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

Method init_extensions

IPython/core/shellapp.py:317–344  ·  view source on GitHub ↗

Load all IPython extensions in IPythonApp.extensions. This uses the :meth:`ExtensionManager.load_extensions` to load all the extensions listed in ``self.extensions``.

(self)

Source from the content-addressed store, hash-verified

315 "eventloop=%s", gui)
316
317 def init_extensions(self):
318 """Load all IPython extensions in IPythonApp.extensions.
319
320 This uses the :meth:`ExtensionManager.load_extensions` to load all
321 the extensions listed in ``self.extensions``.
322 """
323 try:
324 self.log.debug("Loading IPython extensions...")
325 extensions = (
326 self.default_extensions + self.extensions + self.extra_extensions
327 )
328 for ext in extensions:
329 try:
330 self.log.info("Loading IPython extension: %s", ext)
331 self.shell.extension_manager.load_extension(ext)
332 except:
333 if self.reraise_ipython_extension_failures:
334 raise
335 msg = ("Error in loading extension: {ext}\n"
336 "Check your config files in {location}".format(
337 ext=ext,
338 location=self.profile_dir.location
339 ))
340 self.log.warning(msg, exc_info=True)
341 except:
342 if self.reraise_ipython_extension_failures:
343 raise
344 self.log.warning("Unknown error in loading extensions:", exc_info=True)
345
346 def init_code(self):
347 """run the pre-flight code, specified via exec_lines"""

Callers 1

initializeMethod · 0.80

Calls 4

debugMethod · 0.80
infoMethod · 0.80
load_extensionMethod · 0.80
formatMethod · 0.45

Tested by

no test coverage detected