chd/applicationConfiguration/.emacs/jlj-python.el

23 lines
618 B
EmacsLisp

;; PYTHON CONFIGURATION
;; --------------------------------------
;; enable org-mode babel python code blocks
(org-babel-do-load-languages
'org-babel-load-languages
'((python . t)
(matlab . t)))
(elpy-enable)
(setq python-shell-interpreter "python3"
python-shell-interpreter-args "-i")
;; use flycheck not flymake with elpy
(require 'elpy)
(when (require 'flycheck nil t)
(setq elpy-modules (delq 'elpy-module-flymake elpy-modules))
(add-hook 'elpy-mode-hook 'flycheck-mode))
;; enable autopep8 formatting on save
(require 'py-autopep8)
(add-hook 'elpy-mode-hook 'py-autopep8-enable-on-save)