MCPcopy Index your code
hub / github.com/pathwaycom/pathway / _in_notebook

Function _in_notebook

python/pathway/stdlib/viz/plotting.py:19–29  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17
18# after: https://stackoverflow.com/questions/15411967/how-can-i-check-if-code-is-executed-in-the-ipython-notebook
19def _in_notebook():
20 try:
21 from IPython import get_ipython # noqa
22
23 if "IPKernelApp" not in get_ipython().config: # noqa
24 return False
25 except ImportError:
26 return False
27 except AttributeError:
28 return False
29 return True
30
31
32@check_arg_types

Callers 1

plotFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected