Skip to content

Commit

Permalink
gh-82006: IDLE doc improvements (#94349)
Browse files Browse the repository at this point in the history
0. Update text start and stop conditions.
1. Title-case sections but not subsections.
2. Edit Shell Window sections: title, execute, restart.
  • Loading branch information
terryjreedy authored Jun 27, 2022
1 parent edb10ca commit e6391e0
Show file tree
Hide file tree
Showing 3 changed files with 330 additions and 188 deletions.
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
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

0 comments on commit e6391e0

Please sign in to comment.