Value of exec statements?
John Ehresman (jehresma@archaeopteryx.harvard.edu)
06 Feb 1995 17:10:54 GMT
I'm working on a project where I want to embed snippets of python code in
a text document that will be evaluated when the document is displayed. I
want to give the user more flexibility than is allowed with the eval
function, but I also want a simple variable reference to return the
variable's value like python does in interactive mode. Is there any way
to do this with exec? To be more precise, is there any way to obtain the
value of last python expression evaluated by exec?
Thanks,
John