2011/5/27 Rodrigo Gomes <rgomes@gmail.com>

I think that I'm missing something. There is a way to use (import) python modules in a script and run it in my java code, whitout put in my code the path to jython jar?
I'm trying to use the 're' module to work with regex, but when I run the code I receive an error "no module named re".

I'm able to run my script if I delete the code that uses regex (or try to import any module)

I tried to do this:

to include de Lib directory in my jython.jar, but it didn't work. I'm still getting the same error.

Do I really need to put in my code, the path to jython home? Or I'm missing something important?


You need the jython.jar somewhere in your Java path. That does not necessarily means the Jython home path. I guess you had your answer on stackoverflow.



My blog and profile (http://pierrethibault.posterous.com)
YouTube page (http://www.youtube.com/user/tubetib)
Twitter (http://twitter.com/pierreth2)