Hi thanx for the help. I have already done the interpreter part with a sample inter.eval(“2+3”).
Will look for your source for embedding coz that’s what I intend to do OR running a jython script from with in java. Currently the issue I am facing is how to get the java know of the jython scripts
Sungard - Stockholm, Sweden
+46 08 4540 309
Sent: den 20 november 2008 11:46
Cc: Hassan, Ammar
Subject: Re: [Jython-users] Using Jython from Java
A good starting point to learn more about the Java and Jython interoperability is the Jython User Guide available form the web site:
I often use to embed Jython scripts calling them from Java or Groovy base code. This is particularly useful to add dynamic pieces of logic that does not require compiling. A good example are the business logic modules, which often undergo changes. And a last remark: The Python syntax is much more pleasant to read compared to Javanese.
The basic way to embed a Jython script is to call: org.python.util.PythonInterpreter;
The advanced way to call a Jython script, is using the JSR223 API, which also implements the object interchange facilities (Java 6 only);
Both solutions are well described inside the Jython Users Guide.
Have fun with Jython.
AMS Hortolāndia / SP -
phone: +55 13 9762 4094
cell: +55 13 8117 3316
11/20/2008 07:32 AM
I am new to Jython/Python and was wondering how I can access my jython code from within java (both as a script and embedded Java code (if this is the possibility)
I can’t find any good tutorials and shall be grateful if someone can point to it.
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
Jython-users mailing list