@@ -658,85 +658,6 @@ Process-wide parameters
658658 ``sys.version``.
659659
660660
661- .. c:function:: void PySys_SetArgvEx(int argc, wchar_t **argv, int updatepath)
662-
663- .. index::
664- single: main()
665- single: Py_FatalError()
666- single: argv (in module sys)
667-
668- This API is kept for backward compatibility: setting
669- :c:member:`PyConfig.argv`, :c:member:`PyConfig.parse_argv` and
670- :c:member:`PyConfig.safe_path` should be used instead, see :ref:`Python
671- Initialization Configuration <init-config>`.
672-
673- Set :data:`sys.argv` based on *argc* and *argv*. These parameters are
674- similar to those passed to the program's :c:func:`main` function with the
675- difference that the first entry should refer to the script file to be
676- executed rather than the executable hosting the Python interpreter. If there
677- isn't a script that will be run, the first entry in *argv* can be an empty
678- string. If this function fails to initialize :data:`sys.argv`, a fatal
679- condition is signalled using :c:func:`Py_FatalError`.
680-
681- If *updatepath* is zero, this is all the function does. If *updatepath*
682- is non-zero, the function also modifies :data:`sys.path` according to the
683- following algorithm:
684-
685- - If the name of an existing script is passed in ``argv[0]``, the absolute
686- path of the directory where the script is located is prepended to
687- :data:`sys.path`.
688- - Otherwise (that is, if *argc* is ``0`` or ``argv[0]`` doesn't point
689- to an existing file name), an empty string is prepended to
690- :data:`sys.path`, which is the same as prepending the current working
691- directory (``" ." ``).
692-
693- Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a
694- :c:expr:`wchar_t*` string.
695-
696- See also :c:member:`PyConfig.orig_argv` and :c:member:`PyConfig.argv`
697- members of the :ref:`Python Initialization Configuration <init-config>`.
698-
699- .. note::
700- It is recommended that applications embedding the Python interpreter
701- for purposes other than executing a single script pass ``0`` as *updatepath*,
702- and update :data:`sys.path` themselves if desired.
703- See :cve:`2008-5983`.
704-
705- On versions before 3.1.3, you can achieve the same effect by manually
706- popping the first :data:`sys.path` element after having called
707- :c:func:`PySys_SetArgv`, for example using::
708-
709- PyRun_SimpleString(" import sys; sys.path.pop(0 )\n" );
710-
711- .. versionadded:: 3.1.3
712-
713- .. XXX impl. doesn't seem consistent in allowing ``0``/``NULL`` for the params;
714- check w/ Guido.
715-
716- .. deprecated-removed:: 3.11 3.15
717-
718-
719- .. c:function:: void PySys_SetArgv(int argc, wchar_t **argv)
720-
721- This API is kept for backward compatibility: setting
722- :c:member:`PyConfig.argv` and :c:member:`PyConfig.parse_argv` should be used
723- instead, see :ref:`Python Initialization Configuration <init-config>`.
724-
725- This function works like :c:func:`PySys_SetArgvEx` with *updatepath* set
726- to ``1`` unless the :program:`python` interpreter was started with the
727- :option:`-I`.
728-
729- Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a
730- :c:expr:`wchar_t*` string.
731-
732- See also :c:member:`PyConfig.orig_argv` and :c:member:`PyConfig.argv`
733- members of the :ref:`Python Initialization Configuration <init-config>`.
734-
735- .. versionchanged:: 3.4 The *updatepath* value depends on :option:`-I`.
736-
737- .. deprecated-removed:: 3.11 3.15
738-
739-
740661.. c:function:: void Py_SetPythonHome(const wchar_t *home)
741662
742663 This API is kept for backward compatibility: setting
0 commit comments