Setup Python

This commit is contained in:
Vladan Popovic 2019-12-08 21:51:17 +01:00
parent 61d7451aa2
commit 1263e29b8b
3 changed files with 43 additions and 0 deletions

26
modules/jenga-python.el Normal file
View file

@ -0,0 +1,26 @@
;;;; Python configuration.
(require 'jenga-functions)
(instl 'elpy)
(instl 'jupyter)
(instl 'ein)
(instl 'py-autopep8)
(instl 'yasnippet)
(elpy-enable)
(add-hook 'elpy-mode-hook 'py-autopep8-enable-on-save)
;; Enable Flycheck
(when (require 'flycheck nil t)
(setq elpy-modules (delq 'elpy-module-flymake elpy-modules))
(add-hook 'elpy-mode-hook 'flycheck-mode))
;; Use IPython for REPL
(setq python-shell-interpreter "jupyter"
python-shell-interpreter-args "console --simple-prompt"
python-shell-prompt-detect-failure-warning nil)
(add-to-list 'python-shell-completion-native-disabled-interpreters
"jupyter")
(provide 'jenga-python)