save windows clipboard content temporarily and restore later

kakarukeys kakarukeys at gmail.com
Thu Oct 8 11:27:23 EDT 2009


Is there a way to:

1. save windows clipboard content temporarily in a variable
2. (the clipboard content is then overwritten by some other
applications)
3. restore the saved data back into the clipboard.

?

I've tried win32clipboard's GetClipboardData, SetClipboardData.
The GetClipboardData method is able to retrieve clipboard content only
after a format is specified.
Restoring the data with that format could result in information loss,
for example when HTML text is saved in ordinary text format. There is
no format that could preserve 100% of any kind of clipboard content.

Does anyone has a brilliant solution?



More information about the Python-list mailing list