这个简短的 Python 脚本debugwin.py在我的 Linux 机器上运行良好:
>>> import debugwin
>>> l = []
>>> debuwin.watch(l)
0
>>> l.append(1)
但是,人们告诉我,在 Windows(Python 2.7.3 Windows 7)上,它有时在追加后不会更新,有时会出现堆栈溢出:
>>> error in background error handler:
out of stack space (infinite loop?) while executing "::tcl::Bgerror {out of stack
space (infinite loop?)} {-code 1 -level 0 -errorcode NONE -errorinfo {out of stack
space (infinite loop?)Unable to format..."
脚本怎么会溢出?