Gregory Jorgensen<gregj at pobox.com> wrote: >eval() evaluates an expression. exec() executes a statement. Try this: > >>>> exec("def f():\n\treturn 'hello'\t") When I try the above I get a syntax error... I am using PythonWin. Is this a bug? Costas >>>> f() >'hello' > >>>> eval("f()") >'hello'