2 # Copyright (C) 2009, Thomas Leonard
3 # See the README file for details, or visit http://0install.net.
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')
16 # set up the gettext system and locales
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__
))),
25 if os
.path
.isdir(localedir
):
26 module
.bindtextdomain('zero-install', localedir
)
27 module
.textdomain('zero-install')
29 __builtins__
._ = gettext
.gettext
31 __builtins__
._ = lambda x
: x
35 main
.run_gui(sys
.argv
[1:])