[Ironpython-users] no module named urllib

László Frank laszlo.frank at gmail.com
Wed Jul 20 10:28:17 EDT 2016


Thanks Thimo for the update.

>> If you do not need a specific feature from lxml, then the defualt
ElementTree shoul work nicely
Actually, the python library I am trying to use is not my code, it has been
published by Cisco and is quite complex. Here and there pops up the lxml
import, and at current stage I can't decide whether I can port it to
ElementTree (but I guess Cisco had a good reason for using lxml). I
remember seeing XSLT and XPath is used in the code and I don't think
standard xml supports it.

>> The IronPython is based on libxml.
I do not know what you mean by that. Libxml2 is written in C and compiled
into to a native image. As a result, I can't make use of it from
IronPython. Sadly enough the situation is the same as with lxml.

Sadly enough,I can't see any other option than creating a wrapper class
around .Net XDocument and mimic lxml functionality through it. Quite some
effort..

Regards,
Laszlo


On Tue, Jul 19, 2016 at 7:32 PM, Langbehn, Thimo <t.langbehn at euroimmun.de>
wrote:

> Hi László,
>
> > Based on your suggestion I think I will have to re-install a couple of
> packages with Ipy, as I only did it with Python and thought it is
> eventually the same.
>
> The additional Packages, as installed with pip, are usually the same. The
> core packages that come with (Iron)Python however are different.
>
> > Touching the installation topic, I would like to ask one other thing. I
> already learnt I can't use lxml package from IronPython. Have you by any
> chance heard about any alternatives to it ?
>
> If you do not need a specific feature from lxml, then the defualt
> ElementTree shoul work nicely. The IronPython is based on libxml.
>
> import xml.etree.ElementTree as ET
> See https://docs.python.org/2/library/xml.etree.elementtree.html
>
> Cheers,
>
> Thimo
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20160720/e6b395eb/attachment.html>


More information about the Ironpython-users mailing list