我有理由相信我的iPython解釋器導致我的內核死機,並重新啓動,類似於this鏈接和that鏈接中記錄的問題。在Spyder iPython解釋器中抑制ipdb輸出
後面的鏈接表明錯誤是由調試器輸出步驟ipdb
內容到解釋器的事實引起的。一個用戶報告,該行爲停止時,他(套用)
禁用日誌記錄在調試模式
怎樣才能「禁用記錄到控制檯」中Spyder的IDE/IPython的運行前安慰?我真的需要做到這一點,所以我至少可以通過我的代碼步驟....
編輯
我想抑制這種輸出
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中的錯誤是正確的。爲了避免這種情況,您需要從代碼中移除將某些內容打印到控制檯的任何指令。 –
我的收件人都沒有在控制檯上打印任何東西。我指的是這種輸出(請參閱編輯原始問題)。這是ipdb調試器的自動輸出。 – user32882