Function: python-shell-comint-end-of-output-p
python-shell-comint-end-of-output-p is a byte-compiled function
defined in python.el.gz.
Signature
(python-shell-comint-end-of-output-p OUTPUT)
Documentation
Return non-nil if OUTPUT ends with input prompt.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/python.el.gz
(defun python-shell-comint-end-of-output-p (output)
"Return non-nil if OUTPUT ends with input prompt."
(string-match
;; XXX: It seems on macOS an extra carriage return is attached
;; at the end of output, this handles that too.
(concat
"\r?\n?"
;; Remove initial caret from calculated regexp
(replace-regexp-in-string
(rx string-start ?^) ""
python-shell--prompt-calculated-input-regexp)
(rx eos))
output))