@@ -439,41 +439,22 @@ <h3>25.5.2.3. Python Shell window<a class="headerlink" href="#python-shell-windo
439439</ li >
440440</ ul >
441441</ div >
442+ < div class ="section " id ="text-colors ">
443+ < h3 > 25.5.2.4. Text colors< a class ="headerlink " href ="#text-colors " title ="Permalink to this headline "> ¶</ a > </ h3 >
444+ < p > Idle defaults to black on white text, but colors text with special meanings.
445+ For the shell, these are shell output, shell error, user output, and
446+ user error. For Python code, at the shell prompt or in an editor, these are
447+ keywords, builtin class and function names, names following < tt class ="docutils literal "> < span class ="pre "> class</ span > </ tt > and
448+ < tt class ="docutils literal "> < span class ="pre "> def</ span > </ tt > , strings, and comments. For any text window, these are the cursor (when
449+ present), found text (when possible), and selected text.</ p >
450+ < p > Text coloring is done in the background, so uncolorized text is occasionally
451+ visible. To change the color scheme, use the Configure IDLE dialog
452+ Highlighting tab. The marking of debugger breakpoint lines in the editor and
453+ text in popups and dialogs is not user-configurable.</ p >
442454</ div >
443- < div class ="section " id ="syntax-colors ">
444- < h2 > 25.5.3. Syntax colors< a class ="headerlink " href ="#syntax-colors " title ="Permalink to this headline "> ¶</ a > </ h2 >
445- < p > The coloring is applied in a background “thread,” so you may occasionally see
446- uncolorized text. To change the color scheme, edit the < tt class ="docutils literal "> < span class ="pre "> [Colors]</ span > </ tt > section in
447- < tt class ="file docutils literal "> < span class ="pre "> config.txt</ span > </ tt > .</ p >
448- < dl class ="docutils ">
449- < dt > Python syntax colors:</ dt >
450- < dd > < dl class ="first last docutils ">
451- < dt > Keywords</ dt >
452- < dd > orange</ dd >
453- < dt > Strings</ dt >
454- < dd > green</ dd >
455- < dt > Comments</ dt >
456- < dd > red</ dd >
457- < dt > Definitions</ dt >
458- < dd > blue</ dd >
459- </ dl >
460- </ dd >
461- < dt > Shell colors:</ dt >
462- < dd > < dl class ="first last docutils ">
463- < dt > Console output</ dt >
464- < dd > brown</ dd >
465- < dt > stdout</ dt >
466- < dd > blue</ dd >
467- < dt > stderr</ dt >
468- < dd > dark green</ dd >
469- < dt > stdin</ dt >
470- < dd > black</ dd >
471- </ dl >
472- </ dd >
473- </ dl >
474455</ div >
475456< div class ="section " id ="startup-and-code-execution ">
476- < h2 > 25.5.4 . Startup and code execution< a class ="headerlink " href ="#startup-and-code-execution " title ="Permalink to this headline "> ¶</ a > </ h2 >
457+ < h2 > 25.5.3 . Startup and code execution< a class ="headerlink " href ="#startup-and-code-execution " title ="Permalink to this headline "> ¶</ a > </ h2 >
477458< p > Upon startup with the < tt class ="docutils literal "> < span class ="pre "> -s</ span > </ tt > option, IDLE will execute the file referenced by
478459the environment variables < span class ="target " id ="index-5 "> </ span > < tt class ="xref std std-envvar docutils literal "> < span class ="pre "> IDLESTARTUP</ span > </ tt > or < span class ="target " id ="index-6 "> </ span > < a class ="reference internal " href ="../using/cmdline.html#envvar-PYTHONSTARTUP "> < tt class ="xref std std-envvar docutils literal "> < span class ="pre "> PYTHONSTARTUP</ span > </ tt > </ a > .
479460IDLE first checks for < tt class ="docutils literal "> < span class ="pre "> IDLESTARTUP</ span > </ tt > ; if < tt class ="docutils literal "> < span class ="pre "> IDLESTARTUP</ span > </ tt > is present the file
@@ -487,7 +468,7 @@ <h2>25.5.4. Startup and code execution<a class="headerlink" href="#startup-and-c
487468executed in the Tk namespace, so this file is not useful for importing
488469functions to be used from IDLE’s Python shell.</ p >
489470< div class ="section " id ="command-line-usage ">
490- < h3 > 25.5.4 .1. Command line usage< a class ="headerlink " href ="#command-line-usage " title ="Permalink to this headline "> ¶</ a > </ h3 >
471+ < h3 > 25.5.3 .1. Command line usage< a class ="headerlink " href ="#command-line-usage " title ="Permalink to this headline "> ¶</ a > </ h3 >
491472< div class ="highlight-python3 "> < div class ="highlight "> < pre > idle.py [-c command] [-d] [-e] [-h] [-i] [-r file] [-s] [-t title] [-] [arg] ...
492473
493474-c command run command in the shell window
@@ -512,7 +493,7 @@ <h3>25.5.4.1. Command line usage<a class="headerlink" href="#command-line-usage"
512493</ ul >
513494</ div >
514495< div class ="section " id ="idle-console-differences ">
515- < h3 > 25.5.4 .2. IDLE-console differences< a class ="headerlink " href ="#idle-console-differences " title ="Permalink to this headline "> ¶</ a > </ h3 >
496+ < h3 > 25.5.3 .2. IDLE-console differences< a class ="headerlink " href ="#idle-console-differences " title ="Permalink to this headline "> ¶</ a > </ h3 >
516497< p > As much as possible, the result of executing Python code with IDLE is the
517498same as executing the same code in a console window. However, the different
518499interface and operation occasionally affects results.</ p >
@@ -526,7 +507,7 @@ <h3>25.5.4.2. IDLE-console differences<a class="headerlink" href="#idle-console-
526507Some consoles only work with a single physical line at a time.</ p >
527508</ div >
528509< div class ="section " id ="running-without-a-subprocess ">
529- < h3 > 25.5.4 .3. Running without a subprocess< a class ="headerlink " href ="#running-without-a-subprocess " title ="Permalink to this headline "> ¶</ a > </ h3 >
510+ < h3 > 25.5.3 .3. Running without a subprocess< a class ="headerlink " href ="#running-without-a-subprocess " title ="Permalink to this headline "> ¶</ a > </ h3 >
530511< p > By default, IDLE executes user code in a separate subprocess via a socket,
531512which uses the internal loopback interface. This connection is not
532513externally visible and no data is sent to or received from the Internet.
@@ -552,24 +533,24 @@ <h3>25.5.4.3. Running without a subprocess<a class="headerlink" href="#running-w
552533</ div >
553534</ div >
554535< div class ="section " id ="help-and-preferences ">
555- < h2 > 25.5.5 . Help and preferences< a class ="headerlink " href ="#help-and-preferences " title ="Permalink to this headline "> ¶</ a > </ h2 >
536+ < h2 > 25.5.4 . Help and preferences< a class ="headerlink " href ="#help-and-preferences " title ="Permalink to this headline "> ¶</ a > </ h2 >
556537< div class ="section " id ="additional-help-sources ">
557- < h3 > 25.5.5 .1. Additional help sources< a class ="headerlink " href ="#additional-help-sources " title ="Permalink to this headline "> ¶</ a > </ h3 >
538+ < h3 > 25.5.4 .1. Additional help sources< a class ="headerlink " href ="#additional-help-sources " title ="Permalink to this headline "> ¶</ a > </ h3 >
558539< p > IDLE includes a help menu entry called “Python Docs” that will open the
559540extensive sources of help, including tutorials, available at docs.python.org.
560541Selected URLs can be added or removed from the help menu at any time using the
561542Configure IDLE dialog. See the IDLE help option in the help menu of IDLE for
562543more information.</ p >
563544</ div >
564545< div class ="section " id ="setting-preferences ">
565- < h3 > 25.5.5 .2. Setting preferences< a class ="headerlink " href ="#setting-preferences " title ="Permalink to this headline "> ¶</ a > </ h3 >
546+ < h3 > 25.5.4 .2. Setting preferences< a class ="headerlink " href ="#setting-preferences " title ="Permalink to this headline "> ¶</ a > </ h3 >
566547< p > The font preferences, highlighting, keys, and general preferences can be
567548changed via Configure IDLE on the Option menu. Keys can be user defined;
568549IDLE ships with four built in key sets. In addition a user can create a
569550custom key set in the Configure IDLE dialog under the keys tab.</ p >
570551</ div >
571552< div class ="section " id ="extensions ">
572- < h3 > 25.5.5 .3. Extensions< a class ="headerlink " href ="#extensions " title ="Permalink to this headline "> ¶</ a > </ h3 >
553+ < h3 > 25.5.4 .3. Extensions< a class ="headerlink " href ="#extensions " title ="Permalink to this headline "> ¶</ a > </ h3 >
573554< p > IDLE contains an extension facility. Peferences for extensions can be
574555changed with Configure Extensions. See the beginning of config-extensions.def
575556in the idlelib directory for further information. The default extensions
@@ -615,19 +596,19 @@ <h3><a href="../contents.html">Table Of Contents</a></h3>
615596< li > < a class ="reference internal " href ="#automatic-indentation "> 25.5.2.1. Automatic indentation</ a > </ li >
616597< li > < a class ="reference internal " href ="#completions "> 25.5.2.2. Completions</ a > </ li >
617598< li > < a class ="reference internal " href ="#python-shell-window "> 25.5.2.3. Python Shell window</ a > </ li >
599+ < li > < a class ="reference internal " href ="#text-colors "> 25.5.2.4. Text colors</ a > </ li >
618600</ ul >
619601</ li >
620- < li > < a class ="reference internal " href ="#syntax-colors "> 25.5.3. Syntax colors</ a > </ li >
621- < li > < a class ="reference internal " href ="#startup-and-code-execution "> 25.5.4. Startup and code execution</ a > < ul >
622- < li > < a class ="reference internal " href ="#command-line-usage "> 25.5.4.1. Command line usage</ a > </ li >
623- < li > < a class ="reference internal " href ="#idle-console-differences "> 25.5.4.2. IDLE-console differences</ a > </ li >
624- < li > < a class ="reference internal " href ="#running-without-a-subprocess "> 25.5.4.3. Running without a subprocess</ a > </ li >
602+ < li > < a class ="reference internal " href ="#startup-and-code-execution "> 25.5.3. Startup and code execution</ a > < ul >
603+ < li > < a class ="reference internal " href ="#command-line-usage "> 25.5.3.1. Command line usage</ a > </ li >
604+ < li > < a class ="reference internal " href ="#idle-console-differences "> 25.5.3.2. IDLE-console differences</ a > </ li >
605+ < li > < a class ="reference internal " href ="#running-without-a-subprocess "> 25.5.3.3. Running without a subprocess</ a > </ li >
625606</ ul >
626607</ li >
627- < li > < a class ="reference internal " href ="#help-and-preferences "> 25.5.5 . Help and preferences</ a > < ul >
628- < li > < a class ="reference internal " href ="#additional-help-sources "> 25.5.5 .1. Additional help sources</ a > </ li >
629- < li > < a class ="reference internal " href ="#setting-preferences "> 25.5.5 .2. Setting preferences</ a > </ li >
630- < li > < a class ="reference internal " href ="#extensions "> 25.5.5 .3. Extensions</ a > </ li >
608+ < li > < a class ="reference internal " href ="#help-and-preferences "> 25.5.4 . Help and preferences</ a > < ul >
609+ < li > < a class ="reference internal " href ="#additional-help-sources "> 25.5.4 .1. Additional help sources</ a > </ li >
610+ < li > < a class ="reference internal " href ="#setting-preferences "> 25.5.4 .2. Setting preferences</ a > </ li >
611+ < li > < a class ="reference internal " href ="#extensions "> 25.5.4 .3. Extensions</ a > </ li >
631612</ ul >
632613</ li >
633614</ ul >
0 commit comments