Skip to content

Commit 148d606

Browse files
committed
fix #42
1 parent 931e411 commit 148d606

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

execnb/shell.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,15 @@ def __init__(self,
7878
self.out,self.count = [],1
7979
self.exc = self.result = self._fname = self._cell_idx = self._stdout = self._stderr = None
8080
if IN_NOTEBOOK:
81-
try: self.enable_matplotlib()
81+
try: self.enable_matplotlib('inline')
8282
except ModuleNotFoundError: pass
8383
if path: self.set_path(path)
8484

85-
def enable_matplotlib(self):
85+
def enable_matplotlib(self, gui=None):
8686
"Enable `matplotlib` in a nested shell"
8787
from matplotlib_inline.backend_inline import configure_inline_support
8888
configure_inline_support.current_backend = 'unset'
89-
return super().enable_matplotlib('inline')
89+
return super().enable_matplotlib(gui)
9090

9191
def set_path(self, path):
9292
"Add `path` to python path, or `path.parent` if it's a file"

nbs/02_shell.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,15 +148,15 @@
148148
" self.out,self.count = [],1\n",
149149
" self.exc = self.result = self._fname = self._cell_idx = self._stdout = self._stderr = None\n",
150150
" if IN_NOTEBOOK:\n",
151-
" try: self.enable_matplotlib()\n",
151+
" try: self.enable_matplotlib('inline')\n",
152152
" except ModuleNotFoundError: pass\n",
153153
" if path: self.set_path(path)\n",
154154
"\n",
155-
" def enable_matplotlib(self):\n",
155+
" def enable_matplotlib(self, gui=None):\n",
156156
" \"Enable `matplotlib` in a nested shell\"\n",
157157
" from matplotlib_inline.backend_inline import configure_inline_support\n",
158158
" configure_inline_support.current_backend = 'unset'\n",
159-
" return super().enable_matplotlib('inline')\n",
159+
" return super().enable_matplotlib(gui)\n",
160160
" \n",
161161
" def set_path(self, path):\n",
162162
" \"Add `path` to python path, or `path.parent` if it's a file\"\n",

0 commit comments

Comments
 (0)