More refactoring.
[zeroinstall.git] / injector-gui
blob0e05cbdef8356062d39b7f7c6efbdfebe8161d24
1 #!/usr/bin/env python
2 import os, sys
4 __builtins__._ = lambda x: x
6 if len(sys.argv) < 3:
7 print "Usage: injector INTERFACE PROG [ARGS]"
8 print "PROG is a relative path inside an implementation of INTERFACE. Eg:"
9 print "injector /uri/0install/site/myprog.xml bin/myprog --help"
10 sys.exit(1)
11 interface_uri = os.path.realpath(sys.argv[1])
12 prog = sys.argv[2]
13 prog_args = sys.argv[3:]
15 import model
16 from gui import GUIPolicy
17 import gui, gtk
19 gtk.rc_parse_string('style "scrolled" { '
20 'GtkScrolledWindow::scrollbar-spacing = 0}\n'
21 'class "GtkScrolledWindow" style : gtk "scrolled"\n')
23 GUIPolicy(interface_uri, prog, prog_args).main()