@@ -97,7 +97,7 @@ PyWideStringList
97
97
If *index * is greater than or equal to *list * length, append *item * to
98
98
*list *.
99
99
100
- *index * must be greater than or equal to 0 .
100
+ *index * must be greater than or equal to `` 0 `` .
101
101
102
102
Python must be preinitialized to call this function.
103
103
@@ -256,18 +256,18 @@ PyPreConfig
256
256
257
257
Set the LC_CTYPE locale to the user preferred locale?
258
258
259
- If equals to 0 , set :c:member:`~PyPreConfig.coerce_c_locale` and
260
- :c:member:`~PyPreConfig.coerce_c_locale_warn` members to 0 .
259
+ If equals to ``0`` , set :c:member:`~PyPreConfig.coerce_c_locale` and
260
+ :c:member:`~PyPreConfig.coerce_c_locale_warn` members to ``0`` .
261
261
262
262
See the :term:`locale encoding`.
263
263
264
264
Default: ``1`` in Python config, ``0`` in isolated config.
265
265
266
266
.. c:member:: int coerce_c_locale
267
267
268
- If equals to 2 , coerce the C locale.
268
+ If equals to ``2`` , coerce the C locale.
269
269
270
- If equals to 1 , read the LC_CTYPE locale to decide if it should be
270
+ If equals to ``1`` , read the LC_CTYPE locale to decide if it should be
271
271
coerced.
272
272
273
273
See the :term:`locale encoding`.
@@ -282,8 +282,8 @@ PyPreConfig
282
282
283
283
.. c:member:: int dev_mode
284
284
285
- If non-zero, enables the :ref:`Python Development Mode <devmode>`:
286
- see :c:member:`PyConfig.dev_mode`.
285
+ :ref:`Python Development Mode <devmode>`: see
286
+ :c:member:`PyConfig.dev_mode`.
287
287
288
288
Default: ``-1`` in Python mode, ``0`` in isolated mode.
289
289
@@ -329,8 +329,10 @@ PyPreConfig
329
329
330
330
If non-zero, enable the :ref: `Python UTF-8 Mode <utf8-mode >`.
331
331
332
- Set by the :option: `-X utf8 <-X> ` command line option and the
333
- :envvar: `PYTHONUTF8 ` environment variable.
332
+ Set to ``0 `` or ``1 `` by the :option: `-X utf8 <-X> ` command line option
333
+ and the :envvar: `PYTHONUTF8 ` environment variable.
334
+
335
+ Also set to ``1 `` if the ``LC_CTYPE `` locale is ``C `` or ``POSIX ``.
334
336
335
337
Default: ``-1 `` in Python config and ``0 `` in isolated config.
336
338
@@ -555,7 +557,7 @@ PyConfig
555
557
* Otherwise (``python -c code `` and ``python ``), prepend an empty string,
556
558
which means the current working directory.
557
559
558
- Set to 1 by the :option:`-P` command line option and the
560
+ Set to ``1`` by the :option:`-P` command line option and the
559
561
:envvar:`PYTHONSAFEPATH` environment variable.
560
562
561
563
Default: ``0`` in Python config, ``1`` in isolated config.
@@ -592,10 +594,10 @@ PyConfig
592
594
593
595
.. c:member:: int buffered_stdio
594
596
595
- If equals to 0 and :c:member:`~PyConfig.configure_c_stdio` is non-zero,
597
+ If equals to ``0`` and :c:member:`~PyConfig.configure_c_stdio` is non-zero,
596
598
disable buffering on the C streams stdout and stderr.
597
599
598
- Set to 0 by the :option:`-u` command line option and the
600
+ Set to ``0`` by the :option:`-u` command line option and the
599
601
:envvar:`PYTHONUNBUFFERED` environment variable.
600
602
601
603
stdin is always opened in buffered mode.
@@ -604,11 +606,11 @@ PyConfig
604
606
605
607
.. c:member:: int bytes_warning
606
608
607
- If equals to 1 , issue a warning when comparing :class:`bytes` or
609
+ If equals to ``1`` , issue a warning when comparing :class:`bytes` or
608
610
:class:`bytearray` with :class:`str`, or comparing :class:`bytes` with
609
611
:class:`int`.
610
612
611
- If equal or greater to 2 , raise a :exc:`BytesWarning` exception in these
613
+ If equal or greater to ``2`` , raise a :exc:`BytesWarning` exception in these
612
614
cases.
613
615
614
616
Incremented by the :option:`-b` command line option.
@@ -671,6 +673,9 @@ PyConfig
671
673
672
674
If non-zero, enable the :ref:`Python Development Mode <devmode>`.
673
675
676
+ Set to ``1`` by the :option:`-X dev <-X>` option and the
677
+ :envvar:`PYTHONDEVMODE` environment variable.
678
+
674
679
Default: ``-1`` in Python mode, ``0`` in isolated mode.
675
680
676
681
.. c:member:: int dump_refs
@@ -800,7 +805,7 @@ PyConfig
800
805
801
806
Enter interactive mode after executing a script or a command.
802
807
803
- If greater than 0 , enable inspect: when a script is passed as first
808
+ If greater than ``0`` , enable inspect: when a script is passed as first
804
809
argument or the -c option is used, enter interactive mode after executing
805
810
the script or the command, even when :data:`sys.stdin` does not appear to
806
811
be a terminal.
@@ -818,25 +823,27 @@ PyConfig
818
823
819
824
.. c:member:: int interactive
820
825
821
- If greater than 0 , enable the interactive mode (REPL).
826
+ If greater than ``0`` , enable the interactive mode (REPL).
822
827
823
828
Incremented by the :option:`-i` command line option.
824
829
825
830
Default: ``0``.
826
831
827
832
.. c:member:: int isolated
828
833
829
- If greater than 0 , enable isolated mode:
834
+ If greater than ``0`` , enable isolated mode:
830
835
831
- * Set :c:member:`~PyConfig.safe_path` to 1 :
836
+ * Set :c:member:`~PyConfig.safe_path` to ``1`` :
832
837
don't prepend a potentially unsafe path to :data:`sys.path` at Python
833
838
startup.
834
- * Set :c:member:`~PyConfig.use_environment` to 0 .
835
- * Set :c:member:`~PyConfig.user_site_directory` to 0 : don't add the user
839
+ * Set :c:member:`~PyConfig.use_environment` to ``0`` .
840
+ * Set :c:member:`~PyConfig.user_site_directory` to ``0`` : don't add the user
836
841
site directory to :data:`sys.path`.
837
842
* Python REPL doesn't import :mod:`readline` nor enable default readline
838
843
configuration on interactive prompts.
839
844
845
+ Set to ``1`` by the :option:`-I` command line option.
846
+
840
847
Default: ``0`` in Python mode, ``1`` in isolated mode.
841
848
842
849
See also :c:member:`PyPreConfig.isolated`.
@@ -906,7 +913,7 @@ PyConfig
906
913
907
914
Module search paths: :data:`sys.path`.
908
915
909
- If :c:member:`~PyConfig.module_search_paths_set` is equal to 0 ,
916
+ If :c:member:`~PyConfig.module_search_paths_set` is equal to ``0`` ,
910
917
:c:func:`Py_InitializeFromConfig` will replace
911
918
:c:member:`~PyConfig.module_search_paths` and sets
912
919
:c:member:`~PyConfig.module_search_paths_set` to ``1``.
@@ -970,7 +977,7 @@ PyConfig
970
977
971
978
.. c:member:: int parser_debug
972
979
973
- Parser debug mode. If greater than 0 , turn on parser debugging output (for expert only, depending
980
+ Parser debug mode. If greater than ``0`` , turn on parser debugging output (for expert only, depending
974
981
on compilation options).
975
982
976
983
Incremented by the :option:`-d` command line option. Set to the
@@ -981,7 +988,7 @@ PyConfig
981
988
.. c:member:: int pathconfig_warnings
982
989
983
990
If non-zero, calculation of path configuration is allowed to log
984
- warnings into ``stderr``. If equals to 0 , suppress these warnings.
991
+ warnings into ``stderr``. If equals to ``0`` , suppress these warnings.
985
992
986
993
Default: ``1`` in Python mode, ``0`` in isolated mode.
987
994
@@ -1031,7 +1038,7 @@ PyConfig
1031
1038
1032
1039
.. c:member:: int quiet
1033
1040
1034
- Quiet mode. If greater than 0 , don't display the copyright and version at
1041
+ Quiet mode. If greater than ``0`` , don't display the copyright and version at
1035
1042
Python startup in interactive mode.
1036
1043
1037
1044
Incremented by the :option:`-q` command line option.
@@ -1071,7 +1078,7 @@ PyConfig
1071
1078
1072
1079
Show total reference count at exit?
1073
1080
1074
- Set to 1 by :option:`-X showrefcount <-X>` command line option.
1081
+ Set to ``1`` by :option:`-X showrefcount <-X>` command line option.
1075
1082
1076
1083
Need a :ref:`debug build of Python <debug-build>` (the ``Py_REF_DEBUG ``
1077
1084
macro must be defined).
@@ -1150,6 +1157,8 @@ PyConfig
1150
1157
If equals to zero, ignore the :ref:`environment variables
1151
1158
<using-on-envvars>`.
1152
1159
1160
+ Set to ``0`` by the :option:`-E` environment variable.
1161
+
1153
1162
Default: ``1`` in Python config and ``0`` in isolated config.
1154
1163
1155
1164
.. c:member:: int user_site_directory
@@ -1164,11 +1173,11 @@ PyConfig
1164
1173
1165
1174
.. c:member:: int verbose
1166
1175
1167
- Verbose mode. If greater than 0 , print a message each time a module is
1176
+ Verbose mode. If greater than ``0`` , print a message each time a module is
1168
1177
imported, showing the place (filename or built-in module) from which
1169
1178
it is loaded.
1170
1179
1171
- If greater or equal to 2 , print a message for each file that is checked
1180
+ If greater or equal to ``2`` , print a message for each file that is checked
1172
1181
for when searching for a module. Also provides information on module
1173
1182
cleanup at exit.
1174
1183
@@ -1199,7 +1208,7 @@ PyConfig
1199
1208
1200
1209
.. c:member:: int write_bytecode
1201
1210
1202
- If equal to 0 , Python won't try to write ``.pyc`` files on the import of
1211
+ If equal to ``0`` , Python won't try to write ``.pyc`` files on the import of
1203
1212
source modules.
1204
1213
1205
1214
Set to ``0`` by the :option:`-B` command line option and the
@@ -1400,18 +1409,18 @@ Python Path Configuration
1400
1409
1401
1410
If at least one "output field" is not set, Python calculates the path
1402
1411
configuration to fill unset fields. If
1403
- :c:member:`~PyConfig.module_search_paths_set` is equal to 0 ,
1412
+ :c:member:`~PyConfig.module_search_paths_set` is equal to ``0`` ,
1404
1413
:c:member:`~PyConfig.module_search_paths` is overridden and
1405
- :c:member:`~PyConfig.module_search_paths_set` is set to 1 .
1414
+ :c:member:`~PyConfig.module_search_paths_set` is set to ``1`` .
1406
1415
1407
1416
It is possible to completely ignore the function calculating the default
1408
1417
path configuration by setting explicitly all path configuration output
1409
1418
fields listed above. A string is considered as set even if it is non-empty.
1410
1419
``module_search_paths`` is considered as set if
1411
- ``module_search_paths_set`` is set to 1 . In this case, path
1420
+ ``module_search_paths_set`` is set to ``1`` . In this case, path
1412
1421
configuration input fields are ignored as well.
1413
1422
1414
- Set :c:member:`~PyConfig.pathconfig_warnings` to 0 to suppress warnings when
1423
+ Set :c:member:`~PyConfig.pathconfig_warnings` to ``0`` to suppress warnings when
1415
1424
calculating the path configuration (Unix only, Windows does not log any warning).
1416
1425
1417
1426
If :c:member:`~PyConfig.base_prefix` or :c:member:`~PyConfig.base_exec_prefix`
@@ -1445,10 +1454,10 @@ The following configuration files are used by the path configuration:
1445
1454
1446
1455
If a ``._pth`` file is present:
1447
1456
1448
- * Set :c:member:`~PyConfig.isolated` to 1 .
1449
- * Set :c:member:`~PyConfig.use_environment` to 0 .
1450
- * Set :c:member:`~PyConfig.site_import` to 0 .
1451
- * Set :c:member:`~PyConfig.safe_path` to 1 .
1457
+ * Set :c:member:`~PyConfig.isolated` to ``1`` .
1458
+ * Set :c:member:`~PyConfig.use_environment` to ``0`` .
1459
+ * Set :c:member:`~PyConfig.site_import` to ``0`` .
1460
+ * Set :c:member:`~PyConfig.safe_path` to ``1`` .
1452
1461
1453
1462
The ``__PYVENV_LAUNCHER__`` environment variable is used to set
1454
1463
:c:member:`PyConfig.base_executable`
@@ -1511,7 +1520,7 @@ initialization, the core feature of :pep:`432`:
1511
1520
1512
1521
Private provisional API:
1513
1522
1514
- * :c:member: `PyConfig._init_main `: if set to 0 ,
1523
+ * :c:member: `PyConfig._init_main `: if set to `` 0 `` ,
1515
1524
:c:func: `Py_InitializeFromConfig ` stops at the "Core" initialization phase.
1516
1525
* :c:member: `PyConfig._isolated_interpreter `: if non-zero,
1517
1526
disallow threads, subprocesses and fork.
0 commit comments