[pygtk] Rich text on the clipboard

Seth Mahoney smahoney at pdx.edu
Thu Jan 4 07:11:43 WST 2007


Can anyone point me to a nice tutorial or any info at all on how to
handle copying rich text to the clipboard using python and GTK?  The
scenario I've got in mind is that I'd like to have the program I'm
working on construct a rich text string and put it on the clipboard for
pasting into whatever text editing application the user is working with.
I've tried a variety of methods without success, including putting the
text in a textbuffer and using the textbuffer's copy_clipboard method to
copy the formatted text to the clipboard, but I only ever end up with
plain text.  Any help would be appreciated.



More information about the pygtk mailing list