Hans Sebastian wrote:
Hi,
I need help or suggestions from you guys for a problem that I have
with pylint code E0401:
F0401: 6: Unable to import 'win32api'
F0401: 6: Unable to import 'win32con'
The software/package that I run pylint against supports multiple
platforms. One of them is Windows and for the windows build it's
dependent on python modules for windows extensions. The problem is
when I run it on non-windows, I get results such as above. Is there a
way for me to run pylint on non-windows machine and somehow ignore
these modules? Are there different ways that people have done? Thanks
a lot for any reply.
-hans
------------------------------------------------------------------------
_______________________________________________
Python-Projects mailing list
[email protected]
http://lists.logilab.org/mailman/listinfo/python-projects
import sys
if sys.platform == 'win32':
# pylint: disable=E0401
import win32api
This will locally disable the error.
JM
_______________________________________________
Python-Projects mailing list
[email protected]
http://lists.logilab.org/mailman/listinfo/python-projects