考虑我文件的内容" sandbox.py":
execfile('sandbox.py')
当我运行它时,它会产生如下巨大的重复错误:
Traceback (most recent call last):
File "sandbox.py", line 1, in <module>
execfile('sandbox.py')
File "sandbox.py", line 1, in <module>
execfile('sandbox.py')
File "sandbox.py", line 1, in <module>
execfile('sandbox.py')
File "sandbox.py", line 1, in <module>
execfile('sandbox.py')
File "sandbox.py", line 1, in <module>
execfile('sandbox.py')
File "sandbox.py", line 1, in <module>
execfile('sandbox.py')
File "sandbox.py", line 1, in <module>
execfile('sandbox.py')
File "sandbox.py", line 1, in <module>
execfile('sandbox.py')
File "sandbox.py", line 1, in <module>
execfile('sandbox.py')
File "sandbox.py", line 1, in <module>
execfile('sandbox.py')
#(.... Same thing for about a 1000 more times...)
KeyError: 'unknown symbol table entry'
总之,有人可以解释刚刚发生了什么吗?为什么在使用execfile时没有其他错误与字典相关的错误?