You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<h3>25.5.2.3. Calltips<aclass="headerlink" href="#calltips" title="Permalink to this headline">¶</a></h3>
443
-
<p>A calltip is shown when one types <codeclass="kbd docutils literal"><spanclass="pre">(</span></code> after the name of an <em>acccessible</em>
446
+
<p>A calltip is shown when one types <codeclass="kbd docutils literal"><spanclass="pre">(</span></code> after the name of an <em>accessible</em>
444
447
function. A name expression may include dots and subscripts. A calltip
445
448
remains until it is clicked, the cursor is moved out of the argument area,
446
449
or <codeclass="kbd docutils literal"><spanclass="pre">)</span></code> is typed. When the cursor is in the argument part of a definition,
@@ -532,11 +535,47 @@ <h3>25.5.3.1. Command line usage<a class="headerlink" href="#command-line-usage"
532
535
<codeclass="docutils literal"><spanclass="pre">sys.argv</span></code> reflects the arguments passed to IDLE itself.</li>
533
536
</ul>
534
537
</div>
538
+
<divclass="section" id="startup-failure">
539
+
<h3>25.5.3.2. Startup failure<aclass="headerlink" href="#startup-failure" title="Permalink to this headline">¶</a></h3>
540
+
<p>IDLE uses a socket to communicate between the IDLE GUI process and the user
541
+
code execution process. A connection must be established whenever the Shell
542
+
starts or restarts. (The latter is indicated by a divider line that says
543
+
‘RESTART’). If the user process fails to connect to the GUI process, it
544
+
displays a <codeclass="docutils literal"><spanclass="pre">Tk</span></code> error box with a ‘cannot connect’ message that directs the
545
+
user here. It then exits.</p>
546
+
<p>A common cause of failure is a user-written file with the same name as a
547
+
standard library module, such as <em>random.py</em> and <em>tkinter.py</em>. When such a
548
+
file is located in the same directory as a file that is about to be run,
549
+
IDLE cannot import the stdlib file. The current fix is to rename the
550
+
user file.</p>
551
+
<p>Though less common than in the past, an antivirus or firewall program may
552
+
stop the connection. If the program cannot be taught to allow the
553
+
connection, then it must be turned off for IDLE to work. It is safe to
554
+
allow this internal connection because no data is visible on external
555
+
ports. A similar problem is a network mis-configuration that blocks
556
+
connections.</p>
557
+
<p>Python installation issues occasionally stop IDLE: multiple versions can
558
+
clash, or a single installation might need admin access. If one undo the
559
+
clash, or cannot or does not want to run as admin, it might be easiest to
560
+
completely remove Python and start over.</p>
561
+
<p>A zombie pythonw.exe process could be a problem. On Windows, use Task
562
+
Manager to detect and stop one. Sometimes a restart initiated by a program
563
+
crash or Keyboard Interrupt (control-C) may fail to connect. Dismissing
564
+
the error box or Restart Shell on the Shell menu may fix a temporary problem.</p>
565
+
<p>When IDLE first starts, it attempts to read user configuration files in
566
+
~/.idlerc/ (~ is one’s home directory). If there is a problem, an error
567
+
message should be displayed. Leaving aside random disk glitches, this can
568
+
be prevented by never editing the files by hand, using the configuration
569
+
dialog, under Options, instead Options. Once it happens, the solution may
570
+
be to delete one or more of the configuration files.</p>
571
+
<p>If IDLE quits with no message, and it was not started from a console, try
572
+
starting from a console (<codeclass="docutils literal"><spanclass="pre">python</span><spanclass="pre">-m</span><spanclass="pre">idlelib)</span></code> and see if a message appears.</p>
<h3>25.5.3.2. IDLE-console differences<aclass="headerlink" href="#idle-console-differences" title="Permalink to this headline">¶</a></h3>
575
+
<h3>25.5.3.3. IDLE-console differences<aclass="headerlink" href="#idle-console-differences" title="Permalink to this headline">¶</a></h3>
537
576
<p>As much as possible, the result of executing Python code with IDLE is the
538
577
same as executing the same code in a console window. However, the different
539
-
interface and operation occasionally affects visible results. For instance,
578
+
interface and operation occasionally affect visible results. For instance,
540
579
<codeclass="docutils literal"><spanclass="pre">sys.modules</span></code> starts with more entries.</p>
541
580
<p>IDLE also replaces <codeclass="docutils literal"><spanclass="pre">sys.stdin</span></code>, <codeclass="docutils literal"><spanclass="pre">sys.stdout</span></code>, and <codeclass="docutils literal"><spanclass="pre">sys.stderr</span></code> with
542
581
objects that get input from and send output to the Shell window.
0 commit comments