简体   繁体   English

如何在后台运行python程序?

[英]How to run a python program in the background?

How can I make a python program run in the background? 如何使python程序在后台运行? I don't need the console running since all it does is sends me emails with updates once an hour. 我不需要控制台运行,因为它所做的只是每小时向我发送一封包含更新的电子邮件。 Is there a way to do it when I convert it to exe using py2exe? 当我使用py2exe将其转换为exe时,有什么方法可以做到? I am using python 2.7.8. 我正在使用python 2.7.8。 Also, is there a way to make it open in the boot menu immediately when the computer turns on from the code? 另外,有没有办法在从代码打开计算机后立即在启动菜单中将其打开? Thank you 谢谢

If you are asking strictly how to hide the console as part of the py2exe bundling, that's simple. 如果您严格要求如何在py2exe捆绑中隐藏控制台,那很简单。 See - Hiding command-line dialog in py2exe 请参阅- 在py2exe中隐藏命令行对话框

If you are asking how to have a program without a GUI, just build the program in py2exe as above and run it. 如果您询问如何在不使用GUI的情况下创建程序,只需按照上述方法在py2exe中构建程序并运行它。 Unless you have created a GUI, it will run on it's own until it terminates or is terminated. 除非您创建了GUI,否则它将自行运行,直到终止或终止。

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

相关问题 在后台运行python程序 - Run python program in background python程序将不会在后台运行 - python program will not run in background 如何在Ubuntu服务器的后台运行Python程序 - How to run the Python program in the background in Ubuntu server 如何在后台运行python程序以保持活动窗口相同 - How to run python program in background to keep active window the same 在Firebase中定期运行python程序作为后台服务 - Periodically run a python program as a background service in firebase 如何使用 python 的命令行脚本在后台运行 python 程序? - How can I run a python program in the background using python's Command Line Scripts? 从其他 python 程序在后台运行 python 并继续 - Run python in background from other python program and continue 终止ssh后如何在Raspberry Pi上继续在后台运行Python程序 - How to keep run Python Program in Background on Raspberry Pi after terminate ssh 是否可以让 c++ dll 在后台运行 python 程序并填充向量的 Z1D78DC8ED5121449018B5114FE2 程序? 如果是这样,怎么做? - Is it possible to have a c++ dll run a python program in background and have it populate a map of vectors? If so, how? 如何将python程序作为守护程序运行? - How to run python program as a daemon?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM