autopep8 -i *.py

http://www.python.org/dev/peps/pep-0008/
https://pypi.python.org/pypi/autopep8/
https://github.com/jcrocholl/pep8

sudo pip-python install --upgrade autopep8

autopep8 -i *.py