Pages

Thursday, January 3, 2013

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.