what does 0 mean in MyApp(0)
lycka at carmen.se
Tue Oct 4 14:18:33 CEST 2005
> Alterbnative 2 is simple and useful, so that's why everybody use that
Everybody doesn't... Particularly in Windows, it's common that
people make a .pyw-file, and then you don't see any console,
or otherwise they double-click on a .py-file, and if the app
dies with an error, they'll never get a chance to read the
traceback (unless they have a horribly slow computer). Even
worse, it they use command.com as their shell (default on
MS DOS derivates such as Windows ME) copying text from the
shell doesn't work very well, even if the shell didn't close.
Getting all printouts, tracebacks etc into a file is very
convenient during development. In a decent development
environment, you're likely to have a window open where you
do "tail -f" on the file.
Even in production, it's a good thing if it's at least possible
to enable output to a debug file. I've had that as a command
line switch, and asked users to turn that on and mail me the
resulting log file as they reproduced a buggy behaviour.
More information about the Python-list