##// END OF EJS Templates
Protect against failure to show local data....
Protect against failure to show local data. See https://github.com/napari/napari/pull/3201 where formatting traceback was failing and lead to silenced errors. With this change we instead get the rest of the traceback but without the local variables, which is still better.

File last commit:

r11124:9567c77a
r26712:053e48a3
Show More
getipython.py
24 lines | 916 B | text/x-python | PythonLexer
Brian Granger
Continuing a massive refactor of everything.
r2205 # encoding: utf-8
MinRK
add IPython.get_ipython...
r10579 """Simple function to call to get the current InteractiveShell instance
Fernando Perez
Remove 2.3 compatibility, minor cleanups.
r1414 """
#-----------------------------------------------------------------------------
MinRK
add IPython.get_ipython...
r10579 # Copyright (C) 2013 The IPython Development Team
Brian Granger
Continuing a massive refactor of everything.
r2205 #
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distributed as part of this software.
Fernando Perez
Remove 2.3 compatibility, minor cleanups.
r1414 #-----------------------------------------------------------------------------
ville
initialization (no svn history)
r988
Brian Granger
Continuing a massive refactor of everything.
r2205 #-----------------------------------------------------------------------------
# Classes and functions
#-----------------------------------------------------------------------------
Robert Kern
ENH: Allow non-dict namespaces. This involves a change in the ipapi for setting user namespaces.
r1419
Brian Granger
ipapi.get now returns None if there are no InteractiveShells running....
r2292
MinRK
add IPython.get_ipython...
r10579 def get_ipython():
"""Get the global InteractiveShell instance.
Returns None if no InteractiveShell instance is registered.
"""
Brian Granger
Fixing two minor bugs....
r2816 from IPython.core.interactiveshell import InteractiveShell
MinRK
add IPython.get_ipython...
r10579 if InteractiveShell.initialized():
return InteractiveShell.instance()