Skip to content

Instantly share code, notes, and snippets.

#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";