8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83aafff commit a555475Copy full SHA for a555475
lib/matplotlib/pyplot.py
@@ -114,7 +114,8 @@ def install_repl_displayhook():
114
class _NotIPython(Exception):
115
pass
116
117
- # see if we have IPython hooks around, if so monkey patch
+ # see if we have IPython hooks around, if use them
118
+
119
try:
120
from IPython import get_ipython
121
ip = get_ipython()
@@ -128,8 +129,7 @@ class _NotIPython(Exception):
128
129
# IPython 1.x
130
ip.register_post_execute(draw_all)
131
- # import failed or sys.displayhook is not of correct type,
132
- # must not have IPython
+ # import failed or ipython is not running
133
except (ImportError, _NotIPython):
134
dh = sys.displayhook
135
0 commit comments