How to save a binary file?

hidura at gmail.com hidura at gmail.com
Tue Oct 5 17:11:07 EDT 2010


Hello, how i can save a binary file, i read in the manual in the IO area  
but doesn' t show how to save it.
Here is the code what i am using:
s = open('/home/hidura/test.jpeg', 'wb')
s.write(str.encode(formFields[5]))
s.close()

If needs the binary code i could upload.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20101005/361ec58f/attachment.html>


More information about the Python-list mailing list