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-util-strip-string
            (python-shell-send-string-no-output
             (format
              "%s\nprint(';'.join(__PYTHON_EL_get_completions(%s)))"
              python-shell-completion-setup-code
              (python-shell--encode-string input))
             process))))
      (when (> (length completions) 2)
        (split-string completions
                      "^'\\|^\"\\|;\\|'$\\|\"$" t)))))