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')