From: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - 2006-08-26 13:32:16
|
I'm still building Windows EXEs via the Mcmillan installer that I set-up quite a while ago (I'll get standaloneBuilder one of these days!) and I still use that old debugging technique, the print statement, all the time. For some reason I had assumed that switching the standalone config file from console to no-console would make no difference if I left the print statements in place, i.e. the standard output would just get directed to NULL or something. However I just tracked down a problem I was having to the fact that with the console switched off but the printing still active my PythonCard app was stopping halfway through processing a button press and control returning to the event loop. The issue would not affect every PC the application was running on but when it happened it was always in the same place. I presume printing to no console is therefore "a bad thing" and the standalone build mechanism isn't capable of redirecting standard output with no console - could anyone confirm this? It also makes me wonder what happens to standard error output, e.g. exceptions. Traditionally they get reported to the console - in "non-console mode" could this also trigger issues (presumably in most cases the exception occurring in the first place is probably a bad sign, but sometimes you might be able to recover)? Do I need to make sure that any error output is blocked off as well or logged to a file? I feel a bit of an idiot for taking so long to realize what now seems pretty obvious, but I just wanted to make sure I am now correct and that there isn't something else weird going on with my application and this standard output business is just a red herring. -- XXXXXXXXXXX |