簡體   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