Re: Python Indentation Obligation...

  • From: Jared Wright <wright.jaredm@xxxxxxxxx>
  • To: programmingblind@xxxxxxxxxxxxx
  • Date: Mon, 13 Dec 2010 03:53:39 -0500

This would be a splendid addition to Nonvisual Development and its freshly community-driven approach. I'll put it up there if noone else wants to, but I figured I'd give its author a heads up first.

On 12/12/2010 2:12 PM, Hamid Hamraz wrote:
It is in Python. I tried the header comment to be descriptive enough. each of the begin/end markers must be in a separate line followed by a new line character. Each line including the begin/end markers will be deleted from the output script. You can also use it like this for example:
def myFunc()
#{
function_body
#}
use it from the command line like this:
braceRemover.py your_script_name
The output script is output.py
Note that the # sign is not necessary.
It is also easy to modify the new line character(s) to get adapted to your OS/Editor, from within the script. One more thing you have to be cautious about, is the end of your file to be ended with a new line. I haven't tested it so much. Up to now, it has worked fine for me. Feel free to change it as you want, and do let me know of any potential problems/bugs.
Cheers!
Hamid

    ----- Original Message -----
    *From:* QuentinC <mailto:quentinc@xxxxxxxxxxx>
    *To:* programmingblind@xxxxxxxxxxxxx
    <mailto:programmingblind@xxxxxxxxxxxxx>
    *Sent:* Sunday, December 12, 2010 8:19 PM
    *Subject:* Re: Python Indentation Obligation...

    > I concur that the Python indentation is hard to deal, but at
    least for writing the Python scripts, I developed a simple script
    for removing the braces or whatever start/end markers is required
    to use for better readability, with the corresponding indent
    level. It is very short and easy for my initial Python scripting
    practises. If you would like, I will be glad to send it along.
    IN which language is your script ? I'm interested.
    I found a python modification named pybrace. In fact, that's the
    type of thing I'm looking for, because a script so modified would
    have a syntax relatively close to other scripting languages (js,
    lua, ruby, etc.). The problem with the braces if not to confuse
    with dictionnaries...
    I could perhaps adapt something to use with my 6pad editor. Thank
    you if you can send it to me.
    > Moreover, I also found Python a very easy to pick, and very
    strong scripting language.
    I don't doubt about its capabilities, its popularity is a kind of
    proof. The only thing which stops me in going further is that
    indentation problem.


Other related posts: