Thanks a lot; I didn't know about sys.executable. For the record, IDLE is running pythonw.exe. I won't have a chance to test if this helps till tomorrow, unfortunately.