ipython / ipython/ipynb

Reload semantics

未关闭
#38 3 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Jupyter Notebook
星标
258
派生
71
PR 合并指标
30 天内没有已合并 PR

描述

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!

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。