Home
About
Blog
Products
Forum
Support
Contact
Sunbelt Computer Software
PL/B Language Development and Support
Home
About
Blog
Products
Forum
Support
Contact
cpython/Include/pylifecycle.h at pythoncapi · pythoncapi/cpython · GitHub
Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
Uh oh!
There was an error while loading.
Please reload this page
.
pythoncapi
/
cpython
Public
forked from
python/cpython
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Files
Expand file tree
pythoncapi
Breadcrumbs
cpython
/
Include
/
pylifecycle.h
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
189 lines (159 loc) · 5.89 KB
pythoncapi
Breadcrumbs
cpython
/
Include
/
pylifecycle.h
Copy path
Top
File metadata and controls
Code
Blame
189 lines (159 loc) · 5.89 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
/* Interfaces to configure, query, create & destroy the Python runtime */
#ifndef
Py_PYLIFECYCLE_H
#define
Py_PYLIFECYCLE_H
#ifdef
__cplusplus
extern
"C"
{
#endif
PyAPI_FUNC
(
void
)
Py_SetProgramName
(
const
wchar_t
*
);
PyAPI_FUNC
(
wchar_t
*
)
Py_GetProgramName
(
void
);
PyAPI_FUNC
(
void
)
Py_SetPythonHome
(
const
wchar_t
*
);
PyAPI_FUNC
(
wchar_t
*
)
Py_GetPythonHome
(
void
);
#ifndef
Py_LIMITED_API
/* Only used by applications that embed the interpreter and need to
* override the standard encoding determination mechanism
*/
PyAPI_FUNC
(
int
)
Py_SetStandardStreamEncoding
(
const
char
*
encoding
,
const
char
*
errors
);
#endif
#ifdef
Py_BUILD_CORE
PyAPI_FUNC
(
void
)
_Py_ClearStandardStreamEncoding
(
void
);
#endif
#ifndef
Py_LIMITED_API
/* PEP 432 Multi-phase initialization API (Private while provisional!) */
PyAPI_FUNC
(
_PyInitError
)
_Py_InitializeCore
(
PyInterpreterState
*
*
interp
,
const
_PyCoreConfig
*
);
PyAPI_FUNC
(
int
)
_Py_IsCoreInitialized
(
void
);
PyAPI_FUNC
(
_PyInitError
)
_PyMainInterpreterConfig_Read
(
_PyMainInterpreterConfig
*
config
,
const
_PyCoreConfig
*
core_config
);
PyAPI_FUNC
(
void
)
_PyMainInterpreterConfig_Clear
(
_PyMainInterpreterConfig
*
);
PyAPI_FUNC
(
int
)
_PyMainInterpreterConfig_Copy
(
_PyMainInterpreterConfig
*
config
,
const
_PyMainInterpreterConfig
*
config2
);
PyAPI_FUNC
(
_PyInitError
)
_Py_InitializeMainInterpreter
(
PyInterpreterState
*
interp
,
const
_PyMainInterpreterConfig
*
);
#endif
/* Initialization and finalization */
PyAPI_FUNC
(
void
)
Py_Initialize
(
void
);
PyAPI_FUNC
(
void
)
Py_InitializeEx
(
int
);
#ifndef
Py_LIMITED_API
PyAPI_FUNC
(
_PyInitError
)
_Py_InitializeFromConfig
(
const
_PyCoreConfig
*
config
);
PyAPI_FUNC
(
void
)
_Py_NO_RETURN
_Py_FatalInitError
(
_PyInitError
err
);
#endif
PyAPI_FUNC
(
void
)
Py_Finalize
(
void
);
PyAPI_FUNC
(
int
)
Py_FinalizeEx
(
void
);
PyAPI_FUNC
(
int
)
Py_IsInitialized
(
void
);
/* Subinterpreter support */
PyAPI_FUNC
(
PyThreadState
*
)
Py_NewInterpreter
(
void
);
PyAPI_FUNC
(
void
)
Py_EndInterpreter
(
PyThreadState
*
);
/* Py_PyAtExit is for the atexit module, Py_AtExit is for low-level
* exit functions.
*/
#ifndef
Py_LIMITED_API
PyAPI_FUNC
(
void
)
_Py_PyAtExit
(
void
(
*
func
)(
PyObject
*
),
PyObject
*
);
#endif
PyAPI_FUNC
(
int
)
Py_AtExit
(
void
(
*
func
)(
void
));
PyAPI_FUNC
(
void
)
_Py_NO_RETURN
Py_Exit
(
int
);
/* Restore signals that the interpreter has called SIG_IGN on to SIG_DFL. */
#ifndef
Py_LIMITED_API
PyAPI_FUNC
(
void
)
_Py_RestoreSignals
(
void
);
PyAPI_FUNC
(
int
)
Py_FdIsInteractive
(
FILE
*
,
const
char
*
);
#endif
/* Bootstrap __main__ (defined in Modules/main.c) */
PyAPI_FUNC
(
int
)
Py_Main
(
int
argc
,
wchar_t
*
*
argv
);
#ifdef
Py_BUILD_CORE
PyAPI_FUNC
(
int
)
_Py_UnixMain
(
int
argc
,
char
*
*
argv
);
#endif
/* In getpath.c */
PyAPI_FUNC
(
wchar_t
*
)
Py_GetProgramFullPath
(
void
);
PyAPI_FUNC
(
wchar_t
*
)
Py_GetPrefix
(
void
);
PyAPI_FUNC
(
wchar_t
*
)
Py_GetExecPrefix
(
void
);
PyAPI_FUNC
(
wchar_t
*
)
Py_GetPath
(
void
);
#ifdef
Py_BUILD_CORE
struct
_PyPathConfig
;
PyAPI_FUNC
(
_PyInitError
)
_PyPathConfig_SetGlobal
(
const
struct
_PyPathConfig
*
config
);
PyAPI_FUNC
(
PyObject
*
)
_PyPathConfig_ComputeArgv0
(
int
argc
,
wchar_t
*
*
argv
);
PyAPI_FUNC
(
int
)
_Py_FindEnvConfigValue
(
FILE
*
env_file
,
const
wchar_t
*
key
,
wchar_t
*
value
,
size_t
value_size
);
#endif
PyAPI_FUNC
(
void
)
Py_SetPath
(
const
wchar_t
*
);
#ifdef
MS_WINDOWS
int
_Py_CheckPython3
(
void
);
#endif
/* In their own files */
PyAPI_FUNC
(
const
char
*
)
Py_GetVersion
(
void
);
PyAPI_FUNC
(
const
char
*
)
Py_GetPlatform
(
void
);
PyAPI_FUNC
(
const
char
*
)
Py_GetCopyright
(
void
);
PyAPI_FUNC
(
const
char
*
)
Py_GetCompiler
(
void
);
PyAPI_FUNC
(
const
char
*
)
Py_GetBuildInfo
(
void
);
#ifndef
Py_LIMITED_API
PyAPI_FUNC
(
const
char
*
)
_Py_gitidentifier
(
void
);
PyAPI_FUNC
(
const
char
*
)
_Py_gitversion
(
void
);
#endif
/* Internal -- various one-time initializations */
#ifndef
Py_LIMITED_API
PyAPI_FUNC
(
PyObject
*
)
_PyBuiltin_Init
(
void
);
PyAPI_FUNC
(
_PyInitError
)
_PySys_BeginInit
(
PyObject
*
*
sysmod
);
PyAPI_FUNC
(
int
)
_PySys_EndInit
(
PyObject
*
sysdict
,
PyInterpreterState
*
interp
);
PyAPI_FUNC
(
_PyInitError
)
_PyImport_Init
(
PyInterpreterState
*
interp
);
PyAPI_FUNC
(
void
)
_PyExc_Init
(
PyObject
*
bltinmod
);
PyAPI_FUNC
(
_PyInitError
)
_PyImportHooks_Init
(
void
);
PyAPI_FUNC
(
int
)
_PyFloat_Init
(
void
);
PyAPI_FUNC
(
int
)
PyByteArray_Init
(
void
);
PyAPI_FUNC
(
_PyInitError
)
_Py_HashRandomization_Init
(
const
_PyCoreConfig
*
);
#endif
/* Various internal finalizers */
#ifdef
Py_BUILD_CORE
PyAPI_FUNC
(
void
)
_PyExc_Fini
(
void
);
PyAPI_FUNC
(
void
)
_PyImport_Fini
(
void
);
PyAPI_FUNC
(
void
)
_PyImport_Fini2
(
void
);
PyAPI_FUNC
(
void
)
_PyGC_DumpShutdownStats
(
void
);
PyAPI_FUNC
(
void
)
_PyGC_Fini
(
void
);
PyAPI_FUNC
(
void
)
_PyType_Fini
(
void
);
PyAPI_FUNC
(
void
)
_Py_HashRandomization_Fini
(
void
);
#endif
/* Py_BUILD_CORE */
#ifndef
Py_LIMITED_API
PyAPI_FUNC
(
void
)
PyMethod_Fini
(
void
);
PyAPI_FUNC
(
void
)
PyFrame_Fini
(
void
);
PyAPI_FUNC
(
void
)
PyCFunction_Fini
(
void
);
PyAPI_FUNC
(
void
)
PyDict_Fini
(
void
);
PyAPI_FUNC
(
void
)
PyTuple_Fini
(
void
);
PyAPI_FUNC
(
void
)
PyList_Fini
(
void
);
PyAPI_FUNC
(
void
)
PySet_Fini
(
void
);
PyAPI_FUNC
(
void
)
PyBytes_Fini
(
void
);
PyAPI_FUNC
(
void
)
PyByteArray_Fini
(
void
);
PyAPI_FUNC
(
void
)
PyFloat_Fini
(
void
);
PyAPI_FUNC
(
void
)
PyOS_FiniInterrupts
(
void
);
PyAPI_FUNC
(
void
)
PySlice_Fini
(
void
);
PyAPI_FUNC
(
void
)
PyAsyncGen_Fini
(
void
);
PyAPI_FUNC
(
int
)
_Py_IsFinalizing
(
void
);
#endif
/* !Py_LIMITED_API */
/* Signals */
typedef
void
(
*
PyOS_sighandler_t
)(
int
);
PyAPI_FUNC
(
PyOS_sighandler_t
)
PyOS_getsig
(
int
);
PyAPI_FUNC
(
PyOS_sighandler_t
)
PyOS_setsig
(
int
,
PyOS_sighandler_t
);
#ifndef
Py_LIMITED_API
/* Random */
PyAPI_FUNC
(
int
)
_PyOS_URandom
(
void
*
buffer
,
Py_ssize_t
size
);
PyAPI_FUNC
(
int
)
_PyOS_URandomNonblock
(
void
*
buffer
,
Py_ssize_t
size
);
#endif
/* !Py_LIMITED_API */
/* Legacy locale support */
#ifndef
Py_LIMITED_API
PyAPI_FUNC
(
void
)
_Py_CoerceLegacyLocale
(
int
warn
);
PyAPI_FUNC
(
int
)
_Py_LegacyLocaleDetected
(
void
);
PyAPI_FUNC
(
char
*
)
_Py_SetLocaleFromEnv
(
int
category
);
#endif
#ifdef
Py_BUILD_CORE
PyAPI_FUNC
(
int
)
_Py_IsLocaleCoercionTarget
(
const
char
*
ctype_loc
);
#endif
#ifdef
__cplusplus
}
#endif
#endif
/* !Py_PYLIFECYCLE_H */
You can’t perform that action at this time.