Jython and python modules
Asked 07 September, 2021
Viewed 2.9K times
  • 59
Votes

I've just started using the PythonInterpreter from within my Java classes, and it works great! However, if I try to include python modules (re, HTMLParser, etc.), I'm receiving the following exception (for re):

Exception in thread "main" Traceback (innermost last):
  File "", line 1, in ?
ImportError: no module named re

How could I make the classes from the jython jar "see" the modules python has available?

4 Answer