help.txt 7.68 KB
Newer Older
1
[See the end of this file for ** TIPS ** on using IDLE !!]
David Scherer's avatar
David Scherer committed
2 3 4 5

Click on the dotted line at the top of a menu to "tear it off": a
separate window containing the menu is created.

6
File Menu:
David Scherer's avatar
David Scherer committed
7

Kurt B. Kaiser's avatar
Kurt B. Kaiser committed
8 9 10 11 12 13 14
	New Window       -- Create a new editing window
	Open...          -- Open an existing file
	Recent Files...  -- Open a list of recent files
	Open Module...   -- Open an existing module (searches sys.path)
	Class Browser    -- Show classes and methods in current file
	Path Browser     -- Show sys.path directories, modules, classes
                            and methods
David Scherer's avatar
David Scherer committed
15
	---
Kurt B. Kaiser's avatar
Kurt B. Kaiser committed
16 17
	Save             -- Save current window to the associated file (unsaved
		            windows have a * before and after the window title)
David Scherer's avatar
David Scherer committed
18

Kurt B. Kaiser's avatar
Kurt B. Kaiser committed
19 20 21 22
	Save As...       -- Save current window to new file, which becomes
		            the associated file
	Save Copy As...  -- Save current window to different file
		            without changing the associated file
23
	---
Kurt B. Kaiser's avatar
Kurt B. Kaiser committed
24
	Print Window     -- Print the current window
David Scherer's avatar
David Scherer committed
25
	---
Kurt B. Kaiser's avatar
Kurt B. Kaiser committed
26 27
	Close            -- Close current window (asks to save if unsaved)
	Exit             -- Close all windows, quit (asks to save if unsaved)
David Scherer's avatar
David Scherer committed
28

29
Edit Menu:
David Scherer's avatar
David Scherer committed
30

Kurt B. Kaiser's avatar
Kurt B. Kaiser committed
31 32 33
	Undo             -- Undo last change to current window
                            (A maximum of 1000 changes may be undone)
	Redo             -- Redo last undone change to current window
David Scherer's avatar
David Scherer committed
34
	---
Kurt B. Kaiser's avatar
Kurt B. Kaiser committed
35 36 37 38 39
	Cut              -- Copy a selection into system-wide clipboard,
                            then delete the selection
	Copy             -- Copy selection into system-wide clipboard
	Paste            -- Insert system-wide clipboard into window
	Select All       -- Select the entire contents of the edit buffer
David Scherer's avatar
David Scherer committed
40
	---
Kurt B. Kaiser's avatar
Kurt B. Kaiser committed
41 42 43
	Find...          -- Open a search dialog box with many options
	Find Again       -- Repeat last search
	Find Selection   -- Search for the string in the selection
David Scherer's avatar
David Scherer committed
44
	Find in Files... -- Open a search dialog box for searching files
Kurt B. Kaiser's avatar
Kurt B. Kaiser committed
45 46 47 48 49
	Replace...       -- Open a search-and-replace dialog box
	Go to Line       -- Ask for a line number and show that line
	Expand Word      -- Expand the word you have typed to match another
		            word in the same buffer; repeat to get a
                            different expansion
50 51 52

Format Menu (only in Edit window):

Kurt B. Kaiser's avatar
Kurt B. Kaiser committed
53 54 55 56 57 58
	Indent Region       -- Shift selected lines right 4 spaces
	Dedent Region       -- Shift selected lines left 4 spaces
	Comment Out Region  -- Insert ## in front of selected lines
	Uncomment Region    -- Remove leading # or ## from selected lines
	Tabify Region       -- Turns *leading* stretches of spaces into tabs
	Untabify Region     -- Turn *all* tabs into the right number of spaces
59
	New Indent Width... -- Open dialog to change indent width
Kurt B. Kaiser's avatar
Kurt B. Kaiser committed
60 61
	Format Paragraph    -- Reformat the current blank-line-separated
                               paragraph
62 63 64 65

Run Menu (only in Edit window):

	Python Shell -- Open or wake up the Python shell window
David Scherer's avatar
David Scherer committed
66
	---
67
	Check Module -- Run a syntax check on the module
Kurt B. Kaiser's avatar
Kurt B. Kaiser committed
68
	Run Module   -- Execute the current file in the __main__ namespace
69

Kurt B. Kaiser's avatar
Kurt B. Kaiser committed
70 71 72
Shell Menu (only in Shell window):

	View Last Restart -- Scroll the shell window to the last restart
Kurt B. Kaiser's avatar
Kurt B. Kaiser committed
73 74 75 76 77 78
	Restart Shell     -- Restart the interpreter with a fresh environment

Debug Menu (only in Shell window):

	Go to File/Line   -- look around the insert point for a filename
		             and linenumber, open the file, and show the line
Kurt B. Kaiser's avatar
Kurt B. Kaiser committed
79
	Debugger (toggle) -- Run commands in the shell under the debugger
Kurt B. Kaiser's avatar
Kurt B. Kaiser committed
80
	Stack Viewer      -- Show the stack traceback of the last exception
Kurt B. Kaiser's avatar
Kurt B. Kaiser committed
81 82 83
	Auto-open Stack Viewer (toggle) -- Open stack viewer on traceback

Options Menu:
David Scherer's avatar
David Scherer committed
84

85
	Configure IDLE -- Open a configuration dialog.  Fonts, indentation,
