Jython/Python Libs

Ype Kingma ykingma at accessforall.nl
Tue Jan 7 20:03:27 CET 2003


Terry Hancock wrote:

> Hi all,
> I need to survey what modules are supported in both Jython and Python
> (which is probably nearly the same as knowing which modules have no
> dependencies on C extensions).  What would be the quickest way to
> establish
> that?  (As in, is there a way to import and test them all automatically
> and report the failures, or has someone already tabulated this somewhere).
> 
> Ideally I'd also catch the few cases of modules which don't work correctly
> for language compatibility regions, but I know that can be pretty subtle.
> 
> I'm really only interested in the standard library modules -- I'll test
> any extra modules we need case-by-case anyway.
> 
> The goal is to clearly establish and document what subset of Python will
> run on either platform.

You can use python libs available from the CPython installation
by extending the Jython path with the CPython library path, so Jython will
load it's own libraries before looking for the CPython ones.

Then have Jython run the tests that come with the standard CPython
installation.

I tried this a few years ago when I started using Jython, and I have
forgotten the details. The biggest problem was locating the main test
module, ie. the one that invokes all the tests. I'm not even sure
that these tests are still distributed with CPython.

I do remember being surprised at how many tests actually passed
then. In case you can repeat this exercise I'd like to know the
results.


Have fun,
Ype

-- 
email at xs4all.nl




More information about the Python-list mailing list