Skip to content

Commit c432de1

Browse files
committed
Fix tables in 'Using on Windows' for the text writer
1 parent a667800 commit c432de1

File tree

1 file changed

+199
-149
lines changed

1 file changed

+199
-149
lines changed

Doc/using/windows.rst

Lines changed: 199 additions & 149 deletions
Original file line numberDiff line numberDiff line change
@@ -385,50 +385,66 @@ The following settings are those that are considered likely to be modified in
385385
normal use. Later sections list those that are intended for administrative
386386
customization.
387387

388-
.. csv-table:: Standard configuration options
389-
:header: "Config Key", "Environment Variable", "Description"
390-
:widths: 2, 2, 4
391-
392-
``default_tag``,``PYTHON_MANAGER_DEFAULT``,"The preferred default
393-
version to launch or install. By default, this is interpreted as the most
394-
recent non-prerelease version from the CPython team.
395-
"
396-
``default_platform``,``PYTHON_MANAGER_DEFAULT_PLATFORM``,"The preferred
397-
default platform to launch or install. This is treated as a suffix to the
398-
specified tag, such that ``py -V:3.14`` would prefer an install for
399-
``3.14-64`` if it exists (and ``default_platform`` is ``-64``), but will use
400-
``3.14`` if no tagged install exists.
401-
"
402-
``logs_dir``,``PYTHON_MANAGER_LOGS``,"The location where log files are
403-
written. By default, :file:`%TEMP%`.
404-
"
405-
``automatic_install``,``PYTHON_MANAGER_AUTOMATIC_INSTALL``,"True to
406-
allow automatic installs when specifying a particular runtime to launch.
407-
By default, true.
408-
"
409-
``include_unmanaged``,``PYTHON_MANAGER_INCLUDE_UNMANAGED``,"True to
410-
allow listing and launching runtimes that were not installed by the Python
411-
install manager, or false to exclude them. By default, true.
412-
"
413-
``shebang_can_run_anything``,"``PYTHON_MANAGER_SHEBANG_CAN_RUN_ANYTHING``
414-
","True to allow shebangs in ``.py`` files to launch applications other than
415-
Python runtimes, or false to prevent it. By default, true.
416-
"
417-
``log_level``,"``PYMANAGER_VERBOSE``, ``PYMANAGER_DEBUG``","Set
418-
the default level of output (0-50) By default, 20. Lower values produce more
419-
output. The environment variables are boolean, and may produce additional
420-
output during startup that is later suppressed by other configuration.
421-
"
422-
``confirm``,``PYTHON_MANAGER_CONFIRM``,"True to confirm certain actions
423-
before taking them (such as uninstall), or false to skip the confirmation. By
424-
default, true.
425-
"
426-
``install.source``,``PYTHON_MANAGER_SOURCE_URL``,"Override the index
427-
feed to obtain new installs from.
428-
"
429-
``list.format``,``PYTHON_MANAGER_LIST_FORMAT``,"Specify the default
430-
format used by the ``py list`` command. By default, ``table``.
431-
"
388+
.. rubric:: Standard configuration options
389+
390+
.. Sphinx bug with text writer; remove widths & caption temporarily
391+
.. :widths: 2, 2, 4
392+
393+
.. list-table::
394+
395+
* - Config Key
396+
- Environment Variable
397+
- Description
398+
399+
* - ``default_tag``
400+
- ``PYTHON_MANAGER_DEFAULT``
401+
- The preferred default version to launch or install. By default, this is interpreted as the most recent non-prerelease version from the CPython team.
402+
403+
* - ``default_platform``
404+
- ``PYTHON_MANAGER_DEFAULT_PLATFORM``
405+
- The preferred default platform to launch or install. This is treated as a suffix to the
406+
specified tag, such that ``py -V:3.14`` would prefer an install for
407+
``3.14-64`` if it exists (and ``default_platform`` is ``-64``), but will use
408+
``3.14`` if no tagged install exists.
409+
410+
* - ``logs_dir``
411+
- ``PYTHON_MANAGER_LOGS``
412+
- The location where log files are written. By default, :file:`%TEMP%`.
413+
414+
* - ``automatic_install``
415+
- ``PYTHON_MANAGER_AUTOMATIC_INSTALL``
416+
- True to allow automatic installs when specifying a particular runtime to launch.
417+
By default, true.
418+
419+
* - ``include_unmanaged``
420+
- ``PYTHON_MANAGER_INCLUDE_UNMANAGED``
421+
- True to allow listing and launching runtimes that were not installed by the Python
422+
install manager, or false to exclude them. By default, true.
423+
424+
* - ``shebang_can_run_anything``
425+
- ``PYTHON_MANAGER_SHEBANG_CAN_RUN_ANYTHING``
426+
- True to allow shebangs in ``.py`` files to launch applications other than
427+
Python runtimes, or false to prevent it. By default, true.
428+
429+
* - ``log_level``
430+
- ``PYMANAGER_VERBOSE``, ``PYMANAGER_DEBUG``
431+
- Set the default level of output (0-50) By default, 20. Lower values produce more
432+
output. The environment variables are boolean, and may produce additional
433+
output during startup that is later suppressed by other configuration.
434+
435+
* - ``confirm``
436+
- ``PYTHON_MANAGER_CONFIRM``
437+
- True to confirm certain actions before taking them (such as uninstall), or false to skip the confirmation.
438+
By default, true.
439+
440+
* - ``install.source``
441+
- ``PYTHON_MANAGER_SOURCE_URL``
442+
- Override the index feed to obtain new installs from.
443+
444+
* - ``list.format``
445+
- ``PYTHON_MANAGER_LIST_FORMAT``
446+
- Specify the default format used by the ``py list`` command.
447+
By default, ``table``.
432448

