|
From: Seshu N. <ses...@sd...> - 2001-01-03 22:56:56
|
Thanks finn. I downloaded the latest jython-2.0b1 and it
imports the glob/re modules as stand-alone execution (at
command line).
However, the glob module still cannot be imported when tried
as below in Java code:
Is there any special command to be used or something like
special setting for PYTHONPATH or someother env
variables to be used to run this Java source:
Any help will be appreciated.
Thanks.
__________________________________________
import org.python.util.PythonInterpreter;
import org.python.core.*;
import java.util.*;
public class
PythonInterpreterTest{
PythonInterpreter interp =
new PythonInterpreter();
public void test() throws PyException {
:
interp.exec("import glob"); //Cannot import glob here
interp.exec("files = glob.glob('*.java')");
}
}
__________________________________________________
[Seshu Nimmala]
>I'm not able to import "glob" module or "re" module for use in jython.
>I'm using jython-2.0a2.
>Is it a bug or a current limitation?
It was a bug in alpha2. The re.py from CPython2.0 wasn't included in the
installer. It is fixed in beta1.
regards,
finn
>
|