[英]How to keep python script running after it has finished?
I am new to this, so I am sure this is a stupid question.我是新手,所以我确信这是一个愚蠢的问题。 Although, I cannot seem to find anything on the web.虽然,我似乎在 web 上找不到任何东西。
How would I keep a script running after it has completed?脚本完成后如何保持运行? for example:例如:
import webbroswer
webbrowser.open_new("google.com")
In this case, How would I keep executing this code (until I want to quit the terminal (or something))?在这种情况下,我将如何继续执行此代码(直到我想退出终端(或其他东西))?
Thanks for any help!谢谢你的帮助!
You can make an loop with condition of a specific key and input in loop.您可以使用特定键的条件进行循环并在循环中输入。 when you enter right key it finish.当你输入右键它完成。
like喜欢
key="something"
while key != "q":
key=str(input())
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.