I use this vimrc for editing python, makes my life pretty and readable:

autocmd BufRead,BufNewFile *.py syntax on
autocmd BufRead,BufNewFile *.py set ai
autocmd BufRead,BufNewFile *.py set foldmethod=indent
autocmd BufRead,BufNewFile *.py set syntax=python
autocmd BufRead,BufNewFile *.py set smartindent
autocmd BufRead,BufNewFile *.py set cinwords=class,def,elif,else,except,finally,for,if,try,while
autocmd FileType * set tabstop=2|set shiftwidth=2|set noexpandtab
autocmd FileType python set tabstop=4|set shiftwidth=4|set expandtab
set background=dark
map :let &background = ( &background == "dark"? "light" : "dark" )

Related posts:

  1. Python magazine customer service
  2. Python threads
  3. Python regex
  4. Python-RPM
  5. Cyclomatic complexity of python code