Function: python-shell-completion-get-completions

python-shell-completion-get-completions is a byte-compiled function defined in python.el.gz.

Signature

(python-shell-completion-get-completions PROCESS INPUT)

Documentation

Get completions of INPUT using PROCESS.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/python.el.gz
(defun python-shell-completion-get-completions (process input)
  "Get completions of INPUT using PROCESS."
  (with-current-buffer (process-buffer process)
    (let ((completions
           (python-shell-send-string-no-output
            (format "print(__PYTHON_EL_get_completions(%s))"
                    (python-shell--encode-string input))
            process)))
      (condition-case nil
          (python--parse-json-array completions)
        (json-parse-error
         (python--parse-json-array
          (car (last (split-string completions "[\n\r]+" t)))))))))