is there any way to use the webkit engine in python, combined with GTK to display html data that is stored within a python file, for example
import webkit
import gtk
html = "<h1>This is HTML content</h1><p>I am displaying this in python</p"
gobject.threads_init()
win = gtk.Window()
view = webkit.WebView()
view.open(html)
win.add(view)
win.show_all()
gtk.main()
This is a crude demonstration of what i want, but the output should show the HTML content rendered within webkit.
Can i do this, and if not, can i store a local html file somewhere and render that through webkit?
Thanks,