On 2005-04-08, Dan <[EMAIL PROTECTED]> wrote: > On Thu, 7 Apr 2005 21:52:11 -0500, [EMAIL PROTECTED] wrote: > >>Python strings always carry their length, and can have embedded NULs. >> s.write("\0\1\2\3") >>should write 4 bytes to the socket 's'. > > I'm taking binary data from a database, so it's not really a Python > string. Is there an easy way to convert it?
The struct module. -- Grant Edwards grante Yow! I want to read my new at poem about pork brains and visi.com outer space... -- http://mail.python.org/mailman/listinfo/python-list