Why does GtkTexts insert_text generate critical messages complaining “assertion `index <= TEXT_LENGTH (text) failed."?
Due to a PyGTK bug in all versions up to 0.6.11, insert_text works with GtkText, but generates GTK critical warnings, even though it is defined for all GtkEditables. The workaround is to use insert_defaults(), which works and doesn’t generate warnings. It has one nasty side-effect: see faq 14.7 For the original message explaining this, see [www.mail-archive.com] insert_text has been fixed (in the same patch that added the position argument to GtkEditable.insert_text()) in version 0.6.10 and should be used if that version is available.