What's the simplest way to put a python script into the system tray?
My target platform is Windows. I don't want to see the 'cmd.exe' window.
Those are two questions, actually:
- Adding a tray icon can be done with Win32 API. Example: SysTrayIcon.py
- Hiding the
cmd.exe
window is as easy as usingpythonw.exe
instead ofpython.exe
to run your scripts.
来源:https://stackoverflow.com/questions/1085694/whats-the-simplest-way-to-put-a-python-script-into-the-system-tray-windows