Importing a class, please help...

Alex Martelli aleaxit at yahoo.com
Mon Feb 6 00:05:11 EST 2006


anon <anon at nospam.nospam> wrote:

> Xavier
> 
> Yes I meant Python.  I have also been using Jython and I am VERY WELL aware
> what a JAR is.  Jython has the ability to call methods stored in classes in
> a JAR.  I was only asking if this could be done with Python also.

Classic Python is able to import Python modules from a .zip file; it
would be a reasonably easy tweak to allow the extension to be .jar or
.foo or .zap as well as .zip -- but they'd still have to be Python
modules.  Java classes use a completely different bytecode from Classic
Python: if you need to access such JVM bytecode, use Jython instead.


Alex



More information about the Python-list mailing list