Python 获取输入时停止
如何在 Python 中运行循环并对其进行编码以在用户按下按钮(而不是 ctr+c)时停止?
How can I run a loop in Python and code it to stop when the user press a button (not ctr+c)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我遇到了类似的问题,找到了这段代码摘录对我有帮助。
当然,问题是使用诅咒会阻止许多其他事情(例如打印)工作,但有一些方法可以解决这个问题。
I had a similar problem, found this code excerpt that helped me.
The problem of course is that using curses will prevent a lot of other things (like print) from working but there are ways around that.