1
# Interfaces to configure, query, create & destroy the Python runtime
3
from libc.stdio cimport FILE
4
from .pystate cimport PyThreadState
7
cdef extern from "Python.h":
10
void Py_SetProgramName(wchar_t *)
11
wchar_t *Py_GetProgramName()
13
void Py_SetPythonHome(wchar_t *)
14
wchar_t *Py_GetPythonHome()
16
# Only used by applications that embed the interpreter and need to
17
# override the standard encoding determination mechanism
18
int Py_SetStandardStreamEncoding(const char *encoding, const char *errors)
21
void Py_InitializeEx(int)
22
void _Py_InitializeEx_Private(int, int)
25
int Py_IsInitialized()
26
PyThreadState *Py_NewInterpreter()
27
void Py_EndInterpreter(PyThreadState *)
30
# _Py_PyAtExit is for the atexit module, Py_AtExit is for low-level
32
void _Py_PyAtExit(void (*func)(object), object)
33
int Py_AtExit(void (*func)())
37
# Restore signals that the interpreter has called SIG_IGN on to SIG_DFL.
38
void _Py_RestoreSignals()
40
int Py_FdIsInteractive(FILE *, const char *)
42
# Bootstrap __main__ (defined in Modules/main.c)
43
int Py_Main(int argc, wchar_t **argv)
46
wchar_t *Py_GetProgramFullPath()
47
wchar_t *Py_GetPrefix()
48
wchar_t *Py_GetExecPrefix()
50
void Py_SetPath(const wchar_t *)
51
int _Py_CheckPython3()
54
const char *Py_GetVersion()
55
const char *Py_GetPlatform()
56
const char *Py_GetCopyright()
57
const char *Py_GetCompiler()
58
const char *Py_GetBuildInfo()
59
const char *_Py_gitidentifier()
60
const char *_Py_gitversion()
62
ctypedef void (*PyOS_sighandler_t)(int)
63
PyOS_sighandler_t PyOS_getsig(int)
64
PyOS_sighandler_t PyOS_setsig(int, PyOS_sighandler_t)
67
int _PyOS_URandom(void *buffer, Py_ssize_t size)
68
int _PyOS_URandomNonblock(void *buffer, Py_ssize_t size)