Exec Statement Question
victorsubervi at gmail.com
Sun Nov 29 21:11:13 CET 2009
I have the following line of code:
exec('%s()' % table)
where 'table' is a variable in a for loop that calls variables from another
script. I've made it so that it only calls one variable. I know for a fact
that it's calling that variable in the script because it found errors in
that script. I've tried to have it return the following:
It doesn't return anything. No errors are thrown because the code evaluates.
I don't know how to capture the output. I would like to do something like:
var = exec(...)
but of course those options don't work. Suggestions?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list