[EMAIL PROTECTED] (Bengt Richter) writes: > If you have a place in the program where output should never happen > except when you would want a console window to see it in, you can > call AllocConsole [1] safely even in multiple such places, just before > the printing, and the first such call will create the console and hook > up stdout and stderr ready to print. Subsequent calls to AllocConsole > are effectively ignored, so all the output goes to the same console > no matter which code section executed first. IMO this should be > built into at least the windows wpython to trigger at the first > attempt at stdout or stderr output. There could be an option to > override that default and thus ignore stdout/stderr output, but I > think it would be a useful default. Plus it would tell people early > that they had usesless prints going in their wpython programs. >
IMO that would be a nice addition to pythonw.exe, but I have no time to care about this myself. For py2exe, I'm still unsure how debugging output from a frozen gui program should be handled. Thomas -- http://mail.python.org/mailman/listinfo/python-list