Be an IDLE fellow
Creating a Python script can be as simple as using your favourite text editor to create a file with the extension .py, then adding your code. However, this can prove tricky when it comes to indenting lines as well as when you’re making minor revisions and need a way to execute your scripts quickly each time.
IDLE is Python’s integrated development and learning environment. IDLE includes a multiwindow text editor with features above and beyond simple word processing programs such as smart indents, call tips and auto complete of common terms. Once a script has been saved, you can launch it using IDLE’s Python shell window by pressing F5. This is ideal for interactive scripts as the window automatically colourises input, output and error messages.
IDLE is a cross platform application. If you have a Raspberry Pi, you’ll find it preinstalled in the Programming section of the Applications menu – choose Python 3 (IDLE) for this tutorial. IDLE is also installed in Ubuntu repositories. Simply open Terminal and run sudo apt-get
update then sudo apt-get install idle3 . The Python website has an extensive user manual for IDLE. Visit https://docs.python.
org/3/library/idle.html for more information. For the purposes of this tutorial, remember that after you’ve executed a script you can continue to interact with it through entering commands via the shell window, for example to append an element to an array.