How can I run python script on Windows 7, with ability to enable/disable apperance of window and on taskbar?
Question: I found only [How to start a python script in the background once it's
run?](http://stackoverflow.com/questions/6345298/how-to-start-a-python-script-
in-the-background-once-its-run) and [how to run a python script in the
background?](http://stackoverflow.com/questions/783531/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.


Answer: You need to build a Windows SysTray App/Service using the [Python for Windows
Extensions](http://sourceforge.net/projects/pywin32/)

Please see similar question: [How to build a SystemTray app for
Windows?](http://stackoverflow.com/questions/9494739/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.

