Closed davidleejy closed 2 years ago
this feature is added by #127 . it will be important to note the caveat that global variables cant be used in local scopes when this behavior is activated.
This does not work anymore?
seems to work for me when i use the include_non_defs=False
.
my example notebook has a print statement that should display when include_non_defs
is True:
the following cells show loading with this style behavior.
Is it possible to do the equivalent of
import ipynb.fs.defs.notebook123
in importnb? This imports only definitions innotebook123.ipynb
and avoids other statements. For e.g. if there's a statementfoo='hi'
innotebook123.ipynb
, it does not get imported.I think this is a useful feature since there might be executable statements in
notebook123.ipynb
that demonstrate how the functions work and are kept uncommented in the notebook for debugging and communicative purposes. Would be neat if these statements aren't imported.