Save data to a file thru a http connection

Scott David Daniels scott.daniels at
Wed May 31 23:11:29 CEST 2006

yinglcs at wrote:
> I am new to python. I read an example here about how to fetch data thru
> a HTTP connection:
> My question is how can i save the data to a file after reading it from
> a http connection.

Do the tutorial and this and many other things will become clear.

Instead of just "print sometext", do something like:
     f = open('filename', 'w')
     print >>f, sometext
     ... (possibly more prints like the above).

--Scott David Daniels
scott.daniels at

More information about the Python-list mailing list