I have the following function in python:
def foo():
print 1
return 1
In the shell, I run
foo()
and I get
1
1
as I should. But when I run the following in the shell
exec('foo')
I get nothing? why?
This is a diluted version of a much larger problem.