Re: elementtree XML() unicode

2009-11-05 Thread John Machin
On Nov 5, 12:35 am, Stefan Behnel wrote: > John Machin, 04.11.2009 02:56: > > > On Nov 4, 12:14 pm, Kee Nethery wrote: > >> The reason I am confused is that getResponse2 is classified as an   > >> "str" in the Komodo IDE. I want to make sure I don't lose the non- > >> ASCII characters coming from

Re: elementtree XML() unicode

2009-11-04 Thread Stefan Behnel
John Machin, 04.11.2009 02:56: > On Nov 4, 12:14 pm, Kee Nethery wrote: >> The reason I am confused is that getResponse2 is classified as an >> "str" in the Komodo IDE. I want to make sure I don't lose the non- >> ASCII characters coming from the URL. > > str is all about 8-bit bytes. True in P

Re: elementtree XML() unicode

2009-11-03 Thread Kee Nethery
On Nov 3, 2009, at 7:06 PM, Gabriel Genellina wrote: En Tue, 03 Nov 2009 23:06:58 -0300, Kee Nethery escribió: If there was a place in the official docs for me to append these nuggets of information to the sections for "xml.etree.ElementTree.XML(text)" and "xml.etree.ElementTree.dump(

Re: elementtree XML() unicode

2009-11-03 Thread Gabriel Genellina
En Tue, 03 Nov 2009 23:06:58 -0300, Kee Nethery escribió: If there was a place in the official docs for me to append these nuggets of information to the sections for "xml.etree.ElementTree.XML(text)" and "xml.etree.ElementTree.dump(elem)" I would absolutely do so. http://bugs.python.org/ a

Re: elementtree XML() unicode

2009-11-03 Thread John Machin
On Nov 4, 1:06 pm, Kee Nethery wrote: > On Nov 3, 2009, at 5:27 PM, John Machin wrote: > > > > > On Nov 4, 11:01 am, Kee Nethery wrote: > >> Why is this not working and what do I need to do to use Elementtree > >> with unicode? > > > What you need to do is NOT feed it unicode. You feed it a str

Re: elementtree XML() unicode

2009-11-03 Thread John Machin
On Nov 4, 11:01 am, Kee Nethery wrote: > Having an issue with elementtree XML() in python 2.6.4. > > This code works fine: > >       from xml.etree import ElementTree as et >       getResponse = u'''   > bobblehead city>city''' >       theResponseXml = et.XML(getResponse) > > This code errors out

Re: elementtree XML() unicode

2009-11-03 Thread Gabriel Genellina
En Tue, 03 Nov 2009 21:01:46 -0300, Kee Nethery escribió: Having an issue with elementtree XML() in python 2.6.4. This code works fine: from xml.etree import ElementTree as et getResponse = u''' bobbleheadcity>city''' theResponseXml = et.XML(getResponse) This code errors

elementtree XML() unicode

2009-11-03 Thread Kee Nethery
Having an issue with elementtree XML() in python 2.6.4. This code works fine: from xml.etree import ElementTree as et getResponse = u''' bobbleheadcity>city''' theResponseXml = et.XML(getResponse) This code errors out when it tries to do the et.XML() from xml.etree impor

Re: elementtree XML() unicode

2009-11-03 Thread Kee Nethery
On Nov 3, 2009, at 4:44 PM, Gabriel Genellina wrote: En Tue, 03 Nov 2009 21:01:46 -0300, Kee Nethery escribió: I've removed all the stuff in my code and tried to distill it down to just what is failing. Hopefully I have not removed something essential. Sounds like I did remove somethi

Re: elementtree XML() unicode

2009-11-03 Thread Kee Nethery
On Nov 3, 2009, at 5:27 PM, John Machin wrote: On Nov 4, 11:01 am, Kee Nethery wrote: Having an issue with elementtree XML() in python 2.6.4. This code works fine: from xml.etree import ElementTree as et getResponse = u''' bobbleheadcity''' theResponseXml = et.XML(getRespo

Re: elementtree XML() unicode

2009-11-03 Thread John Machin
On Nov 4, 12:14 pm, Kee Nethery wrote: > On Nov 3, 2009, at 4:44 PM, Gabriel Genellina wrote: > > > En Tue, 03 Nov 2009 21:01:46 -0300, Kee Nethery   > > escribió: > > >> I've removed all the stuff in my code and tried to distill it down   > >> to just what is failing. Hopefully I have not remove