#!/usr/bin/python

import sys

# which python version are we using, the hash-bang abouve might be munged by setuptools
version = '%s.%s' % (sys.version_info[0], sys.version_info[1])

# get a path to our private module, and make sure it overrides
# all other paths (This is probably Debian specific)
sys.path.insert(0, '/usr/share/smart-notifier/lib/python%s' % version)

if '--notify' in sys.argv:
    import smart_notifier
    smart_notifier.notify(sys.stdin.read())
else:
    import smart_notifier.gui
    smart_notifier.gui.service()
