From: Thomas H. <th...@py...> - 2006-06-07 19:27:29
|
Michael Hipp wrote: > Is there any way from within a program compiled by py2exe that you can detect > whether you are running as a console or windows application? > > That is, whether you were compiled with either: > > windows=["myprog.py"] > -or- > console=["myprog.py"] > You can examine the sys.frozen attribute which is set when a program frozen by py2exe runs. For a console app, this is 'console_exe', for a windows app, it is 'windows_exe'. Thomas |