ID EN
Sys

__interactivehook__

Python 3.11

When this attribute exists, its value is automatically called (with no arguments) when the interpreter is launched in interactive mode. This is done after the PYTHONSTARTUP file is read, so that you can set this hook there. The site module sets this.

Syntax

PYTHON
sys.__interactivehook__

See Also

interactive mode PYTHONSTARTUP site sets this auditing event