Possible Duplicate:
Tool to convert python indentation from spaces to tabs?
I have a number of python files (>1000) that need to be reformatted so indentation is done only with tabs (yes, i know PEP-8, but this is a coding standard of a company). What is the easiest way to do so? Maybe some script in Python that will os.walk
over files and do some magic? I can't just grep
file content since file can be malformed (mixed tab and spaces, different amount of spaces) but Python will still run it and i get it back working after conversion.