12.1.2010 14:54, Markus Krosche kirjoitti:
Hi all Jython-Users,

I have a little problem. I use Jython as a "scripting environment" for my Java software. Within the Java code I would like to know whether my string holds a valid Jython expression or not, without evaluating it. So I simply would like to know whether the string is syntactically correct ...

Is there any way to do that using the Jython interface?

For example something like this here:

isValid("X1 + X2")

X1 and X2 are of course known by the intepreter object ...
from codeop import compile_command

Consult the stdlib docs for interpreting the results.

Thanks and best regards
------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________ Jython-users mailing list Jython-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jython-users