String Literal to Blob

Victor Subervi victorsubervi at gmail.com
Thu Apr 10 13:04:43 EDT 2008


Well, what I did was this:

            content = col_fields[0][14].tostring()
            pic = "tmp" + str(i) + ".jpg"
            img = open(pic, "w")
            img.write(content)
            print '<img src="%s"><br /><br />' % pic
            img.close()
where I am incrementing i. Ugly. Stupid. But if it is the only way to do it
in python, and I do not want to invest the time doing it in php, which I
think would be prettier in this instance, then I guess it will do. Your
thoughts appreciated.
Victor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080410/1bf964c1/attachment.html>


More information about the Python-list mailing list