Function: python-shell-switch-to-shell

python-shell-switch-to-shell is an interactive and byte-compiled function defined in python.el.gz.

Signature

(python-shell-switch-to-shell &optional MSG)

Documentation

Switch to inferior Python process buffer.

When optional argument MSG is non-nil, forces display of a user-friendly message if there's no process running; defaults to t when called interactively.

Probably introduced at or before Emacs version 24.3.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/python.el.gz
(defun python-shell-switch-to-shell (&optional msg)
  "Switch to inferior Python process buffer.
When optional argument MSG is non-nil, forces display of a
user-friendly message if there's no process running; defaults to
t when called interactively."
  (interactive "p")
  (pop-to-buffer
   (process-buffer (python-shell-get-process-or-error msg))
   nil 'mark-for-redisplay))