Jupyter 简明教程

Connecting to Jupyter Notebook

有一个可供与 Jupyter notebook 一起使用的 %qtconsole 魔术命令。这将调用 QtConsole 作为 notebook 前端的从属终端。因此,可以在 notebook 和 Qtconsole 终端之间共享数据。

There is a %qtconsole magic command available for use with Jupyter notebook. This invokes the QtConsole as a slave terminal to notebook frontend. As a result, data between notebook and Qtconsole terminal can be shared.

connecting jupyter notebook

您可以看到 notebook 中的变量可在 qtconsole 窗口内访问。此外,Qtconsole 中的新变量已在 notebook 中重新使用。

You can see that the variable in notebook is accessible within qtconsole window. Also, a new variable in Qtconsole is used back in notebook.

请注意,两个输入单元格和输出单元格之间的编号是递增的。

Observe that the input and output cells are numbered incrementally between the two.