On 19/9/2013 11:53, Neil Cerutti wrote:
> On 2013-09-18, Dave Angel 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
>>
On 2013-09-18, Dave Angel 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 shoul
On Wed, Sep 18, 2013, at 16:13, Dave Angel wrote:
> 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_
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 defin
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
On 18/9/2013 15:40, MRAB wrote:
> On 18/09/2013 20:28, stephen.bou...@gmail.com wrote:
>> Thanks to everyone for their help. Using everyone's suggestions, this seems
>> to work:
>>
>> import win32clipboard, win32con
>>
>> def getclipboard():
>> win32clipboard.OpenClipboard()
>> s = win3
On 18/09/2013 20:28, stephen.bou...@gmail.com wrote:
Thanks to everyone for their help. Using everyone's suggestions, this seems to
work:
import win32clipboard, win32con
def getclipboard():
win32clipboard.OpenClipboard()
s = win32clipboard.GetClipboardData(win32con.CF_UNICODETEXT)
Thanks to everyone for their help. Using everyone's suggestions, this seems to
work:
import win32clipboard, win32con
def getclipboard():
win32clipboard.OpenClipboard()
s = win32clipboard.GetClipboardData(win32con.CF_UNICODETEXT)
win32clipboard.CloseClipboard()
if '\0' in s:
On Fri, Sep 13, 2013, at 12:09, random...@fastmail.us wrote:
> Anyway, to match behavior found in other applications when pasting from
> the clipboard, I would suggest using:
>
> if s.contains('\0'): s = s[:s.index('\0')]
>
> Which will also remove non-null bytes after the first null (but if the
On Thursday, September 12, 2013 6:01:20 PM UTC-5, stephen...@gmail.com wrote:
> I have an excel file. When I select cells, copy from excel, and then use
> win32clipboard to get the contents of the clipboard, I have a 131071
> character string.
>
>
>
> When I save the file as a text file, and u
On Fri, Sep 13, 2013, at 10:38, stephen.bou...@gmail.com wrote:
> > Hm, that gives me a "Type str doesn't support the buffer API" message.
>
> Aha, I need to use str(s, encoding='utf8').rstrip('\0').
It's not a solution to your problem, but why aren't you using
CF_UNICODETEXT, particularly if you
On 2013-09-13, stephen.bou...@gmail.com wrote:
> On Thursday, September 12, 2013 10:43:46 PM UTC-5, Neil Hodgson wrote:
>> Stephen Boulet:
>>
>>
>>
>> > From the clipboard contents copied from the spreadsheet, the characters
>> > s[:80684] were the visible cell contents, and s[80684:] all sta
On Friday, September 13, 2013 9:31:45 AM UTC-5, stephen...@gmail.com wrote:
> On Thursday, September 12, 2013 10:43:46 PM UTC-5, Neil Hodgson wrote:
>
> > Stephen Boulet:
>
> >
>
> >
>
> >
>
> > > From the clipboard contents copied from the spreadsheet, the characters
> > > s[:80684] were
On Thursday, September 12, 2013 10:43:46 PM UTC-5, Neil Hodgson wrote:
> Stephen Boulet:
>
>
>
> > From the clipboard contents copied from the spreadsheet, the characters
> > s[:80684] were the visible cell contents, and s[80684:] all started with
> > "b'\x0" and lack any useful info for what
Stephen Boulet:
From the clipboard contents copied from the spreadsheet, the characters s[:80684] were
the visible cell contents, and s[80684:] all started with "b'\x0" and lack any
useful info for what I'm trying to accomplish.
Looks like Excel is rounding up its clipboard allocation to
On 13/09/2013 01:58, stephen.bou...@gmail.com wrote:
Hi Steven. Here is my code:
import win32clipboard, win32con
def getclipboard():
win32clipboard.OpenClipboard()
s = win32clipboard.GetClipboardData(win32con.CF_TEXT)
win32clipboard.CloseClipboard()
return s
I use this help
Hi Steven. Here is my code:
import win32clipboard, win32con
def getclipboard():
win32clipboard.OpenClipboard()
s = win32clipboard.GetClipboardData(win32con.CF_TEXT)
win32clipboard.CloseClipboard()
return s
I use this helper function to grab the text on the clipboard and do useful
On Thu, 12 Sep 2013 16:01:20 -0700, stephen.boulet wrote:
> I have an excel file. When I select cells, copy from excel, and then use
> win32clipboard to get the contents of the clipboard, I have a 131071
> character string.
How exactly are you using win32clipboard, and what exact result are you
I have an excel file. When I select cells, copy from excel, and then use
win32clipboard to get the contents of the clipboard, I have a 131071 character
string.
When I save the file as a text file, and use the python 3.3 open command to
read its contents, I only have 80684 characters.
Excel (an
19 matches
Mail list logo