On Nov 30, 7:37 am, gil_johnson <x7-g5w...@earthlink.net> wrote: > On Nov 27, 9:58 am, "Diez B. Roggisch" <de...@nospam.web.de> 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. > Gil
At least with Windows, you get a number of scripts included in your Python install - under the python directory/tools/scripts. There are several scripts here which are intended to help with indentation issues - such as reindent and pindent. Those might help you out some. Nonetheless, it would be better to implement coding standards that everyone can stick to. -- http://mail.python.org/mailman/listinfo/python-list