如何为你的 Python 脚本添加 "按回车关闭此窗口" 消息
只需在 Python 脚本底部添加此行:
press_enter_close.py
input("Press Enter to close this window...")Python 2 变体:
press_enter_close_py2.py
raw_input("Press Enter to close this window...")Check out similar posts by category:
Python
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow