Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

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:

 "console_scripts": ["app_name = app_name.cli:command_line"],

How can I make it so that this program runs in the background like pythonw does?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Instead of console_scripts, something that should be run as a GUI application goes in 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/

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading