[ANN] lxml 2.2 released

Stefan Behnel stefan_ml at behnel.de
Sat Mar 21 17:11:20 EDT 2009


python at bdurham.com wrote:
> Is it possible to use the same install of lxml across multiple versions
> of Python, eg. I have 2.4, 2.5, 2.6, and 3.0 installed on my workstation
> - can I use a single copy of lmxl for 4 versions of Python?

It would be interesting to have some more information about your intentions
here.

In general, the answer is no. It's a C extension which gets compiled
against the C-API of Python. You will quickly run into unresolved symbols
when you try using a binary module that was compiled against one Python
version in a different Python version.

However, it's built using exactly the same sources on all platforms, and
you only need to keep separate copies of the binary modules. The rest are
Python modules that are not platform specific. Also, the dependencies
(libxml2 and libxslt) do not depend on Python but only on the operating system.


> My understanding is that we can replace our use of elmentree and
> htmlparser with lxml.

Yes, although the API of HTMLParser is different from lxml's own HTML
parser and tree interface (which is basically trivial).


> Congrats on your latest release!

Thanks!

Stefan



More information about the Python-list mailing list