<li>coded in 100% pure Python, using the <aclass="reference internal"href="tkinter.html#module-tkinter"title="tkinter: Interface to Tcl/Tk for graphical user interfaces"><ttclass="xref py py-mod docutils literal"><spanclass="pre">tkinter</span></tt></a> GUI toolkit</li>
<li>cross-platform: works on Windows, Unix, and Mac OS X</li>
<li>cross-platform: works mostly the same on Windows, Unix, and Mac OS X</li>
<li>Python shell window (interactive interpreter) with colorizing
of code input, output, and error messages</li>
<li>multi-window text editor with multiple undo, Python colorizing,
...
...
@@ -223,7 +223,12 @@ there is a syntax error, the approximate location is indicated in the
Editor window.</dd>
<dt>Run Module</dt>
<dd>Do Check Module (above). If no error, restart the shell to clean the
environment, then execute the module.</dd>
environment, then execute the module. Output is displayed in the Shell
window. Note that output requires use of <ttclass="docutils literal"><spanclass="pre">print</span></tt> or <ttclass="docutils literal"><spanclass="pre">write</span></tt>.
When execution is complete, the Shell retains focus and displays a prompt.
At this point, one may interactively explore the result of execution.
This is similar to executing a file with <ttclass="docutils literal"><spanclass="pre">python</span><spanclass="pre">-i</span><spanclass="pre">file</span></tt> at a command
<h2>25.5.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
...
...
@@ -506,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>25.5.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>