What's the simplest way to put a python script into the system tray (Windows)

一笑奈何 提交于 2019-11-26 15:17:03

问题


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.


回答1:


Those are two questions, actually:

  1. Adding a tray icon can be done with Win32 API. Example: SysTrayIcon.py
  2. Hiding the cmd.exe window is as easy as using pythonw.exe instead of python.exe to run your scripts.


来源:https://stackoverflow.com/questions/1085694/whats-the-simplest-way-to-put-a-python-script-into-the-system-tray-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!