Source formatting fixer?

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Tue Dec 11 17:26:57 EST 2007


En Tue, 11 Dec 2007 12:22:11 -0300, Jesse Jaggars <jhjaggars at gmail.com>  
escribi�:

> Bret wrote:
>> Does anyone know of a package that can be used to "fix" bad formatting
>> in Python code?  I don't mean actual errors, just instances where
>> someone did things that violate the style guide and render the code
>> harder to read.
>>
> This may not be exactly what you want, but if you use Gedit there is a
> handy reindent plugin.
>
> http://live.gnome.org/Gedit/Plugins/Reindent

Python already comes with a reindenter, see Tools\scripts\reindent.py
If you want to transform y= f (   x- 3 ) into y = f(x - 3) try PythonTidy  
(search this same group for a link)

-- 
Gabriel Genellina




More information about the Python-list mailing list