Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions Doc/tutorial/interpreter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Invoking the Interpreter
========================

The Python interpreter is usually installed as |usr_local_bin_python_x_dot_y_literal|
on those machines where it is available; putting :file:`/usr/local/bin` in your
Unix shell's search path makes it possible to start it by typing the command:
on those machines where it is available; Ensure /usr/local/bin is included in your Unix
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep lines under 80 chars as per PEP8.

shell's search path to start the interpreter by typing the command:

.. code-block:: text

Expand All @@ -23,10 +23,10 @@ is an installation option, other places are possible; check with your local
Python guru or system administrator. (E.g., :file:`/usr/local/python` is a
popular alternative location.)

On Windows machines where you have installed Python from the :ref:`Microsoft Store
<windows-store>`, the |python_x_dot_y_literal| command will be available. If you have
the :ref:`py.exe launcher <launcher>` installed, you can use the :file:`py`
command. See :ref:`setting-envvars` for other ways to launch Python.
On Windows, if you installed Python from the :ref:Microsoft Store <windows-store>,
the |python_x_dot_y_literal| command will be available. Alternatively, if you have the
Copy link
Member

@picnixz picnixz Jan 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK, you might have both installed so it's not really "alternatively". Also, we should keep the mention about setting environment variables because it's relevant.

:ref:py.exe launcher <launcher> installed, you can use the :file:py command to launch
Python.

Typing an end-of-file character (:kbd:`Control-D` on Unix, :kbd:`Control-Z` on
Windows) at the primary prompt causes the interpreter to exit with a zero exit
Expand All @@ -37,7 +37,8 @@ The interpreter's line-editing features include interactive editing, history
substitution and code completion on systems that support the `GNU Readline
<https://tiswww.case.edu/php/chet/readline/rltop.html>`_ library.
Perhaps the quickest check to see whether command line editing is supported is
typing :kbd:`Control-P` to the first Python prompt you get. If it beeps, you
typing :kbd:`Control-P` to the first Python prompt you get. i.e. Pressing :kbd:Control-P
moves to the previous command in the command history. If it beeps, you
Comment on lines +40 to +41
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change doesn't seem typographically correct and the markup is incorrect.

have command line editing; see Appendix :ref:`tut-interacting` for an
introduction to the keys. If nothing appears to happen, or if ``^P`` is
echoed, command line editing isn't available; you'll only be able to use
Expand Down
4 changes: 3 additions & 1 deletion Lib/_pyrepl/fancy_termios.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ def as_list(self):
self.lflag,
self.ispeed,
self.ospeed,
self.cc,
# Always return a copy of the control characters list to ensure
# there are not any additional references to self.cc
self.cc[:],
Comment on lines +43 to +45
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an unrelated change.

]

def copy(self):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Restore terminal control characters on REPL exit.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also remove this along with the unrelated change.

Loading