Replacing a package with another

2008-01-26 Thread J . Pablo Fernández
Hello, Is it possible to replace one package with another at runtime, that is, I have package a.blah which I want instead of b.blah, so I can "inject" functionality in an existing package? Thanks. -- J. Pablo Fernández <[EMAIL PROTECTED]> (http://pupeno.com) -- http://mail.py

ElementTree and DTDs

2008-05-15 Thread J . Pablo Fernández
Hello, Is ElementTree supposed to load DTDs? I have some xmls heavy on entities and it fails this way: Python 2.5.2 (r252:60911, Apr 21 2008, 11:12:42) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> filename = "revo/xml/a.x

Re: ElementTree and DTDs

2008-05-16 Thread J . Pablo Fernández
Or is there another library that would handle DTDs correctly, performing entity replacements? Thanks. On May 16, 12:20 am, J. Pablo Fernández <[EMAIL PROTECTED]> wrote: > Hello, > > Is ElementTree supposed to load DTDs? I have some xmls heavy on > entities and it fails this way

Getting elements and text with lxml

2008-05-16 Thread J . Pablo Fernández
Hello, I have an XML file that starts with: *-a out of it, I'd like to extract something like (I'm just showing one structure, any structure as long as all data is there is fine): [("ofc", "*"), "-", ("rad", "a")] How can I do it? I managed to get the content of boths tags and the text u

Re: Getting elements and text with lxml

2008-05-17 Thread J . Pablo Fernández
On May 17, 2:19 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Fri, 16 May 2008 18:53:03 -0300, J. Pablo Fernández <[EMAIL PROTECTED]>   > escribió: > > > > > Hello, > > > I have an XML file that starts with: > > > > >

Re: Getting elements and text with lxml

2008-05-17 Thread J . Pablo Fernández
On May 17, 4:17 pm, Stefan Behnel <[EMAIL PROTECTED]> wrote: > J. Pablo Fernández wrote: > > I have an XML file that starts with: > > > > > > > > >   *-a > > > > > out of it, I'd like to extract something like (I'm just showi