This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#this little script will put the right identation for python script if was ill-formated (due to pasting code to web page, say) | |
#perl identPython.pl < ill_formated_python_code > good_python_code | |
$level = 0; | |
while (<STDIN>) { | |
chomp($line = $_); | |
$line =~ s/^\s*//; | |
if ($line eq "") { | |
$level = 0; | |
print "\n"; |