python一行一行执行_在Jupyter Notebook单元格中可视化Python代码逐行执行

Nbtutor是一款用于Jupyter Notebook的工具,能实现Python代码逐行执行的可视化。安装Nbtutor后,通过加载扩展并在代码单元格中使用特定魔法命令,可以观察代码执行过程。支持自定义参数如最大帧深度、浮点数精度等,还能够扩展显示numpy数组。开发时,需创建开发环境并使用npm构建资产。
摘要由CSDN通过智能技术生成

Nbtutor

Visualize Python code execution (line-by-line) in Jupyter Notebook cells. Inspired by Online Python Tutor.

usage.gif

Usage

Install

Note: installing directly off this repo won't work, as we don't ship the built JavaScript and CSS assets. See more about developing below.

pip

pip install nbtutor

jupyter nbextension install --overwrite --py nbtutor

jupyter nbextension enable --py nbtutor

conda

conda install -c conda-forge nbtutor

Usage (Jupyter Notebook)

First load the nbtutor IPython kernel extension at top of the Notebook by executing the following magic in a CodeCell:

%load_ext nbtutor

Then to visualize the execute of code in a CodeCell add the following magic to the top of the CodeCell and execute it again:

%%nbtutor

Optional arguments

T

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值