sys.exit call from pythonw.exe gives error

Jo Schambach jschamba at
Thu Oct 27 16:50:21 CEST 2005

I wrote a python GUI with tkInter and installed it on a windows machine
with the .pyw extension, so it will be executed from pythonw.exe instead
of python.exe, since I didn't want the console window to appear.
My application exits with a call to sys.exit. However, when this call is
executed under pythonw.exe I get an error popup window with the
following messeage:

---- start quote ----
Microsoft Visual C++ Runtime Library
Runtime Error!
Program: C:\Python24\pythonw.exe

This application has requested the Runtime to terminate in an unusual way.
Please contact the application support team for more information
---- end quote ----

What am I doint wrong here?


Dr Joachim Schambach
The University of Texas at Austin
Department of Physics
1 University Station C1600
Austin, Texas 78712-0264, USA
Phone: (512) 471-1303; FAX: (814) 295-5111
e-mail: jschamba at

More information about the Python-list mailing list