exec("a=dir()")
print a
--Darrell
Greg Fortune wrote:
> Is there any way to "catch" the value produced by an exec? I'm
> considering things like print statements that don't really assign a value,
> but do send a result to stdout.
>
> For example, if I execute
>
> exec('print dir()')
> ...