防止在ipython shell中显示调试日志信息

我在virtualenv中使用scrapy
shell. I
Python安装在virtualenv中.当我开始使用scrapy shell时

 scrapy shell 'https://example.com'

并按Tab键获取自动填充建议,它显示了大量的调试信息.我怎么能禁用它?

In [1]: from scra2018-03-23 10:05:45 [parso.python.diff] DEBUG: diff parser start
2018-03-23 10:05:45 [parso.python.diff] DEBUG: diff parser calculated
2018-03-23 10:05:45 [parso.python.diff] DEBUG: diff: line_lengths old: 1, new: 1
2018-03-23 10:05:45 [parso.python.diff] DEBUG: diff replace old[1:1] new[1:1]
2018-03-23 10:05:45 [parso.python.diff] DEBUG: parse_part from 1 to 1 (to 0 in part parser)
2018-03-23 10:05:45 [parso.python.diff] DEBUG: diff parser end

《防止在ipython shell中显示调试日志信息》

最佳答案
https://github.com/ipython/ipython/issues/10946看起来像是在这里报告错误.

如果您需要在ipython中进行调试日志记录,请尝试

logging.getLogger( ‘parso.cache’).禁用=真
logging.getLogger( ‘parso.cache.pickle’).禁用=真

并等待parso更新

点赞