Quickyl correct the indentation issues in a given python file perl -i.bak -pe "s/\t/' 'x(8-pos()%8)/eg" filename.py