433449
Dotted names should be nested inside JSON objects, for example, ``list.format``
434450
would be specified as ``{"list": {"format": "table"}}``.
@@ -492,7 +508,7 @@ which the path to the script and any additional arguments will be appended.
492508
This functionality may be disabled by the ``shebang_can_run_anything``
493509
configuration option.
494510

495-
.. note:
511+
.. note::
496512

497513
The behaviour of shebangs in the Python install manager is subtly different
498514
from the previous ``py.exe`` launcher, and the old configuration options no
@@ -638,46 +654,63 @@ variable will be used instead.
638654
Configuration settings that are paths are interpreted as relative to the
639655
directory containing the configuration file that specified them.
640656

641-
.. csv-table:: Administrative configuration options
642-
:header: "Config Key", "Description"
643-
:widths: 1, 4
644-
645-
``base_config``,"The highest priority configuration file to read. Note that
646-
only the built-in configuration file and the registry can modify this
647-
setting.
648-
"
649-
``user_config``,"The second configuration file to read.
650-
"
651-
``additional_config``,"The third configuration file to read.
652-
"
653-
``registry_override_key``,"Registry location to check for overrides. Note
654-
that only the built-in configuration file can modify this setting.
655-
"
656-
``bundled_dir``,"Read-only directory containing locally cached files.
657-
"
658-
``install.fallback_source``,"Path or URL to an index to consult when the
659-
main index cannot be accessed.
660-
"
661-
``install.enable_shortcut_kinds``,"Comma-separated list of shortcut kinds
662-
to allow (e.g. ``""pep514,start""``). Enabled shortcuts may still be disabled
663-
by ``disable_shortcut_kinds``.
664-
"
665-
``install.disable_shortcut_kinds``,"Comma-separated list of shortcut kinds
666-
to exclude (e.g. ``""pep514,start""``). Disabled shortcuts are not
667-
reactivated by ``enable_shortcut_kinds``.
668-
"
669-
``pep514_root``,"Registry location to read and write PEP 514 entries into.
670-
By default, :file:`HKEY_CURRENT_USER\\Software\\Python`.
671-
"
672-
``start_folder``,"Start menu folder to write shortcuts into. By default,
673-
``Python``. This path is relative to the user's Programs folder.
674-
"
675-
``virtual_env``,"Path to the active virtual environment. By default, this
676-
is ``%VIRTUAL_ENV%``, but may be set empty to disable venv detection.
677-
"
678-
``shebang_can_run_anything_silently``,"True to suppress visible warnings
679-
when a shebang launches an application other than a Python runtime.
680-
"
657+
.. Sphinx bug with text writer; remove widths & caption temporarily
658+
.. :widths: 1, 4
659+
660+
.. rubric:: Administrative configuration options
661+
662+
.. list-table::
663+
664+
* - Config Key
665+
- Description
666+
667+
* - ``base_config``
668+
- The highest priority configuration file to read. Note that
669+
only the built-in configuration file and the registry can modify this
670+
setting.
671+
672+
* - ``user_config``
673+
- The second configuration file to read.
674+
675+
* - ``additional_config``
676+
- The third configuration file to read.
677+
678+
* - ``registry_override_key``
679+
- Registry location to check for overrides. Note
680+
that only the built-in configuration file can modify this setting.
681+
682+
* - ``bundled_dir``
683+
- Read-only directory containing locally cached files.
684+
685+
* - ``install.fallback_source``
686+
- Path or URL to an index to consult when the
687+
main index cannot be accessed.
688+
689+
* - ``install.enable_shortcut_kinds``
690+
- Comma-separated list of shortcut kinds
691+
to allow (e.g. ``"pep514,start"``). Enabled shortcuts may still be disabled
692+
by ``disable_shortcut_kinds``.
693+
694+
* - ``install.disable_shortcut_kinds``
695+
- Comma-separated list of shortcut kinds
696+
to exclude (e.g. ``"pep514,start"``). Disabled shortcuts are not
697+
reactivated by ``enable_shortcut_kinds``.
698+
699+
* - ``pep514_root``
700+
- Registry location to read and write PEP 514 entries into.
701+
By default, :file:`HKEY_CURRENT_USER\\Software\\Python`.
702+
703+
* - ``start_folder``
704+
- Start menu folder to write shortcuts into. By default,
705+
``Python``. This path is relative to the user's Programs folder.
706+
707+
* - ``virtual_env``
708+
- Path to the active virtual environment. By default, this
709+
is ``%VIRTUAL_ENV%``, but may be set empty to disable venv detection.
710+
711+
* - ``shebang_can_run_anything_silently``
712+
- True to suppress visible warnings
713+
when a shebang launches an application other than a Python runtime.
681714

