PythonTidy

Thomas Heller theller at ctypes.org
Tue Dec 5 13:06:30 EST 2006


Chuck Rhode schrieb:
> That went well.  PythonTidy has been looked at at least 10**2 times,
> and I have received a couple of complaints, which I hope I have
> addressed satisfactorily -- plenty good enough for a beta test.  The
> basic concept stands.

Sure.
There is still one major issue.  pythonTidy uses open(input-file, "rb") to
open the Python module to tidy up.  That does not work on Windows,
at least if the file has (as it should) "\r\n" newlines.
I suggest you open the file with open(input-file, "rU").

For output, PythonTidy generates "\n" line endings, this should also be changed
on Windows.

And another wish from me:
PythonTidy outputs strings with single quotes, while my own style is to
use double quotes (I don't think that pep8 prefers one over the other).
Is it possible to customize this?

> PythonTidy.py cleans up, regularizes, and reformats the text of
> Python scripts:
> 
>   http://www.LacusVeris.com/PythonTidy/PythonTidy.python
> 
> What next?  Is it appropriately submitted to the Cheese Shop?
> 

Of course.

Thomas




More information about the Python-list mailing list