Extract ipython/jupyter arglist to variables
Also fixes #1022 by removing default --pylab arg from +python/open-ipython-repl.
This commit is contained in:
parent
553cee5921
commit
4455dc8baa
2 changed files with 10 additions and 2 deletions
|
@ -27,7 +27,7 @@
|
|||
"Open an IPython REPL."
|
||||
(interactive)
|
||||
(let ((python-shell-interpreter "ipython")
|
||||
(python-shell-interpreter-args "-i --pylab --simple-prompt --no-color-info"))
|
||||
(python-shell-interpreter-args +python-jupyter-repl-args))
|
||||
(+python/repl)))
|
||||
|
||||
;;;###autoload
|
||||
|
@ -36,7 +36,7 @@
|
|||
(interactive)
|
||||
(add-to-list 'python-shell-completion-native-disabled-interpreters "jupyter")
|
||||
(let ((python-shell-interpreter "jupyter")
|
||||
(python-shell-interpreter-args "console --simple-prompt"))
|
||||
(python-shell-interpreter-args (format "console %s" +python-jupyter-repl-args)))
|
||||
(+python/repl)))
|
||||
|
||||
(defun +python--extract-version (prefix str)
|
||||
|
|
|
@ -3,6 +3,14 @@
|
|||
(defconst +python-mode-line-indicator '("" +python--version)
|
||||
"Format for the python version/env indicator in the mode-line.")
|
||||
|
||||
(defvar +python-ipython-repl-args "-i --simple-prompt --no-color-info"
|
||||
"CLI arguments to initialize ipython with when `+python/open-ipython-repl' is
|
||||
called.")
|
||||
|
||||
(defvar +python-jupyter-repl-args "--simple-prompt"
|
||||
"CLI arguments to initialize 'jupiter console %s' with when
|
||||
`+python/open-ipython-repl' is called.")
|
||||
|
||||
(defvar-local +python--version nil
|
||||
"The python version in the current buffer.")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue