4

I've created a python library with a GUI component. I'm creating a command line launcher using the console_scripts feature of setuptools. Currently, when I launch the tool using the console_scripts launcher, it also brings up a command shell because it's being launched with python.exe. Is there a way to use the console_scripts feature but launch the script with pythonw instead so that no command shell appears?

My setup.py looks like this:

from setuptools import setup, find_packages

setup(
    name='mytool',
    version='1.0',
    packages=find_packages(),
    entry_points={
        'console_scripts': ['mytool=mytool.cli:main'],
    },
)

1 Answer 1

3

Use gui_scripts instead of console_scripts.

See this page for more info.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.