4831
4831
When interactivly called, messages the shell name, Emacs would in the given circtumstances.
4833
To change the default Python interpreter, use `py-switch-shell'.
4833
With \\[universal-argument] 4 is called `py-switch-shells' see docu there.
4836
(let* ((erg (cond (py-use-local-default
4837
(if (not (string= "" py-shell-local-path))
4838
(expand-file-name py-shell-local-path)
4839
(message "Abort: `py-use-local-default' is set to `t' but `py-shell-local-path' is empty. Maybe call `py-toggle-local-default-use'")))
4840
((py-choose-shell-by-shebang))
4841
((py-choose-shell-by-import))
4842
(t (default-value 'py-shell-name))))
4843
(cmd (if py-edit-only-p erg
4844
(executable-find erg))))
4846
(when (interactive-p)
4848
(when (interactive-p) (message "%s" "Could not detect Python on your system. Maybe set `py-edit-only-p'?")))
4836
(if (eq 4 (prefix-numeric-value arg))
4837
(py-switch-shells '(4))
4838
(let* ((erg (cond (py-use-local-default
4839
(if (not (string= "" py-shell-local-path))
4840
(expand-file-name py-shell-local-path)
4841
(message "Abort: `py-use-local-default' is set to `t' but `py-shell-local-path' is empty. Maybe call `py-toggle-local-default-use'")))
4842
((py-choose-shell-by-shebang))
4843
((py-choose-shell-by-import))
4844
(t (default-value 'py-shell-name))))
4845
(cmd (if py-edit-only-p erg
4846
(executable-find erg))))
4848
(when (interactive-p)
4850
(when (interactive-p) (message "%s" "Could not detect Python on your system. Maybe set `py-edit-only-p'?")))
4851
4854
(defadvice pdb (before gud-query-cmdline activate)
4852
4855
"Provide a better default command line when called interactively."