def waitForKeyPress(): """Force the DOS Prompt window to stay open so the user gets a chance to see what's wrong.""" import msvcrt print('(Hit any key to exit)', file=sys.stderr) while not msvcrt.kbhit(): pass