@@ -78,8 +78,7 @@ The following functions can be safely called before Python is initialized:
7878 Despite their apparent similarity to some of the functions listed above,
7979 the following functions **should not be called ** before the interpreter has
8080 been initialized: :c:func: `Py_EncodeLocale `, :c:func: `Py_GetPath `,
81- :c:func: `Py_GetPrefix `, :c:func: `Py_GetExecPrefix `,
82- :c:func: `Py_GetProgramFullPath `, :c:func: `Py_GetPythonHome `, :c:func: `PyEval_InitThreads `, and
81+ :c:func: `Py_GetPrefix `, :c:func: `Py_GetProgramFullPath `, :c:func: `Py_GetPythonHome `, :c:func: `PyEval_InitThreads `, and
8382 :c:func: `Py_RunMain `.
8483
8584
@@ -633,54 +632,6 @@ Process-wide parameters
633632 <venv-def>` need to be handled.
634633
635634
636- .. c:function:: wchar_t* Py_GetExecPrefix()
637-
638- Return the *exec-prefix* for installed platform-*dependent* files. This is
639- derived through a number of complicated rules from the program name set with
640- :c:member:`PyConfig.program_name` and some environment variables; for example, if the
641- program name is ``'/usr/local/bin/python' ``, the exec-prefix is
642- ``'/usr/local' ``. The returned string points into static storage; the caller
643- should not modify its value. This corresponds to the :makevar: `exec_prefix `
644- variable in the top-level :file: `Makefile ` and the ``--exec-prefix ``
645- argument to the :program: `configure ` script at build time. The value is
646- available to Python code as ``sys.base_exec_prefix ``. It is only useful on
647- Unix.
648-
649- Background: The exec-prefix differs from the prefix when platform dependent
650- files (such as executables and shared libraries) are installed in a different
651- directory tree. In a typical installation, platform dependent files may be
652- installed in the :file:`/usr/local/plat` subtree while platform independent may
653- be installed in :file:`/usr/local`.
654-
655- Generally speaking, a platform is a combination of hardware and software
656- families, e.g. Sparc machines running the Solaris 2.x operating system are
657- considered the same platform, but Intel machines running Solaris 2.x are another
658- platform, and Intel machines running Linux are yet another platform. Different
659- major revisions of the same operating system generally also form different
660- platforms. Non-Unix operating systems are a different story; the installation
661- strategies on those systems are so different that the prefix and exec-prefix are
662- meaningless, and set to the empty string. Note that compiled Python bytecode
663- files are platform independent (but not independent from the Python version by
664- which they were compiled!).
665-
666- System administrators will know how to configure the :program:`mount` or
667- :program:`automount` programs to share :file:`/usr/local` between platforms
668- while having :file:`/usr/local/plat` be a different filesystem for each
669- platform.
670-
671- This function should not be called before :c:func:`Py_Initialize`, otherwise
672- it returns ``NULL``.
673-
674- .. versionchanged:: 3.10
675- It now returns ``NULL`` if called before :c:func:`Py_Initialize`.
676-
677- .. deprecated-removed:: 3.13 3.15
678- Use :c:func:`PyConfig_Get("base_exec_prefix") <PyConfig_Get>`
679- (:data: `sys.base_exec_prefix `) instead. Use
680- :c:func:`PyConfig_Get("exec_prefix") <PyConfig_Get>`
681- (:data: `sys.exec_prefix `) if :ref:`virtual environments <venv-def>` need
682- to be handled.
683-
684635.. c:function:: wchar_t* Py_GetProgramFullPath()
685636
686637 .. index::
0 commit comments