execnb 0.2.1__tar.gz → 0.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {execnb-0.2.1/execnb.egg-info → execnb-0.2.2}/PKG-INFO +1 -1
- execnb-0.2.2/execnb/__init__.py +1 -0
- {execnb-0.2.1 → execnb-0.2.2}/execnb/shell.py +9 -9
- {execnb-0.2.1 → execnb-0.2.2/execnb.egg-info}/PKG-INFO +1 -1
- execnb-0.2.1/execnb/__init__.py +0 -1
- {execnb-0.2.1 → execnb-0.2.2}/LICENSE +0 -0
- {execnb-0.2.1 → execnb-0.2.2}/MANIFEST.in +0 -0
- {execnb-0.2.1 → execnb-0.2.2}/README.md +0 -0
- {execnb-0.2.1 → execnb-0.2.2}/execnb/_modidx.py +0 -0
- {execnb-0.2.1 → execnb-0.2.2}/execnb.egg-info/SOURCES.txt +0 -0
- {execnb-0.2.1 → execnb-0.2.2}/execnb.egg-info/dependency_links.txt +0 -0
- {execnb-0.2.1 → execnb-0.2.2}/execnb.egg-info/entry_points.txt +0 -0
- {execnb-0.2.1 → execnb-0.2.2}/execnb.egg-info/requires.txt +0 -0
- {execnb-0.2.1 → execnb-0.2.2}/execnb.egg-info/top_level.txt +0 -0
- {execnb-0.2.1 → execnb-0.2.2}/pyproject.toml +0 -0
- {execnb-0.2.1 → execnb-0.2.2}/setup.cfg +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.2.2"
|
|
@@ -27,9 +27,6 @@ from IPython.display import display as disp, HTML
|
|
|
27
27
|
|
|
28
28
|
from base64 import b64encode
|
|
29
29
|
from html import escape
|
|
30
|
-
try: from matplotlib_inline.backend_inline import set_matplotlib_formats
|
|
31
|
-
except ImportError: set_matplotlib_formats = None
|
|
32
|
-
|
|
33
30
|
|
|
34
31
|
from fastcore.nbio import *
|
|
35
32
|
from fastcore.nbio import _dict2obj
|
|
@@ -59,10 +56,13 @@ class CaptureShell(InteractiveShell):
|
|
|
59
56
|
if path: self.set_path(path)
|
|
60
57
|
self.display_formatter.active = True
|
|
61
58
|
if not IN_NOTEBOOK: InteractiveShell._instance = self
|
|
62
|
-
if
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
59
|
+
if mpl_format:
|
|
60
|
+
try: from matplotlib_inline.backend_inline import set_matplotlib_formats
|
|
61
|
+
except ImportError: set_matplotlib_formats = None
|
|
62
|
+
if set_matplotlib_formats:
|
|
63
|
+
self.enable_matplotlib("inline")
|
|
64
|
+
self._run("from matplotlib_inline.backend_inline import set_matplotlib_formats")
|
|
65
|
+
self._run(f"set_matplotlib_formats('{mpl_format}')")
|
|
66
66
|
|
|
67
67
|
def _run(self, raw_cell, store_history=False, silent=False, shell_futures=True, cell_id=None,
|
|
68
68
|
stdout=True, stderr=True, display=True, verbose=False):
|
|
@@ -73,13 +73,13 @@ class CaptureShell(InteractiveShell):
|
|
|
73
73
|
return AttrDict(result=result, stdout='' if semic else c.stdout, stderr=c.stderr,
|
|
74
74
|
display_objects=c.outputs,
|
|
75
75
|
exception=result.error_in_exec or result.error_before_exec, quiet=semic)
|
|
76
|
-
|
|
76
|
+
|
|
77
77
|
def set_path(self, path):
|
|
78
78
|
"Add `path` to python path, or `path.parent` if it's a file"
|
|
79
79
|
path = Path(path)
|
|
80
80
|
if path.is_file(): path = path.parent
|
|
81
81
|
self._run(f"import sys; sys.path.insert(0, '{path.as_posix()}')")
|
|
82
|
-
|
|
82
|
+
|
|
83
83
|
def enable_gui(self, gui=None): pass
|
|
84
84
|
|
|
85
85
|
# %% ../nbs/00_shell.ipynb #93adf867
|
execnb-0.2.1/execnb/__init__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.2.1"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|