eval() -- don't print to stdout

Rob Nikander nikander at mindspring.com
Thu Jul 12 11:31:15 EDT 2001


In article <20010712.112138.213975407.8136 at kanchenjunga.mindspring.com>,
"Rob Nikander" <nikander at mindspring.com> wrote:

> How do you prevent eval/exec from printing its result to the console? 

Oops.  I figured it out 2 minutes after posting.   Passing 'eval' to
compile() rather than letting the third parameter default to 'single'
seems to do the trick.



More information about the Python-list mailing list