copy/paste html formatted data

Hello,

I'm trying find a way to copy html formatted data to the clipboard,
and have it keep the formatting.
(i'm trying to preserve table formatting when copying from wxgrid to
other applications).
I was able to achieve this on Windows using win32clipboard and
calling:
win32clipboard.RegisterClipboardFormat("HTML Format")
However I would like to achieve the same for Linux.
I read that I could use the pygtk.clipboard.set_with_data but there
are no comprehensive examples for copying anything other than text,
and looks like it might only work for gnome.

Any suggestions would be much appreciated.

Thank you,
Sandy