> If there is a way to exec multiple statements (including conditionals, > loops, etc.), that would be fine. You're in luck. >>> s = '''print 'hi' ... print 'there' ... ''' >>> c = compile (s, 'string', 'exec') >>> exec (c) hi there >>> Alex.