I am using Jython to imbed into other applications,
specifically we are building a Jython development environment and tools inside
Eclipse. However there is a couple of problems.
As I was looking at the Jython code, I noticed that
certain error conditions can result in the Jython code calling System.exit().
This is .... very bad. It would cause the application imbedding Jython to
spontaneously exit and potentially cause problems. Instead these calls should
throw RuntimeException or InternalError. This would accomplish the same task of
exiting the interpreter at these points while allowing the developers imbedding
the code to catch these exceptions and handle them within their respective
Another problem is the dependence upon output and
error streams for rendering interpreter replies. Although this is appropriate in
a console environment, it is not always appropriate in other environments. There
should be a manner to allow the caller to get the result of the call back as a
string object (whether it be an exception or simple result) and then manage that
string as they see fit.
I know that the first issue is rather technically
easy to handle. However the second issue is beyond my knowledge of Jython. I
would be interested in comments on the matter. Our project is just ramping up.
It will be available in a couple days at http://ejython.tigris.org/. The name
eJython stands for "Eclipse Jython." We will have a rather large project
including integration of an interactive interpreter and Jython development
tools. Our ultimate goal is to hook this project into the Eclipse framework
deeply so that users can write refactoring tools in jython using its powerful
parsing abilities and much more. In addition we hope to push Jython developers
into using eclipse through the Jython Development Toolkit (jydt).
If you are interested and have ideas, please stop
by when we get the pages up and running. File your ideas in issue tracking and
if you are interested in helping out let us know.