"John Bauman" <[EMAIL PROTECTED]> writes:
> "Matt Helm" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> 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 charact
> It's perfectly good Python, though, so just forget about it or wrap it
> in a "cstring(s)" function do you don't have to look at it!
Thanks for the sanity check. I just wanted to make sure I was correct
as well as right.
Matt
--
http://mail.python.org/mailman/listinfo/python-list
John Bauman wrote:
> "Matt Helm" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
>>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.
>
"Matt Helm" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> 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.
--
http://mail.python.org/mailman/l
Matt Helm wrote:
>
> I am using win32com to access a third party COM interface but am
> having trouble using the string that is returned.
>
> The vendor's docs show the following method:
>
> HRESULT CookString(BSTR param_a, short buf_size, [out, retval] BSTR*
> result_b);
>
> param_a is a
I am using win32com to access a third party COM interface but am
having trouble using the string that is returned.
The vendor's docs show the following method:
HRESULT CookString(BSTR param_a, short buf_size, [out, retval] BSTR*
result_b);
param_a is a string to be processed.
buf_size is