diff options
Diffstat (limited to 'embed/xulrunner/bindings/python/test.py')
-rw-r--r-- | embed/xulrunner/bindings/python/test.py | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/embed/xulrunner/bindings/python/test.py b/embed/xulrunner/bindings/python/test.py new file mode 100644 index 000000000..d06278e5f --- /dev/null +++ b/embed/xulrunner/bindings/python/test.py @@ -0,0 +1,32 @@ +#! /usr/bin/python +import pygtk +pygtk.require("2.0") +import gtk +import gnomegeckoembed +import os + +class Base: + def destroy(self, widget, data=None): + gtk.main_quit() + + def __init__(self): + gnomegeckoembed.gecko_embed_single_set_comp_path("/usr/lib/firefox") + gnomegeckoembed.gecko_embed_single_push_startup() + self.browser = gnomegeckoembed.Embed() + self.browser.load_url("www.gnome.org") + + self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) + self.window.connect("destroy", self.destroy) + self.window.set_default_size(800, 600) + self.window.add(self.browser) + self.browser.show() + self.window.show() + + def main(self): + gtk.main() + +print __name__ +if __name__ == "__main__": + base = Base() + base.main() + |