Embedding in JPython

Steffen Ries steffen.ries at sympatico.ca
Tue Aug 1 08:18:02 EDT 2000


Hi,

just a simple question:

I'm trying to embed a script into a Java application. 

The script defines a function, which is called when certain events
happen. The function is supposed to take a Java object, analyze it and
return a value.

Is there a way to call a python function directly?

For now I have implemented:
  interp.set("java_obj", javaObj);
  interp.exec("foo(java_obj)");
which looks rather in-elegant.

tia,
/steffen
-- 
steffen.ries at sympatico.ca	<> Gravity is a myth -- the Earth sucks!



More information about the Python-list mailing list