Stripping characters from windows clipboard with win32clipboard from excel
Neil Cerutti
neilc at norwich.edu
Thu Sep 19 11:53:12 EDT 2013
On 2013-09-18, Dave Angel <davea at davea.name> wrote:
> On 18/9/2013 17:40, Neil Hodgson wrote:
>
>> Dave Angel:
>>
>>> So is the bug in Excel, in Windows, or in the Python library? Somebody
>>> is falling down on the job; if Windows defines the string as ending at
>>> the first null, then the Python interface should use that when defining
>>> the text defined with CF_UNICODETEXT.
>>
>> Everything is performing correctly. win32clipboard is low-level
>> direct access to the Win32 clipboard API. A higher level API which is
>> more easily used from Python could be defined on top of this if anyone
>> was motivated.
>>
>> Neil
>
> Clearly you miss the point. If the clipboard API is defined to
> return a null-terminated string, then the problem is in the
> Python library which doesn't do a strlen() (or the
> wide-character equivalent; I forget its name) on the results.
Python can't really know if you're pasting text or a screenshot
or what.
--
Neil Cerutti
More information about the Python-list
mailing list