eval() -- don't print to stdout

Rob Nikander nikander at mindspring.com
Thu Jul 12 17:21:46 CEST 2001


Hi,
How do you prevent eval/exec from printing its result to the console?  I
would like to get the result as a string and display it in a GUI widget, but
when I call eval() it returns None and prints to console. The 'code'
module does the same thing.

Rob



More information about the Python-list mailing list