Python's IDLE editor is much better now

17 points by wheelerof4te ↗ HN
People used to say all kinds of things about Python's native IDLE editor, but lately it has become a viable alternative for me to other editors like Notepad++.

At least on Windows, where you have no autocompletion when you launch Python inside a shell, it's a godsend.

IDLE got line numbers in Python 3.8, and with that change it became good enough for most quick scripts.

The editor itself is highly customisable, it has a debugger and primitive auto-completion of callables and global variables. You can make your own theme or just use IDLE Dark like a normal person :)

So, thank you for improving IDLE! I hope it gets tabs some day, but I know that would be hard to implement.

5 comments

[ 3.5 ms ] story [ 22.0 ms ] thread
Nice. People often dismiss IDLE as too basic, but at least is available by default in the base system. That's godsend when you're taking your first steps learning a language. I believe IDLE single-handedly made me a Python programmer instead of a Ruby programmer. I tried Ruby first, to this day it think it's even a nicer language, drawing much inspiration from Smalltalk. But trying to set the environment for the first time, I got stuck trying to call the ruby interpreter from a text editor, and gave up. With Python there was IDLE out of the box, and there was no such problem. Languages that save you the chore of assembling a proper environment from loose parts by hand before any actual programming are a blessing.
It is not good enough for some simple situation. For instance, the up arrow ↑ in keyboard is not work. Sometimes I have a typo in my code line, such as `from itertools import chains`, here `chains` should be `chain`, so it raise an exception. In Python shell, I could press ↑ to show this line again and only delete the last letter. But ↑ can not work in IDLE, I have to copy or re-input the whole line.
If IDLE is as awesome as Jupyter, then the spring is here.
They have different purposes. Jupyter is not a editor, it's a tool for quick data-sciency scripting.
You can assign a shortcut for that.

Mine is Alt+Up/Down for history previous/next.