Can I run webkit.WebView object without GTK loop? I want to make a simple webkit-based headless browser and I do not need GTK anywhere – I don’t display anything.
win = gtk.Window() # <------------------------+--- can I not use those?
web = webkit.WebView() # |
web.load_uri("http://example.com") # |
web.connect("load-finished", get_html_source) #|
win.add(web) # <-------------------------------|
#win.show_all() # |
gtk.main() # <---------------------------------|
True that without show_all I don not display anything, but I still use GTK. I want to make the script multi threading and GTK is problematic here (the less modules I use the better for me)
(I use Python but this is not a python-specific question)
No, that is impossible.
webkit.WebViewis built on top of the GTK toolkit and even if you are only displaying a web view, you still need a GTK window to put it in.If you really don’t want a GTK window, then why not open the page in the default browser?