title: Expand tabs to spaces in vim only in python files?
body: <p>How do I have the tab key insert 4 spaces when I'm editing "*.py" files and not any other files?</p>
  
  <p>Following a recommendation from <a href="https://stackoverflow.com/questions/9864543/vim-and-pep-8-style-guide-for-python-code">Vim and PEP 8 -- Style Guide for Python Code</a>, I installed vim-flake8 (and vim-pathogen). This gives warnings when PEP8 style guidelines are violated. This is great, but I would for tabs to be expanded automatically in the first place when editing python files. I would like to have tab key actually insert tabs when editing other types of files.</p>
  
  <p>In other words, I want the following to apply when I'm editing python files and only python files:</p>
  
  <pre><code>set expandtab       " tabs are converted to spaces
  set tabstop=4       " numbers of spaces of tab character
  set shiftwidth=4    " numbers of spaces to (auto)indent
  </code></pre>