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

查看:84
本文介绍了在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天全站免登陆