[Tutor] getting image from url

Amit Sethi amit.pureenergy at gmail.com
Fri Jul 10 18:28:26 CEST 2009


I am sorry, I did not realize the problem was in the location .Ignore
the message

On Fri, Jul 10, 2009 at 9:19 PM, Emile van Sebille<emile at fenx.com> wrote:
> On 7/10/2009 8:29 AM Amit Sethi said...
>>
>> Hi , I am trying to get  images from url
>>
>> Their is  a  mail relating to it here :
>> "http://mail.python.org/pipermail/python-list/2001-October/108548.html"
>>
>> but when i followed similar procedure :
>>
>>>>> import urllib
>>>>> fp =
>>>>> urllib.urlopen("http://en.wikipedia.org/wiki/File:Portrait_john_calvin.jpg")
>>>>> img = cStringIO.StringIO(fp.read())
>
> Right here, try...
>
>    img.read()[:50]
>
> ... and it should become clear what the problem is...
>
> HTH,
>
> Emile
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>



-- 
A-M-I-T S|S


More information about the Tutor mailing list