PageRenderTime 295ms CodeModel.GetById 166ms app.highlight 3ms RepoModel.GetById 122ms app.codeStats 0ms

Plain Text | 285 lines | 224 code | 61 blank | 0 comment | 0 complexity | 79fdf1281a9e7c5948164299eadf84ea MD5 | raw file
  1[See the end of this file for ** TIPS ** on using IDLE !!]
  3Click on the dotted line at the top of a menu to "tear it off": a
  4separate window containing the menu is created.
  6File Menu:
  8	New Window       -- Create a new editing window
  9	Open...          -- Open an existing file
 10	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
 14                            and methods
 15	---
 16	Save             -- Save current window to the associated file (unsaved
 17		            windows have a * before and after the window title)
 19	Save As...       -- Save current window to new file, which becomes
 20		            the associated file
 21	Save Copy As...  -- Save current window to different file
 22		            without changing the associated file
 23	---
 24	Print Window     -- Print the current window
 25	---
 26	Close            -- Close current window (asks to save if unsaved)
 27	Exit             -- Close all windows, quit (asks to save if unsaved)
 29Edit Menu:
 31	Undo             -- Undo last change to current window
 32                            (A maximum of 1000 changes may be undone)
 33	Redo             -- Redo last undone change to current window
 34	---
 35	Cut              -- Copy a selection into system-wide clipboard,
 36                            then delete the selection
 37	Copy             -- Copy selection into system-wide clipboard
 38	Paste            -- Insert system-wide clipboard into window
 39	Select All       -- Select the entire contents of the edit buffer
 40	---
 41	Find...          -- Open a search dialog box with many options
 42	Find Again       -- Repeat last search
 43	Find Selection   -- Search for the string in the selection
 44	Find in Files... -- Open a search dialog box for searching files
 45	Replace...       -- Open a search-and-replace dialog box
 46	Go to Line       -- Ask for a line number and show that line
 47	Show Calltip     -- Open a small window with function param hints
 48	Show Completions -- Open a scroll window allowing selection keywords
 49			    and attributes. (see '*TIPS*', below)
 50	Show Parens	 -- Highlight the surrounding parenthesis
 51	Expand Word      -- Expand the word you have typed to match another
 52		            word in the same buffer; repeat to get a
 53                            different expansion
 55Format Menu (only in Edit window):
 57	Indent Region       -- Shift selected lines right 4 spaces
 58	Dedent Region       -- Shift selected lines left 4 spaces
 59	Comment Out Region  -- Insert ## in front of selected lines
 60	Uncomment Region    -- Remove leading # or ## from selected lines
 61	Tabify Region       -- Turns *leading* stretches of spaces into tabs
 62		(Note: We recommend using 4 space blocks to indent Python code.)
 63	Untabify Region     -- Turn *all* tabs into the right number of spaces
 64	New Indent Width... -- Open dialog to change indent width
 65	Format Paragraph    -- Reformat the current blank-line-separated
 66                               paragraph
 68Run Menu (only in Edit window):
 70	Python Shell -- Open or wake up the Python shell window
 71	---
 72	Check Module -- Run a syntax check on the module
 73	Run Module   -- Execute the current file in the __main__ namespace
 75Shell Menu (only in Shell window):
 77	View Last Restart -- Scroll the shell window to the last restart
 78	Restart Shell     -- Restart the interpreter with a fresh environment
 80Debug Menu (only in Shell window):
 82	Go to File/Line   -- look around the insert point for a filename
 83		             and linenumber, open the file, and show the line
 84	Debugger (toggle) -- Run commands in the shell under the debugger
 85	Stack Viewer      -- Show the stack traceback of the last exception
 86	Auto-open Stack Viewer (toggle) -- Open stack viewer on traceback
 88Options Menu:
 90	Configure IDLE -- Open a configuration dialog.  Fonts, indentation,
 91                          keybindings, and color themes may be altered.
 92                          Startup Preferences may be set, and Additional Help
 93                          Sources can be specified.
 95			  On MacOS X this menu is not present, use
 96			  menu 'IDLE -> Preferences...' instead.
 97	---
 98	Code Context --	  Open a pane at the top of the edit window which
 99			  shows the block context of the section of code
