IronPython 2.0

0 views
Skip to first unread message

Craig Nicol

unread,
Oct 22, 2008, 6:58:19 PM10/22/08
to door-r...@googlegroups.com
I've tested the code in IronPython2.0RC1, and now that zipfile works, it seems the only code change required between the CPython and IronPython versions is the XSLT transformation. In other words, within odr_util.py, there needs to be an IronPython implementation of xsltproc_stream() alongside the CPython version and a wrapper that selects between the CPython and IronPython versions at runtime depending on what xml libraries are available.

I'm expecting something like:

def xsltproc_stream(xsltstream, stream):
    try:
        import libxml2
        import libxslt
        xsltproc_stream_libxslt(xsltstream, stream)
    except ImportError:
        try:
            import System.Xml
            xsltproc_stream_SystemXml(xsltstream, stream)
        except ImportError:
            raise ImportError, 'No valid xml libraries found'


--
skype: callto:craignicol     sip:craig...@ekiga.net    http://twitter.com/craignicol     http://craignicol.wordpress.com
Reply all
Reply to author
Forward
0 new messages