Checking the coding style
andrej.mitrovich at gmail.com
Sun Feb 7 20:59:40 CET 2010
On Feb 7, 8:22 pm, Kev Dwyer <kevin.p.dw... at gmail.com> wrote:
> On Sun, 07 Feb 2010 19:36:10 +0100, Pablo Recio Quijano wrote:
> > Hi!
> > I'm finishing a project writen in Python, and I realize about the
> > document PEP8 - Style Guide for Python Code .
> > Is there any app or script that checks if my project pass that style
> > guide? I also worked with Drupal, and I know there is some modules and
> > scripts that checks its coding standars  and it's very usefull to
> > clean the code.
> > Thanks in advance!
> > http://www.python.org/dev/peps/pep-0008/
> Hello Pablo,
> The pep8 package (http://pypi.python.org/pypi/pep8) can do this, though
> I have never used it myself. PyLint is a customisable static analysis
> program that checks style among other things.
I've used pep8.py myself for some Python 3.x projects, and it's pretty
good. You don't need to install it either, a simple call via python
pep8.py 'yourpythonfile.py' should do.
I think PyLint can be used for Python 2.x, but I'm not sure about 3.x.
More information about the Python-list