Skip to content

Commit fdaffbe

Browse files
The default program name is "python3" except on Windows
The full program name inference is done in Python/initconfig.c and the reference documentation is with PyConfig.program_name.
1 parent 6cd0446 commit fdaffbe

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Doc/c-api/init.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -369,11 +369,13 @@ Process-wide parameters
369369
of the ``argv[0]`` argument to the :c:func:`main` function of the program
370370
(converted to wide characters).
371371
This is used by :c:func:`Py_GetPath` and some other functions below to find
372-
the Python run-time libraries relative to the interpreter executable. The
373-
default value is ``'python'``. The argument should point to a
374-
zero-terminated wide character string in static storage whose contents will not
375-
change for the duration of the program's execution. No code in the Python
376-
interpreter will change the contents of this storage.
372+
the Python run-time libraries relative to the interpreter executable.
373+
Without calling this function, a program name is inferred as described in
374+
:c:member:`PyConfig.program_name`. The argument should point to a
375+
zero-terminated wide character string. The string will be copied, so the
376+
caller may free the corresponding memory afterwards. The argument to this
377+
function may be ``NULL`` or an empty string, in which case the function does
378+
nothing.
377379
378380
Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a
379381
:c:type:`wchar_*` string.

0 commit comments

Comments
 (0)