Re: normalize in PyXML version hell (was: ...)

Unknown <[email protected]>
Newsgroups gmane.comp.sysutils.ark.devel
Message-ID <[email protected]>
Harlan writes:

> I'm pretty sure I'm running Python-2.0 and PyXML-0.6.1.
> Not positive on the last bit, though.  Does python have a
> way to query/display the version number of a package?

(sys.version is the version of your Python interpreter;
don't know of a general way to get at a sub-package
version...)

OK, minor investigation suggests that the 'normalize' method
for a DOM doc was introduced in 0.6.2 (sigh).  So try
replacing the normalize line with

        try:
            root_elem.normalize()
        except AttributeError:
            # normalize was only introduced in PyXML 0.6.2, so
            # maybe we can get by without it...
            pass

Now, 'normalize' is the method that stitches together all
adjacent Text nodes in a DOM.  Here's hoping the
split-up-but-adjacent Text nodes case doesn't arise...

Thanks for keeping on the case; I've adjusted the
documentation, which I hope to check in tonight.

See how that goes...

Will
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.