On Oct 10, 6:00 am, Neil Hodgson <nyamatongwe+thun...@gmail.com> wrote: > kakarukeys: > > > I followed your hints, and wrote the following code. It works for most > > clipboard formats except files. Selecting and copying a file, followed > > by backup() and restore() throw an exception: > > For some formats the handle stored on the clipboard may not be a > memory handle so may not be retrieved as memory. You could try using a > list of formats to include or exclude or just pass over the exception. > > Neil
The exception occurred not when the program was trying to retrieve the clipboard data, but when calling SetClipboardData to write to clipboard. So I don't think what you said is the cause of the problem. -- http://mail.python.org/mailman/listinfo/python-list