Lines Matching +full:single +full:- +full:version
18 single: Py_SetProgramName()
19 single: PyEval_InitThreads()
20 single: PyEval_ReleaseLock()
21 single: PyEval_AcquireLock()
22 single: modules (in module sys)
23 single: path (in module sys)
28 single: PySys_SetArgv()
29 single: PySys_SetArgvEx()
30 single: Py_Finalize()
39 :c:func:`PySys_SetArgvEx` for that. This is a no-op when called for a second time
63 Python/C API functions, and destroy all sub-interpreters (see
66 allocated by the Python interpreter. This is a no-op when called for a second
90 Process-wide parameters
97 single: Py_Initialize()
98 single: main()
99 single: Py_GetPath()
105 the Python run-time libraries relative to the interpreter executable. The
107 zero-terminated character string in static storage whose contents will not
114 .. index:: single: Py_SetProgramName()
123 Return the *prefix* for installed platform-independent files. This is derived
128 value. This corresponds to the :makevar:`prefix` variable in the top-level
129 :file:`Makefile` and the ``--prefix`` argument to the :program:`configure`
136 Return the *exec-prefix* for installed platform-*dependent* files. This is
139 program name is ``'/usr/local/bin/python'``, the exec-prefix is
142 variable in the top-level :file:`Makefile` and the ``--exec-prefix``
146 Background: The exec-prefix differs from the prefix when platform dependent
157 platforms. Non-Unix operating systems are a different story; the installation
158 strategies on those systems are so different that the prefix and exec-prefix are
160 files are platform independent (but not independent from the Python version by
172 single: Py_SetProgramName()
173 single: executable (in module sys)
176 side-effect of deriving the default module search path from the program name
186 single: path (in module sys)
203 Return the version of this Python interpreter. This is a string that looks
208 .. index:: single: version (in module sys)
210 The first word (up to the first space character) is the current Python version;
211 the first three characters are the major and minor version separated by a
213 modify its value. The value is available to Python code as ``sys.version``.
218 .. index:: single: platform (in module sys)
231 Return the official copyright string for the current Python version, for example
233 ``'Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam'``
235 .. index:: single: copyright (in module sys)
243 Return an indication of the compiler used to build the current Python version,
248 .. index:: single: version (in module sys)
252 ``sys.version``.
262 .. index:: single: version (in module sys)
266 ``sys.version``.
272 single: main()
273 single: Py_FatalError()
274 single: argv (in module sys)
285 is non-zero, the function also modifies :data:`sys.path` according to the
288 - If the name of an existing script is passed in ``argv[0]``, the absolute
291 - Otherwise (that is, if *argc* is 0 or ``argv[0]`` doesn't point
298 for purposes other than executing a single script pass ``0`` as *updatepath*,
300 See `CVE-2008-5983 <https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5983>`_.
325 The argument should point to a zero-terminated character string in static
344 single: GIL
345 single: global interpreter lock
346 single: interpreter lock
347 single: lock, interpreter
349 The Python interpreter is not fully thread-safe. In order to support
350 multi-threaded Python programs, there's a global lock, called the :term:`global
353 operations could cause problems in a multi-threaded program: for example, when
357 .. index:: single: setcheckinterval() (in module sys)
367 single: PyThreadState
368 single: PyThreadState
370 The Python interpreter keeps some thread-specific bookkeeping information
376 -------------------------------------
394 single: Py_BEGIN_ALLOW_THREADS
395 single: Py_END_ALLOW_THREADS
411 single: PyEval_RestoreThread()
412 single: PyEval_SaveThread()
424 the GIL, but it can also be useful before calling long-running computations
433 Non-Python created threads
434 --------------------------
439 created from C (for example by a third-party library with its own thread
444 of a callback API provided by the aforementioned third-party library),
477 :ref:`lock-objects` in the child. When extending or embedding Python, there
478 is no way to inform Python of additional (non-Python) locks that need to be
489 High-level API
490 --------------
510 This data structure represents the state of a single thread. The only public
518 single: PyEval_ReleaseLock()
519 single: PyEval_ReleaseThread()
520 single: PyEval_SaveThread()
521 single: PyEval_RestoreThread()
529 .. index:: single: Py_Initialize()
531 This is a no-op when called for a second time. It is safe to call this function
542 when there is only a single thread, all object accesses are safe. Therefore,
557 Returns a non-zero value if :c:func:`PyEval_InitThreads` has been called. This
559 avoid calls to the locking API when running single-threaded. This function is
604 The following functions use thread-local storage, and are not compatible
605 with sub-interpreters:
613 thread-related APIs may be used between :c:func:`PyGILState_Ensure` and
622 though recursive calls are allowed, these handles *cannot* be shared - each
649 always has such a thread-state, even if no auto-thread-state call has been
664 macro. It is a no-op when thread support is disabled at compile time.
672 this macro. It is a no-op when thread support is disabled at compile time.
678 :c:macro:`Py_END_ALLOW_THREADS` without the closing brace. It is a no-op when
686 declaration. It is a no-op when thread support is disabled at compile time.
689 Low-level API
690 -------------
739 Return a dictionary in which extensions can store thread-specific state
769 :c:func:`PyEval_RestoreThread` is a higher-level function which is always
779 that it represents the current thread state --- if it isn't, a fatal error is
782 :c:func:`PyEval_SaveThread` is a higher-level function which is always
808 Sub-interpreter support
811 While in most uses, you will only embed a single Python interpreter, there
813 same process and perhaps even in the same thread. Sub-interpreters allow
814 you to do that. You can switch between sub-interpreters using the
825 single: stdout (in module sys)
826 single: stderr (in module sys)
827 single: stdin (in module sys)
829 Create a new sub-interpreter. This is an (almost) totally separate environment
840 sub-interpreter. This thread state is made in the current thread state.
851 single: Py_Finalize()
852 single: Py_Initialize()
854 Extension modules are shared between (sub-)interpreters as follows: the first
857 extension is imported by another (sub-)interpreter, a new module is initialized
860 imported after the interpreter has been completely re-initialized by calling
864 .. index:: single: close() (in module os)
869 .. index:: single: Py_Finalize()
871 Destroy the (sub-)interpreter represented by the given thread state. The given
876 when it returns.) :c:func:`Py_Finalize` will destroy all sub-interpreters that
881 ----------------
883 Because sub-interpreters (and the main interpreter) are part of the same
884 process, the insulation between them isn't perfect --- for example, using
885 low-level file operations like :func:`os.close` they can
887 way extensions are shared between (sub-)interpreters, some extensions may not
891 in one sub-interpreter into a namespace of another sub-interpreter; this should
892 be done with great care to avoid sharing user-defined functions, methods,
893 instances or classes between sub-interpreters, since import operations executed
894 by such objects may affect the wrong (sub-)interpreter's dictionary of loaded
899 and OS-level threads, an assumption broken by the presence of sub-interpreters.
900 It is highly recommended that you don't switch sub-interpreters between a pair
903 of Python code from non-Python created threads will probably be broken when using
904 sub-interpreters.
917 .. index:: single: Py_AddPendingCall()
921 main thread. On failure, ``-1`` is returned without setting any exception.
932 *func* must return ``0`` on success, or ``-1`` on failure with an exception
941 This is a low-level function, only useful for very special cases.
959 The Python interpreter provides some low-level support for attaching profiling
965 profiling or tracing code to avoid the overhead of calling through Python-level
968 functions to be installed per-thread, and the basic events reported to the trace
969 function are the same as had been reported to the Python-level trace functions
983 +------------------------------+--------------------------------------+
987 +------------------------------+--------------------------------------+
990 +------------------------------+--------------------------------------+
992 +------------------------------+--------------------------------------+
995 +------------------------------+--------------------------------------+
997 +------------------------------+--------------------------------------+
999 +------------------------------+--------------------------------------+
1001 +------------------------------+--------------------------------------+
1027 profiling function) when a line-number event is being reported.
1059 for each thread provides a convenient and thread-safe place to store it. The
1067 :c:func:`PyEval_SetProfile`, except the tracing function does receive line-number
1079 +-------------------------------+-------+
1083 +-------------------------------+-------+
1085 +-------------------------------+-------+
1087 +-------------------------------+-------+
1089 +-------------------------------+-------+
1091 +-------------------------------+-------+
1093 +-------------------------------+-------+
1095 +-------------------------------+-------+
1097 +-------------------------------+-------+
1099 +-------------------------------+-------+
1101 +-------------------------------+-------+
1103 +-------------------------------+-------+
1106 :const:`PCALL_FASTER_FUNCTION` means that the fast-path frame setup code is used.
1115 .. _advanced-debugging: