[Python-projects] PyLint use case
trash at willeboordse.demon.nl
trash at willeboordse.demon.nl
Mon Dec 18 11:50:16 CET 2006
For example consider the following script (named script.py);
print i
When I run this script through PyLint I get;
script.py:1: [E] Undefined variable 'i'
Excellent.
Then I have another script;
i = 5
execfile('script.py')
Obviously this script lint?s without above error.
But now I want to run PyLint from the second script, so I do;
i = 5
from pylint import lint
lint.Run(['script.py'])
And PyLint reports the;
script.py:1: [E] Undefined variable 'i'
and that is not what I want (I want it to run without the error just as above).
How to run PyLint to process script.py from the second script
provided its context?
More information about the Python-Projects
mailing list