I'm embedding Jython in a Java application like this:

PythonInterpreter interp = new PythonInterpreter();

Where "console" is a custom OutputStream. Works fine, output printed from the script with "print" statements go to "console" as expected. But if the script contains an error, the interpreter doesn't seem to give any error messages - it just stops. I think it's supposed to give some feedback, though.

How do I get error messages from the interpreter? I thought interp.setErr(console) was supposed to do that.

Best Regards,
Joonas Pulakka