Non-Indented python

Samuel Krempp krempp at trucs.en.trop.crans.ens-cachan.fr
Wed Nov 7 08:34:10 EST 2001


On some rare occasions, the constraint of expressing blocks through 
identation can be painful.
(eg, when I want to write a quick script, but am on a bad computer with 
no good editor. Or if I want to create a script from a shell 
command-line, à-la awk or so.. )

I figure it should be quite simple to implement a program that 
translates scripts where blocks are expressed by traditionnal block 
markers like '{' and '}' (or whatever else..) into a well indented 
python script. 
I thought it surely was already existing, but surprisingly I could not 
find any..

Is there such a program ??

If not, what would be the best way to implement a 'python-ni' 
executable (script or binary) that can be called in place of python to 
execute those non-indented scripts ? 
(maybe there is a better way than translating the whole script into an 
indented one and feeding it to the regular python executable..)

-- 
Sam, the knight who says NI !  




More information about the Python-list mailing list