我最近在ubuntu 12.04上重新安装了spyder。这是问题所在: 当我在控制台中键入一个左括号时,焦点会立即切换到内部控制台,显示错误(我将其解释为“缺少关闭括号”?)虽然我很欣赏代码监控,但如果控制台让我感觉会很好在得出结论之前先完成我的代码行。
我该如何避免这种行为? (我不介意在内部控制台中显示“错误”,但是每当我打开支架时切换到内部控制台都是非常具有破坏性的。)
以下是内部控制台的输出:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/spyder-2.3.0-py2.7.egg/spyderlib/widgets/shell.py", line 298, in keyPressEvent
self.postprocess_keyevent(event)
File "/usr/local/lib/python2.7/dist-packages/spyder-2.3.0-py2.7.egg/spyderlib/widgets/shell.py", line 727, in postprocess_keyevent
ShellBaseWidget.postprocess_keyevent(self, event)
File "/usr/local/lib/python2.7/dist-packages/spyder-2.3.0-py2.7.egg/spyderlib/widgets/shell.py", line 438, in postprocess_keyevent
self._key_parenleft(text)
File "/usr/local/lib/python2.7/dist-packages/spyder-2.3.0-py2.7.egg/spyderlib/widgets/shell.py", line 797, in _key_parenleft
self.show_object_info(last_obj, call=True)
File "/usr/local/lib/python2.7/dist-packages/spyder-2.3.0-py2.7.egg/spyderlib/widgets/mixins.py", line 608, in show_object_info
signature=True, color='#2D62FF')
File "/usr/local/lib/python2.7/dist-packages/spyder-2.3.0-py2.7.egg/spyderlib/widgets/mixins.py", line 108, in show_calltip
self.calltip_widget.show_tip(point, tiptext, wrapped_textlines)
File "/usr/local/lib/python2.7/dist-packages/spyder-2.3.0-py2.7.egg/spyderlib/widgets/calltip.py", line 157, in show_tip
forward=False)
File "/usr/local/lib/python2.7/dist-packages/spyder-2.3.0-py2.7.egg/spyderlib/widgets/calltip.py", line 252, in _find_parenthesis
while category(char) != 'Cc' and position > 0:
TypeError: need a single Unicode character as parameter
答案 0 :(得分:1)
要在内部控制台上不显示错误,您需要转到
Tools > Preferences > General > Debugging
并停用名为
的选项[ ] Pop up internal console when internal errors appear