重用来自不同IPython笔记本的代码 [英] Reusing code from different IPython notebooks
本文介绍了重用来自不同IPython笔记本的代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用IPython,并希望从另一个笔记本中运行功能(不需要在不同的笔记本之间剪切和粘贴它们)。这可能并且相当容易吗?
I am using IPython and want to run functions from one notebook from another (without cutting and pasting them between different notebooks). Is this possible and reasonably easy to do?
推荐答案
您可以将qtconsole连接到同一个内核。只需在启动时提供:
You can connect with a qtconsole to the same kernel. Just supply this at startup:
ipython qtconsole --existing kernel-0300435c-3d07-4bb6-abda-8952e663ddb7.json
在为长字符串启动笔记本后查看输出。
Look at the output after starting the notebook for the long string.
这篇关于重用来自不同IPython笔记本的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文