Save data to a file thru a http connection
yinglcs at gmail.com
yinglcs at gmail.com
Wed May 31 21:52:41 EDT 2006
Scott,
Can you please tell me which chapter of the tutorial that you are
referring to http://docs.python.org/tut/tut.html?
The only chapter that I find about http is chapter 10.7, but it does
not have the example that you are referring to
Scott David Daniels wrote:
> yinglcs at gmail.com wrote:
> > I am new to python. I read an example here about how to fetch data thru
> > a HTTP connection:
> > http://diveintopython.org/http_web_services/review.html,
> >
> > 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).
> f.close()
>
> --Scott David Daniels
> scott.daniels at acm.org
More information about the Python-list
mailing list