From: Nicola de C. <nde...@rs...> - 2005-04-06 13:59:53
|
Hi all, I am trying to access the functionality offered by this simple jython command >> sys.settrace(MyTraceBackFunction()) from a java program that runs a Jython interpreter . I tried the following : PySystemState s = Py.getSystemState(); s.settrace(new MyTraceBackFunction()); Where MyTraceBackFunction is defined as follow: public class MyTraceBackFunction extends PyObject { public PyObject __call__(PyFrame frame, PyString name, PyObject arg) { // do something here. return this; } } However it doesn't work ... I couldn't find any example about it .. could you point me to the rigth direction ? Thanks in advance Nicola |