Marshal Obj is String or Binary?

casevh at comcast.net casevh at comcast.net
Fri Jan 13 19:54:48 EST 2006


Try...

>>> for i in bytes: print ord(i)

or

>>> len(bytes)

What you see isn't always what you have. Your database is capable of
storing \ x 0 0 characters, but your string contains a single byte of
value zero. When Python displays the string representation to you, it
escapes the values so they can be displayed.

casevh




More information about the Python-list mailing list