I work on a GUI program that emits messages to console. Most of the time the messages can be ignored so a console window isn't needed. Linux users choose to show or not show messages by simply choosing to launch app
from a shell session or the window manager. Windows users need to run different scripts: app
for normal GUI-only mode or app-with-messages
for gui with a command prompt window.
entry_points={
# only needed for Windows:
'console_scripts': ['app-with-messages= app.runApp:run'],
# Used on both Linux and Windows:
'gui_scripts': ['app = app.runApp:run']
}
Both of these scripts call the same function. The only difference is that on Windows app
will be started with pythonw.exe
instead of python.exe
. How can we avoid confusing our linux users and not create the redundant-for-them app-with-messages
script?