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

Method initialize

IPython/terminal/ipapp.py:275–292  ·  view source on GitHub ↗

Do actions after construct, but before starting the app.

(self, argv=None)

Source from the content-addressed store, hash-verified

273
274 @catch_config_error
275 def initialize(self, argv=None):
276 """Do actions after construct, but before starting the app."""
277 super(TerminalIPythonApp, self).initialize(argv)
278 if self.subapp is not None:
279 # don't bother initializing further, starting subapp
280 return
281 # print(self.extra_args)
282 if self.extra_args and not self.something_to_run:
283 self.file_to_run = self.extra_args[0]
284 self.init_path()
285 # create the shell
286 self.init_shell()
287 # and draw the banner
288 self.init_banner()
289 # Now a variety of things that happen after the banner is printed.
290 self.init_gui_pylab()
291 self.init_extensions()
292 self.init_code()
293
294 def init_shell(self):
295 """initialize the InteractiveShell instance"""

Callers 1

test_cli_priorityFunction · 0.45

Calls 6

init_shellMethod · 0.95
init_bannerMethod · 0.95
init_pathMethod · 0.80
init_gui_pylabMethod · 0.80
init_extensionsMethod · 0.80
init_codeMethod · 0.80

Tested by 1

test_cli_priorityFunction · 0.36