blob: f62f863bef151c05f4ba7f1c7ce3b1cebd7d8840 [file] [log] [blame]
Georg Brandl8ec7f652007-08-15 14:28:01 +00001.. _idle:
2
Georg Brandl8ec7f652007-08-15 14:28:01 +00003.. index::
Georg Brandlb19be572007-12-29 10:57:00 +00004 single: IDLE
Georg Brandl8ec7f652007-08-15 14:28:01 +00005 single: Python Editor
6 single: Integrated Development Environment
7
Terry Jan Reedyeb405892014-12-04 00:55:46 -05008IDLE
9====
10
11.. moduleauthor:: Guido van Rossum <guido@Python.org>
12
Georg Brandlc21cd7e2008-05-16 17:37:53 +000013IDLE is the Python IDE built with the :mod:`tkinter` GUI toolkit.
Georg Brandl8ec7f652007-08-15 14:28:01 +000014
15IDLE has the following features:
16
Georg Brandlc21cd7e2008-05-16 17:37:53 +000017* coded in 100% pure Python, using the :mod:`tkinter` GUI toolkit
Georg Brandl8ec7f652007-08-15 14:28:01 +000018
Terry Jan Reedyeb405892014-12-04 00:55:46 -050019* cross-platform: works on Windows, Unix, and Mac OS X
Georg Brandl8ec7f652007-08-15 14:28:01 +000020
Terry Jan Reedyeb405892014-12-04 00:55:46 -050021* multi-window text editor with multiple undo, Python colorizing,
22 smart indent, call tips, and many other features
Georg Brandl8ec7f652007-08-15 14:28:01 +000023
24* Python shell window (a.k.a. interactive interpreter)
25
Terry Jan Reedyeb405892014-12-04 00:55:46 -050026* debugger (not complete, but you can set breakpoints, view and step)
Georg Brandl8ec7f652007-08-15 14:28:01 +000027
28
29Menus
30-----
31
Terry Jan Reedyeb405892014-12-04 00:55:46 -050032IDLE has two window types, the Shell window and the Editor window. It is
33possible to have multiple editor windows simultaneously. IDLE's
34menus dynamically change based on which window is currently selected. Each menu
35documented below indicates which window type it is associated with. Click on
36the dotted line at the top of a menu to "tear it off": a separate window
37containing the menu is created (for Unix and Windows only).
Georg Brandl8ec7f652007-08-15 14:28:01 +000038
Terry Jan Reedyeb405892014-12-04 00:55:46 -050039File menu (Shell and Editor)
40^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Georg Brandl8ec7f652007-08-15 14:28:01 +000041
Terry Jan Reedy44d8b112013-07-01 00:42:44 -040042New file
Terry Jan Reedyeb405892014-12-04 00:55:46 -050043 Create a new file editing window
Georg Brandl8ec7f652007-08-15 14:28:01 +000044
45Open...
Terry Jan Reedyeb405892014-12-04 00:55:46 -050046 Open an existing file
Georg Brandl8ec7f652007-08-15 14:28:01 +000047
48Open module...
Terry Jan Reedyeb405892014-12-04 00:55:46 -050049 Open an existing module (searches sys.path)
Georg Brandl8ec7f652007-08-15 14:28:01 +000050
Terry Jan Reedyeb405892014-12-04 00:55:46 -050051Recent Files
52 Open a list of recent files
Georg Brandl8ec7f652007-08-15 14:28:01 +000053
54.. index::
55 single: Class browser
56 single: Path browser
57
Terry Jan Reedyeb405892014-12-04 00:55:46 -050058Class browser
59 Show classes and methods in current file
60
61Path browser
62 Show sys.path directories, modules, classes and methods
63
Georg Brandl8ec7f652007-08-15 14:28:01 +000064Save
Terry Jan Reedyeb405892014-12-04 00:55:46 -050065 Save current window to the associated file (unsaved windows have a
66 \* before and after the window title)
Georg Brandl8ec7f652007-08-15 14:28:01 +000067
68Save As...
Terry Jan Reedyeb405892014-12-04 00:55:46 -050069 Save current window to new file, which becomes the associated file
Georg Brandl8ec7f652007-08-15 14:28:01 +000070
71Save Copy As...
Terry Jan Reedyeb405892014-12-04 00:55:46 -050072 Save current window to different file without changing the associated file
73
74Print Window
75 Print the current window
Georg Brandl8ec7f652007-08-15 14:28:01 +000076
77Close
Terry Jan Reedyeb405892014-12-04 00:55:46 -050078 Close current window (asks to save if unsaved)
Georg Brandl8ec7f652007-08-15 14:28:01 +000079
80Exit
Terry Jan Reedyeb405892014-12-04 00:55:46 -050081 Close all windows and quit IDLE (asks to save if unsaved)
Georg Brandl8ec7f652007-08-15 14:28:01 +000082
83
Terry Jan Reedyeb405892014-12-04 00:55:46 -050084Edit menu (Shell and Editor)
85^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Georg Brandl8ec7f652007-08-15 14:28:01 +000086
87Undo
Terry Jan Reedyeb405892014-12-04 00:55:46 -050088 Undo last change to current window (a maximum of 1000 changes may be undone)
Georg Brandl8ec7f652007-08-15 14:28:01 +000089
90Redo
91 Redo last undone change to current window
92
93Cut
Terry Jan Reedyeb405892014-12-04 00:55:46 -050094 Copy selection into system-wide clipboard; then delete the selection
Georg Brandl8ec7f652007-08-15 14:28:01 +000095
96Copy
97 Copy selection into system-wide clipboard
98
99Paste
100 Insert system-wide clipboard into window
101
102Select All
103 Select the entire contents of the edit buffer
104
105Find...
106 Open a search dialog box with many options
107
108Find again
109 Repeat last search
110
111Find selection
112 Search for the string in the selection
113
114Find in Files...
115 Open a search dialog box for searching files
116
117Replace...
118 Open a search-and-replace dialog box
119
120Go to line
121 Ask for a line number and show that line
122
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500123Expand word
124 Expand the word you have typed to match another word in the same buffer;
125 repeat to get a different expansion
126
127Show call tip
128 After an unclosed parenthesis for a function, open a small window with
129 function parameter hints
130
131Show surrounding parens
132 Highlight the surrounding parenthesis
133
134Show Completions
135 Open a scroll window allowing selection keywords and attributes. See
136 Completions below.
137
138
139Format menu (Editor window only)
140^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
141
Georg Brandl8ec7f652007-08-15 14:28:01 +0000142Indent region
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500143 Shift selected lines right by the indent width (default 4 spaces)
Georg Brandl8ec7f652007-08-15 14:28:01 +0000144
145Dedent region
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500146 Shift selected lines left by the indent width (default 4 spaces)
Georg Brandl8ec7f652007-08-15 14:28:01 +0000147
148Comment out region
149 Insert ## in front of selected lines
150
151Uncomment region
152 Remove leading # or ## from selected lines
153
154Tabify region
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500155 Turns *leading* stretches of spaces into tabs. (Note: We recommend using
156 4 space blocks to indent Python code.)
Georg Brandl8ec7f652007-08-15 14:28:01 +0000157
158Untabify region
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500159 Turn *all* tabs into the correct number of spaces
Georg Brandl8ec7f652007-08-15 14:28:01 +0000160
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500161Toggle tabs
162 Open a dialog to switch between indenting with spaces and tabs.
163
164New Indent Width
165 Open a dialog to change indent width. The accepted default by the Python
166 community is 4 spaces.
Georg Brandl8ec7f652007-08-15 14:28:01 +0000167
168Format Paragraph
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500169 Reformat the current blank-line-separated paragraph. All lines in the
170 paragraph will be formatted to less than 80 columns.
Georg Brandl8ec7f652007-08-15 14:28:01 +0000171
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500172Strip trailing whitespace
173 Removes any space characters after the end of the last non-space character
Georg Brandl8ec7f652007-08-15 14:28:01 +0000174
175.. index::
176 single: Import module
177 single: Run script
178
179
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500180Run menu (Editor window only)
181^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Georg Brandl8ec7f652007-08-15 14:28:01 +0000182
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500183Python Shell
184 Open or wake up the Python Shell window
Georg Brandl8ec7f652007-08-15 14:28:01 +0000185
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500186Check module
187 Check the syntax of the module currently open in the Editor window. If the
188 module has not been saved IDLE will prompt the user to save the code.
Georg Brandl8ec7f652007-08-15 14:28:01 +0000189
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500190Run module
191 Restart the shell to clean the environment, then execute the currently
192 open module. If the module has not been saved IDLE will prompt the user
193 to save the code.
Georg Brandl8ec7f652007-08-15 14:28:01 +0000194
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500195Shell menu (Shell window only)
196^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Ned Deilyc859bd22012-10-20 13:23:25 -0700197
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500198View Last Restart
199 Scroll the shell window to the last Shell restart
200
201Restart Shell
202 Restart the shell to clean the environment
203
204Debug menu (Shell window only)
205^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Georg Brandl8ec7f652007-08-15 14:28:01 +0000206
207Go to file/line
Ned Deilyc859bd22012-10-20 13:23:25 -0700208 Look around the insert point for a filename and line number, open the file,
209 and show the line. Useful to view the source lines referenced in an
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500210 exception traceback. Available in the context menu of the Shell window.
Georg Brandl8ec7f652007-08-15 14:28:01 +0000211
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500212Debugger (toggle)
213 This feature is not complete and considered experimental. Run commands in
214 the shell under the debugger
Georg Brandl8ec7f652007-08-15 14:28:01 +0000215
Ned Deilyc859bd22012-10-20 13:23:25 -0700216Stack viewer
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500217 Show the stack traceback of the last exception
Georg Brandl8ec7f652007-08-15 14:28:01 +0000218
Ned Deilyc859bd22012-10-20 13:23:25 -0700219Auto-open Stack Viewer
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500220 Toggle automatically opening the stack viewer on unhandled exception
Georg Brandl8ec7f652007-08-15 14:28:01 +0000221
222.. index::
223 single: stack viewer
224 single: debugger
225
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500226Options menu (Shell and Editor)
227^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Georg Brandl8ec7f652007-08-15 14:28:01 +0000228
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500229Configure IDLE
230 Open a configuration dialog. Fonts, indentation, keybindings, and color
231 themes may be altered. Startup Preferences may be set, and additional
232 help sources can be specified.
Ned Deilyc859bd22012-10-20 13:23:25 -0700233
Terry Jan Reedy9e466cf2014-12-04 01:22:41 -0500234Configure Extensions
235 Open a configuration dialog for setting preferences for extensions
236 (discussed below).
237
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500238Code Context (toggle)(Editor Window only)
239 Open a pane at the top of the edit window which shows the block context
240 of the section of code which is scrolling off the top of the window.
241
242Windows menu (Shell and Editor)
243^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
244
245Zoom Height
246 Toggles the window between normal size (40x80 initial setting) and maximum
247 height. The initial size is in the Configure IDLE dialog under the general
248 tab.
249
250The rest of this menu lists the names of all open windows; select one to bring
251it to the foreground (deiconifying it if necessary).
252
253Help menu (Shell and Editor)
254^^^^^^^^^^^^^^^^^^^^^^^^^^^^
255
256About IDLE
257 Version, copyright, license, credits
258
259IDLE Help
260 Display a help file for IDLE detailing the menu options, basic editing and
261 navigation, and other tips.
262
263Python Docs
264 Access local Python documentation, if installed. Or will start a web browser
265 and open docs.python.org showing the latest Python documentation.
266
267Additional help sources may be added here with the Configure IDLE dialog under
268the General tab.
269
270.. index::
271 single: Cut
272 single: Copy
273 single: Paste
274 single: Set Breakpoint
275 single: Clear Breakpoint
276 single: breakpoints
277
278Editor Window context menu
279^^^^^^^^^^^^^^^^^^^^^^^^^^
280
281* Right-click in Editor window (Control-click on OS X)
Ned Deilyc859bd22012-10-20 13:23:25 -0700282
Andrew Svetlov5018db72012-11-01 22:39:14 +0200283Cut
284 Copy selection into system-wide clipboard; then delete selection
285
286Copy
287 Copy selection into system-wide clipboard
288
289Paste
290 Insert system-wide clipboard into window
291
Ned Deilyc859bd22012-10-20 13:23:25 -0700292Set Breakpoint
293 Sets a breakpoint. Breakpoints are only enabled when the debugger is open.
294
295Clear Breakpoint
296 Clears the breakpoint on that line.
297
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500298Shell Window context menu
299^^^^^^^^^^^^^^^^^^^^^^^^^
Ned Deilyc859bd22012-10-20 13:23:25 -0700300
301* Right-click in Python Shell window (Control-click on OS X)
302
Andrew Svetlov5018db72012-11-01 22:39:14 +0200303Cut
304 Copy selection into system-wide clipboard; then delete selection
305
306Copy
307 Copy selection into system-wide clipboard
308
309Paste
310 Insert system-wide clipboard into window
311
Ned Deilyc859bd22012-10-20 13:23:25 -0700312Go to file/line
313 Same as in Debug menu.
314
315
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500316Editing and navigation
317----------------------
318
319In this section, 'C' refers to the Control key on Windows and Unix and
320the Command key on Mac OSX.
Georg Brandl8ec7f652007-08-15 14:28:01 +0000321
322* :kbd:`Backspace` deletes to the left; :kbd:`Del` deletes to the right
323
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500324* :kbd:`C-Backspace` delete word left; :kbd:`C-Del` delete word to the right
325
Georg Brandl8ec7f652007-08-15 14:28:01 +0000326* Arrow keys and :kbd:`Page Up`/:kbd:`Page Down` to move around
327
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500328* :kbd:`C-LeftArrow` and :kbd:`C-RightArrow` moves by words
329
Georg Brandl8ec7f652007-08-15 14:28:01 +0000330* :kbd:`Home`/:kbd:`End` go to begin/end of line
331
332* :kbd:`C-Home`/:kbd:`C-End` go to begin/end of file
333
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500334* Some useful Emacs bindings are inherited from Tcl/Tk:
335
336 * :kbd:`C-a` beginning of line
337
338 * :kbd:`C-e` end of line
339
340 * :kbd:`C-k` kill line (but doesn't put it in clipboard)
341
342 * :kbd:`C-l` center window around the insertion point
343
344 * :kbd:`C-b` go backwards one character without deleting (usually you can
345 also use the cursor key for this)
346
347 * :kbd:`C-f` go forward one character without deleting (usually you can
348 also use the cursor key for this)
349
350 * :kbd:`C-p` go up one line (usually you can also use the cursor key for
351 this)
352
353 * :kbd:`C-d` delete next character
354
355Standard keybindings (like :kbd:`C-c` to copy and :kbd:`C-v` to paste)
356may work. Keybindings are selected in the Configure IDLE dialog.
Georg Brandl8ec7f652007-08-15 14:28:01 +0000357
358
359Automatic indentation
360^^^^^^^^^^^^^^^^^^^^^
361
362After a block-opening statement, the next line is indented by 4 spaces (in the
363Python Shell window by one tab). After certain keywords (break, return etc.)
364the next line is dedented. In leading indentation, :kbd:`Backspace` deletes up
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500365to 4 spaces if they are there. :kbd:`Tab` inserts spaces (in the Python
366Shell window one tab), number depends on Indent width. Currently tabs
367are restricted to four spaces due to Tcl/Tk limitations.
Georg Brandl8ec7f652007-08-15 14:28:01 +0000368
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500369See also the indent/dedent region commands in the edit menu.
370
371Completions
372^^^^^^^^^^^
373
374Completions are supplied for functions, classes, and attributes of classes,
375both built-in and user-defined. Completions are also provided for
376filenames.
377
378The AutoCompleteWindow (ACW) will open after a predefined delay (default is
379two seconds) after a '.' or (in a string) an os.sep is typed. If after one
380of those characters (plus zero or more other characters) a tab is typed
381the ACW will open immediately if a possible continuation is found.
382
383If there is only one possible completion for the characters entered, a
384:kbd:`Tab` will supply that completion without opening the ACW.
385
386'Show Completions' will force open a completions window, by default the
387:kbd:`C-space` will open a completions window. In an empty
388string, this will contain the files in the current directory. On a
389blank line, it will contain the built-in and user-defined functions and
390classes in the current name spaces, plus any modules imported. If some
391characters have been entered, the ACW will attempt to be more specific.
392
393If a string of characters is typed, the ACW selection will jump to the
394entry most closely matching those characters. Entering a :kbd:`tab` will
395cause the longest non-ambiguous match to be entered in the Editor window or
396Shell. Two :kbd:`tab` in a row will supply the current ACW selection, as
397will return or a double click. Cursor keys, Page Up/Down, mouse selection,
398and the scroll wheel all operate on the ACW.
399
400"Hidden" attributes can be accessed by typing the beginning of hidden
401name after a '.', e.g. '_'. This allows access to modules with
402``__all__`` set, or to class-private attributes.
403
404Completions and the 'Expand Word' facility can save a lot of typing!
405
406Completions are currently limited to those in the namespaces. Names in
407an Editor window which are not via ``__main__`` and :data:`sys.modules` will
408not be found. Run the module once with your imports to correct this situation.
409Note that IDLE itself places quite a few modules in sys.modules, so
410much can be found by default, e.g. the re module.
411
412If you don't like the ACW popping up unbidden, simply make the delay
413longer or disable the extension. Or another option is the delay could
414be set to zero. Another alternative to preventing ACW popups is to
415disable the call tips extension.
Georg Brandl8ec7f652007-08-15 14:28:01 +0000416
417Python Shell window
418^^^^^^^^^^^^^^^^^^^
419
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500420* :kbd:`C-c` interrupts executing command
Georg Brandl8ec7f652007-08-15 14:28:01 +0000421
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500422* :kbd:`C-d` sends end-of-file; closes window if typed at a ``>>>`` prompt
Georg Brandl8ec7f652007-08-15 14:28:01 +0000423
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500424* :kbd:`Alt-/` (Expand word) is also useful to reduce typing
Georg Brandl8ec7f652007-08-15 14:28:01 +0000425
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500426 Command history
Georg Brandl8ec7f652007-08-15 14:28:01 +0000427
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500428 * :kbd:`Alt-p` retrieves previous command matching what you have typed. On
429 OS X use :kbd:`C-p`.
Georg Brandl8ec7f652007-08-15 14:28:01 +0000430
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500431 * :kbd:`Alt-n` retrieves next. On OS X use :kbd:`C-n`.
Georg Brandl8ec7f652007-08-15 14:28:01 +0000432
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500433 * :kbd:`Return` while on any previous command retrieves that command
Georg Brandl8ec7f652007-08-15 14:28:01 +0000434
435
436Syntax colors
437-------------
438
439The coloring is applied in a background "thread," so you may occasionally see
440uncolorized text. To change the color scheme, edit the ``[Colors]`` section in
441:file:`config.txt`.
442
443Python syntax colors:
444 Keywords
445 orange
446
Georg Brandlc62ef8b2009-01-03 20:55:06 +0000447 Strings
Georg Brandl8ec7f652007-08-15 14:28:01 +0000448 green
449
450 Comments
451 red
452
453 Definitions
454 blue
455
456Shell colors:
457 Console output
458 brown
459
460 stdout
461 blue
462
463 stderr
464 dark green
465
466 stdin
467 black
468
469
Georg Brandl09827eb2009-03-15 21:51:48 +0000470Startup
471-------
472
473Upon startup with the ``-s`` option, IDLE will execute the file referenced by
474the environment variables :envvar:`IDLESTARTUP` or :envvar:`PYTHONSTARTUP`.
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500475IDLE first checks for ``IDLESTARTUP``; if ``IDLESTARTUP`` is present the file
476referenced is run. If ``IDLESTARTUP`` is not present, IDLE checks for
Georg Brandl09827eb2009-03-15 21:51:48 +0000477``PYTHONSTARTUP``. Files referenced by these environment variables are
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500478convenient places to store functions that are used frequently from the IDLE
Georg Brandl09827eb2009-03-15 21:51:48 +0000479shell, or for executing import statements to import common modules.
480
481In addition, ``Tk`` also loads a startup file if it is present. Note that the
482Tk file is loaded unconditionally. This additional file is ``.Idle.py`` and is
483looked for in the user's home directory. Statements in this file will be
484executed in the Tk namespace, so this file is not useful for importing functions
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500485to be used from IDLE's Python shell.
Georg Brandl09827eb2009-03-15 21:51:48 +0000486
487
Georg Brandl8ec7f652007-08-15 14:28:01 +0000488Command line usage
489^^^^^^^^^^^^^^^^^^
490
491::
492
493 idle.py [-c command] [-d] [-e] [-s] [-t title] [arg] ...
494
495 -c command run this command
496 -d enable debugger
497 -e edit mode; arguments are files to be edited
498 -s run $IDLESTARTUP or $PYTHONSTARTUP first
499 -t title set title of shell window
500
501If there are arguments:
502
Éric Araujoa8132ec2010-12-16 03:53:53 +0000503#. If ``-e`` is used, arguments are files opened for editing and
Georg Brandl8ec7f652007-08-15 14:28:01 +0000504 ``sys.argv`` reflects the arguments passed to IDLE itself.
505
Éric Araujoa8132ec2010-12-16 03:53:53 +0000506#. Otherwise, if ``-c`` is used, all arguments are placed in
Georg Brandl8ec7f652007-08-15 14:28:01 +0000507 ``sys.argv[1:...]``, with ``sys.argv[0]`` set to ``'-c'``.
508
Éric Araujoa8132ec2010-12-16 03:53:53 +0000509#. Otherwise, if neither ``-e`` nor ``-c`` is used, the first
Georg Brandl8ec7f652007-08-15 14:28:01 +0000510 argument is a script which is executed with the remaining arguments in
511 ``sys.argv[1:...]`` and ``sys.argv[0]`` set to the script name. If the script
512 name is '-', no script is executed but an interactive Python session is started;
513 the arguments are still available in ``sys.argv``.
514
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500515Running without a subprocess
516^^^^^^^^^^^^^^^^^^^^^^^^^^^^
517
518If IDLE is started with the -n command line switch it will run in a
519single process and will not create the subprocess which runs the RPC
520Python execution server. This can be useful if Python cannot create
521the subprocess or the RPC socket interface on your platform. However,
522in this mode user code is not isolated from IDLE itself. Also, the
523environment is not restarted when Run/Run Module (F5) is selected. If
524your code has been modified, you must reload() the affected modules and
525re-import any specific items (e.g. from foo import baz) if the changes
526are to take effect. For these reasons, it is preferable to run IDLE
527with the default subprocess if at all possible.
528
529.. deprecated:: 3.4
530
531
Terry Jan Reedy9e466cf2014-12-04 01:22:41 -0500532Help and preferences
533--------------------
534
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500535Additional help sources
Terry Jan Reedy9e466cf2014-12-04 01:22:41 -0500536^^^^^^^^^^^^^^^^^^^^^^^
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500537
538IDLE includes a help menu entry called "Python Docs" that will open the
539extensive sources of help, including tutorials, available at docs.python.org.
540Selected URLs can be added or removed from the help menu at any time using the
541Configure IDLE dialog. See the IDLE help option in the help menu of IDLE for
542more information.
543
544
Terry Jan Reedy9e466cf2014-12-04 01:22:41 -0500545Setting preferences
546^^^^^^^^^^^^^^^^^^^
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500547
548The font preferences, highlighting, keys, and general preferences can be
Terry Jan Reedy9e466cf2014-12-04 01:22:41 -0500549changed via Configure IDLE on the Option menu. Keys can be user defined;
550IDLE ships with four built in key sets. In addition a user can create a
551custom key set in the Configure IDLE dialog under the keys tab.
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500552
553
554Extensions
Terry Jan Reedy9e466cf2014-12-04 01:22:41 -0500555^^^^^^^^^^
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500556
Terry Jan Reedy9e466cf2014-12-04 01:22:41 -0500557IDLE contains an extension facility. Peferences for extensions can be
558changed with Configure Extensions. See the beginning of config-extensions.def
559in the idlelib directory for further information. The default extensions
560are currently:
Terry Jan Reedyeb405892014-12-04 00:55:46 -0500561
562* FormatParagraph
563
564* AutoExpand
565
566* ZoomHeight
567
568* ScriptBinding
569
570* CallTips
571
572* ParenMatch
573
574* AutoComplete
575
576* CodeContext
Georg Brandl8ec7f652007-08-15 14:28:01 +0000577
Terry Jan Reedy9e466cf2014-12-04 01:22:41 -0500578* RstripExtension