在 IPython 的另一个笔记本中包含一个笔记本? [英] Including a notebook in another notebook in IPython?

查看:32
本文介绍了在 IPython 的另一个笔记本中包含一个笔记本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个笔记本,我打算将其用作其他笔记本的库.它有一些功能可以准备某些类型的文件等.

I have a notebook which I intend to use as a library for other notebooks. It has some functions that can ready certain types of files etc.

如何将该笔记本包含在应该能够使用图书馆笔记本中的功能的新笔记本中?

How can I include that notebook in a new notebook that should be able to use the functions in the library notebook?

推荐答案

谷歌搜索 notebook import hook 产生一些 示例.这仍然是实验性的,但欢迎您改进它.我建议还使用 --script 标志,每次保存笔记本时保存可导入的 .py 文件.

googling for notebook import hook yield some examples. This is still experimental, but you are welcomed to improved it. I would suggest also using the --script flag that save an importable .py file every time you save the notebook.

这篇关于在 IPython 的另一个笔记本中包含一个笔记本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