All pastes #967523 Raw Edit

Miscellany

public text v1 · immutable
·published 2008-04-02 14:07 UTC
rendered paste body
# -*- coding: UTF-8 -*-

import gtk
import gobject

buf = gtk.TextBuffer()
buf.register_deserialize_tagset()
cont = "Här ska det inte visas en bild."

try:
  text = buf.deserialize(buf, "application/x-gtk-text-buffer-rich-text", buf.get_start_iter(), cont)
except gobject.GError, e:
  print "%s has errors: %s" % (cont, e)
  text = cont

print "EOF"