|
module difflib not found: msg#00074lang.jython.user
This is a piece of Java code where I try to use a Python source code file. try { Properties preProperties = System.getProperties(); Properties postProperties = new Properties(); postProperties.put("sys.path", "/home/lddekeyz/python/Libs"); String[] input = { page1, page2 }; //defined above PythonInterpreter.initialize(preProperties, postProperties, input); PythonInterpreter interp = new PythonInterpreter(); interp.execfile(inputStream);//also defined above, is a inputStream to a source file PyObject output = interp.get("output"); String finalResult = (String) output.__tojava__(String.class); log.warn("the result is : " + finalResult); } catch (Exception e) { log.warn("=========> interpretion went wrong : " + e); } In this code file, the difflib module is imported. But when this Java code is run, I get following warning in my log: WARNING: =========> interpretion went wrong : Traceback (innermost last): File "<iostream>", line 9, in ? ImportError: no module named difflib Any idea what's wrong here? The difflib.py module is in the Lib directory. If you don"t have a registry file, then it doesn"t> > > > > ------------------------------------------------------- > This SF.Net email is sponsored by Yahoo. > Introducing Yahoo! Search Developer Network - Create apps using Yahoo! > Search APIs Find out how you can build Yahoo! directly into your own > Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 > _______________________________________________ > Jython-users mailing list > Jython-users@xxxxx > https://lists.sourceforge.net/lists/listinfo/jython-users ------------------------------------------------------- This SF.Net email is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: PythonString to JavaString, Alex Greif |
|---|---|
| Next by Date: | Re: socket timeouts, Alan Kennedy |
| Previous by Thread: | PythonString to JavaString, Lieven De Keyzer |
| Next by Thread: | RE: module difflib not found, Updike, Clark |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |