Function: python-shell--get-multiline-input

python-shell--get-multiline-input is a byte-compiled function defined in python.el.gz.

Signature

(python-shell--get-multiline-input)

Documentation

Return lines at a multi-line input in Python shell.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/python.el.gz
(defun python-shell--get-multiline-input ()
  "Return lines at a multi-line input in Python shell."
  (save-excursion
    (let ((p (point)) lines)
      (when (progn
              (beginning-of-line)
              (looking-back python-shell-prompt-block-regexp (pos-bol)))
        (push (buffer-substring-no-properties (point) p) lines)
        (while (progn (comint-previous-prompt 1)
                      (looking-back python-shell-prompt-block-regexp (pos-bol)))
          (push (buffer-substring-no-properties (point) (pos-eol)) lines))
        (push (buffer-substring-no-properties (point) (pos-eol)) lines))
      lines)))