win32clipboard.GetClipboardData() return string with null characters

Roger Upole rupole at hotmail.com
Thu May 26 06:15:36 EDT 2005


I don't get any extra characters.  Do they always show up, or is it possible
whatever application put the data on the clipboard put them there ?

        Roger
.
"aurora" <aurora00 at gmail.com> wrote in message news:op.src74qnv6yt6e7 at news.cisco.com...
>I was using win32clipboard.GetClipboardData() to retrieve the Windows  clipboard using code similar to the message below:
>
> http://groups-beta.google.com/group/comp.lang.python/msg/3722ba3afb209314?hl=en
>
> Some how I notice the data returned includes \0 and some characters that  shouldn't be there after the null character. It is 
> easy enough to truncate  them. But why does it get there in the first place? Is the data length  somehow calculated wrong?
>
> I'm using Windows XP SP2 with Python 2.4 and pywin32-203.
>
> aurora 




----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---



More information about the Python-list mailing list