682715
.. _install-freethreaded-windows:
683716

@@ -716,70 +749,87 @@ issue at `our bug tracker <https://github.com/python/cpython/issues>`_,
716749
including any relevant log files (written to your :file:`%TEMP%` directory by
717750
default).
718751

719-
.. csv-table:: Troubleshooting
720-
:header: "Symptom", "Things to try"
721-
:widths: 1, 1
722-
723-
"``python`` gives me a ""command not found"" error or opens the Store app
724-
when I type it in my terminal.", "Did you :ref:`install the Python install
725-
manager <pymanager>`?
726-
"
727-
"", "Click Start, open ""Manage app execution aliases"", and check that the
728-
aliases for ""Python (default)"" are enabled. If they already are, try
729-
disabling and re-enabling to refresh the command. The ""Python (default
730-
windowed)"" and ""Python install manager"" commands may also need refreshing.
731-
"
732-
"", "Check that the ``py`` and ``pymanager`` commands work.
733-
"
734-
"``py`` gives me a ""command not found"" error when I type it in my
735-
terminal.","Did you :ref:`install the Python install manager <pymanager>`?
736-
"
737-
"", "Click Start, open ""Manage app execution aliases"", and check that the
738-
aliases for ""Python install manager"" are enabled. If they already are, try
739-
disabling and re-enabling to refresh the command. The ""Python (default
740-
windowed)"" and ""Python install manager"" commands may also need refreshing.
741-
"
742-
"``py`` gives me a ""can't open file"" error when I type commands in my
743-
terminal.", "This usually means you have the legacy launcher installed and it
744-
has priority over the Python install manager. To remove, click Start, open
745-
""Installed apps"", search for ""Python launcher"" and uninstall it.
746-
"
747-
"``python`` doesn't launch the same runtime as ``py``", "Click Start, open
748-
""Installed apps"", look for any existing Python runtimes, and either remove
749-
them or Modify and disable the :envvar:`PATH` options.
750-
"
751-
"", "Click Start, open ""Manage app execution aliases"", and check that your
752-
``python.exe`` alias is set to ""Python (default)""
753-
"
754-
"``python`` and ``py`` don't launch the runtime I expect", "Check your
755-
``PYTHON_MANAGER_DEFAULT`` environment variable or ``default_tag``
756-
configuration. The ``py list`` command will show your default based on these
757-
settings.
758-
"
759-
"", "Installs that are managed by the Python install manager will be chosen
760-
ahead of unmanaged installs. Use ``py install`` to install the runtime you
761-
expect, or configure your default tag.
762-
"
763-
"", "Prerelease and experimental installs that are not managed by the Python
764-
install manager may be chosen ahead of stable releases. Configure your
765-
default tag or uninstall the prerelease runtime and reinstall using ``py
766-
install``.
767-
"
768-
"``pythonw`` or ``pyw`` don't launch the same runtime as ``python`` or
769-
``py``","Click Start, open ""Manage app execution aliases"", and check that
770-
your ``pythonw.exe`` and ``pyw.exe`` aliases are consistent with your
771-
others.
772-
"
773-
"``pip`` gives me a ""command not found"" error when I type it in my
774-
terminal.","Have you activated a virtual environment? Run the
775-
``.venv\Scripts\activate`` script in your terminal to activate.
776-
"
777-
"","The package may be available but missing the generated executable.
778-
We recommend using the ``python -m pip`` command instead, or alternatively
779-
the ``python -m pip install --force pip`` command will recreate the
780-
executables and show you the path to add to :envvar:`PATH`. These scripts are
781-
separated for each runtime, and so you may need to add multiple paths.
782-
"
752+
.. rubric:: Troubleshooting
753+
754+
.. Sphinx bug with text writer; remove widths & caption temporarily
755+
.. :widths: 1, 1
756+
757+
.. list-table::
758+
759+
* - Symptom
760+
- Things to try
761+
762+
* - ``python`` gives me a "command not found" error or opens the Store app
763+
when I type it in my terminal.
764+
- Did you :ref:`install the Python install manager <pymanager>`?
765+
766+
* -
767+
- Click Start, open "Manage app execution aliases", and check that the
768+
aliases for "Python (default)" are enabled. If they already are, try
769+
disabling and re-enabling to refresh the command. The "Python (default
770+
windowed)" and "Python install manager" commands may also need refreshing.
771+
772+
* -
773+
- Check that the ``py`` and ``pymanager`` commands work.
774+
775+
* - ``py`` gives me a "command not found" error when I type it in my
776+
terminal.
777+
- Did you :ref:`install the Python install manager <pymanager>`?
778+
779+
* -
780+
- Click Start, open "Manage app execution aliases", and check that the
781+
aliases for "Python install manager" are enabled. If they already are, try
782+
disabling and re-enabling to refresh the command. The "Python (default
783+
windowed)" and "Python install manager" commands may also need refreshing.
784+
785+
* - ``py`` gives me a "can't open file" error when I type commands in my
786+
terminal.
787+
- This usually means you have the legacy launcher installed and it
788+
has priority over the Python install manager. To remove, click Start, open
789+
"Installed apps", search for "Python launcher" and uninstall it.
790+
791+
* - ``python`` doesn't launch the same runtime as ``py``
792+
- Click Start, open
793+
"Installed apps", look for any existing Python runtimes, and either remove
794+
them or Modify and disable the :envvar:`PATH` options.
795+
796+
* -
797+
- Click Start, open "Manage app execution aliases", and check that your
798+
``python.exe`` alias is set to "Python (default)"
799+
800+
* - ``python`` and ``py`` don't launch the runtime I expect
801+
- Check your
802+
``PYTHON_MANAGER_DEFAULT`` environment variable or ``default_tag``
803+
configuration. The ``py list`` command will show your default based on these
804+
settings.
805+
806+
* -
807+
- Installs that are managed by the Python install manager will be chosen
808+
ahead of unmanaged installs. Use ``py install`` to install the runtime you
809+
expect, or configure your default tag.
810+
811+
* -
812+
- Prerelease and experimental installs that are not managed by the Python
813+
install manager may be chosen ahead of stable releases. Configure your
814+
default tag or uninstall the prerelease runtime and reinstall using ``py
815+
install``.
816+
817+
* - ``pythonw`` or ``pyw`` don't launch the same runtime as ``python`` or
818+
``py``
819+
- Click Start, open "Manage app execution aliases", and check that
820+
your ``pythonw.exe`` and ``pyw.exe`` aliases are consistent with your
821+
others.
822+
823+
* - ``pip`` gives me a "command not found" error when I type it in my terminal.
824+
- Have you activated a virtual environment? Run the
825+
``.venv\Scripts\activate`` script in your terminal to activate.
826+
827+
* -
828+
- The package may be available but missing the generated executable.
829+
We recommend using the ``python -m pip`` command instead, or alternatively
830+
the ``python -m pip install --force pip`` command will recreate the
831+
executables and show you the path to add to :envvar:`PATH`. These scripts are
832+
separated for each runtime, and so you may need to add multiple paths.
783833

784834

785835
.. _windows-embeddable:

0 commit comments

Comments
 (0)