Michael wrote: > Hi All, > > I've received (via UDP) a null terminated string and need to convert it > into a Python string. Can anyone tell me how this is done? If it helps, > I know the number of characters in the string. > > Thanks, > M. McDonnell > Have you received this string in Python or in C? If the former, then just throw away the last character of the string you've received and you're done!
s = s[:-1] regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://holdenweb.blogspot.com Recent Ramblings http://del.icio.us/steve.holden -- http://mail.python.org/mailman/listinfo/python-list