繁体   English   中英

如何使用 python 的命令行脚本在后台运行 python 程序?

[英]How can I run a python program in the background using python's Command Line Scripts?

我目前将我的程序设置为使用命令行脚本( https://python-packaging.readthedocs.io/en/latest/command-line-scripts.html )运行,如下所示:

 "console_scripts": ["app_name = app_name.app:main"],

我怎样才能让这个程序像 pythonw 一样在后台运行?

而不是console_scripts ,应该作为 GUI 应用程序运行的东西放在gui_scripts中。

 "console_scripts": ["app_name = app_name.cli:command_line"],
 "gui_scripts": ["app_name = app_name.gui:start_window"],

请参阅https://packaging.python.org/en/latest/specifications/entry-points/

暂无
暂无

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

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