(root)/
Python-3.11.7/
Include/
cpython/
pylifecycle.h
       1  #ifndef Py_CPYTHON_PYLIFECYCLE_H
       2  #  error "this header file must not be included directly"
       3  #endif
       4  
       5  /* Py_FrozenMain is kept out of the Limited API until documented and present
       6     in all builds of Python */
       7  PyAPI_FUNC(int) Py_FrozenMain(int argc, char **argv);
       8  
       9  /* Only used by applications that embed the interpreter and need to
      10   * override the standard encoding determination mechanism
      11   */
      12  Py_DEPRECATED(3.11) PyAPI_FUNC(int) Py_SetStandardStreamEncoding(
      13      const char *encoding,
      14      const char *errors);
      15  
      16  /* PEP 432 Multi-phase initialization API (Private while provisional!) */
      17  
      18  PyAPI_FUNC(PyStatus) Py_PreInitialize(
      19      const PyPreConfig *src_config);
      20  PyAPI_FUNC(PyStatus) Py_PreInitializeFromBytesArgs(
      21      const PyPreConfig *src_config,
      22      Py_ssize_t argc,
      23      char **argv);
      24  PyAPI_FUNC(PyStatus) Py_PreInitializeFromArgs(
      25      const PyPreConfig *src_config,
      26      Py_ssize_t argc,
      27      wchar_t **argv);
      28  
      29  PyAPI_FUNC(int) _Py_IsCoreInitialized(void);
      30  
      31  
      32  /* Initialization and finalization */
      33  
      34  PyAPI_FUNC(PyStatus) Py_InitializeFromConfig(
      35      const PyConfig *config);
      36  PyAPI_FUNC(PyStatus) _Py_InitializeMain(void);
      37  
      38  PyAPI_FUNC(int) Py_RunMain(void);
      39  
      40  
      41  PyAPI_FUNC(void) _Py_NO_RETURN Py_ExitStatusException(PyStatus err);
      42  
      43  /* Restore signals that the interpreter has called SIG_IGN on to SIG_DFL. */
      44  PyAPI_FUNC(void) _Py_RestoreSignals(void);
      45  
      46  PyAPI_FUNC(int) Py_FdIsInteractive(FILE *, const char *);
      47  PyAPI_FUNC(int) _Py_FdIsInteractive(FILE *fp, PyObject *filename);
      48  
      49  Py_DEPRECATED(3.11) PyAPI_FUNC(void) _Py_SetProgramFullPath(const wchar_t *);
      50  
      51  PyAPI_FUNC(const char *) _Py_gitidentifier(void);
      52  PyAPI_FUNC(const char *) _Py_gitversion(void);
      53  
      54  PyAPI_FUNC(int) _Py_IsFinalizing(void);
      55  
      56  /* Random */
      57  PyAPI_FUNC(int) _PyOS_URandom(void *buffer, Py_ssize_t size);
      58  PyAPI_FUNC(int) _PyOS_URandomNonblock(void *buffer, Py_ssize_t size);
      59  
      60  /* Legacy locale support */
      61  PyAPI_FUNC(int) _Py_CoerceLegacyLocale(int warn);
      62  PyAPI_FUNC(int) _Py_LegacyLocaleDetected(int warn);
      63  PyAPI_FUNC(char *) _Py_SetLocaleFromEnv(int category);
      64  
      65  PyAPI_FUNC(PyThreadState *) _Py_NewInterpreter(int isolated_subinterpreter);