IDLE(1)

πŸ¦‹ IDLE(1) πŸ¦‹

okay so hi bestie πŸ’– this is the IDLE(1) page, straight outta the General Commands Manual β€” and yes, we're doing the whole thing, every flag, every example, no skips, no cap.


✨ NAME ✨

IDLE β€” An Integrated DeveLopment Environment for Python πŸ‘‘

(that's the actual capitalisation in the name, IDLE, the "D" and "L" are just... doing their own thing, we love a stylistic choice πŸ’…)


🌸 SYNTAX 🌸

Three whole ways to summon it, here they are, verbatim:

idle [ -dins ] [ -t title ] [ file ...]

idle [ -dins ] [ -t title ] ( -c cmd | -r file ) [ arg ...]

idle [ -dins ] [ -t title ] - [ arg ...]

πŸŽ€ DESCRIPTION πŸŽ€

So this manual page is a lil brief rundown of the idle command, okay? And plot twist: it was written for Debian, because the original program literally does not ship a manual page. Not one. So if you want the real deep lore, go check IDLE's own help menu 🫢

Now, the vibe: IDLE is an Integrated DeveLopment Environment for Python. It's built on Tkinter, which is Python's bindings to the Tk widget set. And the features? All 100% pure Python, bestie. We're talking multi-windows with multiple undo, Python colorizing, a Python shell window subclass, and a debugger. She's cross-platform too β€” works on literally every platform where Tk is installed. iconic behavior, honestly 🌈


πŸ’… OPTIONS πŸ’…

  • -h β€” print this help message and then dip. bye πŸ‘‹
  • -n β€” run IDLE without a subprocess. (the details live in Help/IDLE Help, go peek 🧚)

okay so the next little crew will override IDLE's 'settings' configuration:

  • -e β€” open an edit window.
  • -i β€” open a shell window.

and these ones? they imply -i and will open a shell for you:

  • -c cmd β€” run the command in a shell, or
  • -r file β€” run script from file.
  • -d β€” enable the debugger πŸ›
  • -s β€” run $IDLESTARTUP or $PYTHONSTARTUP before anything else.
  • -t title β€” set the title of the shell window.
heads up bestie: a default edit window gets bypassed when -c, -r, or - are used. she's not opening that for you, periodt.

and one more for the road: [arg]* and [file]* get passed to the command (-c) or script (-r) in sys.argv[1:]. iykyk 😌


⭐ EXAMPLES ⭐

  • idle β€” open an edit window or a shell, depending on IDLE's configuration. dealer's choice ✨
  • idle foo.py foobar.py β€” edit the files, and also open a shell if it's configured to start with a shell.
  • idle -est "Baz" foo.py β€” run $IDLESTARTUP or $PYTHONSTARTUP, edit foo.py, and open a shell window titled "Baz". multi-tasking queen πŸ‘‘
  • idle -c "import sys; print sys.argv" "foo" β€” open a shell window and run the command, passing "-c" in sys.argv[0] and "foo" in sys.argv[1].
  • idle -d -s -r foo.py "Hello World" β€” open a shell window, run a startup script, enable the debugger, and run foo.py, passing "foo.py" in sys.argv[0] and "Hello World" in sys.argv[1].
  • echo "import sys; print sys.argv" | idle - "foobar" β€” open a shell window, run the script you piped in, passing '' in sys.argv[0] and "foobar" in sys.argv[1].

πŸ”₯ SEE ALSO πŸ”₯

python(1).


πŸ’œ AUTHORS πŸ’œ

Various.


and that's the whole page, no notes 🫢 mwah πŸ’–

sign-off time: this was the IDLE(1) page, dated 21 September 2004 β€” yeah she's vintage, she's a classic, we respect the elders πŸŽ€ go forth and debug, bestie 🌸