Re: [Tutor] (no subject). Ord and Chr query

2005-05-27 Thread Ben Vinger
--- John Carmona <[EMAIL PROTECTED]> wrote: > Ben I could not get your script working indentation? ___ Can't remember an address in your address book? Enter the first few letters and Address AutoComplete will automatic

Re: [Tutor] (no subject). Ord and Chr query

2005-05-27 Thread John Carmona
To all that have answered, many thanks. I will check the tutorials that have been pointed out to me. I have also got the Dive into Python printed and I will start reading that one too pretty soon. I am off on holiday starting Tuesday so I won't have the time to study too much in the next couple

[Tutor] all methods in a module

2005-05-27 Thread Johan Meskens CS3 jmcs3
hello >>> import random >>> print random.setstate.__doc__ Restore internal state from object returned by getstate(). my question is " how can i loop through all the methods in a module and print out their '__doc__' content ? >>> for d in dir( random ): print random.???d???.__doc_

Re: [Tutor] all methods in a module

2005-05-27 Thread Kent Johnson
Johan Meskens CS3 jmcs3 wrote: > my question is > " how can i loop through all the methods in a module > and print out their '__doc__' content ? > > for d in dir( random ): > > print random.???d???.__doc__ print getattr(random, d).__doc__ in general you should be prepared

Re: [Tutor] all methods in a module

2005-05-27 Thread Ewald Ertl
Hi! I've the following solution: >>> for d in [ "random." + d for d in dir(random)]: ... if callable( eval(d) ): ... print "%30s :\n\n %s" % ( d, eval( "%s.__doc__" % ( d))) ... random.Random : Random number generator base class used by bound module function

Re: [Tutor] all methods in a module

2005-05-27 Thread Johan Meskens CS3 jmcs3
Johan Meskens CS3 jmcs3 wrote: > hello > > >>> import random > >>> print random.setstate.__doc__ > Restore internal state from object returned by getstate(). > > > my question is > " how can i loop through all the methods in a module > and print out their '__doc__' content ? > > >>> for

Re: [Tutor] all methods in a module

2005-05-27 Thread Wolfram Kraus
Johan Meskens CS3 jmcs3 wrote: > hello > > import random print random.setstate.__doc__ > > Restore internal state from object returned by getstate(). > > > my question is > " how can i loop through all the methods in a module > and print out their '__doc__' content ? > > fo

[Tutor] Eclipse and Member Function Availability

