BLOBS and python (continued)

Alex cut_me_out at hotmail.com
Thu May 4 15:58:40 EDT 2000


Oops (C-c C-c executes a buffer and brings up the python interpreter in
a python module, sends a message in a newsgroup followup.  I wanted an
interpreter, and hit the wrong key sequence. :)

Anyhoo, you could use the base64 module:

>>> import base64
>>> image = "Your image with \"'\" in it here."
>>> base64.encodestring (image)
'WW91ciBpbWFnZSB3aXRoICInIiBpbiBpdCBoZXJlLg==\012'

I don't know if it'll be fast enough for you, though.

Alex.



More information about the Python-list mailing list