getting values from an "exec" statement

Miki Tebeka tebeka at cs.bgu.ac.il
Wed Oct 1 02:17:26 EDT 2003


Hello Toby,

> I'm designing an educational application that will run Python code and
> check the output against a pre-define answer. I want to use the "exec"
> statement to run the code, but I don't know how to get output from it.
[...]

The battaries are there already...
http://www.python.org/doc/current/lib/module-doctest.html

HTH.
Miki




More information about the Python-list mailing list