In GUI applications, Py2exe redirects sys.stderr
to a log file and sys.stdout
to an object that ignores all writes. To avoid the log file, do this in your program at the top of the main module:
import sys
sys.stderr = sys.stdout
Or, let py2exe create a console application by using the console
keyword instead of windows
in setup.py
.