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

 

Regards

 

Ammar Hassan

Sungard - Stockholm, Sweden

+46 08 4540 309


From: claudef@br.ibm.com [mailto:claudef@br.ibm.com]
Sent: den 20 november 2008 11:46
To: jython-users@lists.sourceforge.net
Cc: Hassan, Ammar
Subject: Re: [Jython-users] Using Jython from Java

 


Dear Hammar,  

A good starting point to learn more about the Java and Jython interoperability is the Jython User Guide available form the web site:
http://www.jython.org/Project/userguide.html

 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.

Regards,
Claude

Claude Falbriard
Developer
AMS Hortolāndia / SP - Brazil
phone: +55 13 9762 4094
cell:       +55 13 8117 3316
e-mail:  claudef@br.ibm.com


<Ammar.Hassan@sungard.com>

11/20/2008 07:32 AM

To

<jython-users@lists.sourceforge.net>

cc

 

Subject

[Jython-users] Using Jython from Java

 

 

 




Hi
 
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.
 
Thanks
Regards
 
Ammar Hassan
 -------------------------------------------------------------------------
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
http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________
Jython-users mailing list
Jython-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users