Pythonw.exe exits prematurely

Brainsludge brainsludge at
Wed Oct 24 00:01:50 CEST 2007


I am running WinXP SP2 with Python 2.5.1 and encountered the following

I wrote a script that logs into my mail server, and checks for new
messages every 20 seconds. When a new message is found, it displays a
Windows tool tip and prints a line to console indicating a new

When I run the script with python.exe (console), the script runs fine
and checks for new messages in perpetuity (as it should). However,
when I run the script with pythonw.exe (no console), the script
prematurely exits after 10 or 15 minutes. For those 15 minutes, it
works as it should, displaying tool tips when new messages arrive.
Furthermore, when it exits prematurely, it appears to be exiting
gracefully (I have an exit routine that logs out of the mail server
and cleans up).

Does anyone know why this might be the case? The lines printed to
console are purely for diagnostic purposes. Otherwise, the two
processes should be identical.


More information about the Python-list mailing list