Variable: python-shell-first-prompt-hook
python-shell-first-prompt-hook is a customizable variable defined in
python.el.gz.
Value
(python-shell-completion-native-turn-on-maybe-with-msg
python-shell-send-setup-code)
Documentation
Hook run upon first (non-pdb) shell prompt detection.
This is the place for shell setup functions that need to wait for output. Since the first prompt is ensured, this helps the current process to not hang while waiting. This is useful to safely attach setup code for long-running processes that eventually provide a shell.
This variable was added, or its default value changed, in Emacs 25.1.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/python.el.gz
(defcustom python-shell-first-prompt-hook nil
"Hook run upon first (non-pdb) shell prompt detection.
This is the place for shell setup functions that need to wait for
output. Since the first prompt is ensured, this helps the
current process to not hang while waiting. This is useful to
safely attach setup code for long-running processes that
eventually provide a shell."
:version "25.1"
:type 'hook
:group 'python)