[EMAIL PROTECTED] wrote:

> Hello all, please correct me, if I do...
> 
> from ClientForm import ParseResponse
> from urllib2 import urlopen
> ...
> response=urlopen(url)
> forms=ParseResponse(response)
> 
> I won't be able to
> 
> print response.read()
> 
> in order to see HTML source anymore. In other words I will see only an
> empty string. Suggestions?

the server is sending you a stream of bytes; there's no way to "rewind" 
that without issuing another request.

if you want to use the data multiple times, you'll have to save it in
a buffer, and parse it from there (use StringIO to wrap a string in a 
file-like object).

</F>

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to