Commit bafef5ad authored by Terry Jan Reedy's avatar Terry Jan Reedy

Edit Menus section of Idle doc. Make menu entries match current Idle in order

and case.  Edit some of the explanatory sentences and end all with a period.
parent 9e466cf1
...@@ -29,136 +29,147 @@ IDLE has the following features: ...@@ -29,136 +29,147 @@ IDLE has the following features:
Menus Menus
----- -----
IDLE has two window types, the Shell window and the Editor window. It is IDLE has two main window types, the Shell window and the Editor window. It is
possible to have multiple editor windows simultaneously. IDLE's possible to have multiple editor windows simultaneously. Output windows, such
menus dynamically change based on which window is currently selected. Each menu as used for Edit / Find in Files, are a subtype of edit window. They currently
documented below indicates which window type it is associated with. Click on have the same top menu as Editor windows but a different default title and
the dotted line at the top of a menu to "tear it off": a separate window context menu.
containing the menu is created (for Unix and Windows only).
IDLE's menus dynamically change based on which window is currently selected.
Each menu documented below indicates which window type it is associated with.
Click on the dotted line at the top of a menu to "tear it off": a separate
window containing the menu is created (for Unix and Windows only).
File menu (Shell and Editor) File menu (Shell and Editor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
New file New File
Create a new file editing window Create a new file editing window.
Open... Open...
Open an existing file Open an existing file with an Open dialog.
Open module...
Open an existing module (searches sys.path)
Recent Files Recent Files
Open a list of recent files Open a list of recent files. Click one to open it.
Open Module...
Open an existing module (searches sys.path).
.. index:: .. index::
single: Class browser single: Class browser
single: Path browser single: Path browser
Class browser Class Browser
Show classes and methods in current file Show functions, classes, and methods in the current Editor file in a
tree structure. In the shell, open a module first.
Path browser Path Browser
Show sys.path directories, modules, classes and methods Show sys.path directories, modules, functions, classes and methods in a
tree structure.
Save Save
Save current window to the associated file (unsaved windows have a Save the current window to the associated file, if there is one. Windows
\* before and after the window title) that have been changed since being opened or last saved have a \* before
and after the window title. If there is no associated file,
do Save As instead.
Save As... Save As...
Save current window to new file, which becomes the associated file Save the current window with a Save As dialog. The file saved becomes the
new associated file for the window.
Save Copy As... Save Copy As...
Save current window to different file without changing the associated file Save the current window to different file without changing the associated
file.
Print Window Print Window
Print the current window Print the current window to the default printer.
Close Close
Close current window (asks to save if unsaved) Close the current window (ask to save if unsaved).
Exit Exit
Close all windows and quit IDLE (asks to save if unsaved) Close all windows and quit IDLE (ask to save unsaved windows).
Edit menu (Shell and Editor) Edit menu (Shell and Editor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Undo Undo
Undo last change to current window (a maximum of 1000 changes may be undone) Undo the last change to the current window. A maximum of 1000 changes may
be undone.
Redo Redo
Redo last undone change to current window Redo the last undone change to the current window.
Cut Cut
Copy selection into system-wide clipboard; then delete the selection Copy selection into the system-wide clipboard; then delete the selection.
Copy Copy
Copy selection into system-wide clipboard Copy selection into the system-wide clipboard.
Paste Paste
Insert system-wide clipboard into window Insert contents of the system-wide clipboard into the current window.
The clipboard functions are also available in context menus.
Select All Select All
Select the entire contents of the edit buffer Select the entire contents of the current window.
Find... Find...
Open a search dialog box with many options Open a search dialog with many options
Find again Find Again
Repeat last search Repeat the last search, if there is one.
Find selection Find Selection
Search for the string in the selection Search for the currently selected string, if there is one.
Find in Files... Find in Files...
Open a search dialog box for searching files Open a file search dialog. Put results in an new output window.
Replace... Replace...
Open a search-and-replace dialog box Open a search-and-replace dialog.
Go to Line
Move cursor to the line number requested and make that line visible.
Go to line Show Completions
Ask for a line number and show that line Open a scrollable list allowing selection of keywords and attributes. See
Completions in the Tips sections below.
Expand word Expand Word
Expand the word you have typed to match another word in the same buffer; Expand a prefix you have typed to match a full word in the same window;
repeat to get a different expansion repeat to get a different expansion.
Show call tip Show call tip
After an unclosed parenthesis for a function, open a small window with After an unclosed parenthesis for a function, open a small window with
function parameter hints function parameter hints.
Show surrounding parens Show surrounding parens
Highlight the surrounding parenthesis Highlight the surrounding parenthesis.
Show Completions
Open a scroll window allowing selection keywords and attributes. See
Completions below.
Format menu (Editor window only) Format menu (Editor window only)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Indent region Indent Region
Shift selected lines right by the indent width (default 4 spaces) Shift selected lines right by the indent width (default 4 spaces).
Dedent region Dedent Region
Shift selected lines left by the indent width (default 4 spaces) Shift selected lines left by the indent width (default 4 spaces).
Comment out region Comment Out Region
Insert ## in front of selected lines Insert ## in front of selected lines.
Uncomment region Uncomment Region
Remove leading # or ## from selected lines Remove leading # or ## from selected lines.
Tabify region Tabify Region
Turns *leading* stretches of spaces into tabs. (Note: We recommend using Turn *leading* stretches of spaces into tabs. (Note: We recommend using
4 space blocks to indent Python code.) 4 space blocks to indent Python code.)
Untabify region Untabify Region
Turn *all* tabs into the correct number of spaces Turn *all* tabs into the correct number of spaces.
Toggle tabs Toggle Tabs
Open a dialog to switch between indenting with spaces and tabs. Open a dialog to switch between indenting with spaces and tabs.
New Indent Width New Indent Width
...@@ -166,62 +177,67 @@ New Indent Width ...@@ -166,62 +177,67 @@ New Indent Width
community is 4 spaces. community is 4 spaces.
Format Paragraph Format Paragraph
Reformat the current blank-line-separated paragraph. All lines in the Reformat the current blank-line-delimited paragraph in comment block or
paragraph will be formatted to less than 80 columns. multiline string or selected line in a string. All lines in the
paragraph will be formatted to less than N columns, where N defaults to 72.
Strip trailing whitespace Strip trailing whitespace
Removes any space characters after the end of the last non-space character Remove any space characters after the last non-space character of a line.
.. index:: .. index::
single: Import module
single: Run script single: Run script
Run menu (Editor window only) Run menu (Editor window only)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Python Shell Python Shell
Open or wake up the Python Shell window Open or wake up the Python Shell window.
Check module Check Module
Check the syntax of the module currently open in the Editor window. If the Check the syntax of the module currently open in the Editor window. If the
module has not been saved IDLE will prompt the user to save the code. module has not been saved IDLE will either prompt the user to save or
autosave, as selected in the General tab of the Idle Settings dialog. If
there is a syntax error, the approximate location is indicated in the
Editor window.
Run module Run Module
Restart the shell to clean the environment, then execute the currently Do Check Module (above). If no error, restart the shell to clean the
open module. If the module has not been saved IDLE will prompt the user environment, then execute the module.
to save the code.
Shell menu (Shell window only) Shell menu (Shell window only)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
View Last Restart View Last Restart
Scroll the shell window to the last Shell restart Scroll the shell window to the last Shell restart.
Restart Shell Restart Shell
Restart the shell to clean the environment Restart the shell to clean the environment.
Debug menu (Shell window only) Debug menu (Shell window only)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Go to file/line Go to File/Line
Look around the insert point for a filename and line number, open the file, Look on the current line. with the cursor, and the line above for a filename
and show the line. Useful to view the source lines referenced in an and line number. If found, open the file if not already open, and show the
exception traceback. Available in the context menu of the Shell window. line. Use this to view source lines referenced in an exception traceback
and lines found by Find in Files. Also available in the context menu of
the Shell window and Output windows.
.. index::
single: debugger
single: stack viewer
Debugger (toggle) Debugger (toggle)
This feature is not complete and considered experimental. Run commands in When actived, code entered in the Shell or run from an Editor will run
the shell under the debugger under the debugger. In the Editor, breakpoints can be set with the context
menu. This feature is still incomplete and somewhat experimental.
Stack viewer Stack Viewer
Show the stack traceback of the last exception Show the stack traceback of the last exception in a tree widget, with
access to locals and globals.
Auto-open Stack Viewer Auto-open Stack Viewer
Toggle automatically opening the stack viewer on unhandled exception Toggle automatically opening the stack viewer on an unhandled exception.
.. index::
single: stack viewer
single: debugger
Options menu (Shell and Editor) Options menu (Shell and Editor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...@@ -229,23 +245,26 @@ Options menu (Shell and Editor) ...@@ -229,23 +245,26 @@ Options menu (Shell and Editor)
Configure IDLE Configure IDLE
Open a configuration dialog. Fonts, indentation, keybindings, and color Open a configuration dialog. Fonts, indentation, keybindings, and color
themes may be altered. Startup Preferences may be set, and additional themes may be altered. Startup Preferences may be set, and additional
help sources can be specified. help sources can be specified. Non-default user setting are saved in a
.idlerc directory in the user's home directory. Problems caused by bad user
configuration files are solved by editing or deleting one or more of the
files in .idlerc.
Configure Extensions Configure Extensions
Open a configuration dialog for setting preferences for extensions Open a configuration dialog for setting preferences for extensions
(discussed below). (discussed below). See note above about the location of user settings.
Code Context (toggle)(Editor Window only) Code Context (toggle)(Editor Window only)
Open a pane at the top of the edit window which shows the block context Open a pane at the top of the edit window which shows the block context
of the section of code which is scrolling off the top of the window. of the code which has scrolled above the top of the window.
Windows menu (Shell and Editor) Windows menu (Shell and Editor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Zoom Height Zoom Height
Toggles the window between normal size (40x80 initial setting) and maximum Toggles the window between normal size and maximum height. The initial size
height. The initial size is in the Configure IDLE dialog under the general defaults to 40 lines by 80 chars unless changed on the General tab of the
tab. Configure IDLE dialog.
The rest of this menu lists the names of all open windows; select one to bring The rest of this menu lists the names of all open windows; select one to bring
it to the foreground (deiconifying it if necessary). it to the foreground (deiconifying it if necessary).
...@@ -254,16 +273,19 @@ Help menu (Shell and Editor) ...@@ -254,16 +273,19 @@ Help menu (Shell and Editor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
About IDLE About IDLE
Version, copyright, license, credits Display version, copyright, license, credits, and more.
IDLE Help IDLE Help
Display a help file for IDLE detailing the menu options, basic editing and Display a help file for IDLE detailing the menu options, basic editing and
navigation, and other tips. navigation, and other tips.
Python Docs Python Docs
Access local Python documentation, if installed. Or will start a web browser Access local Python documentation, if installed, or start a web browser
and open docs.python.org showing the latest Python documentation. and open docs.python.org showing the latest Python documentation.
Turtle Demo
Run the turtledemo module with example python code and turtle drawings.
Additional help sources may be added here with the Configure IDLE dialog under Additional help sources may be added here with the Configure IDLE dialog under
the General tab. the General tab.
...@@ -275,39 +297,32 @@ the General tab. ...@@ -275,39 +297,32 @@ the General tab.
single: Clear Breakpoint single: Clear Breakpoint
single: breakpoints single: breakpoints
Editor Window context menu Context Menus
^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^
* Right-click in Editor window (Control-click on OS X) Open a context menu by right-clicking in a window (Control-click on OS X).
Context menus have the standard clipboard functions also on the Edit menu.
Cut Cut
Copy selection into system-wide clipboard; then delete selection Copy selection into the system-wide clipboard; then delete the selection.
Copy Copy
Copy selection into system-wide clipboard Copy selection into the system-wide clipboard.
Paste Paste
Insert system-wide clipboard into window Insert contents of the system-wide clipboard into the current window.
Editor windows also have breakpoint functions. Lines with a breakpoint set are
specially marked. Breakpoints only have an effect when running under the
debugger. Breakpoints for a file are saved in the user's .idlerc directory.
Set Breakpoint Set Breakpoint
Sets a breakpoint. Breakpoints are only enabled when the debugger is open. Set a breakpoint on the current line.
Clear Breakpoint Clear Breakpoint
Clears the breakpoint on that line. Clear the breakpoint on that line.
Shell Window context menu Shell and Output windows have the following.
^^^^^^^^^^^^^^^^^^^^^^^^^
* Right-click in Python Shell window (Control-click on OS X)
Cut
Copy selection into system-wide clipboard; then delete selection
Copy
Copy selection into system-wide clipboard
Paste
Insert system-wide clipboard into window
Go to file/line Go to file/line
Same as in Debug menu. Same as in Debug menu.
...@@ -481,8 +496,8 @@ shell, or for executing import statements to import common modules. ...@@ -481,8 +496,8 @@ shell, or for executing import statements to import common modules.
In addition, ``Tk`` also loads a startup file if it is present. Note that the In addition, ``Tk`` also loads a startup file if it is present. Note that the
Tk file is loaded unconditionally. This additional file is ``.Idle.py`` and is Tk file is loaded unconditionally. This additional file is ``.Idle.py`` and is
looked for in the user's home directory. Statements in this file will be looked for in the user's home directory. Statements in this file will be
executed in the Tk namespace, so this file is not useful for importing functions executed in the Tk namespace, so this file is not useful for importing
to be used from IDLE's Python shell. functions to be used from IDLE's Python shell.
Command line usage Command line usage
...@@ -508,9 +523,9 @@ If there are arguments: ...@@ -508,9 +523,9 @@ If there are arguments:
#. Otherwise, if neither ``-e`` nor ``-c`` is used, the first #. Otherwise, if neither ``-e`` nor ``-c`` is used, the first
argument is a script which is executed with the remaining arguments in argument is a script which is executed with the remaining arguments in
``sys.argv[1:...]`` and ``sys.argv[0]`` set to the script name. If the script ``sys.argv[1:...]`` and ``sys.argv[0]`` set to the script name. If the
name is '-', no script is executed but an interactive Python session is started; script name is '-', no script is executed but an interactive Python session
the arguments are still available in ``sys.argv``. is started; the arguments are still available in ``sys.argv``.
Running without a subprocess Running without a subprocess
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment