ipython / ipython/ipynb

Reload semantics

Open
#38 3 comments 2 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
258
Forks
71
PR merge metrics
No merged PRs in 30d

Description

I'm in JupyterLab, with two notebooks open, one of which is importing a function from the other (`tools.ipynb`):

```
import ipynb.fs.defs.tools
```

However, it doesn't seem to pick up changes from the other one, even when I re-run the cell containing the import. However, if I:

```
import importlib
importlib.reload(ipynb.fs.defs.tools)
```

Then it does indeed pick it up changes each time. Unfortunately, this doesn't work for the `from X import Y` style, since the reference to the module containing the imported item isn't in scope to pass to `reload`.

Is it possible that ipynb could watch timestamps on the imported files and handle this under the hood when the imported file changes? Thanks for a great project!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.