【发布时间】:2012-03-25 01:25:44
【问题描述】:
我正在使用 Python 开发适用于 Windows 的软件。我正在 Linux 上开发,我正在使用 Pylint 来检查我的代码。 我无法摆脱错误:
F| Unable to import '_winreg'
这很明显——Linux 上的 Python 没有这个模块。
那么,我必须在 .pylintrc 中添加什么内容才能忽略此错误?
提前致谢, 盎司
编辑:
文档说:
:F0401: *Unable to import %r*
Used when pylint has been unable to import a module.
现在我需要找到如何使用它...
部分解决方案:
pylint --disable=F0401 <filename>
我仍在寻找通过 .pylintrc 的方法。
【问题讨论】: