I'm trying to define a new function on the at runtime, this fails: >>> eval( "def global_func_name():\n\tpass" ) Traceback (most recent call last): File "<stdin>", line 1, in ? File "<string>", line 1 def global_func_name(): ^ SyntaxError: invalid syntax any idea how I can do this? Thanks, Bruce.