MCPcopy Create free account
hub / github.com/ipython/ipython / ex

Method ex

IPython/core/interactiveshell.py:2682–2685  ·  view source on GitHub ↗

Execute a normal python statement in user namespace.

(self, cmd)

Source from the content-addressed store, hash-verified

2680 #-------------------------------------------------------------------------
2681
2682 def ex(self, cmd):
2683 """Execute a normal python statement in user namespace."""
2684 with self.builtin_trap:
2685 exec(cmd, self.user_global_ns, self.user_ns)
2686
2687 def ev(self, expr):
2688 """Evaluate python expression expr in user namespace.

Callers 9

test_omit__namesMethod · 0.80
test_mix_termsMethod · 0.80
test_timeit_shlexFunction · 0.80

Calls

no outgoing calls

Tested by 9

test_omit__namesMethod · 0.64
test_mix_termsMethod · 0.64
test_timeit_shlexFunction · 0.64