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. > > Unfortunately there's no guarantee that the string occupies the whole of the returned buffer: the first zero byte terminates the string.
regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC www.holdenweb.com PyCon TX 2006 www.python.org/pycon/ -- http://mail.python.org/mailman/listinfo/python-list