Multiple directories and/or subdirectories in IPython Notebook session?

前端 未结 2 884
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-28 13:25

The IPython documentation pages suggest that opening several different sessions of IPython notebook is the only way to interact with saved notebooks in different directories

相关标签:
2条回答
  • 2020-12-28 13:59

    The interface and architecture design issues for multiple directory support (and more generally for "project" support) for iPython notebook are important to get right. A design is described in

    IPEP 16: Notebook multi directory dashboard and URL mapping

    and is being discussed at IPEP 16: Notebook multi directory dashboard and URL mapping · Issue #3166 · ipython/ipython

    0 讨论(0)
  • 2020-12-28 14:19

    The IPython documentation pages suggest that opening several different sessions of IPython notebook is the only way to interact with saved notebooks in different directories or subdirectories, but this is not explicitly confirmed anywhere.

    Yes, this is a current (temporary) limitation of the Notebook server. Multi-directory support is very high on the notebook todo list (unfortunately that list is long, and devs are few and have day jobs), it is just not there yet. By 0.14 (Fall, probably), you should have no reason to be running more than one nb server, but for now that's the only option for multiple directories. All that is missing for a simple first draft is:

    1. Associating individual notebooks with directories (fairly trivial), and
    2. Web UI for simple filesystem navigation (slightly less trivial).

    I'm willing to tinker with source code if I have to for this ability

    The limiting factor, if you want to poke around in the source, is the NotebookManager, which is associated with a particular directory. If you tweak the list_notebooks() method to handle subdirectories, you are 90% there.

    I was curious about this as well, so I tossed together an quick example here that allows you to at least read/run/edit/save notebooks in subdirs (walk depth is limited to 2, but easy to change). Any new notebooks will be in the top-level dir, and there is no UI for moving them around.

    0 讨论(0)
提交回复
热议问题