[Tutor] Press Enter to quit. Silently maybe.
sierra_mtnview at sbcglobal.net
Wed Mar 24 02:40:39 CET 2010
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 there crept into the finish here.
Yes, no need to fiddle with the finish. Just let it reach the end.
On 3/23/2010 3:08 PM, Steven D'Aprano wrote:
> 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 morning
> expecting that they will all be finished only to discover that one of
> those programs is stupidly sitting them with a "Press any key to quit"
> message, stopping all the rest from running.
> In my opinion, such behaviour should be a shooting offense.
>> 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
>> def finish():
>> print; print "Bye"
>> raw_input('Press Enter to quit')
> What yes/no prompt? How do you select No?
Wayne Watson (Watson Adventures, Prop., Nevada City, CA)
(121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet
Stop the illegal killing of dolphins and porpoises.
Wrest the control of the world's fisheries from Japan.
More information about the Tutor