[pygtk] Images in gtkhtml2
Christopher Backhouse
cjbackhouse at gmail.com
Thu Feb 8 09:19:04 WST 2007
I am trying to use gtkhtml, despite the complete lack of any
documentation I managed to get it working. But images don't work - in
the code below the image comes up with the blank image icon. The same
html renders fine in firefox. Any ideas?
import gtk, gtkhtml2
doc=gtkhtml2.Document()
doc.open_stream("text/html")
doc.write_stream('text <img src="file:///home/chris/img.png"> text2')
doc.close_stream()
view=gtkhtml2.View()
view.set_document(doc)
win=gtk.Window()
win.add(view)
win.show_all()
gtk.main()
More information about the pygtk
mailing list