Re: Copy functio in imaplib

2005-02-22 Thread Max M
Raghul wrote: What is message_set in the python documentation for copy in imaplib? Is they referring message set to the particular mail message in my inbox or something else. copy( message_set, new_mailbox) Copy message_set messages onto end of new_mailbox. A sequence of numbers encoded as

Re: functions and named keyword arguments

2005-02-22 Thread Fuzzyman
Diez B. Roggisch wrote: Sorry if this is a duplicate - I use the google interface and sometiems it screws up (not showing stuff you've posted *or* not posting it). Before you ask it's because at work I have no NNTP and *heavily* restricted http. It is - so I requote my answer :) Im

Execute a list

2005-02-22 Thread Groleo Marius
Hi. How can i execute a string in python? For example if I have the variable s, defined below s = 'print hello' How can I execute the code that s keeps inside, considering that the code is correct? -- http://mail.python.org/mailman/listinfo/python-list

Re: display VARCHAR(mysql) and special chars in html

2005-02-22 Thread Radovan Garabik
Jonas Meurer [EMAIL PROTECTED] wrote: hello, my script selects a comment saved as VARCHAR in MySQL and displays it inside an html page. the problem is, that the comment contains several special characters, as mysterious utf-8 hyphens, german umlauts, etc. i could write a function to

Re: NOOB coding help....

2005-02-22 Thread Igorati
Thank you, that does help quit a bit. I am working on the corrections now. To the first poster... don't know what that meant. I thought I made my case understandable. Thank you again. I will work on that. I was attempting to open wade_stoddard... b/c that was my file I was working with, and I was

use python / qt with cygwin

2005-02-22 Thread denis
Hello, Do you know if it is possible to use python + qt bindings in cygwin ? I've looked inside kde / cygwin. There is a package named qt-gcc-3 but I did'nt find the qt bindings for python :/ Is there a way to do that ? Or am I obliged to use tkinter to make user interfaces when I'm with python /

Re: which parser to use

2005-02-22 Thread Jean Brouwers
Check out SimpleParse/mxTextTools. Just an outstanding E/BNF driven parser, very highly recommended. http://simpleparse.sourceforge.net/ /Jean Brouwers PS) See also http://www-128.ibm.com/developerworks/linux/library/l-simple.html

Re: NOOB coding help....

2005-02-22 Thread Igorati
#This program will ask for a user to imput numbers. The numbers will then be calculated #to find the statistical mean, mode, and median. Finallly the user will be asked #if he would like to print out the answers. numbers = [ ] print 'Enter numbers to add to the list. (Enter 0 to quit.)' def

Re: python2.4 generator expression python2.3 list expression

2005-02-22 Thread TZOTZIOY
On Mon, 21 Feb 2005 10:55:05 -0800, rumours say that Bryan [EMAIL PROTECTED] might have written: [I] is to reset the rightmost (less significant) '1' bit of a number (ie change it to '0'). [bryan] i tried c = c - 1 but i'm not getting the least significant or rightmost bit reset to zero. am i

pydoc documentation

2005-02-22 Thread Liat Koski
Hellow all, I need to use pydoc mosule in order to get documentation to programs i made I can't find a good source explaning how to use this module I work on linux OS but this documentation can be made also on my windows OS If anyone knows how to use it, and maybe has some source code he wrote

Re: Mixing Txinter and Pygame

2005-02-22 Thread Eric Brunel
On Tue, 22 Feb 2005 13:17:37 +1300, Tim Knauf [EMAIL PROTECTED] wrote: Hi everyone, I'm glad to have found this list. I've written a small script for my own use which, amongst other things, captures mouse click information from a window containing an image. I used Pygame to manage the image

executea string

2005-02-22 Thread Groleo Marius
I have the folowing code: c=2 e=3 s=12 code.append('funtion (c, e,s)') print \n.join(code) + '\n' The problem is when i call append. The variables s, c, e are not replaced with their value, so in the end i get the result: funtion( c, e, s); The result that i want is : funtion(2,3,12);

Re: Test for structure

