2

I found only How to start a python script in the background once it's run? and how to run a python script in the background? - but it is permanent and is not allowing switching to a normal mode.

I want to periodically check for some situation (change of website) and notify me once it happens - without appearing as window and taking space in taskbar all the time.

Community
  • 1
  • 1
Bulwersator
  • 1,102
  • 2
  • 12
  • 30

1 Answers1

1

You need to build a Windows SysTray App/Service using the Python for Windows Extensions

Please see similar question: How to build a SystemTray app for Windows?

This is by no means trivial, so please feel free to post follow-up questions of a more specific nature!

Update:

You may also find this 3rd-party module quite useful that seems to implement the hardest part of this for you as a reuseable library:

https://github.com/Infinidat/infi.systray

Example using infi.systray:

from infi.systray import SysTrayIcon
def say_hello(systray):
    print "Hello, World!"
menu_options = (("Say Hello", None, say_hello),)
systray = SysTrayIcon("icon.ico", "Example tray icon", menu_options)
systray.start()

Looking at the source code for infi.systray the nice thing about it is that it doesn't depend on pywin32. It uses ctypes which is available as part of the standard Python library.

Community
  • 1
  • 1
James Mills
  • 18,669
  • 3
  • 49
  • 62
  • 1
    Heh, and I wanted to use Python because I expected that it will take far less code than Java. Now I am unsure :) – Bulwersator May 14 '14 at 07:12