100			  which is scrolling off the top or the window.
101			  (Not present in Shell window.)
103Windows Menu:
105	Zoom Height -- toggles the window between configured size
106	and maximum height.
107	---
108	The rest of this menu lists the names of all open windows;
109	select one to bring it to the foreground (deiconifying it if
110	necessary).
112Help Menu:
114	About IDLE  -- Version, copyright, license, credits
115	IDLE Readme -- Background discussion and change details
116	---
117	IDLE Help   -- Display this file
118	Python Docs -- Access local Python documentation, if
119		       installed.  Otherwise, access
120	---
121	(Additional Help Sources may be added here)
124** TIPS **
127Additional Help Sources:
129	Windows users can Google on zopeshelf.chm to access Zope help files in
130	the Windows help format.  The Additional Help Sources feature of the
131	configuration GUI supports .chm, along with any other filetypes
132	supported by your browser.  Supply a Menu Item title, and enter the
133	location in the Help File Path slot of the New Help Source dialog.  Use
134	http:// and/or www. to identify external URLs, or download the file and
135	browse for its path on your machine using the Browse button.
137	All users can access the extensive sources of help, including
138	tutorials, available at  Selected URLs can be added
139	or removed from the Help menu at any time using Configure IDLE.
141Basic editing and navigation:
143	Backspace deletes char to the left; DEL deletes char to the right.
144	Control-backspace deletes word left, Control-DEL deletes word right.
145	Arrow keys and Page Up/Down move around.
146	Control-left/right Arrow moves by words in a strange but useful way.
147	Home/End go to begin/end of line.
148	Control-Home/End go to begin/end of file.
149	Some useful Emacs bindings are inherited from Tcl/Tk:
150		Control-a     beginning of line
151		Control-e     end of line
152		Control-k     kill line (but doesn't put it in clipboard)
153		Control-l     center window around the insertion point
154	Standard Windows bindings may work on that platform.
155	Keybindings are selected in the Settings Dialog, look there.
157Automatic indentation:
159	After a block-opening statement, the next line is indented by 4 spaces
160	(in the Python Shell window by one tab).  After certain keywords
161	(break, return etc.) the next line is dedented.  In leading
162	indentation, Backspace deletes up to 4 spaces if they are there.  Tab
163	inserts spaces (in the Python Shell window one tab), number depends on
164	Indent Width.  (N.B. Currently tabs are restricted to four spaces due
165	to Tcl/Tk issues.)
167        See also the indent/dedent region commands in the edit menu.
171	Completions are supplied for functions, classes, and attributes of
172	classes, both built-in and user-defined.  Completions are also provided
173	for filenames.
175	The AutoCompleteWindow (ACW) will open after a predefined delay
176	(default is two seconds) after a '.' or (in a string) an os.sep is
177	typed.  If after one of those characters (plus zero or more other
178	characters) you type a Tab the ACW will open immediately if a possible
179	continuation is found.
181	If there is only one possible completion for the characters entered, a
182	Tab will supply that completion without opening the ACW.
184	'Show Completions' will force open a completions window.  In an empty
185	string, this will contain the files in the current directory.  On a
186	blank line, it will contain the built-in and user-defined functions and
187	classes in the current name spaces, plus any modules imported.  If some
188	characters have been entered, the ACW will attempt to be more specific.
190	If string of characters is typed, the ACW selection will jump to the
191	entry most closely matching those characters. Entering a Tab will cause
192	the longest non-ambiguous match to be entered in the Edit window or
193	Shell.  Two Tabs in a row will supply the current ACW selection, as
194	will Return or a double click.  Cursor keys, Page Up/Down, mouse
195	selection, and the scrollwheel all operate on the ACW.
197	'Hidden' attributes can be accessed by typing the beginning of hidden
198	name after a '.'.  e.g. '_'.  This allows access to modules with
199	'__all__' set, or to class-private attributes.
201	Completions and the 'Expand Word' facility can save a lot of typing!
203	Completions are currently limited to those in the namespaces.  Names in
204	an Edit window which are not via __main__ or sys.modules will not be
205	found.  Run the module once with your imports to correct this
206	situation.  Note that IDLE itself places quite a few modules in
207	sys.modules, so much can be found by default, e.g. the re module.
209	If you don't like the ACW popping up unbidden, simply make the delay
210	longer or disable the extension.  OTOH, you could make the delay zero.
212	You could also switch off the CallTips extension.  (We will be adding
213	a delay to the call tip window.)
215Python Shell window:
217	Control-c interrupts executing command.
218	Control-d sends end-of-file; closes window if typed at >>> prompt
219		(this is Control-z on Windows).
221    Command history:
223	Alt-p retrieves previous command matching what you have typed.
224	Alt-n retrieves next.
225	      (These are Control-p, Control-n on the Mac)
226	Return while cursor is on a previous command retrieves that command.
227	Expand word is also useful to reduce typing.
229    Syntax colors:
231	The coloring is applied in a background "thread", so you may
232	occasionally see uncolorized text.  To change the color
233	scheme, use the Configure IDLE / Highlighting dialog.
235    Python default syntax colors:
237	Keywords	orange
238	Builtins	royal purple
239	Strings		green
240	Comments	red
241	Definitions	blue
243    Shell default colors:
245	Console output	brown
246	stdout		blue
247	stderr		red
248	stdin		black
250Other preferences:
252	The font preferences, keybinding, and startup preferences can
253	be changed using the Settings dialog.
255Command line usage:
257	Enter idle -h at the command prompt to get a usage message.
259Running without a subprocess:
261	If IDLE is started with the -n command line switch it will run in a
262	single process and will not create the subprocess which runs the RPC
263	Python execution server.  This can be useful if Python cannot create
264	the subprocess or the RPC socket interface on your platform.  However,
265	in this mode user code is not isolated from IDLE itself.  Also, the
266	environment is not restarted when Run/Run Module (F5) is selected.  If
267	your code has been modified, you must reload() the affected modules and
268	re-import any specific items (e.g. from foo import baz) if the changes
269	are to take effect.  For these reasons, it is preferable to run IDLE
270	with the default subprocess if at all possible.
274	IDLE contains an extension facility.  See the beginning of
275	config-extensions.def in the idlelib directory for further information.
276	The default extensions are currently:
278		FormatParagraph
279		AutoExpand
280		ZoomHeight
281		ScriptBinding
282		CallTips
283		ParenMatch
284		AutoComplete
285		CodeContext