"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 character of the string.
No good. The string could be "ABC" + \0 + 77 more chars of random memory. Matt -- http://mail.python.org/mailman/listinfo/python-list