Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Python save image from URL
import cStringIO # *much* faster than StringIO
import urllib
import Image
file = urllib.urlopen('')
im = cStringIO.StringIO( # constructs a StringIO holding the image
img ='/home/wenbert/uploaderx_files/test.gif')
except IOError, e:
raise e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment