Testing a source Script in Jpython

Fredrik Lundh fredrik at pythonware.com
Mon Sep 6 11:22:15 EDT 1999


Carlos Ors <cors at recercai.com> wrote:
> How can I test a script without executing. (Only if structure belongs to the
> python grammar)?

try:
    compile(script_body, script_name, "exec")
except SyntaxError:
    print "invalid syntax"

</F>





More information about the Python-list mailing list