JARs + Jython classes
Paul Brown
pbrown74 at hotmail.com
Tue Jul 2 11:48:50 EDT 2002
hi
i'd like distribute my jython classes along with my compiled java classes,
in the same JAR
does anyone know the syntax for loading a jython class from a JAR, or even
if this is POSSIBLE?
i'm writing java code like this, to use a jython class:
PythonInterpreter interp = new PythonInterpreter();
Result res = new Result();
interp.execfile("Constraint.py");
interp.exec("c=Constraint()");
interp.set("res", new Result());
interp.exec("c.apply(res)");
as you can see, the Constraint is written in jython and i'd like to
instantiate it and call the apply(r) function,
where 'r' is a java object.
i'd like to put Constaint.py in the same JAR as Result.class etc.
thanks
paul
More information about the Python-list
mailing list