File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,8 @@ def install_repl_displayhook():
121
121
Install a repl display hook so that any stale figure are automatically
122
122
redrawn when control is returned to the repl.
123
123
124
- This works with both IPython terminals and vanilla python shells.
124
+ This works with IPython terminals and kernels,
125
+ as well as vanilla python shells.
125
126
"""
126
127
global _IP_REGISTERED
127
128
global _INSTALL_FIG_OBSERVER
@@ -154,6 +155,13 @@ def post_execute():
154
155
155
156
_IP_REGISTERED = post_execute
156
157
_INSTALL_FIG_OBSERVER = False
158
+
159
+ # trigger IPython's eventloop integration, if available
160
+ from IPython .core .pylabtools import backend2gui
161
+
162
+ ipython_gui_name = backend2gui .get (get_backend ())
163
+ if ipython_gui_name :
164
+ ip .enable_gui (ipython_gui_name )
157
165
else :
158
166
_INSTALL_FIG_OBSERVER = True
159
167
You can’t perform that action at this time.
0 commit comments