Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #54406

Re: Stripping characters from windows clipboard with win32clipboard from excel

From Dave Angel <davea@davea.name>
Subject Re: Stripping characters from windows clipboard with win32clipboard from excel
Date 2013-09-18 23:51 +0000
References <13c19665-6dc9-49fe-88c8-52c643892eba@googlegroups.com> <a468f029-0345-425b-a9d1-5fc2f03d8be7@googlegroups.com> <523A01C5.4080705@mrabarnett.plus.com> <mailman.136.1379535222.18130.python-list@python.org> <ssmdnZcwzNaQg6fPnZ2dnUVZ_rqdnZ2d@westnet.com.au>
Newsgroups comp.lang.python
Message-ID <mailman.141.1379548344.18130.python-list@python.org> (permalink)

Show all headers | View raw


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.

But there's a big if there.  Somebody is either ill specified or poorly
implemented here.

-- 
DaveA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Stripping characters from windows clipboard with win32clipboard from excel stephen.boulet@gmail.com - 2013-09-12 16:01 -0700
  Re: Stripping characters from windows clipboard with win32clipboard from excel Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-09-13 00:19 +0000
  Re: Stripping characters from windows clipboard with win32clipboard from excel stephen.boulet@gmail.com - 2013-09-12 17:58 -0700
    Re: Stripping characters from windows clipboard with win32clipboard from excel MRAB <python@mrabarnett.plus.com> - 2013-09-13 02:56 +0100
    Re: Stripping characters from windows clipboard with win32clipboard from excel Neil Hodgson <nhodgson@iinet.net.au> - 2013-09-13 13:43 +1000
      Re: Stripping characters from windows clipboard with win32clipboard from excel stephen.boulet@gmail.com - 2013-09-13 07:31 -0700
        Re: Stripping characters from windows clipboard with win32clipboard from excel Neil Cerutti <neilc@norwich.edu> - 2013-09-13 14:37 +0000
        Re: Stripping characters from windows clipboard with win32clipboard from excel stephen.boulet@gmail.com - 2013-09-13 07:38 -0700
          Re: Stripping characters from windows clipboard with win32clipboard from excel random832@fastmail.us - 2013-09-13 12:09 -0400
          Re: Stripping characters from windows clipboard with win32clipboard from excel random832@fastmail.us - 2013-09-18 15:19 -0400
  Re: Stripping characters from windows clipboard with win32clipboard from excel stephen.boulet@gmail.com - 2013-09-17 09:00 -0700
  Re: Stripping characters from windows clipboard with win32clipboard from excel stephen.boulet@gmail.com - 2013-09-18 12:28 -0700
    Re: Stripping characters from windows clipboard with win32clipboard from excel MRAB <python@mrabarnett.plus.com> - 2013-09-18 20:40 +0100
    Re: Stripping characters from windows clipboard with win32clipboard from excel Dave Angel <davea@davea.name> - 2013-09-18 20:13 +0000
      Re: Stripping characters from windows clipboard with win32clipboard from excel Neil Hodgson <nhodgson@iinet.net.au> - 2013-09-19 07:40 +1000
        Re: Stripping characters from windows clipboard with win32clipboard from excel Dave Angel <davea@davea.name> - 2013-09-18 23:51 +0000
          Re: Stripping characters from windows clipboard with win32clipboard from excel Neil Cerutti <neilc@norwich.edu> - 2013-09-19 15:53 +0000
            Re: Stripping characters from windows clipboard with win32clipboard from excel Dave Angel <davea@davea.name> - 2013-09-19 19:58 +0000
    Re: Stripping characters from windows clipboard with win32clipboard from excel random832@fastmail.us - 2013-09-19 10:39 -0400

csiph-web