2012-02-26, 05:58
I was able to get lxml to work on Dharma + Ubuntu 11.10 x86-64 by extracting the contents of the following RPM to /usr/share/xbmc/system/python/lib/python2.4/ (specifically the directory within the RPM: /./usr/lib64/python2.4/site-packages/lxml/)
I tried a few other RPMs that I found but they either were rejected by python (ImportError) or they caused XBMC to die. This one works like a charm.
I would prefer to not need lxml, unfortunately I am using a library that depends upon it. I would be willing to sacrifice speed for a full python implementation. In Python 2.5 (Dharma is 2.4), there is xml.etree.ElementTree.fromstring for XML parsing, but there is no comparable lxml.html.document_fromstring. BeautifulSoup is a great library, unfortunately the API is different from lxml so it is not a drop in replacement.
Any thoughts on a full python implementation of lxml's API (especially lxml.html)?
I tried a few other RPMs that I found but they either were rejected by python (ImportError) or they caused XBMC to die. This one works like a charm.
I would prefer to not need lxml, unfortunately I am using a library that depends upon it. I would be willing to sacrifice speed for a full python implementation. In Python 2.5 (Dharma is 2.4), there is xml.etree.ElementTree.fromstring for XML parsing, but there is no comparable lxml.html.document_fromstring. BeautifulSoup is a great library, unfortunately the API is different from lxml so it is not a drop in replacement.
Any thoughts on a full python implementation of lxml's API (especially lxml.html)?