A Python 2.7 script runs fine on Windows 7 64-bit.
- However the exact same script
myscript.pyw
simply renamed to have a.pyw
extension runs for some time before crashing. It is started by double clicking on the file to run it.
This script uses subprocess
module to run another program, and ctypes
module to check for user idle time in a infinite while
loop.
while True:
try:
runSomeCode()
except Exception(e)
logging.error(e)
Strangely the crashing of the .pyw
file does not cause any errors to be logged to file.
Any ideas what may have happened?