def wait_at_exit():
"""\
Wait at exit, but only if console window was opened separately.
"""
if not is_separate_console_window():
return
import atexit
import msvcrt
def wait_at_end():
"""Print a message and wait for a key"""
sys.stderr.flush()
sys.stdout.write('\n[Press any key]\n')
sys.stdout.flush()
msvcrt.getch()
atexit.register(wait_at_end)
评论列表
文章目录