如下图所示,我在控制台中可以访问到cnt,然而在sypder的脚本中则无法打印 解决步骤如下: 1. 打开Tools-Preferences 2. Run-General settings 把第二个选项勾上,保存 3. 完事