[英]How can I run a python program in the background using python's Command Line Scripts?
I currently have my program set up to run with Command Line Scripts ( https://python-packaging.readthedocs.io/en/latest/command-line-scripts.html ) like so:我目前将我的程序设置为使用命令行脚本( https://python-packaging.readthedocs.io/en/latest/command-line-scripts.html )运行,如下所示:
"console_scripts": ["app_name = app_name.app:main"],
How can I make it so that this program runs in the background like pythonw does?我怎样才能让这个程序像 pythonw 一样在后台运行?
Instead of console_scripts
, something that should be run as a GUI application goes in gui_scripts
.而不是console_scripts
,应该作为 GUI 应用程序运行的东西放在gui_scripts
中。
"console_scripts": ["app_name = app_name.cli:command_line"],
"gui_scripts": ["app_name = app_name.gui:start_window"],
See https://packaging.python.org/en/latest/specifications/entry-points/请参阅https://packaging.python.org/en/latest/specifications/entry-points/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.