A long time ago, a user reported problems getting a bitmap from the Windows clipboard: http://mail.python.org/pipermail/python-win32/2001-May/000056.html
The tail end of that thread indicates that the patch was applied, but I see in the current code base, the NotImplementedError is not raised for CF_BITMAP. Instead, if I get the original error if I attempt to get a bitmap from the clipboard:
# after hitting PrtScn to put a bitmap on the clipboard
>>> import win32clipboard as wclip
>>> result = wclip.GetClipboardData(wclip.CF_BITMAP)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
pywintypes.error: (6, 'GetClipboardData:GlobalLock', 'The handle is invalid.')
If win32clipboard doesn't support the CF_BITMAP for GetClipboardData, it should provide a useful message indicating such, rather than a surprising message about an invalid handle.
Log in to post a comment.