how to format a python source file with tools?

gil_johnson x7-g5W_rt at
Mon Nov 30 15:37:19 CET 2009

On Nov 27, 9:58 am, "Diez B. Roggisch" <de... at> wrote:
> > so i would like to have a tool to intelligently format the code for me
> > and make the code more beautiful
> > and automated.
> This is not possible. Consider the following situation:

> [...]

> Both are semantically radically different, and only you know which one
> is the right one.

> Diez

I have to agree with Diez, there is no way to automate this. Some
human intervention is needed. What I would like is an editor that will
indicate what Python will consider a logical block (and sub-block, and
sub-sub-block, etc.)
It's complicated. I've tried to think of a way to do it, and have
gotten lost after a few changes of indentation.
Does anyone know of such a thing?
I miss curly braces with an editor that will highlight matching
parentheses, braces, etc.

More information about the Python-list mailing list