def ex(self, cmd):
    'Execute a normal python statement in user namespace.'
    with self.builtin_trap:
        exec(cmd, self.user_global_ns, self.user_ns)
Execute a normal python statement in user namespace.
def ex(self, cmd):
    
    with self.builtin_trap:
        exec(cmd, self.user_global_ns, self.user_ns)