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 */
7PyAPI_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 */
12PyAPI_FUNC(int) Py_SetStandardStreamEncoding(const char *encoding,
13 const char *errors);
14
15/* PEP 432 Multi-phase initialization API (Private while provisional!) */
16
17PyAPI_FUNC(PyStatus) Py_PreInitialize(
18 const PyPreConfig *src_config);
19PyAPI_FUNC(PyStatus) Py_PreInitializeFromBytesArgs(
20 const PyPreConfig *src_config,
21 Py_ssize_t argc,
22 char **argv);
23PyAPI_FUNC(PyStatus) Py_PreInitializeFromArgs(
24 const PyPreConfig *src_config,
25 Py_ssize_t argc,
26 wchar_t **argv);
27
28PyAPI_FUNC(int) _Py_IsCoreInitialized(void);
29
30
31/* Initialization and finalization */
32
33PyAPI_FUNC(PyStatus) Py_InitializeFromConfig(
34 const PyConfig *config);
35PyAPI_FUNC(PyStatus) _Py_InitializeMain(void);
36
37PyAPI_FUNC(int) Py_RunMain(void);
38
39
40PyAPI_FUNC(void) _Py_NO_RETURN Py_ExitStatusException(PyStatus err);
41
42/* Restore signals that the interpreter has called SIG_IGN on to SIG_DFL. */
43PyAPI_FUNC(void) _Py_RestoreSignals(void);
44
45PyAPI_FUNC(int) Py_FdIsInteractive(FILE *, const char *);
46PyAPI_FUNC(int) _Py_FdIsInteractive(FILE *fp, PyObject *filename);
47
48PyAPI_FUNC(void) _Py_SetProgramFullPath(const wchar_t *);
49
50PyAPI_FUNC(const char *) _Py_gitidentifier(void);
51PyAPI_FUNC(const char *) _Py_gitversion(void);
52
53PyAPI_FUNC(int) _Py_IsFinalizing(void);
54
55/* Random */
56PyAPI_FUNC(int) _PyOS_URandom(void *buffer, Py_ssize_t size);
57PyAPI_FUNC(int) _PyOS_URandomNonblock(void *buffer, Py_ssize_t size);
58
59/* Legacy locale support */
60PyAPI_FUNC(int) _Py_CoerceLegacyLocale(int warn);
61PyAPI_FUNC(int) _Py_LegacyLocaleDetected(int warn);
62PyAPI_FUNC(char *) _Py_SetLocaleFromEnv(int category);
63
64PyAPI_FUNC(PyThreadState *) _Py_NewInterpreter(int isolated_subinterpreter);
65

source code of include/python3.10/cpython/pylifecycle.h