Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/322.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/xpath/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使python程序在后台工作_Python_Background - Fatal编程技术网

如何使python程序在后台工作

如何使python程序在后台工作,python,background,Python,Background,我制作了一个程序,即使我关闭它,它也需要在后台工作 我找不到一个方法来做这件事,接受任何建议。事实上,我对在Windows操作系统中关闭tab后继续运行程序不感兴趣,所以我将在Linux、Ubuntu中解释解决方案 你可以试试这样的东西 nohup filename & 或者类似的 nohup filename > /dev/null 另一个可能帮助您找到解决方案的关键词是deamon,它将很好地解释这一点。请重复并从。在浏览器中搜索“Python后台程序”

我制作了一个程序,即使我关闭它,它也需要在后台工作


我找不到一个方法来做这件事,接受任何建议。

事实上,我对在Windows操作系统中关闭tab后继续运行程序不感兴趣,所以我将在Linux、Ubuntu中解释解决方案

你可以试试这样的东西

nohup filename &
或者类似的

nohup filename > /dev/null
另一个可能帮助您找到解决方案的关键词是
deamon
,它将很好地解释这一点。

请重复并从。在浏览器中搜索“Python后台程序”