2011/2/15 Hans Sebastian <[email protected]> > Thanks for the reply Sylvain, > > 2011/2/14 Sylvain Thénault <[email protected]> > > On Tue, Feb 15, 2011 at 12:06 AM, Hans Sebastian <[email protected]> >> wrote: >> > Hi Sylvain Thenault, >> >> Hi, >> >> > My name is Hans. For a few days I've started using pylint, been liking >> it >> > very much but have found an issue using pylint and would like to ask you >> > whether I am using it incorrectly or a bug. >> >> First thing: this is my personal adress. Too speak about pylint, >> please use the [email protected] mailing list. >> >> > The issue is that running pylint >> > repeatedly on about 500 files, I get OSError: Too many open files. >> > >> > I use pylint like such: >> > >> > import os >> > import sys >> > from pylint import lint >> > args = sys.argv[1:] >> > for root, dirs, files in os.walk(args[0]): >> > for file in files: >> > if not file.endswith('.py'): continue >> > try: >> > lint.Run(args) >> > except OSError, e: >> > raise >> > except SystemExit, e: >> > returncode = e.code >> > >> > >> > I installed pylint-0.23.0.tar.gz and ran it using python 2.6.4. I found >> the >> > workaround by increasing the max file descriptors with ulimit to more >> than >> > 4000 but would like to know if there is a better solution or input from >> you >> > whether this is due to misuse or a bug. I definitely appreciate your >> > comments. Thank you >> >> Huum, I suppose this is actually a bug in pylint. You can file a ticket on >> pylint tracker at www.logilab.org/project/pylint >> > > I just filed a bug for the OSError: Too many open files issue. #62295 > > >> May I ask why are you using this wrapper instead of calling pylint >> directly ? >> > > I didn't realize that I can pass in a dir that is a python module and it > will run all its submodules. In this case I can call pylint directly. I'm > not sure I can do this for what I am trying to do. My task is basically to > find all python scripts in the source repository and run pylint on each. Is > there a better approach to of doing that than the approach above? Thanks >
Sorry, I forgot to mention actually with the approach above I am getting invalid Fatals "Unable to import" for scripts that import sibling modules or using relative imports. So I also want to ask how to solve this invalid "Unable to import" problem. Again thanks for any help. > >> -- >> Sylvain >> > > -hans
_______________________________________________ Python-Projects mailing list [email protected] http://lists.logilab.org/mailman/listinfo/python-projects
