每次都在代码里面敲
from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = “all”
太麻烦了
直接配置文件吧
在Windows系统里
我的电脑里是:
C:\Users\66462\.ipython\profile_default\ipython_config.py
c = get_config()
c.InteractiveShell.ast_node_interactivity = “all”