What is the easiest way to auto convert spaces to tabs in multiple python files?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/338767/tool-to-convert-python-indentation-from-spaces-to-tabs">Tool to convert python indentation from spaces to tabs?</a>  </p>
</blockquote>



<p>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 <code>os.walk</code> over files and do some magic? I can't just <code>grep</code> 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.</p>
