Function: python-shell-readline-detect

python-shell-readline-detect is a byte-compiled function defined in python.el.gz.

Signature

(python-shell-readline-detect)

Documentation

Detect the readline support for Python shell completion.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/python.el.gz
(defun python-shell-readline-detect ()
  "Detect the readline support for Python shell completion."
  (let* ((process (python-shell-get-process))
         (output (python-shell-send-string-no-output "
try:
    import readline
    print(readline.get_completer_delims())
except:
    print('No readline support')" process)))
    (setq-local python-shell-readline-completer-delims
                (unless (string-search "No readline support" output)
                  (string-trim-right output)))))