MCPcopy Index your code
hub / github.com/ipython/ipython / _run_module

Method _run_module

IPython/core/shellapp.py:489–500  ·  view source on GitHub ↗

Run module specified at the command-line.

(self)

Source from the content-addressed store, hash-verified

487 self.exit(1)
488
489 def _run_module(self):
490 """Run module specified at the command-line."""
491 if self.module_to_run:
492 # Make sure that the module gets a proper sys.argv as if it were
493 # run using `python -m`.
494 save_argv = sys.argv
495 sys.argv = [sys.executable] + self.extra_args
496 try:
497 self.shell.safe_run_module(self.module_to_run,
498 self.shell.user_ns)
499 finally:
500 sys.argv = save_argv

Callers 1

init_codeMethod · 0.95

Calls 1

safe_run_moduleMethod · 0.80

Tested by

no test coverage detected