2005-02-22 Thread Martin Miller
At the end of his last post, Steve Bethard wrote: That said, I find that in most cases, the better option is to use *args in the original function though. For example: def f(arg): args = aslist(arg) ... f(42) f(['spam', 'eggs', 'ham']) could probably be

Re: python2.4 generator expression python2.3 list expression

2005-02-22 Thread Duncan Booth
Dan Sommers wrote: Seems to work, is there a better way to do this? for c in range( 128 ): even_odd = 0 print '%3d' % c, while c: c = c - 1 even_odd = not even_odd print int( even_odd ) Okay, so your inner loop is only counting to 8, but IMO this is a

Re: Execute a list

2005-02-22 Thread Martin Miller
Here is how to execute code in a string, similar to what was shown in your example: s = 'print hello' exec s hello Hope this helps. -- http://mail.python.org/mailman/listinfo/python-list

Re: subclassing Decimal

2005-02-22 Thread Nick Coghlan
[EMAIL PROTECTED] wrote: yea-though-I-walk-thru-the-valley-of-__new__-I-will-fear-no-super-ly That's beautiful }: Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia ---

Re: Execute a list

2005-02-22 Thread Swaroop C H
Groleo Marius wrote: How can i execute a string in python? How can I execute the code that s keeps inside, considering that the code is correct? Use the exec statement : `exec s` Details at http://www.python.org/doc/ref/exec.html Regards, -- Swaroop C H Blog: http://www.swaroopch.info Book:

Open Course on Software System Design and Implementation

2005-02-22 Thread Amir Michail
Hi, I will be teaching a course on software system design and implementation. Like last year, the course will be open meaning that anyone can participate in online discussions -- not only UNSW students. You can find a mind map of topics covered last year here:

pydoc documentation

2005-02-22 Thread Liat Koski
Hellow all, I need to use pydoc mosule in order to get documentation to programs i made I can't find a good source explaning how to use this module I work on linux OS but this documentation can be made also on my windows OS If anyone knows how to use it, and maybe has some source code

Re: Problem with the sort() function

