blob: 5d4acd0f8880a7376915aa0fb9e92a4de45cd127 [file] [log] [blame]
Kurt B. Kaiser1061e722003-01-04 01:43:53 +00001[See end for ** TIPS on using IDLE]
David Scherer7aced172000-08-15 01:13:23 +00002
3Click on the dotted line at the top of a menu to "tear it off": a
4separate window containing the menu is created.
5
Kurt B. Kaiser39c7b452002-12-11 04:42:39 +00006File Menu:
David Scherer7aced172000-08-15 01:13:23 +00007
Kurt B. Kaiser39c7b452002-12-11 04:42:39 +00008 New Window -- create a new editing window
David Scherer7aced172000-08-15 01:13:23 +00009 Open... -- open an existing file
Kurt B. Kaiser39c7b452002-12-11 04:42:39 +000010 Recent Files... -- open a list of recent files
11 Open Module... -- open an existing module (searches sys.path)
12 Class Browser -- show classes and methods in current file
13 Path Browser -- show sys.path directories, modules, classes
Kurt B. Kaiser1061e722003-01-04 01:43:53 +000014 and methods
David Scherer7aced172000-08-15 01:13:23 +000015 ---
16 Save -- save current window to the associated file (unsaved
17 windows have a * before and after the window title)
18
19 Save As... -- save current window to new file, which becomes
Kurt B. Kaiser39c7b452002-12-11 04:42:39 +000020 the associated file
David Scherer7aced172000-08-15 01:13:23 +000021 Save Copy As... -- save current window to different file
Kurt B. Kaiser39c7b452002-12-11 04:42:39 +000022 without changing the associated file
23 ---
24 Print Window -- print the current window
David Scherer7aced172000-08-15 01:13:23 +000025 ---
26 Close -- close current window (asks to save if unsaved)
27 Exit -- close all windows and quit IDLE (asks to save if unsaved)
28
Kurt B. Kaiser39c7b452002-12-11 04:42:39 +000029Edit Menu:
David Scherer7aced172000-08-15 01:13:23 +000030
31 Undo -- Undo last change to current window (max 1000 changes)
32 Redo -- Redo last undone change to current window
33 ---
34 Cut -- Copy selection into system-wide clipboard; then delete selection
35 Copy -- Copy selection into system-wide clipboard
36 Paste -- Insert system-wide clipboard into window
37 Select All -- Select the entire contents of the edit buffer
38 ---
39 Find... -- Open a search dialog box with many options
Kurt B. Kaiser39c7b452002-12-11 04:42:39 +000040 Find Again -- Repeat last search
41 Find Selection -- Search for the string in the selection
David Scherer7aced172000-08-15 01:13:23 +000042 Find in Files... -- Open a search dialog box for searching files
43 Replace... -- Open a search-and-replace dialog box
Kurt B. Kaiser39c7b452002-12-11 04:42:39 +000044 Go to Line -- Ask for a line number and show that line
45 Expand Word -- Expand the word you have typed to match another
46 word in the same buffer; repeat to get a different
47 expansion
48
49Format Menu (only in Edit window):
50
51 Indent Region -- Shift selected lines right 4 spaces
52 Dedent Region -- Shift selected lines left 4 spaces
53 Comment Out Region -- Insert ## in front of selected lines
54 Uncomment Region -- Remove leading # or ## from selected lines
55 Tabify Region -- Turns *leading* stretches of spaces into tabs
56 Untabify Region -- Turn *all* tabs into the right number of spaces
57 New Indent Width... -- Open dialog to change indent width
David Scherer7aced172000-08-15 01:13:23 +000058 Format Paragraph -- Reformat the current blank-line-separated paragraph
Kurt B. Kaiser39c7b452002-12-11 04:42:39 +000059
60Run Menu (only in Edit window):
61
62 Python Shell -- Open or wake up the Python shell window
David Scherer7aced172000-08-15 01:13:23 +000063 ---
Kurt B. Kaiser39c7b452002-12-11 04:42:39 +000064 Check Module -- Run a syntax check on the module
65 Run Script -- Execute the current file in the __main__ namespace
David Scherer7aced172000-08-15 01:13:23 +000066
Kurt B. Kaiser1061e722003-01-04 01:43:53 +000067Shell Menu (only in Shell window):
68
69 View Last Restart -- Scroll the shell window to the last restart
70 Restart Shell -- Restart the interpreter with a fresh environment
71 ---
72 Go to File/Line -- look around the insert point for a filename
73 and linenumber, open the file, and show the line
74 Debugger (toggle) -- Run commands in the shell under the debugger
75 Stack Viewer -- show the stack traceback of the last exception
76 Auto-open Stack Viewer (toggle) -- Open stack viewer on traceback
77
78Options Menu:
David Scherer7aced172000-08-15 01:13:23 +000079
Kurt B. Kaiser39c7b452002-12-11 04:42:39 +000080 Configure IDLE -- Open a configuration dialog. Fonts, indentation,
81 keybindings, and color themes may be altered.
82 Startup preferences may be set.
83 ---
84 Revert to Default Settings -- Restore original settings
85
86Windows Menu:
87
88 Zoom Height -- toggles the window between configured size
David Scherer7aced172000-08-15 01:13:23 +000089 and maximum height.
90 ---
91 The rest of this menu lists the names of all open windows;
92 select one to bring it to the foreground (deiconifying it if
93 necessary).
94
Kurt B. Kaiser39c7b452002-12-11 04:42:39 +000095Help Menu:
96
97 IDLE Help -- Display this file
98 Python Documentation -- Access local Python documentation, if
99 installed. Otherwise access python.org.
Kurt B. Kaiser39c7b452002-12-11 04:42:39 +0000100 IDLE Readme -- Background discussion and change details
101 ---
102 About IDLE --- Version, copyright, license, credits
103
104** TIPS
105========
David Scherer7aced172000-08-15 01:13:23 +0000106
107Basic editing and navigation:
108
109 Backspace deletes to the left; DEL deletes to the right
110 Arrow keys and Page Up/Down to move around
111 Home/End go to begin/end of line
112 Control-Home/End go to begin/end of file
Kurt B. Kaiser39c7b452002-12-11 04:42:39 +0000113 Some Emacs or standard Windows bindings may work.
114 Keybindings are selected in the Settings Dialog, look there.
David Scherer7aced172000-08-15 01:13:23 +0000115
116Automatic indentation:
117
118 After a block-opening statement, the next line is indented by
119 4 spaces (in the Python Shell window by one tab). After
120 certain keywords (break, return etc.) the next line is
121 dedented. In leading indentation, Backspace deletes up to 4
Kurt B. Kaiser39c7b452002-12-11 04:42:39 +0000122 spaces if they are there. Tab inserts spaces (in the
123 Python Shell window one tab), number depends on Indent Width
124 See also the indent/dedent region commands in the edit menu.
David Scherer7aced172000-08-15 01:13:23 +0000125
126Python Shell window:
127
128 ^C interrupts executing command
129 ^D sends end-of-file; closes window if typed at >>> prompt
130
131 Command history:
132
133 Alt-p retrieves previous command matching what you have typed
134 Alt-n retrieves next
135 Return while on any previous command retrieves that command
136 Alt-/ (Expand word) is also useful here
137
138Syntax colors:
139
140 The coloring is applied in a background "thread", so you may
141 occasionally see uncolorized text. To change the color
Kurt B. Kaiser39c7b452002-12-11 04:42:39 +0000142 scheme, use the Settings/Highlighting dialog.
David Scherer7aced172000-08-15 01:13:23 +0000143
Kurt B. Kaiser39c7b452002-12-11 04:42:39 +0000144 Python default syntax colors:
David Scherer7aced172000-08-15 01:13:23 +0000145
146 Keywords orange
147 Strings green
148 Comments red
149 Definitions blue
150
Kurt B. Kaiser39c7b452002-12-11 04:42:39 +0000151 Shell default colors:
David Scherer7aced172000-08-15 01:13:23 +0000152
153 Console output brown
154 stdout blue
155 stderr dark green
156 stdin black
157
158Other preferences:
159
Kurt B. Kaiser39c7b452002-12-11 04:42:39 +0000160 The font preferences, keybinding, and startup preferences can
161 be changed using the Settings dialog.
David Scherer7aced172000-08-15 01:13:23 +0000162
163Command line usage:
Kurt B. Kaiser39c7b452002-12-11 04:42:39 +0000164
165 Enter idle -h at the command prompt to get a usage message.