更新时间:2022-03-17 00:37:32
您是否检查了 Python 绑定WebKit GTK+ 端口.在其中一个目录中有关于如何使用它的演示,包括浏览器:python demos/tabbed_browser.py
Did you check the Python bindings for the WebKit GTK+ port. In one of the directory there are demos on how to use it, including a browser: python demos/tabbed_browser.py
您还可以在 WebKit GTK+上查看 Alp Toker 的 FOSDEM 幻灯片> (pdf) 开发混合 Web/GTK+ 富互联网应用程序.
You could check also the slides of a FOSDEM by Alp Toker on WebKit GTK+ (pdf) Developing hybrid Web/GTK+ rich internet applications.
import gtk
import webkit
view = webkit.WebView()
sw = gtk.ScrolledWindow()
sw.add(view)
win = gtk.Window(gtk.WINDOW_TOPLEVEL)
win.add(sw)
win.show_all()
view.open("http://w3.org/")
gtk.main()
这应该会给你很好的开始提示.
That should give you good hints for starting.