2005-05-27 Thread Gooch, John
I am building a class and using a "main.py" script as the "driver" for testing. Where I am having problems is that the class is defined in another file ( say the class is "MyClass" and the file is "MyClass.py" that I am importing as a module. The problem itself ( not a major one ), is that when usi

[Tutor] Formatted writing to a file

2005-05-27 Thread Mohammad Mohiuddin
I am trying to write to a file multiple times before close. Using the following sequence:   outfile = open(data_file, 'w' ) x=5 while x > 0 x = x - 1 datax is read from a file.   outfile.write('%25s' %datax + "|\n")   This loop will write 5 lines at column position 25. I later come back to the sam

Re: [Tutor] all methods in a module

2005-05-27 Thread Bob Gailer
At 04:46 AM 5/27/2005, Johan Meskens CS3 jmcs3 wrote: hello    >>> import random >>> print random.setstate.__doc__ Restore internal state from object returned by getstate(). my question is " how can i loop through all the methods in a module   and print out their '__doc__' content ? >>> for d

[Tutor] two windows

2005-05-27 Thread EUGENE ASTLEY
I asked for help on my problem but unfortunately now help yet. I am trying to put up instructions for a board game and then have the person read and then proceed onto the game. The following is what I have that displays the instructions just fine but will not let the game proceed on to the

Re: [Tutor] all methods in a module

2005-05-27 Thread Kent Johnson
Bob Gailer wrote: >> my question is >> " how can i loop through all the methods in a module >> and print out their '__doc__' content ? >> >> >>> for d in dir( random ): >> print random.???d???.__doc__ > > > The prior responses use dir(), requiring then the use of eval() to get > the ob

Re: [Tutor] Formatted writing to a file

2005-05-27 Thread Lee Harr
>Content-Type: text/html; format=flowed > > [...] What a mess. You should to post to the list in plain text. Someone might take the time to weed through that for your question, but you will get a lot more help and a lot sooner if you just configure your mailer to send plain text. __

Re: [Tutor] Eclipse and Member Function Availability

2005-05-27 Thread Lee Harr
>using autocomplete feature within Eclipse Are you using pydev? http://pydev.sourceforge.net/ Their website says: """ New Release: 0.9.3!! Wohooo!! Code completion Rules! Check it out! """ So apparently this is something they are actively working on. You may have an old version, or you may have

[Tutor] Any Python interface to USPTO web site?

2005-05-27 Thread Terry Carroll
I have the need to run periodic searches on the US Patent and Trademark Office website, www.uspto.gov. Before I reinvent the wheel, I thought I'd check to see if anyone knew of such a beast. For instance, It's like to be able to pass an argument like one of these: an/"dis corporation" in/n

Re: [Tutor] Formatted writing to a file

2005-05-27 Thread Alan G
> 1. how can I format outfile so i can write multiple lines > and then apend multiple lines later before closing the file? I think you mean add a new column to the existing lines? try something like line = line + '%25s' % newdata > 2. how can I make data formatting string '%25s' intiger (in thi

Re: [Tutor] Help: wget-- how does it work?

2005-05-27 Thread Terry Carroll
On Fri, 27 May 2005, Aaron Elbaz wrote: > First, I found the progress bar class from aspn > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/168639 > > This could be used to simulate wgets progress bar. What I'm trying to > figure out now is how one would stat a file as it was being downlo

Re: [Tutor] Formatted writing to a file

2005-05-27 Thread Bob Gailer
1. how can I format outfile so i can write multiple lines and then apend multiple lines later before closing the file? It sounds like you want to update the file in successive passes. This is hard or impossible. Your best bet is to read one file and write another.  2. how can I make data formatti

[Tutor] Help: wget-- how does it work?

2005-05-27 Thread Aaron Elbaz
One of my favourite unix applications is wget. Thinking how easy (and fun) it might be to implement with pythons excellent librairies has led me to a few questions. First, I found the progress bar class from aspn http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/168639 This could be used t

Re: [Tutor] Help: wget-- how does it work?

2005-05-27 Thread Kent Johnson
Aaron Elbaz wrote: > One of my favourite unix applications is wget. > > This could be used to simulate wgets progress bar. What I'm trying to > figure out now is how one would stat a file as it was being downloaded > so that I can feed information to the progress bar, and what the most > optimal w

[Tutor] increment operator

2005-05-27 Thread Servando Garcia
Hello Is there a increment operator in python similar to c++ like so "SomeVariable++" ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] increment operator

2005-05-27 Thread Lee Cullens
I find the following invaluable - maybe you will also. http://rgruet.free.fr/PQR24/PQR2.4.html Lee C On May 27, 2005, at 11:25 PM, Servando Garcia wrote: > Hello > Is there a increment operator in python similar to c++ > like so "SomeVariable++" > > __

Re: [Tutor] increment operator

2005-05-27 Thread Bob Gailer
At 08:25 PM 5/27/2005, Servando Garcia wrote: Is there an increment operator in python similar to c++ like SomeVariable++ No. Closest is SomeVariable += 1. Bob Gailer mailto:[EMAIL PROTECTED] 510 558 3275 home 720 938 2625 cell ___ Tutor maillist -

Re: [Tutor] Formatted writing to a file

2005-05-27 Thread Bob Gailer
At 02:58 PM 5/27/2005, Alan G wrote: > 1. how can I format outfile so i can write multiple lines > and then apend multiple lines later before closing the file? I think you mean add a new column to the existing lines? try something like line = line + '%25s' % newdata > 2. how can I make data forma