sys.exit call from pythonw.exe gives error

jepler at unpythonic.net jepler at unpythonic.net
Thu Oct 27 12:20:41 EDT 2005


I wrote the following small program:
#-----------------------------------------------------------------------
import sys, Tkinter
t = Tkinter.Tk()
b = Tkinter.Button(command=lambda: sys.exit(0), text="Click to exit")
b.pack()
t.mainloop()
#-----------------------------------------------------------------------
and ran it with pythonw.exe from python 2.3.4 on a machine running Windows NT
4.0.  (I actually used Start > Run and entered "d:\python23\pythonw.exe x:\app.pyw"
rather than clicking on the app.pyw icon, but this shouldn't make a difference)

When the button is clicked, the application exits without giving any error like
the one you described.

Jeff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20051027/0b1c97de/attachment.sig>


More information about the Python-list mailing list