mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
lang/python: add Ipython/Jupyter REPL commands
This commit is contained in:
@ -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 " ")))))
|
||||||
|
Reference in New Issue
Block a user