|
From: Stephen S. <ss...@ci...> - 2001-05-31 19:05:51
|
Folk, I am attempting to embed Jython in a system whose dynamic configuration is to include Jython expressions and code fragments. These code fragments are runtime evaluated and effect the progress of the overall system. The fragments serve as statement guards, iterators, etc. Thus, I need to do a good deal of expression evaluation, examine, in Java, the results of the evaluation and proceed. Not every expression will naturally set a variable in the environment storing its results. Thus, I would like to be able to determine the value of the evaluated expression without resorting to a storage side effect . The public interfaces to Py (such as runCode) return a value. However, in the way I have been experimenting with them, the value is always PyNone. In addition, a printed result of the expression evaluation is delivered to sysout. I am looking, therefore, for a couple of things: 1) reliably suppressing delivery of the computed result of the expression to sysout 2) reliably delivering the computed result to the invoker of the expression evaluation. Any aid is appreciated. Response by E-mail would also be appreciated. Thanks -steve |