lang/python: add Ipython/Jupyter REPL commands
This commit is contained in:
parent
301a01182d
commit
7c6e2e705f
1 changed files with 17 additions and 0 deletions
|
@ -22,6 +22,23 @@
|
||||||
(run-python nil t t))
|
(run-python nil t t))
|
||||||
(run-python nil t t)))))
|
(run-python nil t t)))))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun +python/open-ipython-repl ()
|
||||||
|
"Open an IPython REPL."
|
||||||
|
(interactive)
|
||||||
|
(let ((python-shell-interpreter "ipython")
|
||||||
|
(python-shell-interpreter-args "-i --pylab --simple-prompt --no-color-info"))
|
||||||
|
(+python/repl)))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun +python/open-jupyter-repl ()
|
||||||
|
"Open a Jupyter console."
|
||||||
|
(interactive)
|
||||||
|
(add-to-list 'python-shell-completion-native-disabled-interpreters "jupyter")
|
||||||
|
(let ((python-shell-interpreter "jupyter")
|
||||||
|
(python-shell-interpreter-args "console --simple-prompt"))
|
||||||
|
(+python/repl)))
|
||||||
|
|
||||||
(defun +python--extract-version (prefix str)
|
(defun +python--extract-version (prefix str)
|
||||||
(when str
|
(when str
|
||||||
(format "%s%s" prefix (cadr (split-string str " ")))))
|
(format "%s%s" prefix (cadr (split-string str " ")))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue