Re: how to format a python source file with tools?



On Nov 27, 9:58 am, "Diez B. Roggisch" <de...@xxxxxxxxxxxxx> 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
.



Relevant Pages

  • Re: How can a virtual root be defined programmatically?
    ... > Are you saying you want to open metabse.xml with a text editor and add the ... >> our case the addition of this virtual root will happen once and never be ... >> create the root with IIS of course but we want to automate the process. ...
    (microsoft.public.inetserver.iis)
  • Re: how to format a python source file with tools?
    ... I have to agree with Diez, there is no way to automate this. ... I miss curly braces with an editor that will highlight matching ... you get a number of scripts included in your ... Python install - under the python directory/tools/scripts. ...
    (comp.lang.python)
  • Re: Opening RC file in text mode
    ... select Source Code Editor, ... Automate your software builds with Visual Build Pro ... I never want to open them with the resource editor since it doesn't ...
    (microsoft.public.vc.ide_general)
  • importing .bas
    ... I have a .BAS file with a macro module that I can manually import into the ... Normal project in VB Editor. ... I'd like to automate this process. ...
    (microsoft.public.word.vba.general)
  • Re: How can a virtual root be defined programmatically?
    ... Are you saying you want to open metabse.xml with a text editor and add the ... If you want to automate it, than ADSI or WMI is the way to go. ... > our case the addition of this virtual root will happen once and never be ...
    (microsoft.public.inetserver.iis)