Kent Johnson wrote:
> I don't think the object returned from urllib2.urlopen() has save() and get() 
>       > methods. According to the docs urlopen() "returns a file-like object 
> with two
> additional methods:
>
>    * geturl() -- return the URL of the resource retrieved
>    * info() -- return the meta-information of the page, as a dictionary-like 
> object"
>
> So you should treat data.f like an open file - use read() to get the contents 
> into a > variable. Then open a real (disk) file for writing and write it out. 
> This section of > the Python tutorial has a quick intro:
>  http://docs.python.org/tut/node9.html#SECTION009200000000000000000
>
> Kent


Thanks. I will check this out and let you know if I can get it to work.


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to