Jython with dependencies on lxml

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Jython with dependencies on lxml

Cory Casanave

I am currently looking into using Jython and/or Python for an information federation project. One of the information sources (TAXII) has a Python library dependent on lxml (http://libtaxii.readthedocs.org/en/latest/installation.html) . Others, including my integration models have Java APIs (Eclipse EMF) that are accessible from Jython.

 

Are the dependent libraries (libxml2, linxslt1, zlibg) available in Jython? List I saw was some mention of LXML 4 years ago but nothing recent.

Alternatively, are there any Python libraries for Eclipse EMF or OMG-XMI (The file format used for the models)?

 

Thanks in advance!


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Jython-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-users
Reply | Threaded
Open this post in threaded view
|

Re: Jython with dependencies on lxml

Stefan Richthofer
The website link you posted states the folowing:
lxml - A Pythonic binding for the C libraries libxml2 and libxslt.
 

This makes it difficult to run in Jython. You can try the following:
 
- use JyNI (www.jyni.org)
Since it's still alpha and I never tested with lxml, there's a great chance it will fail.
 
- Jython has some built-in xml capabilities: http://www.jython.org/docs/library/markup.html#structured-markup-processing-tools
Maybe you can use these to replace the dependency on lxml.
 
- You can fork lxml and try to fix its dependencies using Java bindings of libxml2 and libxslt.
https://github.com/rath/libxml2-java
http://xmlsoft.org/XSLT/python.html mentions Java bindings called LibxmlJ as part of GNU classpath.
If you get this working, please consider to make your solution available on github or somewhere.
 
- Use an embedded solution via JPY http://jpy.readthedocs.org/en/latest/intro.html or JEP https://github.com/mrj0/jep
 
 
Regards
 
Stefan
 

Gesendet: Montag, 24. November 2014 um 16:37 Uhr
Von: "Cory Casanave" <[hidden email]>
An: "[hidden email]" <[hidden email]>
Betreff: [Jython-users] Jython with dependencies on lxml

I am currently looking into using Jython and/or Python for an information federation project. One of the information sources (TAXII) has a Python library dependent on lxml (http://libtaxii.readthedocs.org/en/latest/installation.html[http://libtaxii.readthedocs.org/en/latest/installation.html]) . Others, including my integration models have Java APIs (Eclipse EMF) that are accessible from Jython.
 
Are the dependent libraries (libxml2, linxslt1, zlibg) available in Jython? List I saw was some mention of LXML 4 years ago but nothing recent.
Alternatively, are there any Python libraries for Eclipse EMF or OMG-XMI (The file format used for the models)?
 
Thanks in advance!
------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk_______________________________________________[http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk_______________________________________________] Jython-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/jython-users[https://lists.sourceforge.net/lists/listinfo/jython-users]

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Jython-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-users