Coverage for /home/tbone/mambaforge/lib/python3.9/site-packages/importnb/__init__.py: 75%
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1# coding: utf-8
3__all__ = "Notebook", "reload"
6def is_ipython():
7 from sys import modules
9 return "IPython" in modules
12def get_ipython(force=True):
13 if force or is_ipython():
14 try:
15 from IPython import get_ipython
16 except ModuleNotFoundError:
17 return
18 shell = get_ipython()
19 if shell is None:
20 from IPython import InteractiveShell
22 shell = InteractiveShell.instance()
23 return shell
24 return None
27import builtins
29from ._version import *
30from .loader import Notebook, reload
32builtins.true, builtins.false, builtins.null = True, False, None