JEPP

I’ve been working with JEPP this morning. A co-worker, Joe Grant, recommended it to me for cases where we have a need to run some of our Python based tools from Java. It turns out that it works pretty well and I think it may help us out with a few things at work. One thing that I was pleased to find came from this example:

dualmini:~/Work/jep-2.2 corbinbs$ cat test2.py
class Twig(Exception):
    pass

x = 1

if x == 1:
    raise Twig("I'm a pretty error message!")

dualmini:~/Work/jep-2.2 corbinbs$
dualmini:~/Work/jep-2.2 corbinbs$ java -jar jep.jar test2.py
jep.JepException: : I'm a pretty error message!
at jep.Jep.run(Native Method)
at jep.Jep.runScript(Jep.java:191)
at jep.Jep.runScript(Jep.java:167)
at jep.Run.run(Run.java:58)
at jep.Run.main(Run.java:153)
dualmini:~/Work/jep-2.2 corbinbs$

So, it looks like CPython exceptions bubble back up quite nicely. This will likely help us improve some of our error handling/reporting in cases where we’ve got Java tools/apps calling out to some of our Python tools. JEPP is definitely worthy of the “Rock The Fat Knot” stamp of approval.

Add post to:   Delicious Reddit Slashdot Digg Technorati Google
Make comment

Comments

Huh?

As normal, Corbin’s computer lingo has lost this lowly sports writer.

Required. 30 chars of fewer.

Required.

captcha image Please, enter symbols, which you see on the image