Re: [Tutor] Press Enter to quit. Silently maybe.

2010-03-23 Thread Wayne Watson
Win 7. Some time ago, I believe under Tutor, it was suggested when quitting to move the method I described. Ah, I see what happened! I had used this in something of an earlier incarnation of the program when some tkinter code was in use. There was a loop in the code, and the quit code used t

Re: [Tutor] Press Enter to quit. Silently maybe.

2010-03-23 Thread Steven D'Aprano
On Wed, 24 Mar 2010 07:47:40 am Wayne Watson wrote: > I use this code to quit a completed program. What on earth for? If the program is complete, just quit. In my opinion, there is very little worse than setting up a chain of long-running programs to run overnight, then coming back in the morn

Re: [Tutor] Press Enter to quit. Silently maybe.

2010-03-23 Thread Shashwat Anand
run this file (test.py) as: def finish(): print '\n', "bye", '\n' raw_input('Press Enter to quit: ') finish() $python -i test.py A second approach could be: def finish(): import os, subprocess print '\n', "bye", '\n' raw_input('Press Enter to quit: ') subprocess.call('p

Re: [Tutor] Press Enter to quit. Silently maybe.

2010-03-23 Thread bob gailer
On 3/23/2010 4:47 PM, Wayne Watson wrote: I use this code to quit a completed program. If no is selected for the yes/no prompt, warning messages appear in the shell window. What is the yes/no prompt? Is it in your program or is it a feature of IDLE? What are the warning messages? I'm executin

[Tutor] Press Enter to quit. Silently maybe.

2010-03-23 Thread Wayne Watson
I use this code to quit a completed program. If no is selected for the yes/no prompt, warning messages appear in the shell window. I'm executing from IDLE. Is there a way to just return to the >>> prompt there? def finish(): print; print "Bye" print raw_input('Press Enter to quit')

Re: [Tutor] How to add a description to a module

2010-03-23 Thread Hugo Arts
On Tue, Mar 23, 2010 at 8:16 PM, Armstrong, Richard J. wrote: > Hello, > > > > I have a simple question. I have created a module call Newmark.py and it > runs fine, however, I want to add some documentation so that when I type in > the console help(Newmark) it will give a description of the module

[Tutor] How to add a description to a module

2010-03-23 Thread Armstrong, Richard J.
Hello, I have a simple question. I have created a module call Newmark.py and it runs fine, however, I want to add some documentation so that when I type in the console help(Newmark) it will give a description of the module. Any ideas? Thanks, Richie

[Tutor] func headline & module inspect

2010-03-23 Thread spir ☣
Hello, I was looking for a way to get info about func definition, esp. its param list. The aim beeing to reproduce more or less its header line. Found useful hints at http://stackoverflow.com/questions/582056/getting-list-of-parameters-inside-python-function. Example: =

Re: [Tutor] Python help please

2010-03-23 Thread spir ☣
On Mon, 22 Mar 2010 22:31:58 + laura castañeda wrote: > > Hi my name is Laura and im currently trying to solve one of the > challenges in the book: "Python Programming, second edition" by Michael > Dawson... I'm stuck in the 5 chapter because of this challenge, im the > kinda person who dont

[Tutor] parsing pyc files

2010-03-23 Thread prasad rao
Hi . If you want to see what is in a pyc file,just type od pycfile at bash command prompt. You can see only rows of numbers. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tu

Re: [Tutor] parsing pyc files

2010-03-23 Thread Steven D'Aprano
On Tue, 23 Mar 2010 12:16:03 pm Jojo Mwebaze wrote: > Hello Tutor > > I have two problems, any help will be highly appreciated. > > How is possible to trace the all method calls, object instantiations, > variables used in running an experiment dynamically, without putting > print - or log statemen

Re: [Tutor] parsing pyc files

2010-03-23 Thread Steven D'Aprano
On Tue, 23 Mar 2010 10:01:11 pm Jojo Mwebaze wrote: > Researchers at our university are allowed to checkout code from CVS, > make modifications, change variables/parameters and run experiments.. > After experiments are run, results are published. (However we don't > allow them to commit the changes

Re: [Tutor] parsing pyc files

2010-03-23 Thread Jojo Mwebaze
Researchers at our university are allowed to checkout code from CVS, make modifications, change variables/parameters and run experiments.. After experiments are run, results are published. (However we don't allow them to commit the changes, till changes are approved) take an example, two researche

Re: [Tutor] parsing pyc files

2010-03-23 Thread Alan Gauld
"Jojo Mwebaze" wrote How is possible to trace the all method calls, object instantiations, variables used in running an experiment dynamically, without putting print - or log statements in my code? - some sort of provenance! There are several debuggers for Python including the pdb module