2005-02-22 Thread Nick Coghlan
clementine wrote: Hi, I have an array of arrays in the form of list = [[3,'fork',0.3,1],[2,'fork,0.1,2],[3,'exec',0.2,2]] The in-built sort(),list.sort() sorts on the first element, if the first elts are equal then it sorts on the second elt and so on...But i really dont want to search on the

Re: NOOB coding help....

2005-02-22 Thread Brian van den Broek
Igorati said unto the world upon 2005-02-22 03:51: #This program will ask for a user to imput numbers. The numbers will then be calculated #to find the statistical mean, mode, and median. Finallly the user will be asked #if he would like to print out the answers. numbers = [ ] print 'Enter

Memory Based File Objects

2005-02-22 Thread michael
Hi there, I am using the Python Image package to do some Image conversion. I have a pgm Image and this must be converted to a 1 Bits / Sample Tiff Image. There for I am using Image.save (lala.tiff). *hm* A Tiff Image opt. consists of several pages so I am thinking about using the pytiff package

Re: Accessing files installed with distutils

2005-02-22 Thread Leif K-Brooks
Frans Englich wrote: This is silly. How do I access data files I've installed with distutils? In a portable, generic way, I want to find out what is the following path on most systems: /usr/local/lib/python2.4/lib/site-packages/foo/bar.txt Assuming your module is also in site-packages/foo, I

Re: executea string

2005-02-22 Thread Arjen Dijkstra
Groleo Marius wrote: I have the folowing code: c=2 e=3 s=12 code.append('funtion (c, e,s)') print \n.join(code) + '\n' The problem is when i call append. The variables s, c, e are not replaced with their value, so in the end i get the result: funtion( c, e, s); The result that i want is :

Re: pydoc documentation

2005-02-22 Thread Michele Simionato
$ pydoc -g M.S. -- http://mail.python.org/mailman/listinfo/python-list

Re: how can I make this script shorter?

2005-02-22 Thread TZOTZIOY
On Tue, 22 Feb 2005 00:34:39 -0800, rumours say that Lowell Kirsh [EMAIL PROTECTED] might have written: I have a script which I use to find all duplicates of files within a given directory and all its subdirectories. It seems like it's longer than it needs to be but I can't figure out how to

Re: Memory Based File Objects

2005-02-22 Thread Fuzzyman
Quick reply... check out the StringIO module Regards, Fuzzy http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: Memory Based File Objects

2005-02-22 Thread TZOTZIOY
On 22 Feb 2005 02:06:52 -0800, rumours say that [EMAIL PROTECTED] (michael) might have written: snip of unimportant image manipulation The Image Documentation says that file object just has to implement seek, tell and write. Does anybody have an example how to do that or maybe a snipplet for an

Re: How to write a ping client

2005-02-22 Thread Harlin
whoa... this is not in the standard library, is it? I never knew this was out there. Thanks! Please use your powers for good (the one about halting production on teenage sex comedies :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Test for structure

2005-02-22 Thread Martin Miller
Ooops. I left out an * on a statement in the new aslist() function. I should have written: def aslist(*args): return list(*args) # corrected def f(arg): args = aslist(arg) ... Sorry, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: recommended way of generating HTML from Python

2005-02-22 Thread paul koelle
Michele Simionato wrote: Also, one could argue that the designer should not get in touch with the HTML, but just play with the CSS. Finally, you can achieve separation between logic and presentation just putting the routines generating the HTML pages in a separate module, no need to use a

Re: Test for structure

2005-02-22 Thread Martin Miller
Nope, that isn't right either, in the sense that it handles all the cases properly, including single string vs list of strings'. Guess this overly simplistic aslist() does not work after. I should have been more suspicious and cautious before posting. Sorry. Martin --

Delivery reports about your e-mail

2005-02-22 Thread The Post Office
Your message was undeliverable due to the following reason: Your message was not delivered because the destination server was not reachable within the allowed queue period. The amount of time a message is queued before it is returned depends on local configura- tion parameters. Most likely there

how can I make this script shorter?

2005-02-22 Thread John Machin
Lowell Kirsh wrote: I have a script which I use to find all duplicates of files within a given directory and all its subdirectories. It seems like it's longer than it needs to be but I can't figure out how to shorten it. Perhaps there are some python features or libraries I'm not taking

Re: UTF-8 / German, Scandinavian letters - is it really this difficult?? Linux Windows XP

2005-02-22 Thread Serge Orlov
Mike Dee wrote: [snip wrestling with byte strings] In addition to Martin reply I just want to add two notes: 1. Interactive console in python 2.3 has a bug that was fixed in 2.4, so you can't enter unicode strings at the prompt: C:\Python24python.exe a=u'' a u'\u0430\u0431\u0432'

imaplib.error: command COPY illegal in state AUTH

2005-02-22 Thread Raghul
I am getting this error while copying n number of messages to the folder using imaplib.What to do to copy n number of folders in mail The error i got is imaplib.error: command COPY illegal in state AUTH I am executing the lines for i in alluids: print i print

RE: pydoc documentation- referred to Michele answer

2005-02-22 Thread Liat Koski
Hellow Michele, This systax is working only with bulid in modules, like 'sys' for example But not for personal programs. Am i wrong?? Can you please send me some syntax example you have? cause i'm getting syntax error that i don't know how to solve Thanks Liat -Original Message- From:

Re: python2.4 generator expression python2.3 list expression

2005-02-22 Thread Dan Sommers
On 22 Feb 2005 09:14:50 GMT, Duncan Booth [EMAIL PROTECTED] wrote: Here's yet another way to achieve the same results. This version doesn't iterate over any bits at all: import operator parity = [ False ] for i in range(7): parity += map(operator.not_, parity) Very clever! :-)

Re: Problem with the sort() function

2005-02-22 Thread Sion Arrowsmith
clementine [EMAIL PROTECTED] wrote: Thanx Nick...I forgot to mention im using python 2.2 and along with a host of other things it doesnt seem to have the enumarate built in function :(:(:(...is it possible to replace it by something else? I dont think simulating it will be feasible Here's one

Sequence of empty lists

2005-02-22 Thread JP. Baker
I give up (and have prepared myself for replies telling me which search strings to use on Google etc)! How *should* I create a sequence of N empty lists (buckets)? I obviously can't use a = [[]]*N and I have found various solutions and am currently using a = map(lambda x: [], range(N)) but

Re: NOOB coding help....

2005-02-22 Thread bruno modulix
Igorati wrote: #This program will ask for a user to imput numbers. The numbers will then be calculated #to find the statistical mean, mode, and median. Finallly the user will be asked #if he would like to print out the answers. numbers = [ ] print 'Enter numbers to add to the list. (Enter 0 to

Re: UTF-8 / German, Scandinavian letters - is it really this difficult?? Linux Windows XP

2005-02-22 Thread Mariano Draghi
Hace mucho tiempo en una galaxia muy, muy lejana, Mike Dee escribió: A very very basic UTF-8 question that's driving me nuts: If I have this in the beginning of my Python script in Linux: #!/usr/bin/env python # -*- coding: UTF-8 -*- should I - or should I not - be able to use non-ASCII

Re: which parser to use

2005-02-22 Thread Miki Tebeka
Hello E, I'm building something that requires parsing a rather complex language. I'd like to do the whole application, including the lex/parse phase, in Python (for development/debug speed), and only move parts of it to a compiled language if execution speed absolutely dictates. So, what i'm

Re: Sequence of empty lists

2005-02-22 Thread Diez B. Roggisch
seq = [[] for i in xrange(10)] -- Regards, Diez B. Roggisch -- http://mail.python.org/mailman/listinfo/python-list

Re: pydoc documentation- referred to Michele answer

2005-02-22 Thread Michele Simionato
It works for any module in your path, including your current directory. Supposer you have /home/myname/mymodule.py do the following: $ cd /home/myname $ pydoc -g open the browser and you will see the documentation for mymodule.py just below the documentation for the builtin modules.

Creating Button arrays with different commands using Tkinter

2005-02-22 Thread Harlin
I have an array of Appnames. Let's say they are 'Monkeys', 'Cats', 'Birds'. I would like create a button array with these: ---Start Code--- # Constructing and displaying buttons for a in Appnames: Button(root, text=a, command=lambda:self.OpenFile(a)).pack() # Somewhere else I have this

Re: UTF-8 / German, Scandinavian letters - is it really this difficult?? Linux Windows XP

2005-02-22 Thread Fuzzyman
Mike Dee wrote: A very very basic UTF-8 question that's driving me nuts: If I have this in the beginning of my Python script in Linux: #!/usr/bin/env python # -*- coding: UTF-8 -*- should I - or should I not - be able to use non-ASCII characters in strings and in Tk GUI button labels and

serial port server cnhd38

2005-02-22 Thread per . bergstrom
To whom it may concern, The serial port server 'cnhd38' has been terminated (on who's initiative, I don't know). It affects the users of the (at least) following nodes: cnhd36, cnhd44, cnhd45, cnhd46, cnhd47. The new terminal server to use is called 'msp-t01'. The port numbers that are of interest

Re: How to write a ping client

2005-02-22 Thread Peter Hansen
Harlin wrote: whoa... this is not in the standard library, is it? I never knew this was out there. Thanks! You mean, Google? -- http://mail.python.org/mailman/listinfo/python-list

Re: UTF-8 / German, Scandinavian letters - is it really this difficult?? Linux Windows XP

2005-02-22 Thread Max M
Fuzzyman wrote: Mike Dee wrote: #!/usr/bin/env python # -*- coding: UTF-8 -*- This will mean string literals in your source code will be encoded as UTF8 - if you handle them with normal string operations you might get funny results. It means that you don't have to explicitely set the encoding on

Re: executea string

2005-02-22 Thread Cyril BAZIN
c=2 e=3 s=12 code.append('funtion (c, e,s)') print \n.join(code) + '\n' Hello, You could try this: --- from string import Template code = c=2 e=3 s=12 code.append(Template('function ($c, $e, $s)').substitute(vars())) print \n.join(code) + '\n'

searching pdf files for certain info

2005-02-22 Thread rbt
Not really a Python question... but here goes: Is there a way to read the content of a PDF file and decode it with Python? I'd like to read PDF's, decode them, and then search the data for certain strings. Thanks, rbt -- http://mail.python.org/mailman/listinfo/python-list

Re: searching pdf files for certain info

2005-02-22 Thread Diez B. Roggisch
rbt wrote: Not really a Python question... but here goes: Is there a way to read the content of a PDF file and decode it with Python? I'd like to read PDF's, decode them, and then search the data for certain strings. There is a commercial tool pdflib availabla, that might help. It has a free

Re: Sequence of empty lists

2005-02-22 Thread Paul Rubin
[EMAIL PROTECTED] (JP. Baker) writes: How *should* I create a sequence of N empty lists (buckets)? a = [[] for i in xrange(N)] -- http://mail.python.org/mailman/listinfo/python-list

'modal dialogs' with Tkinter

2005-02-22 Thread Sean McIlroy
I'd like to have a function f such that, when f is invoked, a Tk window w is presented in which a number of variables can be modified, and f returns the values that are indicated by the relevant menus/checkbuttons/etc at the time w gets closed. I've tried various ways of doing this, without

Re: Problem with the sort() function

2005-02-22 Thread Fuzzyman
Sion Arrowsmith wrote: clementine [EMAIL PROTECTED] wrote: Thanx Nick...I forgot to mention im using python 2.2 and along with a host of other things it doesnt seem to have the enumarate built in function :(:(:(...is it possible to replace it by something else? I dont think simulating it

Re: Flow chart (function tree) cross references

2005-02-22 Thread Toby Dickenson
On Tuesday 22 February 2005 13:27, qwweeeit wrote: Does someone knows something about function tree generation and cross references? for trees of *module* dependencies: http://www.tarind.com/depgraph.html -- Toby Dickenson -- http://mail.python.org/mailman/listinfo/python-list

problem with PythonCard - wxPython - _core.py - class point - __getitem__

2005-02-22 Thread It's me
I've built a Python application using PythonCard 1.9 and Python 2.3 running under Windows XP. Everything works except that when I use the keyboard instead of the mouse to do certain operations in a data entry field (like Shift-Home), the program stops at line 1014 of

Re: 'modal dialogs' with Tkinter

2005-02-22 Thread Eric Brunel
On 22 Feb 2005 06:03:14 -0800, Sean McIlroy [EMAIL PROTECTED] wrote: I'd like to have a function f such that, when f is invoked, a Tk window w is presented in which a number of variables can be modified, and f returns the values that are indicated by the relevant menus/checkbuttons/etc at the time

Re: UTF-8 / German, Scandinavian letters - is it really this difficult?? Linux Windows XP

2005-02-22 Thread Duncan Booth
Max M wrote: And this string will automatically be utf-8 encoded: st = 'æøå' So you should be able to convert it to unicode without giving an encoding: ust = unicode(st) No. Strings have no knowledge of their encoding. As you describe the string will be utf-8 encoded, but you

Flow chart (function tree) cross references

2005-02-22 Thread qwweeeit
Hi all, I am developing in Python (as a GUI I choosed Qt). To increase my expertise, besides reading manuals tutorials, I am studying a big program developed in the language of my choice, and related with my project (to develop a card game). For that reason I choosed PySol (also if the GUI part

Re: searching pdf files for certain info

2005-02-22 Thread Andreas Lobinger
Aloha, rbt wrote: Not really a Python question... but here goes: Is there a way to read the content of a PDF file and decode it with Python? I'd like to read PDF's, decode them, and then search the data for certain strings. First of all,

Re: UTF-8 / German, Scandinavian letters - is it really this difficult?? Linux Windows XP

2005-02-22 Thread Fuzzyman
Max M wrote: Fuzzyman wrote: Mike Dee wrote: #!/usr/bin/env python # -*- coding: UTF-8 -*- This will mean string literals in your source code will be encoded as UTF8 - if you handle them with normal string operations you might get funny results. It means that you don't have to

Re: searching pdf files for certain info

2005-02-22 Thread rbt
Andreas Lobinger wrote: Aloha, rbt wrote: Not really a Python question... but here goes: Is there a way to read the content of a PDF file and decode it with Python? I'd like to read PDF's, decode them, and then search the data for certain strings. First of all,

Re: UTF-8 / German, Scandinavian letters - is it really this difficult?? Linux Windows XP

2005-02-22 Thread Paul Boddie
Mike Dee [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... A very very basic UTF-8 question that's driving me nuts: If I have this in the beginning of my Python script in Linux: #!/usr/bin/env python # -*- coding: UTF-8 -*- should I - or should I not - be able to use

Re: Problem with the sort() function

2005-02-22 Thread Scott David Daniels
Nick Coghlan wrote: def mysort(iterable, cmp=None, key=None, reverse=False): return a sorted copy of its input if sys.version_info = (2,4): return sorted(iterable, cmp, key, reverse) seq = list(iterable) if reverse: seq.reverse()# preserve stability if

Re: Copy functio in imaplib

2005-02-22 Thread Grant Edwards
On 2005-02-22, Raghul [EMAIL PROTECTED] wrote: What is message_set in the python documentation for copy in imaplib? It's a list of message numbers. The ones returned by a SEARCH command. Is they referring message set to the particular mail message in my inbox or something else. ? Have you

Re: searching pdf files for certain info

2005-02-22 Thread rbt
Andreas Lobinger wrote: Aloha, rbt wrote: Thanks guys... what if I convert it to PS via printing it to a file or something? Would that make it easier to work with? Not really... The classical PS Drivers (f.e. Acroread4-Unix print- ps) simply define the pdf graphics and text operators as PS

Re: imaplib.error: command COPY illegal in state AUTH

2005-02-22 Thread Grant Edwards
On 2005-02-22, Raghul [EMAIL PROTECTED] wrote: I am getting this error while copying n number of messages to the folder using imaplib.What to do to copy n number of folders in mail The error i got is imaplib.error: command COPY illegal in state AUTH That means you haven't logged in yet.

Re: pydoc documentation- referred to Michele answer

2005-02-22 Thread Scott David Daniels
Liat Koski wrote: Hellow Michele, This systax is working only with bulid in modules, like 'sys' for example But not for personal programs. Am i wrong?? Can you please send me some syntax example you have? cause i'm getting syntax error that i don't know how to solve Thanks Liat Consider this:

Re: 'modal dialogs' with Tkinter

2005-02-22 Thread Fredrik Lundh
Sean McIlroy wrote: I'd like to have a function f such that, when f is invoked, a Tk window w is presented in which a number of variables can be modified, and f returns the values that are indicated by the relevant menus/checkbuttons/etc at the time w gets closed. I've tried various ways of

Re: searching pdf files for certain info

2005-02-22 Thread Tom Willis
I tried that for something not python related and I was getting sporadic spaces everywhere. I am assuming this is not the case in your experience? On Tue, 22 Feb 2005 10:45:09 -0500, rbt [EMAIL PROTECTED] wrote: Andreas Lobinger wrote: Aloha, rbt wrote: Thanks guys... what if I

Re: Creating Button arrays with different commands using Tkinter

2005-02-22 Thread Fredrik Lundh
Harlin [EMAIL PROTECTED] wrote I have an array of Appnames. Let's say they are 'Monkeys', 'Cats', 'Birds'. I would like create a button array with these: ---Start Code--- # Constructing and displaying buttons for a in Appnames: Button(root, text=a,

Re: Problem with the sort() function

2005-02-22 Thread Duncan Booth
Scott David Daniels wrote: if sys.version_info (2, 4): def sorted(iterable, cmp=None, key=None, reverse=False): return a sorted copy of its input seq = list(iterable) if reverse: seq.reverse()# preserve stability

Problem with minidom and special chars in HTML

2005-02-22 Thread Horst Gutmann
Hi :-) I currently have quite a big problem with minidom and special chars (for example uuml;) in HTML. Let's say I have following input file: -- ?xml version=1.0? !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01//EN

Re: Python UPS / FedEx Shipping Module

2005-02-22 Thread Aahz
In article [EMAIL PROTECTED], Gabriel Cooper [EMAIL PROTECTED] wrote: I've made UPS and FedEx shipping rate request modules in python using XML. Is there an interest in putting this on the web? Yes! My company has some similar software, and I may be able to get permission to combine our work.

Re: searching pdf files for certain info

2005-02-22 Thread rbt
Tom Willis wrote: I tried that for something not python related and I was getting sporadic spaces everywhere. I am assuming this is not the case in your experience? On Tue, 22 Feb 2005 10:45:09 -0500, rbt [EMAIL PROTECTED] wrote: Andreas Lobinger wrote: Aloha, rbt wrote: Thanks guys... what if I

Sizers VS window size

2005-02-22 Thread Deltones
Hi, I'm trying to understand one of the wiki wxPython tutorial, and I must admit I`m a bit baffled by sizers. If I run the following relevant piece of code, I get the result I expect, i.e a 800x600 window being opened (sorry for the formatting): objFrame = MainWindow(None, -1, Small Editor,

Re: UTF-8 / German, Scandinavian letters - is it really this difficult?? Linux Windows XP

2005-02-22 Thread Serge Orlov
Paul Boddie wrote: One side-effect of the big push to UTF-8 amongst the Linux distribution vendors/maintainers is the evasion of issues such as filesystem encodings and real Unicode at the system level. In Python, when you have a Unicode object, you are dealing with idealised sequences of

Re: Problem with minidom and special chars in HTML

2005-02-22 Thread Fredrik Lundh
Horst Gutmann wrote: I currently have quite a big problem with minidom and special chars (for example uuml;) in HTML. Let's say I have following input file: -- ?xml version=1.0? !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01//EN

Re: Sizers VS window size

2005-02-22 Thread Brian Victor
Deltones wrote: However, if I add this part from the tutorial, I get a much smaller window. Why is there an interference with the result I want when adding the sizer code? [snip] self.sizer.Fit(self) As noted in the the docs for Fit(): Tell the sizer to resize the window to match the sizer's

Re: display VARCHAR(mysql) and special chars in html

2005-02-22 Thread Jonas Meurer
On 22/02/2005 Radovan Garabik wrote: i could write a function to parse the comment and substitute special chars with the relevant html code, but maybe this already exists in some module? just make the page in utf-8, and you'll save you a lot of troubles ok, how do i do this? simply add a

Comm. between Python and PHP

2005-02-22 Thread Nils Emil P.Larsen
Hello I'm building a daemon in Python. It will measure and control some physical devices on a serial bus. Since it is a daemon, it will never terminate and I can't interfere with the regulation of the devices by using command line parameters. I want to control the regulation by using a Internet

Re: Comm. between Python and PHP

2005-02-22 Thread Peter Hansen
Nils Emil P. Larsen wrote: I'm building a daemon in Python. It will measure and control some physical devices on a serial bus. Since it is a daemon, it will never terminate and I can't interfere with the regulation of the devices by using command line parameters. I want to control the regulation

Re: Problem with minidom and special chars in HTML

2005-02-22 Thread Horst Gutmann
Fredrik Lundh wrote: umm. doesn't that doctype point to an SGML DTD? even if minidom did fetch external DTD's (I don't think it does), it would probably choke on that DTD. running your documents through tidy -asxml -numeric before parsing them as XML might be a good idea...

Re: 'modal dialogs' with Tkinter

2005-02-22 Thread Birdman
You could try using: EasyGUIhttp://www.ferg.org/easygui/ EasyGUI is different from other GUIs in that EasyGUI is NOT event-driven. It allows you to program in a traditional linear fashion, and to put up dialogs for simple input and output when you need to. If you have not yet learned the

Re: Problem with the sort() function

2005-02-22 Thread Steven Bethard
Fuzzyman wrote: Iterators are available in python 2.2 class enumerate: def __init__(self, inlist): self.inlist = inlist self.index = 0 def next(self): if self.index = len(self.inlist): raise StopIteration thisone = self.inlist[self.index] self.index

Re: Problem with the sort() function

2005-02-22 Thread Steven Bethard
Scott David Daniels wrote: or even (if you can't be bothered to look up when features happened): try: test = enumerate except NameError: def enumerate(iterable): ... try: test = sorted except NameError: def sorted(iterable, cmp=None,

a wrapper to invoke functions using argument

2005-02-22 Thread les_ander
Hi, support I have a library of function, called mylib.py, in which there are 2 functions 'f1' and 'f2' (1 arguments in either one); Now I want to write a wrapper that will invoke f1 or f2 using the command line argument. So for example, I want to write a function call.py and invoke it as python

Re: Problem with minidom and special chars in HTML

2005-02-22 Thread Jarek Zgoda
Horst Gutmann napisa(a): I currently have quite a big problem with minidom and special chars (for example uuml;) in HTML. Let's say I have following input file: -- ?xml version=1.0? !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01//EN

PythonCard and Py2Exe

2005-02-22 Thread PipedreamerGrey
I'm trying to create a standalone version (.exe) of PythonCard's Custdb sample using Py2Exe version 0.5.0. Everytime I attempt to compile the program, I get an error during compilation. This is the exact code I'm using in the setup file: from distutils.core import setup import py2exe setup(

Re: Mixing Txinter and Pygame

2005-02-22 Thread Tim Knauf
Eric Brunel wrote: Well, since these are just exceptions, a simple try... except block would be fine, and you can even figure out the reason for the exception. Here is what I'd do: - when you create your Tkinter main window, initialize an attribute that you'll use to see if the application has

how to interrupt time.sleep ?

2005-02-22 Thread BOOGIEMAN
I have line time.sleep(60) in my code How do I cancel waiting 60 seconds if I want to continue with program imediately ? Like Press some button if you don't want to wait If it can't be canceled what's the other solution to wait certain time/or press any button to continue problem ? --

Grid issues

2005-02-22 Thread scottmallory
Greetings, I am new to Python...and I am having some difficulty updating a grid (wx.grid.PyGridTableBase). Everything works just fine (adding /deleting/ resizing rows, cols) except updating individual cells. I am using the grids to display data from a database (which is working fine), I am trying

PythonCard and Py2Exe

2005-02-22 Thread PipedreamerGrey
I'm trying to create a standalone version (.exe) of PythonCard's Custdb sample using Py2Exe version 0.5.0. Everytime I attempt to compile the program, I get an error during compilation. This is the exact code I'm using in the setup file: from distutils.core import setup import py2exe setup(

Py2Exe Import Error

2005-02-22 Thread PipedreamerGrey
I'm trying to create a standalone version (.exe) of PythonCard's Custdb sample using Py2Exe version 0.5.0. Everytime I attempt to compile the program, I get an error during compilation. This is the exact code I'm using in the setup file: from distutils.core import setup import py2exe setup(

Re: intersection of 2 list of pairs

2005-02-22 Thread bearophileHUGS
The use of frozenset can okay when sub-sequences are longer, but for this problem it's slow, and anyway there are situations of repeated data like this that have to be considered: frozenset( ('a', 'a') ) == frozenset(['a']) For Py2.4 the faster and better solution seems Peter Otten one. James

Re: how to interrupt time.sleep ?

2005-02-22 Thread Peter Hansen
BOOGIEMAN wrote: I have line time.sleep(60) in my code How do I cancel waiting 60 seconds if I want to continue with program imediately? Like Press some button if you don't want to wait You cannot. If it can't be canceled what's the other solution to wait certain time/or press any button to

Re: display VARCHAR(mysql) and special chars in html

2005-02-22 Thread Steve Holden
Jonas Meurer wrote: On 22/02/2005 Radovan Garabik wrote: i could write a function to parse the comment and substitute special chars with the relevant html code, but maybe this already exists in some module? just make the page in utf-8, and you'll save you a lot of troubles ok, how do i do this?

Re: How to write a ping client

2005-02-22 Thread Martin Bless
On 21 Feb 2005 18:35:06 -0800, Harlin [EMAIL PROTECTED] wrote: Is there a way to write a ping client? I would like to be able to write a small ping client so that I dont have to do os.system('ping args') I once followed the same line and used a py module by Jeremy Hylton if I remember correctly.

  1   2   >