[Tkinter-discuss] Exiting a Tkinter Program-- An Anomaly or two

Wayne Watson sierra_mtnview at sbcglobal.net
Thu Feb 11 05:33:09 CET 2010


I get the small dialog "Do you want to exit altogether?". I press yes. 
The shell and program windows close. If I say no, then I get error 
messages in the shell followed by a command prompt. The program 
continues to operate.

Well, this isn't bad, but it probably changes how I want to print to the 
shell. If I exit this way, the shell closes and the user can't inspect 
the output any further. Probably, I need to print to a text window 
instead. I have no idea if it will close to with the exit. It seems 
likely. If yes,then I need to write the text fo a file.

On 2/10/2010 6:07 PM, Kevin Walzer wrote:
> On 2/10/10 6:14 PM, Wayne Watson wrote:
>>
>> def Quit(self)
>> self.running = False
>> self.master.quit()
>>
>>
>
> If you change self.master.quit() to sys.exit(), what happens?
>
> (Also make sure that "import sys" is somewhere in the code.)
>

-- 
"Crime is way down. War is declining. And that's far from the good 
news." -- Steven Pinker (and other sources) Why is this true, but yet 
the media says otherwise? The media knows very well how to manipulate us 
(see limbic, emotion, $$). -- WTW


More information about the Tkinter-discuss mailing list