[英]Executing Python script without hanging terminal
但是不幸的是,以上解决方案对我不起作用。 我需要一种执行Python 3.4.3脚本的方法,在终端关闭时使其运行,并且不要挂在终端上并直接执行。
pi@raspberrypi:/var/www/html/mysite/scripts $ nohup python3 my.script.py &
上面的脚本运行,但是它挂在终端上,在我按CTRL + C
停止它之前,我无法输入任何其他命令。
有没有办法实现这样的事情:
pi@raspberrypi:/var/www/html/mysite/scripts $ nohup python3 my.script.py &
pi@raspberrypi:/var/www/html/mysite/scripts $
(Now I enter more commands, despite the script still running)
希望我提供了足够的信息,希望您能为我提供帮助,谢谢!
根据Google的快速搜索,我发现
start /b python3 my.script.py
用于Windows或
python3 my.script.py &
在lunix(bash)上。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.