Python Rundown and Main Windows

Updated 08 September 2020

This guide will be a rundown on Python, the open-source programming language built by the hugely intelligent Guido van Rossum. This guide will also contain external links to Python resources and download links. Programming is the implementation of logic to facilitate specified computing operations and functionality. Put more simply it is the process of creating instructions for a computing device to comprehend and execute. Instructions are referred to as a software program. Once the software program is executed the computing device will perform the specified task. A programming language is a set of commands, directives and other syntaxes which gives you a vocabulary to create these software programs. 

Quick links for the contents of this guide is seen below.

Worth noting there are several other programming languages out there that can be used to control computing devices, often coming down to personal preference, but Python is an excellent place to start. Python is available online and is completely free with over 8.2 million developers running it worldwide. Python is also ranked in the top ten most popular programming languages. It is an excellent language to utilise with Raspberry Pi Boards such as Raspberry Pi 4 Model B 8GB. These are computing devices that can easily fit on the palm of your hand.

There are also several related tutorials on our website to help you become a true Pythonista. A great place to start would be Python and MicroPython - Compare and Access. If you have any questions, queries or things to add please let us know your thoughts!


Overview

Python is a powerhouse programming language capable of supporting your programming needs to upper limits of your imagination. Python is growing particularly in the data sciences with large developments occurring in machine learning, physical modelling, geographic information systems (GIS) and computer vision.

A core aim of Python is to keep programming with this language fun. It does this by using syntax with high human readability. The formatting is visually uncluttered, and it often uses full English keywords where other languages use punctuation or abbreviations. It does not use curly brackets to bound information and semicolons after statements are optional. Operators, which are special symbols in Python that carry out arithmetic or logical computation, are given very intuitive keywords. Also, Tube Personthe total length of code to perform a task tends to be shorter when compared to other programming languages such as C++ or Assembler. Programmers can often become preoccupied with minimising the execution time of code however it is worth realising that development time usually takes the longest. This language wants to be enjoyed, so it is no wonder then that Python derived its name from Monty Python the British comedy group.

Laid out bare, Python is an interpreted, high-level, object-orientated, general-purpose programming language. So, let me break this down. An interpreted language is one where most of its implementations execute instructions directly and freely without a need to compile the language into machine code (usually written in binary it is the lowest level of software). A high-level programming language is one which has strong abstraction from the specific details of the computing device, making it much easier to interpret and understand for a human. The focus is on human usability instead of peak program running efficiency. Object-oriented programming is one where the user defines the data type of a data structure and the types of operations that can be applied to the data structure. A general-purpose programming language is one which is designed for writing software with the widest variety of application domains.     

As a software program grows more in size you may want to split it into several files to maintain it easier as well as improving the reusability of the software program. The solution in Python to this is modules. A module is a file consisting of runnable Python code that can define classes, variables and functions. You can define most used functions in a module and import it to your program code. This saving you from copying definitions into different programs to access module functionality. Packages are a way of structuring modules in Python for a computing device to best retrieve them. Python from the get-go comes with an extensive standard library filled with modules. Also online there are more than hundred-thousand external Python packages available for download. A great repository for this is the Python Package Index. All of these should enable you to hit the ground running no matter the direction of your project.


Rundown of Main Windows

The best way to understand Python is to jump right in and practice. Use this guide as an initial reference. There are three main Python screens. These are Python Command-Line Shell, Python IDLE Shell and Python Program Window. You will be able to open these after completing installing Python onto your computing device. Below there are the different Python screens you will encounter.

1. Below is the Python Command-Line Shell also simplified as the Python Shell. The window represents a mode in which we can interact with the Python programming language. It allows for interactive programming, operating with what is referred to as a read, evaluate, print cycle. This is also referred to as a looping structure. This process is occurring continuously while the Python Shell is open.

In this kind coding environment, you can effectively do the things you can do in the Python IDLE Shell and Python Program Window. Now Commands are entered one step at a time. Code being typed out will be located after the >>>. After entering a line of code the looping structure will feedback the results straight away. The problem with this type of set-up is if you make a mistake or need to change a previous line in a chain of connected code you will have to re-do all the code. This means re-entering and rewriting all previous commands. Also, syntax indentations required for Python will not automatically happen.

