国际贸易协会

tutormagic的Python项目详细描述


Jupyter笔记本电脑的格式扩展名
===========================

================>>

=======>

查看"nbtutor"<;https://github.com/lgpage/nbtutor>;`,一个更完美更好的解决方案。

a
笔记本代码单元(使用ipython内核)。

代码::python



代码::python

conda install tuormagic


或(对于开发版本)

代码::python

pip安装git+https://github.com/kikocorreso/tutormagic.git

在python 2.7.x、3.4.x、3.5.x和3.6.x以及ipython/jupyter 3.x/4.x/5.x上测试。


用法
----


代码::python

%load_ext tuormagic


加载后,在笔记本的代码单元格中键入以下内容:

…代码::python

%%tutor--lang python3
代码::python

%%tutor--lang python3--tab

,请选择
`pythontutor<;http://www.pythontutor.com>;``所支持的可用语言之一。如果设置了此选项,则
它会将单元格中的代码视为python3代码。

-`%tutor--lang python3``或``%tutor-l python3``或``%tutor`
显示带有**python3**代码的pythontor iframe。
-`%tutor--lang python2``或```%tutor-l python2``显示
pythontutor iframe with**python2**代码。
-`%tutor--lang java``或``%tutor-l java``显示pythontor
iframe with**java**代码。
-`%tutor--lang javascript``或```%tutor-l javascript``显示pythontor iframe with**javascript**代码。
-`%tutor--lang typescript``或```%tutor-l typescript``显示带有**typescript**代码的pythontutor iframe。
-``%tutor--lang ruby``或``%tutor-l ruby``显示带有**ruby**代码的pythontutor iframe。
-``%tutor--lang c``或``%tutor-l c``显示
pythontutor iframe带有**c**代码。
-``%tutor--lang c++``或``%tutor-l c++``显示带有**c++**代码的
pythontutor iframe。图片::https://raw.githubusercontent.com/kikocorreso/tutormagic/master/imgs/normal.png
:宽度:500 px

``--height``或``-h`:它以像素为单位更改输出区域显示的高度。它用于定义用于将http://pythontutor.com嵌入笔记本的iframe的高度。如果使用"-tab"选项,则将忽略此选项。图片::http s://raw.githubusercontent.com/kikocorreso/tutormagic/master/imgs/height.png
:宽度:500 px

`--tab``或`-t`:它将在新的tab
中而不是在笔记本的iframe中打开http://pythontutor.com。

`--secure``或`-s`:它将使用https来打开pythontutor.com。这在使用ssl的笔记本中使用时非常有用。

`--link``或`-k`:它将显示到pythontutor的链接,而不是通过iframe。

图片::https://raw.githubusercontent.com/kikocorreso/tutormagic/master/imgs/link1.png
:宽度:500 px

`--run``或``-r`:如果您还想在笔记本的单元格中运行代码。

…图片::https://raw.githubusercontent.com/kikocorreso/tutormagic/master/imgs/run1.png
:宽度:500 px

以下选项可用:

-使用`--cumulative``选项将pythontutor告知cumulative to true

。图片::https://raw.githubusercontent.com/kikocorreso/tutormagic/master/imgs/cumulative1.png
:宽度:500 px

-使用`--heappriments``选项告诉pythontutor在堆上呈现对象

。图片::https://raw.githubusercontent.com/kikocorreso/tutormagic/master/imgs/test廑heap1.png
:宽度:500 px

-使用`--textferences``选项告诉pythontutor对引用使用文本标签
-使用`--curinstr``后跟一个数字在定义步骤

…图片::https://raw.githubusercontent.com/kikocorreso/tutormagic/master/imgs/current1.png
:宽度:500 px

-使用`--verticalstack``将可视化设置为彼此堆叠。

图片::https://raw.githubusercontent.com/kikocorreso/tutormagic/master/imgs/vertical1.png
:宽度:500 px


示例
--


`存储库中包含的示例笔记本<;http://nbviewer.jupyter.org/github/kikocorreoso/tutormagic/blob/master/examples/examples.ipynb>;` ` ` `.

`示例(西班牙语)
笔记本<;http://nbviewer.ipython.org/github/pybonacci/notebooks/blob/master/tutormagic.ipynb>;`_.

扩展名的名称
----


扩展名是由Doug S.Blank建议的。blank
(`@dsblank<;https://github.com/dsblank>;` ` ` ` ` `).

-


0.2.1版
~~~~~~~~~~

-添加了选项` `--安全`,``--link````--cumulative``````--heappriments``和``--textreferences```(感谢james quacinella(`@jquacinella<;https://github.com/jquacinella>;```uu))。
-添加了选项``--run`,``--curinstr``和`--verticalstack`.

0.2.0版
~~~~~~~~~~~~~

-添加了新的`--tab``选项(感谢holger karl(`@hkarl<;https://github.com/hkarl>;``uu))。
-添加了新的`--height``选项(感谢tom simonart(`@tomsimonart<;http://GITHUB.COM/TosisiMARTART&G';'YA])-在http://PythOntuto.com(Typescript,露比,C和C++)上添加了新的语言。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
javascript问题:通过URL用网站数据填充Textview   java TabLayout Android,如何用几个标签填充整个屏幕宽度,并用大量标签滚动?   Eclipse Java运行的文件不再存在于我的工作区中   安装两个Java版本时,使用Java的windows链接不起作用   java将多个图形添加到单个JPanel   java Kafka ConsumerFactory,带有两个Desiarizer   使用反射更改java类超类   当一致性测试失败时,java有没有办法让堆栈跟踪显示在控制台中   java映射到基元类型的HashMap的快速替代方案是什么?   java关闭一个jframe所有剩余的打开jframe都将关闭。   java为什么不推荐“使用getString()获取设备标识符”?   java值比较和值赋值之间有什么性能差异吗?   Java实体数组到JavaScript数组   java使用流将一个列表转换为另一个列表   在JTree中保存对象,但更改显示的名称(java swing)?   java“Hello world”Android应用程序,文件尽可能少,没有IDE,只有文本编辑器   java在方法之间传递值   java如何为项目数组创建ParseQuery?