Created
February 5, 2020 15:24
-
-
Save AndreaPasqualini/0850540799f5cce63df0f0cce915f98e to your computer and use it in GitHub Desktop.
A simple WebKit wrapper opening a website in a GTK window, all written in Python. (tested on Ubuntu 19.10)
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
#!/usr/bin/env python | |
from gi.repository import Gtk | |
from gi.repository import GObject | |
from gi.repository import WebKit2 | |
GObject.threads_init() | |
win = Gtk.Window() | |
bro = WebKit2.WebView() | |
bro.load_uri("https://www.google.com") | |
win.add(bro) | |
win.show_all() | |
Gtk.main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment