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

Question:

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.

Asked By: Alterlife

||

Answers:

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.
Answered By: Assaf Lavie
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.