Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-82006: IDLE doc improvements #94349

Merged
merged 2 commits into from
Jun 27, 2022
Merged
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
35 changes: 24 additions & 11 deletions Doc/library/idle.rst
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ for more on Help menu choices.
single: Clear Breakpoint
single: breakpoints

Context Menus
Context menus
^^^^^^^^^^^^^^^^^^^^^^^^^^

Open a context menu by right-clicking in a window (Control-click on macOS).
Expand Down Expand Up @@ -398,7 +398,7 @@ Squeeze

.. _editing-and-navigation:

Editing and navigation
Editing and Navigation
----------------------

Editor windows
Expand Down Expand Up @@ -576,17 +576,29 @@ line to the top of the editor.
The text and background colors for the context pane can be configured under
the Highlights tab in the Configure IDLE dialog.

Python Shell window
^^^^^^^^^^^^^^^^^^^
Shell window
^^^^^^^^^^^^

With IDLE's Shell, one enters, edits, and recalls complete statements.
Most consoles and terminals only work with a single physical line at a time.
In IDLE's Shell, enter, edit, and recall complete statements. (Most
consoles and terminals only work with a single physical line at a time).

Submit a single-line statement for execution by hitting :kbd:`Return`
with the cursor anywhere on the line. If a line is extended with
Backslash (:kbd:`\\`), the cursor must be on the last physical line.
Submit a multi-line compound statement by entering a blank line after
the statement.

When one pastes code into Shell, it is not compiled and possibly executed
until one hits :kbd:`Return`. One may edit pasted code first.
If one pastes more that one statement into Shell, the result will be a
until one hits :kbd:`Return`, as specified above.
One may edit pasted code first.
If one pastes more than one statement into Shell, the result will be a
:exc:`SyntaxError` when multiple statements are compiled as if they were one.

Lines containing`'RESTART'` mean that the user execution process has been
Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't valid ReST. This is why #93924 is complaining as we are still running make suspicious on that branch.

re-started. This occurs when the user execution process has crashed,
when one requests a restart on the Shell menu, or when one runs code
in an editor window.

The editing features described in previous subsections work when entering
code interactively. IDLE's Shell window also responds to the following keys.

Expand All @@ -603,7 +615,8 @@ code interactively. IDLE's Shell window also responds to the following keys.

* :kbd:`Alt-n` retrieves next. On macOS use :kbd:`C-n`.

* :kbd:`Return` while on any previous command retrieves that command
* :kbd:`Return` while the cursor is on any previous command
retrieves that command

Text colors
^^^^^^^^^^^
Expand All @@ -627,7 +640,7 @@ Highlighting tab. The marking of debugger breakpoint lines in the editor and
text in popups and dialogs is not user-configurable.


Startup and code execution
Startup and Code Execution
--------------------------

Upon startup with the ``-s`` option, IDLE will execute the file referenced by
Expand Down Expand Up @@ -894,7 +907,7 @@ with the default subprocess if at all possible.
.. deprecated:: 3.4


Help and preferences
Help and Preferences
--------------------

.. _help-sources:
Expand Down
Loading