win32com, BSTR, and null terminated strings

John Bauman john at baumanfamily.com
Mon Feb 6 00:51:35 EST 2006


"Matt Helm" <eric at qwhd746oihd49.net> wrote in message 
news:mzh5xzyr.fsf at qwhd746oihd49.net...
> However, what is the proper way to recover the actual string? I have
> been using:
>
>    r.split("\0", 1)[0]
>
I'd prefer to use
r[:-1]
to strip off the last character of the string. 





More information about the Python-list mailing list