Skip to content

Commit e365c4a

Browse files
Commit
1 parent 8706167 commit e365c4a

File tree

2 files changed

+200
-152
lines changed

2 files changed

+200
-152
lines changed

Doc/library/idle.rst

Lines changed: 63 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ possible to have multiple editor windows simultaneously. On Windows and
4545
Linux, each has its own top menu. Each menu documented below indicates
4646
which window type it is associated with.
4747

48-
Output windows, such as used for Edit => Find in Files, are a subtype of editor
48+
Output windows, such as used for :menuselection:`&Edit --> Find in Files`,
49+
are a subtype of editor
4950
window. They currently have the same top menu but a different
5051
default title and context menu.
5152

@@ -56,155 +57,155 @@ described below are moved around to conform to Apple guidelines.
5657
File menu (Shell and Editor)
5758
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5859

59-
New File
60+
:guilabel:`&New File`
6061
Create a new file editing window.
6162

62-
Open...
63+
:guilabel:`&Open...`
6364
Open an existing file with an Open dialog.
6465

65-
Open Module...
66+
:guilabel:`Open &Module...`
6667
Open an existing module (searches sys.path).
6768

68-
Recent Files
69+
:guilabel:`&Recent Files`
6970
Open a list of recent files. Click one to open it.
7071

7172
.. index::
7273
single: Module browser
7374
single: Path browser
7475

75-
Module Browser
76+
:guilabel:`Module &Browser`
7677
Show functions, classes, and methods in the current Editor file in a
7778
tree structure. In the shell, open a module first.
7879

79-
Path Browser
80+
:guilabel:`&Path Browser`
8081
Show sys.path directories, modules, functions, classes and methods in a
8182
tree structure.
8283

83-
Save
84+
:guilabel:`&Save`
8485
Save the current window to the associated file, if there is one. Windows
8586
that have been changed since being opened or last saved have a \* before
8687
and after the window title. If there is no associated file,
8788
do Save As instead.
8889

89-
Save As...
90+
:guilabel:`Save &As...`
9091
Save the current window with a Save As dialog. The file saved becomes the
9192
new associated file for the window. (If your file namager is set to hide
9293
extensions, the current extension will be omitted in the file name box.
9394
If the new filename has no '.', '.py' and '.txt' will be added for Python
9495
and text files, except that on macOS Aqua,'.py' is added for all files.)
9596

96-
Save Copy As...
97+
:guilabel:`Save Cop&y As...`
9798
Save the current window to different file without changing the associated
9899
file. (See Save As note above about filename extensions.)
99100

100-
Print Window
101+
:guilabel:`Prin&t Window`
101102
Print the current window to the default printer.
102103

103-
Close Window
104+
:guilabel:`&Close Window`
104105
Close the current window (if an unsaved editor, ask to save; if an unsaved
105106
Shell, ask to quit execution). Calling ``exit()`` or ``close()`` in the Shell
106107
window also closes Shell. If this is the only window, also exit IDLE.
107108

108-
Exit IDLE
109+
:guilabel:`E&xit IDLE`
109110
Close all windows and quit IDLE (ask to save unsaved edit windows).
110111

111112
Edit menu (Shell and Editor)
112113
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
113114

114-
Undo
115+
:guilabel:`&Undo`
115116
Undo the last change to the current window. A maximum of 1000 changes may
116117
be undone.
117118

118-
Redo
119+
:guilabel:`&Redo`
119120
Redo the last undone change to the current window.
120121

121-
Select All
122+
:guilabel:`Select &All`
122123
Select the entire contents of the current window.
123124

124-
Cut
125+
:guilabel:`Cu&t`
125126
Copy selection into the system-wide clipboard; then delete the selection.
126127

127-
Copy
128+
:guilabel:`&Copy`
128129
Copy selection into the system-wide clipboard.
129130

130-
Paste
131+
:guilabel:`&Paste`
131132
Insert contents of the system-wide clipboard into the current window.
132133

133134
The clipboard functions are also available in context menus.
134135

135-
Find...
136+
:guilabel:`&Find...`
136137
Open a search dialog with many options
137138

138-
Find Again
139+
:guilabel:`Find A&gain`
139140
Repeat the last search, if there is one.
140141

141-
Find Selection
142+
:guilabel:`Find &Selection`
142143
Search for the currently selected string, if there is one.
143144

144-
Find in Files...
145+
:guilabel:`Find in Files...`
145146
Open a file search dialog. Put results in a new output window.
146147

147-
Replace...
148+
:guilabel:`R&eplace...`
148149
Open a search-and-replace dialog.
149150

