Last active
August 29, 2015 14:06
-
-
Save aeroaks/40d91863e420c7b74b1b to your computer and use it in GitHub Desktop.
GTK Webkit Browser - simple single window
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from gi.repository import Gtk | |
from gi.repository import WebKit | |
# initialize WebView | |
view = WebKit.WebView() | |
# initialize Scrolled Window | |
sw = Gtk.ScrolledWindow() | |
sw.add(view) | |
# initialize GTK Window | |
win = Gtk.Window() | |
# destroy signal - to terminate the program neatly | |
win.connect("destroy", Gtk.main_quit) | |
win.add(sw) | |
win.show_all() | |
# open url | |
view.open("http://en.wikipedia.org/") | |
# Start Window | |
Gtk.main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment