python code with indention

Sean Blakey pythonista at gmail.com
Wed Feb 9 13:22:34 EST 2005


On Wed, 09 Feb 2005 10:10:29 -0800 (PST), Xah Lee <xah at xahlee.org> wrote:
> i thought it is trivial for the Python parser to spit out a version
> with matching brackets. Similarly, perhaps some opensourcing student
> has modified a parser to read in a matching brackets delimited version
> of Python.
> 
>  Xah
>  xah at xahlee.org
>  http://xahlee.org/PageTwo_dir/more.html
> 

Well, there's always the pindent.py script. Get the python source, and
look at Tools/scripts/pindent.py

This isn't an alternate parser, but it can turn a python script with
end-block comments and no indentation into a correctly indented python
script.

-- 
Sean Blakey
Saint of Mild Amusement, Evil Genius, Big Geek
Python/Java/C++/C(Unix/Windows/Palm/Web) developer
quine = ['print "quine =",quine,"; exec(quine[0])"'] ; exec(quine[0])



More information about the Python-list mailing list