5034
5034
;;; Python named shells
5035
5035
(defun python (&optional argprompt)
5036
5036
"Start an Python interpreter in another window.
5038
With optional \\[universal-argument] user is prompted
5039
for options to pass to the Python interpreter. "
5037
With optional \\[universal-argument] user is prompted
5038
for options to pass to the Python interpreter. "
5041
(let ((py-shell-name "python"))
5042
(py-shell argprompt)))
5040
(py-set-shell-completion-environment)
5041
(py-shell argprompt nil "python"))
5044
5043
(defun python2 (&optional argprompt)
5045
5044
"Start an Python2 interpreter in another window.
5047
With optional \\[universal-argument] user is prompted
5048
for options to pass to the Python2 interpreter. "
5045
With optional \\[universal-argument] user is prompted
5046
for options to pass to the Python2 interpreter. "
5050
(let ((py-shell-name "python2"))
5051
(py-shell argprompt)))
5048
(py-set-shell-completion-environment)
5049
(py-shell argprompt nil "python2"))
5053
5051
(defun python2.7 (&optional argprompt)
5054
5052
"Start an Python2.7 interpreter in another window.
5056
With optional \\[universal-argument] user is prompted
5057
for options to pass to the Python2.7 interpreter. "
5053
With optional \\[universal-argument] user is prompted
5054
for options to pass to the Python2.7 interpreter. "
5059
(let ((py-shell-name "python2.7"))
5060
(py-shell argprompt)))
5056
(py-set-shell-completion-environment)
5057
(py-shell argprompt nil "python2.7"))
5062
5059
(defun python3 (&optional argprompt)
5063
5060
"Start an Python3 interpreter in another window.
5065
With optional \\[universal-argument] user is prompted
5066
for options to pass to the Python3 interpreter. "
5061
With optional \\[universal-argument] user is prompted
5062
for options to pass to the Python3 interpreter. "
5068
(let ((py-shell-name "python3"))
5069
(py-shell argprompt)))
5064
(py-set-shell-completion-environment)
5065
(py-shell argprompt nil "python3"))
5071
5067
(defun python3.2 (&optional argprompt)
5072
5068
"Start an Python3.2 interpreter in another window.
5074
With optional \\[universal-argument] user is prompted
5075
for options to pass to the Python3.2 interpreter. "
5069
With optional \\[universal-argument] user is prompted
5070
for options to pass to the Python3.2 interpreter. "
5077
(let ((py-shell-name "python3.2"))
5078
(py-shell argprompt)))
5072
(py-set-shell-completion-environment)
5073
(py-shell argprompt nil "python3.2"))
5075
(defalias 'iyp 'ipython)
5076
(defalias 'ipy 'ipython)
5080
5077
(defun ipython (&optional argprompt)
5081
5078
"Start an IPython interpreter in another window.
5083
With optional \\[universal-argument] user is prompted
5084
for options to pass to the IPython interpreter. "
5079
With optional \\[universal-argument] user is prompted
5080
for options to pass to the IPython interpreter. "
5086
(let* ((py-shell-name "ipython"))
5087
(py-set-shell-completion-environment)
5088
(py-shell argprompt)
5089
(when (interactive-p) (switch-to-buffer (current-buffer))
5090
(goto-char (point-max)))))
5082
(py-set-shell-completion-environment)
5083
(py-shell argprompt nil "ipython"))
5092
5085
(defun jython (&optional argprompt)
5093
5086
"Start an Jython interpreter in another window.
5095
With optional \\[universal-argument] user is prompted
5096
for options to pass to the Jython interpreter. "
5087
With optional \\[universal-argument] user is prompted
5088
for options to pass to the Jython interpreter. "
5098
(let ((py-shell-name "jython"))
5099
(py-shell argprompt)))
5090
(py-set-shell-completion-environment)
5091
(py-shell argprompt nil "jython"))
5101
;;; Python dedicated shells
5102
5093
(defun python-dedicated (&optional argprompt)
5103
"Start an unique Python interpreter in another window.
5105
With optional \\[universal-argument] user is prompted
5106
for options to pass to the Python interpreter. "
5094
"Start an Python dedicated interpreter in another window.
5095
With optional \\[universal-argument] user is prompted
5096
for options to pass to the Python interpreter. "
5108
(let ((py-shell-name "python"))
5109
(py-shell argprompt t)))
5098
(py-set-shell-completion-environment)
5099
(py-shell argprompt t "python"))
5111
5101
(defun python2-dedicated (&optional argprompt)
5112
"Start an unique Python2 interpreter in another window.
5114
With optional \\[universal-argument] user is prompted
5115
for options to pass to the Python2 interpreter. "
5102
"Start an Python2 dedicated interpreter in another window.
5103
With optional \\[universal-argument] user is prompted
5104
for options to pass to the Python2 interpreter. "
5117
(let ((py-shell-name "python2"))
5118
(py-shell argprompt t)))
5106
(py-set-shell-completion-environment)
5107
(py-shell argprompt t "python2"))
5120
5109
(defun python2.7-dedicated (&optional argprompt)
5121
"Start an unique Python2.7 interpreter in another window.
5123
With optional \\[universal-argument] user is prompted
5124
for options to pass to the Python2.7 interpreter. "
5110
"Start an Python2.7 dedicated interpreter in another window.
5111
With optional \\[universal-argument] user is prompted
5112
for options to pass to the Python2.7 interpreter. "
5126
(let ((py-shell-name "python2.7"))
5127
(py-shell argprompt t)))
5114
(py-set-shell-completion-environment)
5115
(py-shell argprompt t "python2.7"))
5129
5117
(defun python3-dedicated (&optional argprompt)
5130
"Start an unique Python3 interpreter in another window.
5132
With optional \\[universal-argument] user is prompted
5133
for options to pass to the Python3 interpreter. "
5118
"Start an Python3 dedicated interpreter in another window.
5119
With optional \\[universal-argument] user is prompted
5120
for options to pass to the Python3 interpreter. "
5135
(let ((py-shell-name "python3"))
5136
(py-shell argprompt t)))
5122
(py-set-shell-completion-environment)
5123
(py-shell argprompt t "python3"))
5138
5125
(defun python3.2-dedicated (&optional argprompt)
5139
"Start an unique Python3.2 interpreter in another window.
5141
With optional \\[universal-argument] user is prompted
5142
for options to pass to the Python3.2 interpreter. "
5126
"Start an Python3.2 dedicated interpreter in another window.
5127
With optional \\[universal-argument] user is prompted
5128
for options to pass to the Python3.2 interpreter. "
5144
(let ((py-shell-name "python3.2"))
5145
(py-shell argprompt t)))
5130
(py-set-shell-completion-environment)
5131
(py-shell argprompt t "python3.2"))
5147
5133
(defun ipython-dedicated (&optional argprompt)
5148
"Start an unique IPython interpreter in another window.
5150
With optional \\[universal-argument] user is prompted
5151
for options to pass to the IPython interpreter. "
5134
"Start an IPython dedicated interpreter in another window.
5135
With optional \\[universal-argument] user is prompted
5136
for options to pass to the IPython interpreter. "
5153
(let ((py-shell-name "ipython"))
5154
(py-shell argprompt t)))
5138
(py-set-shell-completion-environment)
5139
(py-shell argprompt t "ipython"))
5156
5141
(defun jython-dedicated (&optional argprompt)
5157
"Start an unique Jython interpreter in another window.
5159
With optional \\[universal-argument] user is prompted
5160
for options to pass to the Jython interpreter. "
5142
"Start an Jython dedicated interpreter in another window.
5143
With optional \\[universal-argument] user is prompted
5144
for options to pass to the Jython interpreter. "
5162
(let ((py-shell-name "jython"))
5163
(py-shell argprompt t)))
5146
(py-set-shell-completion-environment)
5147
(py-shell argprompt t "jython"))
5166
5150
;; Code execution commands