[XML-SIG] More on XML / Python dependencies

wask@mcc.com wask@mcc.com
Fri, 23 Jul 1999 11:23:02 -0500

Hello, again ---

The other day I sent the following:

> I am running the XML package in conjunction with JPython. Since the
> site states that a lot of the Python capability is found within JPython, I
> decided not to install Python.

> However, the parser search capability within saxexts depends upon the
> functionality found in imp. As imp is not implemented in JPython, I am
> forced to install Python just to get the ability to search for a parser.

With a replacement for saxexts that I was directed to, I obtain "imp" from
org.python.core, not Python.

        for parser_name in list:

            if sys.platform[:4] == "java":
                    from org.python.core import imp

However, I'm still forced into the Python environment in the next statement:

                    drv_module = imp.importName(parser_name, 0, globals())

(An exception I got was that urllib couldn't be found. On my machine, that
module is in Python's \Lib directory.)

I'm not haggling over code. Rather, I wish to raise the question whether or
not there are plans afoot to decouple XML from Python? This issue is more
than that of what type of files are stored in which directories.

I raise this question as I have a customer whom I'm trying to convince to
use JPython. I told him he didn't need to install Python. Currently, that is
wrong when using the XML package.

Please understand that I am not criticizing - I'm just trying to get a
better understanding of the environment.

--- Fred