Test a Python function within Python without importing
Peter Hansen
peter at engcorp.com
Tue Nov 2 18:55:11 EST 2004
Marco Aschwanden wrote:
> On Tue, 02 Nov 2004 16:06:42 +0100, Diez B. Roggisch
> <deetsNOSPAM at web.de> wrote:
>
>> use exec on the compiled object - the details are in the docs.
>
> I did it... but exec() does not return a value - or does it?
And note, though you probably discovered this already, that
exec is a statement, not a function. Don't use the parentheses,
and you won't expect a return value... (as with print, for example).
More information about the Python-list
mailing list