I know that spaces are preferred over tabs in Python, so is there a way to easily convert tabs to spaces in IDLE or does it automatically do that?
From the IDLE documentation:
Tab
inserts 1-4 spaces (in the Python Shell window one tab).
You can also use Edit > Untabify Region
to convert tabs to spaces (for instance if you copy/pasted some code into the edit window that uses tabs).
Of course, the best solution is to go download a real IDE. There are plenty of free editors that are much better at being an IDE than IDLE is. By this I mean that they're (IMO) more user-friendly, more customizable, and better at supporting all the things you'd want in a full-featured IDE.
Unfortunately IDLE does not have this functionality. I recommend you check out IdleX, which is an improved IDLE with tons of added functionality.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With