moo.core.code.compile_verb_code

moo.core.code.compile_verb_code(body, filename)

Take a given piece of verb code and wrap it in a function.

Raises SyntaxError if RestrictedPython rejects the code (restricted construct, underscore-aliased import, etc.). The error messages from the compiler are included so the caller can report them to the user.