Moved most of the GUI start-up code into new main.py.
[zeroinstall/zeroinstall-rsl.git] / zeroinstall / 0launch-gui / 0launch-gui
blobfd722f2a8c3ab2de1912f507321e31aabd785136
1 #!/usr/bin/env python
2 import os, sys
4 # This is for pycentral on Debian-type systems. 0launch-gui is a symlink to the
5 # copy in the pycentral source directory. Python does a realpath() on this
6 # before adding the containing directory to sys.path, which means we don't see
7 # the .pyc files. If run as root, this also causes .pyc files to be created in
8 # the source directory, leaving a mess when the package is removed.
9 sys.path.insert(0, os.path.dirname(__file__))
11 import pygtk; pygtk.require('2.0')
13 __builtins__._ = lambda x: x
15 import main
17 main.run_gui(sys.argv[1:])