Usage
>>> cb = HtmlClipboard() >>> cb.GetAvailableFormats() [49161, 49562, 49339, 49560, 49561, 13, 1, 49334, 49335, 49333, 49344, 49478, 49171, 16, 7] >>> cb.HasHtmlFormat() True >>> cb.GetFromClipboard() >>> cb.htmlClipboardVersion '0.9' >>> cb.GetFragment() '<p>Writing to the clipboard is <strong>easy</strong> with this code.</p>' >>> cb.GetSource() 'http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/474121' >>>
You can also put a html fragment to the clipboard as well.
See more detials in the recipe.