繁体   English   中英

如何在后台运行我的应用程序 python

[英]How can I run my application in the background python

我想知道即使单击取消按钮,我是否可以在后台运行我的应用程序。 我使用pythonpyqt5中设计应用程序,让我们看看android中的示例,如果我们希望此应用程序在我关闭应用程序后在后台运行,我们使用不同类型的方法运行下面的Runnable代码

Handler mainHandler = new Handler(getMainLooper());
Runnable myRunnable = new Runnable() {
@Override 
public void run() {....} // This is the work to do on the background
};
mainHandler.post(myRunnable);

我想这样做如果我关闭应用程序,应用程序必须在后台运行,并且图标会show hidden icon ,但在 python 中。

通常,当您想在后台运行 python 应用程序时,您可以使用模块“守护程序”,使进程成为守护程序,或者您可以在 unix 的末尾使用运算符 &。 看看可能对你有帮助的模块守护进程,

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM