On this page
idlelib
Prev: http | Up: stdlib_module | Next: imaplib
Rel: wave, colorsys, gettext, locale, turtle
Ref: docs.python.org — idlelib
Tags: #public #python3 #stdlib
Import
import idlelib
Overview
Implementation package for IDLE, Python's bundled Tkinter-based IDE (python3 -m idlelib). idlelib is an application package rather than a general-purpose library—launch it from the CLI rather than importing its internal modules in production code.
Quick Start
import idlelib
# Verify idlelib is installed; launch the IDE from a terminal with:
# python3 -m idlelib
assert hasattr(idlelib, "__file__")
Implementation Walkthrough
1. Launching IDLE on a Specific File
From the command line:
python3 -m idlelibopens the interactive IDLE shell.python3 -m idlelib script.pyopensscript.pydirectly in the IDLE editor window.
Gotchas & Boundaries
- Private internal API: Submodules inside
idlelibhave no backwards-compatibility guarantee across Python versions. - Requires tkinter: Headless Linux/container builds without Tcl/Tk cannot launch IDLE.
Linked from
Related notes
- tuts/python3/stdlib_module/http Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/imaplib Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/stdlib_module Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/colorsys Linked here; shared tags: #stdlib
- tuts/python3/stdlib_module/gettext Linked here; shared tags: #stdlib
- tuts/python3/stdlib_module/locale Linked here; shared tags: #stdlib
- tuts/python3/stdlib_module/tkinter Linked here; shared tags: #stdlib
- tuts/python3/stdlib_module/turtle Linked here; shared tags: #stdlib
- tuts/python3/stdlib_module/wave Linked here; shared tags: #stdlib