Kurt B. Kaiser's avatar
Kurt B. Kaiser committed
86
                          keybindings, and color themes may be altered.
87
                          Startup Preferences may be set, and Additional Help
Kurt B. Kaiser's avatar
Kurt B. Kaiser committed
88
                          Souces can be specified.
89
	---
Kurt B. Kaiser's avatar
Kurt B. Kaiser committed
90 91 92
	Revert to Default Settings -- Restore original settings.  Not
	                              currently implemented - simply delete
                                      your .idlerc file.
David Scherer's avatar
David Scherer committed
93

94 95 96
Windows Menu:

	Zoom Height -- toggles the window between configured size
David Scherer's avatar
David Scherer committed
97 98 99 100 101 102
	and maximum height.
	---
	The rest of this menu lists the names of all open windows;
	select one to bring it to the foreground (deiconifying it if
	necessary).

103 104
Help Menu:

105
	About IDLE  -- Version, copyright, license, credits
106 107
	IDLE Readme -- Background discussion and change details
	---
108 109 110 111
	IDLE Help   -- Display this file
	Python Docs -- Access local Python documentation, if
		       installed.  Otherwise, access www.python.org.
	---
Kurt B. Kaiser's avatar
Kurt B. Kaiser committed
112
	(Additional Help Sources may be added here)
113 114 115 116 117 118 119 120 121 122 123 124 125 126


** TIPS **
==========

Additional Help Sources:

	Windows users can Google on pythlp.chm and zopeshelf.chm to access help
	files in the Windows help format.  The Additional Help Sources feature
	of the configuration GUI supports .chm, along with any other filetypes
	supported by your browser.  Supply a Menu Item title, and enter the
	location in the Help File Path slot of the New Help Source dialog.  Use
	http:// and/or www. to identify external URLs, or download the file and
	browse for its path on your machine using the Browse button.
David Scherer's avatar
David Scherer committed
127

128 129
	All users can access the extensive sources of help, including
	tutorials, available at www.python.org/doc.  Selected URLs can be added
Kurt B. Kaiser's avatar
Kurt B. Kaiser committed
130
	or removed from the Help menu at any time using Configure IDLE.
David Scherer's avatar
David Scherer committed
131 132 133 134 135 136 137

Basic editing and navigation:

	Backspace deletes to the left; DEL deletes to the right
	Arrow keys and Page Up/Down to move around
	Home/End go to begin/end of line
	Control-Home/End go to begin/end of file
138 139
	Some Emacs or standard Windows bindings may work.
	Keybindings are selected in the Settings Dialog, look there.
David Scherer's avatar
David Scherer committed
140 141 142 143 144 145 146

Automatic indentation:

	After a block-opening statement, the next line is indented by
	4 spaces (in the Python Shell window by one tab).  After
	certain keywords (break, return etc.) the next line is
	dedented.  In leading indentation, Backspace deletes up to 4
147
	spaces if they are there.  Tab inserts spaces (in the
Kurt B. Kaiser's avatar
Kurt B. Kaiser committed
148 149 150 151
	Python Shell window one tab), number depends on Indent Width.
	(N.B. Currently tabs are restricted to four spaces due to Tcl/Tk
	issues.)

152
        See also the indent/dedent region commands in the edit menu.
David Scherer's avatar
David Scherer committed
153 154 155

Python Shell window:

156 157
	Control-c interrupts executing command
	Control-d sends end-of-file; closes window if typed at >>> prompt
David Scherer's avatar
David Scherer committed
158 159 160 161 162

    Command history:

	Alt-p retrieves previous command matching what you have typed
	Alt-n retrieves next
163 164 165
	      (These are Control-p, Control-n on the Mac)      
	Return while cursor is on a previous command retrieves that command
	Expand word is also useful to reduce typing
David Scherer's avatar
David Scherer committed
166

Kurt B. Kaiser's avatar
Kurt B. Kaiser committed
167
    Syntax colors:
David Scherer's avatar
David Scherer committed
168 169 170

	The coloring is applied in a background "thread", so you may
	occasionally see uncolorized text.  To change the color
171
	scheme, use the Settings/Highlighting dialog.
David Scherer's avatar
David Scherer committed
172

173
    Python default syntax colors:
David Scherer's avatar
David Scherer committed
174 175 176 177 178 179

	Keywords	orange
	Strings		green
	Comments	red
	Definitions	blue

180
    Shell default colors:
David Scherer's avatar
David Scherer committed
181 182 183 184 185 186 187 188

	Console output	brown
	stdout		blue
	stderr		dark green
	stdin		black

Other preferences:

189 190
	The font preferences, keybinding, and startup preferences can
	be changed using the Settings dialog.
David Scherer's avatar
David Scherer committed
191 192

Command line usage:
193 194
	
	Enter idle -h at the command prompt to get a usage message.
195 196 197 198 199 200 201 202 203 204 205 206 207

Running without a subprocess:

	If IDLE is started with the -n command line switch it will run in a
	single process and will not create the subprocess which runs the RPC
	Python execution server.  This can be useful if Python cannot create
	the subprocess or the RPC socket interface on your platform.  However,
	in this mode user code is not isolated from IDLE itself.  Also, the
	environment is not restarted when Run/Run Module (F5) is selected.  If
	your code has been modified, you must reload() the affected modules and
	re-import any specific items (e.g. from foo import baz) if the changes
	are to take effect.  For these reasons, it is preferable to run IDLE
	with the default subprocess if at all possible.