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
Copy file name to clipboardExpand all lines: Doc/c-api/init.rst
+1-26Lines changed: 1 addition & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,7 +77,7 @@ The following functions can be safely called before Python is initialized:
77
77
78
78
Despite their apparent similarity to some of the functions listed above,
79
79
the following functions **should not be called** before the interpreter has
80
-
been initialized: :c:func:`Py_EncodeLocale`, :c:func:`Py_GetPrefix`, :c:func:`Py_GetProgramFullPath`, :c:func:`Py_GetPythonHome`, :c:func:`PyEval_InitThreads`, and
80
+
been initialized: :c:func:`Py_EncodeLocale`, :c:func:`Py_GetProgramFullPath`, :c:func:`Py_GetPythonHome`, :c:func:`PyEval_InitThreads`, and
81
81
:c:func:`Py_RunMain`.
82
82
83
83
@@ -602,31 +602,6 @@ Process-wide parameters
602
602
.. deprecated-removed:: 3.11 3.15
603
603
604
604
605
-
.. c:function:: wchar_t* Py_GetPrefix()
606
-
607
-
Return the *prefix* for installed platform-independent files. This is derived
608
-
through a number of complicated rules from the program name set with
609
-
:c:member:`PyConfig.program_name` and some environment variables; for example, if the
610
-
program name is ``'/usr/local/bin/python'``, the prefix is ``'/usr/local'``. The
611
-
returned string points into static storage; the caller should not modify its
612
-
value. This corresponds to the :makevar:`prefix` variable in the top-level
613
-
:file:`Makefile` and the :option:`--prefix` argument to the :program:`configure`
614
-
script at build time. The value is available to Python code as ``sys.base_prefix``.
615
-
It is only useful on Unix. See also the next function.
616
-
617
-
This function should not be called before :c:func:`Py_Initialize`, otherwise
618
-
it returns ``NULL``.
619
-
620
-
.. versionchanged:: 3.10
621
-
It now returns ``NULL`` if called before :c:func:`Py_Initialize`.
622
-
623
-
.. deprecated-removed:: 3.13 3.15
624
-
Use :c:func:`PyConfig_Get("base_prefix") <PyConfig_Get>`
625
-
(:data:`sys.base_prefix`) instead. Use :c:func:`PyConfig_Get("prefix")
626
-
<PyConfig_Get>` (:data:`sys.prefix`) if :ref:`virtual environments
0 commit comments