pyflakes, pylint, pychecker - and other tools

Discussion in 'Python' started by Esmail, Apr 22, 2009.

  1. Esmail

    Esmail Guest

    What is the consensus of the Python community regarding these
    code checkers?

    In particular, are the stylistic recommendations that
    pylint makes considered sensible/valid?

    Are there any other tools you consider essential to Python
    development?

    Thanks.
    Esmail
     
    Esmail, Apr 22, 2009
    #1
    1. Advertisements

  2. Esmail

    Esmail Guest

    Great list Ben, I use emacs and will check out the tools
    you listed.

    What techniques/tools do you recommend for debugging?

    Esmail
     
    Esmail, Apr 22, 2009
    #2
    1. Advertisements

  3. Esmail

    Esmail Guest

    Great list Ben, I use emacs and will check out the tools
    you listed.

    What techniques/tools do you recommend for debugging?

    Esmail
     
    Esmail, Apr 22, 2009
    #3
  4. I really like using Winpdb (http://winpdb.org/) which provides a GUI for
    pdb. It allows you to single-step your code and inspect objects in
    memory. What exactly is in that silly nextOne variable? Hey, it's a
    list rather but it's supposed to be a number! You get the picture.
     
    Alex VanderWoude, Apr 22, 2009
    #4
  5. pylint seems a bit heavy handled, a bit
    too much PEP 8, which was intended as a
    guide, rather than a prescription.

    Colin W.
     
    Colin J. Williams, Apr 22, 2009
    #5
  6. I like PyScripter for Windows, which
    provides a tool for PyLint.

    Colin W.
     
    Colin J. Williams, Apr 22, 2009
    #6
  7. Esmail

    Esmail Guest

    Just having used this for a short while, I would have to agree,
    though for someone coming to Python from other languages (like
    myself) it does provide some stylistic guidance, at least initially,
    to do it the Pythonic way.
     
    Esmail, Apr 22, 2009
    #7
  8. Esmail

    Esmail Guest

    Just having used this for a short while, I would have to agree,
    though for someone coming to Python from other languages (like
    myself) it does provide some stylistic guidance, at least initially,
    to do it the Pythonic way.
     
    Esmail, Apr 22, 2009
    #8
  9. Esmail

    Aahz Guest

    That's half-true on both counts:

    First of all, any new library must be PEP 8-compliant for submission to
    the standard library, so PEP 8 is indeed somewhat prescriptive.

    Second, you can configure pylint to respect your personal style; I think
    that pylint's default PEP 8 configuration makes a lot of sense.
     
    Aahz, Apr 22, 2009
    #9
  10. Could you give a small example of this approach?
     
    Phillip B Oldham, Apr 22, 2009
    #10
  11. Esmail

    Aahz Guest

    Actually, I don't know how, I'm just repeating what was claimed at a
    presentation on pylint. ;-) I've traditionally used pychecker myself
    and haven't seen any reason to switch.
     
    Aahz, Apr 23, 2009
    #11
  12. Esmail

    Esmail Guest

    Thanks for the suggestions, I really like using emacs, so I am going to
    see how I can integrate it with Python development.
    (Unfortunately my Windows version of emacs dosen't seem to be able to
    pop into python mode, and I haven't had time to find out why). At this
    point I do most of my development under Linux/emacs anyway.

    Best,
    Esmail
     
    Esmail, Apr 23, 2009
    #12
  13. Esmail

    Esmail Guest

    Thanks for the suggestions, I really like using emacs, so I am going to
    see how I can integrate it with Python development.
    (Unfortunately my Windows version of emacs dosen't seem to be able to
    pop into python mode, and I haven't had time to find out why). At this
    point I do most of my development under Linux/emacs anyway.

    Best,
    Esmail
     
    Esmail, Apr 23, 2009
    #13
  14. Esmail

    Esmail Guest

    thanks for the suggestion.

    The name made me think that this would be only for the Windows
    platform, but it turns out it's multi-platform.

    I downloaded the Linux version, but haven't had time to explore it
    yet, but plan to.

    Esmail
     
    Esmail, Apr 23, 2009
    #14
  15. Esmail

    Esmail Guest

    thanks for the suggestion.

    The name made me think that this would be only for the Windows
    platform, but it turns out it's multi-platform.

    I downloaded the Linux version, but haven't had time to explore it
    yet, but plan to.

    Esmail
     
    Esmail, Apr 23, 2009
    #15
  16. Esmail

    David Stanek Guest


    I believe you just:

    pylint --generate-rcfile > ~/.pylintrc

    and then customize that file.
     
    David Stanek, Apr 24, 2009
    #16
  17. Esmail

    David Stanek Guest

    I find that the comments in the file it generates are enough. I
    haven't needed any more documentation than that.

    For project specific configuration I just keep a config file[1] in the
    project's source repository. Then make my build script[2] specify that
    file when I run 'paver lint'.

    [1] http://bitbucket.org/dstanek/snake-guice/src/tip/pylint.cfg
    [2] http://bitbucket.org/dstanek/snake-guice/src/tip/pavement.py
     
    David Stanek, Apr 24, 2009
    #17
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.