150-
Go to Line
151+
:guilabel:`Go to &Line`
151152
Move the cursor to the beginning of the line requested and make that
152153
line visible. A request past the end of the file goes to the end.
153154
Clear any selection and update the line and column status.
154155

155-
Show Completions
156+
:guilabel:`S&how Completions`
156157
Open a scrollable list allowing selection of existing names. See
157158
:ref:`Completions <completions>` in the Editing and navigation section below.
158159

159-
Expand Word
160+
:guilabel:`E&xpand Word`
160161
Expand a prefix you have typed to match a full word in the same window;
161162
repeat to get a different expansion.
162163

163-
Show Call Tip
164+
:guilabel:`Show C&all Tip`
164165
After an unclosed parenthesis for a function, open a small window with
165166
function parameter hints. See :ref:`Calltips <calltips>` in the
166167
Editing and navigation section below.
167168

168-
Show Surrounding Parens
169+
:guilabel:`Show Surrounding P&arens`
169170
Highlight the surrounding parenthesis.
170171

171172
.. _format-menu:
172173

173174
Format menu (Editor window only)
174175
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
175176

176-
Format Paragraph
177+
:guilabel:`F&ormat Paragraph`
177178
Reformat the current blank-line-delimited paragraph in comment block or
178179
multiline string or selected line in a string. All lines in the
179180
paragraph will be formatted to less than N columns, where N defaults to 72.
180181

181-
Indent Region
182+
:guilabel:`&Indent Region`
182183
Shift selected lines right by the indent width (default 4 spaces).
183184

184-
Dedent Region
185+
:guilabel:`&Dedent Region`
185186
Shift selected lines left by the indent width (default 4 spaces).
186187

187-
Comment Out Region
188+
:guilabel:`Comment &Out Region`
188189
Insert ## in front of selected lines.
189190

190-
Uncomment Region
191+
:guilabel:`U&ncomment Region`
191192
Remove leading # or ## from selected lines.
192193

193-
Tabify Region
194+
:guilabel:`Tabify Region`
194195
Turn *leading* stretches of spaces into tabs. (Note: We recommend using
195196
4 space blocks to indent Python code.)
196197

197-
Untabify Region
198+
:guilabel:`Untabify Region`
198199
Turn *all* tabs into the correct number of spaces.
199200

200-
Toggle Tabs
201+
:guilabel:`Toggle Tabs`
201202
Open a dialog to switch between indenting with spaces and tabs.
202203

203-
New Indent Width
204+
:guilabel:`New Indent Width`
204205
Open a dialog to change indent width. The accepted default by the Python
205206
community is 4 spaces.
206207

207-
Strip Trailing Chitespace
208+
:guilabel:`S&trip Trailing Whitespace`
208209
Remove trailing space and other whitespace characters after the last
209210
non-whitespace character of a line by applying str.rstrip to each line,
210211
including lines within multiline strings. Except for Shell windows,
@@ -218,7 +219,7 @@ Run menu (Editor window only)
218219

219220
.. _run-module:
220221

221-
Run Module
222+
:guilabel:`R&un Module`
222223
Do :ref:`Check Module <check-module>`. If no error, restart the shell to clean the
223224
environment, then execute the module. Output is displayed in the Shell
224225
window. Note that output requires use of ``print`` or ``write``.
@@ -229,14 +230,14 @@ Run Module
229230

230231
.. _run-custom:
231232

232-
Run... Customized
233+
:guilabel:`Run... &Customized`
233234
Same as :ref:`Run Module <run-module>`, but run the module with customized
234235
settings. *Command Line Arguments* extend :data:`sys.argv` as if passed
235236
on a command line. The module can be run in the Shell without restarting.
236237

237238
.. _check-module:
238239

239-
Check Module
240+
:guilabel:`C&heck Module`
240241
Check the syntax of the module currently open in the Editor window. If the
241242
module has not been saved IDLE will either prompt the user to save or
242243
autosave, as selected in the General tab of the Idle Settings dialog. If
@@ -245,32 +246,32 @@ Check Module
245246

246247
.. _python-shell:
247248

248-
Python Shell
249+
:guilabel:`Python Shell`
249250
Open or wake up the Python Shell window.
250251

251252

252253
Shell menu (Shell window only)
253254
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
254255

255-
View Last Restart
256+
:guilabel:`&View Last Restart`
256257
Scroll the shell window to the last Shell restart.
257258

258-
Restart Shell
259+
:guilabel:`&Restart Shell`
259260
Restart the shell to clean the environment and reset display and exception handling.
260261

261-
Previous History
262+
:guilabel:`&Previous History`
262263
Cycle through earlier commands in history which match the current entry.
263264