Python Command-Line Shell

 

2. Below is the Python IDLE Shell which shares a lot of features of the Python Command-Line Shell but crucially it has several drop-down menus at the top of the window. IDLE is short for Integrated Development Environment. Like the Python Command-Line Shell, it allows for interactive programming with a continuously operating looping structure. Commands are still one step at a time. Code being typed out will be located after the >>>. If you make a mistake or need to change a previous line you will have to re-enter and rewrite all the commands. However, Python syntax indentations will automatically happen. Also, code hinting and syntax highlighting and checking will occur in IDLE. 

Looking into the top drop-down menus. Under the File menu, we can crucially save, open and make new Windows. Under the Edit menu, we have complete editing control, including cut and paste. There are also numerous searching capabilities. Under the Shell Menu, we have the ability to completely restart Python wiping all current information. Under Debug Menu there are some simple debugging capabilities. Options Menu lets you configure the Python IDLE Shell. This is the location to dive deep into Python editing, changing the open-source programming language. Window menu allows easier navigation between different Python windows. Help menu gives information on the Python version and links to help documents. Help menu also has a Turtle Demo which shows some cool examples of code.  

The Python IDLE Shell

 

3. Below is a Python Program Window. It hasn't been saved so it is currently named untitled. When files are saved they are saved as Python File (.py). To access this window open the Python IDLE Shell go into File Menu and select New File. This lets you write software programs that can be a complete program. In this section, you can save, edit and reuse the work you’ve created. This coding environment is not undergoing a looping structure so you can enter multiple command lines. Commands will not be run after you have typed a line of code. Syntax indentation will automatically occur. It will also give suggestions on what to write and structures hints as you are coding.

The drop-down menus at the top of the window are also slightly different. There is now a Run menu which allows you to execute all code written in this module starting from the top once the module is saved to the computing device (can also press F5 on your keyboard to run code). When you select Run Module from this menu it will jump you to the Python IDLE Shell and display the results of the Python Module Shell commands. Python executes code line by line starting from the top. If you want to make a change to the code you can then switch back to the Python Module Shell. Each time you run the program it will reset the Python IDLE shell. It is very common when developing code in Python to be constantly jumping between the Python Program Window and Python IDLE Shell. There is also a Format menu which allows you to lots of control in regards to indentations.

Python Program Window

 

4. Furthermore below is a screen capture of a Browser-Based Online Emulator of Python. There are a number of these available and are an excellent tool to learn from. This means you don't even need to download to test out and run commands using this programming language. Effectively the Python Program Window is on the left and The Python IDLE Shell is located on the right. When you click Run is will execute the instructions written in the Program Window and display the results of the program in the IDLE Shell side. You can also turn it to dark-mode very easily. This is a great tool to familiarise yourself with when going through tutorial content. The location to access this Python emulator is seen below. There is also another link to another Python Online Compiler which allows you to save your code as a Python File (.py).

- Python Browser-Based Compiler Emulator
Python Online Compiler with Save Function

Python Online Compiler


Python and Resources Download Links

Python programming language is free to download and use. It is also open-source giving individuals the freedom to modify, contribute and propose improvements. Download location for this can be seen below. 

- To Download Python

There is more than hundred-thousand external Python packages available for download and use. A great repository for this is the Python Package Index. Location for this can be seen below. 

Python Package Index


The Next Step

A great next step on your coding adventures would be the guide Hello World! First Python Script.


Have a question? Ask the Author of this guide today!

Please enter minimum 20 characters

Your comment will be posted (automatically) on our Support Forum which is publicly accessible. Don't enter private information, such as your phone number.

Expect a quick reply during business hours, many of us check-in over the weekend as well.

Comments


Loading...
Feedback

Please continue if you would like to leave feedback for any of these topics:

  • Website features/issues
  • Content errors/improvements
  • Missing products/categories
  • Product assignments to categories
  • Search results relevance

For all other inquiries (orders status, stock levels, etc), please contact our support team for quick assistance.

Note: click continue and a draft email will be opened to edit. If you don't have an email client on your device, then send a message via the chat icon on the bottom left of our website.

Makers love reviews as much as you do, please follow this link to review the products you have purchased.