在Spyder iPython解释器中抑制ipdb输出 [英] Suppressing ipdb output in Spyder iPython interpreter

查看:71
本文介绍了在Spyder iPython解释器中抑制ipdb输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有理由相信我的iPython解释器导致我的内核死亡并重新启动,类似于链接和链接.

I have reason to believe that my iPython interpreter is causing my kernel to die and restart similar to the issues logged in this link and that link.

后面的链接表示错误是由于调试器将逐步的​​ ipdb 内容输出到解释器中而引起的.一位用户报告说,当他(和我引用)

The latter link indicates that the error is caused by the fact that the debugger outputs step-by-step ipdb content into the interpreter. One user reported that the behavior stopped when he (and I quote)

在调试模式下运行之前,禁用日志记录到控制台

disabled logging to console before running in debug mode

在Spyder IDE/IPython中如何禁用登录到控制台"?我真的需要这样做,以便至少可以逐步完成我的代码....

How does one "disable logging to console" in Spyder IDE/IPython? I really need to do this so I can at least step through my code....

编辑

我想抑制这种输出

ipdb> > d:\temp\other const models\plaxis\output\plotparfile.py(16)PlotParFile()
     14     with open(filename,'r') as fid:
     15         lines = fid.readlines()
---> 16     fid.close()
     17     #split first line get header and pop it out
     18     header = lines[0].split()

> d:\temp\other const models\plaxis\output\plotparfile.py(18)PlotParFile()
     16     fid.close()
     17     #split first line get header and pop it out
---> 18     header = lines[0].split()
     19     lines.pop(0)
     20 

推荐答案

(此处为Spyder开发人员)该输出是自动生成的,其目的是告诉您调试时将代码放置在何处

(Spyder developer here) That output is generated automatically and its purpose is to tell you where are you placed in your code while debugging.

目前,Spyder中没有任何选项可以将其停用.此外,我真的怀疑输出是否可能导致任何内核故障.

Right now there are no options in Spyder to deactivate it. Besides, I really doubt that output could be the cause of any kernel failures.

这篇关于在Spyder iPython解释器中抑制ipdb输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