On 12/30/2011 04:51 AM, Derek Harland wrote:
+ lintPath = os.path.join(os.path.dirname(__file__), 'lint.py') + cmd = '%s %s -f parseable -r n --disable=C,R,I "%s"' % (sys.executable, lintPath, childPath) + process = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE, cwd=parentPath)
While you are at it, you could also drop use of the shell, which is safer with respect to shell quoting problems, as in
cmd = [sys.executable, lintPath, '-f', 'parseable', '-r', 'n', '--disable=C,R,I', childPath] process = Popen(cmd, stdout=PIPE, stderr=PIPE, cwd=parentPath) _______________________________________________ Python-Projects mailing list [email protected] http://lists.logilab.org/mailman/listinfo/python-projects
