Update year to 2009 in various places
[zeroinstall/zeroinstall-rsl.git] / zeroinstall / 0launch-gui / 0launch-gui
blob8ad8895e3ebbf5f784706111f13c1b3b9f382b2d
1 #!/usr/bin/env python
2 # Copyright (C) 2009, Thomas Leonard
3 # See the README file for details, or visit http://0install.net.
4 import os, sys
6 # This is for pycentral on Debian-type systems. 0launch-gui is a symlink to the
7 # copy in the pycentral source directory. Python does a realpath() on this
8 # before adding the containing directory to sys.path, which means we don't see
9 # the .pyc files. If run as root, this also causes .pyc files to be created in
10 # the source directory, leaving a mess when the package is removed.
11 sys.path.insert(0, os.path.dirname(__file__))
13 import pygtk; pygtk.require('2.0')
15 try:
16 # set up the gettext system and locales
17 from gtk import glade
18 import gettext
19 import locale
21 locale.setlocale(locale.LC_ALL, '')
22 for module in glade, gettext:
23 localedir = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))),
24 'locale')
25 if os.path.isdir(localedir):
26 module.bindtextdomain('zero-install', localedir)
27 module.textdomain('zero-install')
29 __builtins__._ = gettext.gettext
30 except ImportError:
31 __builtins__._ = lambda x: x
33 import main
35 main.run_gui(sys.argv[1:])