(require 'ac-python) ;;; Use python-mode with files with these extensions (add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode)) (add-to-list 'auto-mode-alist '("\\.pyx\\'" . python-mode)) ;;; Turn on auto-complete in python shells (add-hook 'inferior-python-mode-hook (lambda () (auto-complete-mode 1))) ;;; Use python major mode if 'python' is in hashbang. (add-to-list 'interpreter-mode-alist '("python" . python-mode)) ;;; Use python as the python interpreter (can be changed to "ipython" in time ;;; when it works) (setq python-python-command "python") ;;; Check files for pep8 mistakes (autoload 'python-pep8 "python-pep8") (autoload 'pep8 "python-pep8")