IDLE¶
+IDLE¶
Source code: Lib/idlelib/
IDLE is Python’s Integrated Development and Learning Environment.
@@ -119,8 +218,8 @@ through multiple files (grep) of global and local namespacesconfiguration, browsers, and other dialogs
Startup and code execution¶
+ + +Startup and Code Execution¶
Upon startup with the Otherwise, arguments are files opened for editing and
IDLE uses a socket to communicate between the IDLE GUI process and the user
code execution process. A connection must be established whenever the Shell
starts or restarts. (The latter is indicated by a divider line that says
@@ -684,9 +794,9 @@ a tk failure with a message to the terminal. This can happen either
if one starts IDLE to edit a file with such a character or later
when entering such a character. If one cannot upgrade tcl/tk,
then re-configure IDLE to use a font that works better. With rare exceptions, the result of executing Python code with IDLE is
intended to be the same as executing the same code by the default method,
directly with Python in a text-mode system console or terminal window.
@@ -726,9 +836,9 @@ that would not be there otherwise. IDLE wraps When a program outputs text, the result is determined by the
corresponding output device. When IDLE executes user code, Squeezed output is expanded in place by double-clicking the label.
It can also be sent to the clipboard or a separate view window by
right-clicking the label. IDLE is intentionally different from standard Python in order to
facilitate development of tkinter programs. Enter By default, IDLE executes user code in a separate subprocess via a socket,
which uses the internal loopback interface. This connection is not
externally visible and no data is sent to or received from the internet.
@@ -825,12 +935,12 @@ with the default subprocess if at all possible. Deprecated since version 3.4. Help menu entry “IDLE Help” displays a formatted html version of the
IDLE chapter of the Library Reference. The result, in a read-only
tkinter text window, is close to what one sees in a web browser.
@@ -845,9 +955,9 @@ has an off-line copy of the docs (this may be an installation option),
that will be opened instead. Selected URLs can be added or removed from the help menu at any time using the
General tab of the Configure IDLE dialog. The font preferences, highlighting, keys, and general preferences can be
changed via Configure IDLE on the Option menu.
Non-default user settings are saved in a Under System Preferences: Dock, one can set “Prefer tabs when opening
documents” to “Always”. This setting is not compatible with the tk/tkinter
GUI framework used by IDLE, and it breaks a few IDLE features. IDLE contains an extension facility. Preferences for extensions can be
changed with the Extensions tab of the preferences dialog. See the
beginning of config-extensions.def in the idlelib directory for further
information. The only current default extension is zzdummy, an example
also used for testing.-s option, IDLE will execute the file referenced by
the environment variables IDLESTARTUP or PYTHONSTARTUP.
IDLE first checks for IDLESTARTUP; if IDLESTARTUP is present the file
@@ -608,8 +718,8 @@ Tk file is loaded unconditionally. This additional file is
-Command line usage¶
+Command line usage¶
idle.py [-c command] [-d] [-e] [-h] [-i] [-r file] [-s] [-t title] [-] [arg] ...
-c command run command in the shell window
@@ -632,9 +742,9 @@ set in the Options dialog.
sys.argv reflects the arguments passed to IDLE itself.Startup failure¶
+
+Startup failure¶
Running user code¶
+
+Running user code¶
-User output in Shell¶
+User output in Shell¶
sys.stdout
and sys.stderr are connected to the display area of IDLE’s Shell. Some of
@@ -780,9 +890,9 @@ down scrolling.Developing tkinter applications¶
+
+Developing tkinter applications¶
import tkinter as tk;
root = tk.Tk() in standard Python and nothing appears. Enter the same
@@ -800,9 +910,9 @@ to interact with.Running without a subprocess¶
+
+Running without a subprocess¶
Help and preferences¶
-Help sources¶
+
+
+Help and Preferences¶
+Help sources¶
Setting preferences¶
+
+Setting preferences¶
.idlerc directory in the user’s
@@ -863,23 +973,23 @@ and then font.IDLE on macOS¶
+
+IDLE on macOS¶
Extensions¶
+
+Extensions¶