264-
Next History
265+
:guilabel:`&Next History`
265266
Cycle through later commands in history which match the current entry.
266267

267-
Interrupt Execution
268+
:guilabel:`&Interrupt Execution`
268269
Stop a running program.
269270

270271
Debug menu (Shell window only)
271272
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
272273

273-
Go to File/Line
274+
:guilabel:`&Go to File/Line`
274275
Look on the current line. with the cursor, and the line above for a filename
275276
and line number. If found, open the file if not already open, and show the
276277
line. Use this to view source lines referenced in an exception traceback
@@ -281,22 +282,22 @@ Go to File/Line
281282
single: debugger
282283
single: stack viewer
283284

284-
Debugger (toggle)
285+
:guilabel:`&Debugger` (toggle)
285286
When activated, code entered in the Shell or run from an Editor will run
286287
under the debugger. In the Editor, breakpoints can be set with the context
287288
menu. This feature is still incomplete and somewhat experimental.
288289

289-
Stack Viewer
290+
:guilabel:`&Stack Viewer`
290291
Show the stack traceback of the last exception in a tree widget, with
291292
access to locals and globals.
292293

293-
Auto-open Stack Viewer
294+
:guilabel:`&Auto-open Stack Viewer`
294295
Toggle automatically opening the stack viewer on an unhandled exception.
295296

296297
Options menu (Shell and Editor)
297298
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
298299

299-
Configure IDLE
300+
:guilabel:`Configure &IDLE`
300301
Open a configuration dialog and change preferences for the following:
301302
fonts, indentation, keybindings, text color themes, startup windows and
302303
size, additional help sources, and extensions. On macOS, open the
@@ -307,18 +308,18 @@ Configure IDLE
307308
Most configuration options apply to all windows or all future windows.
308309
The option items below only apply to the active window.
309310

310-
Show/Hide Code Context (Editor Window only)
311+
:guilabel:`Show/Hide &Code Context` (Editor Window only)
311312
Open a pane at the top of the edit window which shows the block context
312313
of the code which has scrolled above the top of the window. See
313314
:ref:`Code Context <code-context>` in the Editing and Navigation section
314315
below.
315316

316-
Show/Hide Line Numbers (Editor Window only)
317+
:guilabel:`Show/Hide &Line Numbers` (Editor Window only)
317318
Open a column to the left of the edit window which shows the number
318319
of each line of text. The default is off, which may be changed in the
319320
preferences (see :ref:`Setting preferences <preferences>`).
320321

321-
Zoom/Restore Height
322+
:guilabel:`&Zoom/Restore Height`
322323
Toggles the window between normal size and maximum height. The initial size
323324
defaults to 40 lines by 80 chars unless changed on the General tab of the
324325
Configure IDLE dialog. The maximum height for a screen is determined by
@@ -335,18 +336,18 @@ Lists the names of all open windows; select one to bring it to the foreground
335336
Help menu (Shell and Editor)
336337
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
337338

338-
About IDLE
339+
:guilabel:`&About IDLE`
339340
Display version, copyright, license, credits, and more.
340341

341-
IDLE Help
342+
:guilabel:`&IDLE Help`
342343
Display this IDLE document, detailing the menu options, basic editing and
343344
navigation, and other tips.
344345

345-
Python Docs
346+
:guilabel:`Python &Docs`
346347
Access local Python documentation, if installed, or start a web browser
347348
and open docs.python.org showing the latest Python documentation.
348349

349-
Turtle Demo
350+
:guilabel:`Turtle Demo`
350351
Run the turtledemo module with example Python code and turtle drawings.
351352

352353
Additional help sources may be added here with the Configure IDLE dialog under
@@ -362,7 +363,7 @@ for more on Help menu choices.
362363
single: breakpoints
363364

364365
Context menus
365-
^^^^^^^^^^^^^^^^^^^^^^^^^^
366+
^^^^^^^^^^^^^
366367

367368
Open a context menu by right-clicking in a window (Control-click on macOS).
368369
Context menus have the standard clipboard functions also on the Edit menu.
@@ -1020,7 +1021,7 @@ The Lib/idlelib package implements the IDLE application. See the rest
10201021
of this page for how to use IDLE.
10211022

10221023
The files in idlelib are described in idlelib/README.txt. Access it
1023-
either in idlelib or click Help => About IDLE on the IDLE menu. This
1024+
either in idlelib or click :menuselection:`&Help --> &About IDLE` on the IDLE menu. This
10241025
file also maps IDLE menu items to the code that implements the item.
10251026
Except for files listed under 'Startup', the idlelib code is 'private' in
10261027
sense that feature changes can be backported (see :pep:`434`).

0 commit comments

Comments
 (0)