【发布时间】:2022-08-22 23:22:55
【问题描述】:
使用此代码
import code
# ... some code
code.interact(local=locals)
我在 Python Shell 中键入所有内容后都会收到错误消息:
(InteractiveConsole)
>>> 1+1
TypeError: exec() globals must be a dict, not builtin_function_or_method
>>> print(\"nothing works\")
TypeError: exec() globals must be a dict, not builtin_function_or_method
标签: python