Resetting state of http.client/httplib HTTPSConnection objects

2013-08-26 Thread Chris Down
This is a crosspost from python-tutor upon suggestion. I am experiencing intermittent issues where an exception will be raised when calling getresponse(), which makes the entire connection stuck in Request-sent state. Is it possible to reset to idle state somehow without reinstantiating the HTTPSC

Re: Beginner question

2013-08-06 Thread Chris Down
On 2013-08-06 14:35, eschneide...@comcast.net wrote: > Why won't the 'goodbye' part of this code work right? it prints 'ok' no > matter what is typed. Much thanks. "if" statements do not fall through, because the first statement was matched, no other ones in the same chain will be evaluted. "elif

Re: lxml tostring quoting too much

2013-08-06 Thread Chris Down
On 2013-08-06 18:38, andrea crotti wrote: > I would really like to do the following: > > from lxml import etree as ET > from lxml.builder import E > > url = "http://something?x=10&y=20"; > l = E.link(url) > ET.tostring(l) -> "http://something?x=10&y=20" > > However the lxml tostring always quotes t