image from URL
Randy Heiland
heiland at ncsa.uiuc.edu
Thu Oct 11 06:46:01 EDT 2001
I'm trying to load/display an image from a URL, but can't seem to figure
it out. Have seen related threads on the list, but no final answer.
Here's what I try:
Python 2.2a1 (#2, Sep 13 2001, 13:37:15)
[GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2
Type "copyright", "credits" or "license" for more information.
>>> import urllib, Image
>>> fp = urllib.urlopen("http://www.python.org/pics/PyBanner027.gif")
>>> im = Image.open(fp)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/home/heiland/PythonMod/Imaging-1.1.2/PIL/Image.py", line 944,
in open
fp.seek(0)
AttributeError: addinfourl instance has no attribute 'seek'
Can someone set me straight?
thanks,
Randy
More information about the Python-list
mailing list