<h2>24.6.4. Startup and code execution<aclass="headerlink"href="#startup-and-code-execution"title="Permalink to this headline">¶</a></h2>
<p>Upon startup with the <ttclass="docutils literal"><spanclass="pre">-s</span></tt> option, IDLE will execute the file referenced by
the environment variables <spanclass="target"id="index-5"></span><ttclass="xref std std-envvar docutils literal"><spanclass="pre">IDLESTARTUP</span></tt> or <spanclass="target"id="index-6"></span><aclass="reference internal"href="../using/cmdline.html#envvar-PYTHONSTARTUP"><ttclass="xref std std-envvar docutils literal"><spanclass="pre">PYTHONSTARTUP</span></tt></a>.
IDLE first checks for <ttclass="docutils literal"><spanclass="pre">IDLESTARTUP</span></tt>; if <ttclass="docutils literal"><spanclass="pre">IDLESTARTUP</span></tt> is present the file
...
...
@@ -511,9 +511,23 @@ set in the Options dialog.</li>
<ttclass="docutils literal"><spanclass="pre">sys.argv</span></tt> reflects the arguments passed to IDLE itself.</li>
</ul>
</div>
<divclass="section"id="idle-console-differences">
<h3>24.6.4.2. IDLE-console differences<aclass="headerlink"href="#idle-console-differences"title="Permalink to this headline">¶</a></h3>
<p>As much as possible, the result of executing Python code with IDLE is the
same as executing the same code in a console window. However, the different
interface and operation occasionally affects results.</p>
<p>For instance, IDLE normally executes user code in a separate process from
the IDLE GUI itself. The IDLE versions of sys.stdin, .stdout, and .stderr in the
execution process get input from and send output to the GUI process,
which keeps control of the keyboard and screen. This is normally transparent,
but code that access these object will see different attribute values.
Also, functions that directly access the keyboard and screen will not work.</p>
<p>With IDLE’s Shell, one enters, edits, and recalls complete statements.
Some consoles only work with a single physical line at a time.</p>