from IPython import embed

例子
from IPython import embed
a = 10
b = 20
embed(header='First time')
c = 30
d = 40
embed()
 
 

调用此项以在程序的当前点嵌入 IPython,第一次调用enbed()将创建一个 InteractiveShellEmbed 实例, 然后调用它。连续调用只调用已经创建的实例。



猜你喜欢

转载自blog.csdn.net/m0_38082419/article/details/79197178