- PythonTidy: This is a nifty and updated script (v1.21 on 3rd Sept. 2010) by Lacus Veris which can do easily perhaps what you have dreaded to do on slightly older code: refactoring to meet standards! I had to do the following change on my system to make the script produce newlines in the output, but overall I was very satisfied:
- OVERRIDE_NEWLINE = '' # 2006 Dec 05
+ OVERRIDE_NEWLINE = '\n' # 2006 Dec 05
- PyFlakes: It is a lightweight Python code checker (like PyChecker) which can notify you of minor by annoying python coding errors (like misspelling a variable name, forgetting to import a module, etc.) The checks are done in real time and can save some serious swearing and editor-to-terminal switches if you use it as a Vim plugin. However, it does not inform the coders of the styling violations. For that, consider PyLint (see later).
- PyLint: Pylint actually compiles the code and shouts out errors and standard style violations. There is a Vim plugin to do it each time you save the Python file. Working with a large script can get difficult if you :w as frequently as I do. However, one feature I really like is the code rating it shows after analyzing the code.
- Pindent: This is a script which makes Python code slightly easier to understand. It adds some
# endtags to the code after closing
- Python project directory structure: I spent quite sometime trying to get this right. Jp Calderone has spelled out most of the rules here. Also, the Python documentation too has a few things to say about the matter, specially about the differences between a Module and a Package.
- Python and Vim: If you are a Vi fan, like me, then you would love these scripts by Marius Gedminas. They definitely make Vi a more powerful IDE for Python than any other I have seen out there.
- Style Guide for Python Code (PEP 8): This is the coding standard style book for Python: a must read before anyone writes a serious project. There are some things which the Python documentation skips perhaps because of brevity, perhaps because these are not required conventions or perhaps just because programmer are lazy, but this PEP is comprehensive and well thought out. This document is what is used for the default definition in PyLint and PythonTidy's default styling.