MySQLdb blob and binary data

Rune Hansen rune.hansen at scanmine.com
Fri Dec 10 10:58:56 EST 2004


I'm storing gzipped data in a MySQL blob field. I can fetch the blob and 
"wb" write the data to a file. It becomes a file containg gz data.

I can't take the same data and do anything sensible with it in python - 
like say zlib.decompress(data).

How can I convert the binary data from the blob field to the gzipped 
string it was stored as (java stores the string, Pickle is not an option)?

regards

/rune



More information about the Python-list mailing list