ipython / ipython/ipynb

Reload semantics

Ouverte
#38 3 commentaires 2 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Jupyter Notebook
Étoiles
258
Forks
71
Métriques de merge des PR
Aucune PR mergée en 30 j

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!

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.