I would like to know whether my GUI program is being run under python or pythonw. I would like to know this so I can redirect stderr when their is no console window (pythonw) otherwise leave it spitting to the console window (python). This is because I debug using python while the customer release build uses pythonw. I can see their is sys.executable but a google search turned up various discussions on what this actually means (e.g when run under an integrated exe file - which we do for our release builds). Leith Bade
-- http://mail.python.org/mailman/listinfo/python-list