[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?
response = urlopen(url) content = response.read() forms = ParseResponse(content) i.e., adapt ParseResponse to accept a string, or wrap the string in a StringIO: import cStringIO forms = ParseResponse(cStringIO.StringIO(content)) Georg -- http://mail.python.org/mailman/listinfo/python-list