"Catherine Heathcote" <[email protected]> wrote in message
news:[email protected]...
=
> I am reading an XML file (code at the end if it helps) and all goes well
> except I am
> getting the http response code printed.
I suggest you comment out line 22. The status shouldn't be in the data.
> Also everything I get has "\r\n" in it, which atm I am getting rid of with
> strip(), is
> that the best way?
I would use and XML parser such as Elementtree, and let it handle it.
Resist the temptation to think "it's a simple format, I'll parse it myself".
Otherwise strip() or rstrip('\r\n') is fine, depending how much whitespace
matters.
> conn.close
Note that statement does nothing, it's not the same as conn.close()
--
http://mail.python.org/mailman/listinfo/python-list