store .png file in a script

Adam Tauno Williams awilliam at whitemice.org
Sun Jun 6 12:40:47 EDT 2010


Just base64 encode the file, store it as a string in the file, and decode it to a byte-stream when you need the image.  Everything required to do that is in the standard library.
>Would you please let me know that how can I 
>store a .png or .gif or .jpg file, in a python script? 



More information about the Python-list mailing list