I have some Python code that have inconsistent indentation. There is a lot of mixture of tabs and spaces to make the matter even worse, and even space indentation is not pre
The reindent script did not work for me, due to some missing module. Anyway, I found this sed command which does the job perfect for me:
sed
sed -r 's/^([ ]*)([^ ])/\1\1\2/' file.py