Read an image from a URL and write it to the browser
robert.panesse at gmail.com
Sun Dec 21 12:29:29 CET 2008
I want to do something simple: read an image from an image URL and
write the image to the browser in CGI style.
I wrote a CGI script to do this (I'm new to Python) and got the
"FancyURLopener instance has no attribute 'tempcache'" in <bound
method FancyURLopener.__del__ of <urllib.FancyURLopener instance
I have no idea what that error means and neither does Google.
Any idea where I went wrong in the code below?
urlString = "http://www.google.com/google_logo.jpg"
imgStream = urllib.urlopen(urlString)
imgBuffer = imgStream.read()
print "Content-Type: image/jpeg"
More information about the Python-list