Support downloads from GUI.
[zeroinstall.git] / injector-gui
blob68e9c8ad145742901a4c5c678e0a29171138fb7c
1 #!/usr/bin/env python
2 import os, sys
4 __builtins__._ = lambda x: x
6 if len(sys.argv) < 2:
7 print "Usage: injector-gui INTERFACE [ARGS]"
8 print "Eg:"
9 print "injector http://example.com/myprog.xml --help"
10 sys.exit(1)
11 interface_uri = sys.argv[1]
12 if not interface_uri.startswith('http:'):
13 interface_uri = os.path.realpath(interface_uri) # For testing
14 prog_args = sys.argv[2:]
16 import model
17 from gui import GUIPolicy
18 import gui, gtk
20 gtk.rc_parse_string('style "scrolled" { '
21 'GtkScrolledWindow::scrollbar-spacing = 0}\n'
22 'class "GtkScrolledWindow" style : gtk "scrolled"\n')
24 GUIPolicy(interface_uri, prog_args).main()