Thursday, January 3, 2013

PythonTidy, like HTMLTidy for Python

PythonTidy is something like HTMLTidy, but for Python. It attempts to clean up your Python source code to conform to the PEP-8 Python style guide. It takes your Python source code input and cleans it up and writes the output to a different file, so even if it modifies your code in any way semantically (rather than just for formatting), your original code is still intact. The author recommends testing the output before relying on it, which makes sense, since there is a chance that Python Tidy could make inadvertent changes to the meaning of the code. He also mentions some test cases where it fails.

Looks like it could be useful.

PythonTidy is here

- Vasudev Ram
Python, Linux and open source training and consulting - Dancing Bison Enterprises

1 comment:

Niko said...

This looks very outdated to me.
As an alternative I suggest using autopep8 - http://pypi.python.org/pypi/autopep8/ - which is actively developed.