Copyright © 2024 Jiri Kriz,

Learning Python

Comments (0)
Introduction to Python for beginners. No programming skills are assumed. The installation covers Windows only.


I present here what I think is the simplest start with Python on Windows for non-programmers.

Use English everywhere: for the names of the folders, for the names of your programs, for comments in your programs. English is the language of programming.

Do not use spaces in the names of the folders and in the names of your programs. Everything is easier when there are no spaces in the names, e.g. when you later use Unix tools like "cygwin" on your PC. Consequently do not install Python in the standard Windows directories (i.e. folders) "C:\Program Files" or "C:\Program Files (x86)" because the names contain spaces.

A possible directory structure could be:

I will refer to this structure in the description below.

Installation on Windows

Download the latest Python version from This is currently the version 3.9.7. Use "Customize Installation" and proceed according to the following snapshopts.

P_i1 P_i2 P_i3

Press "Install" and agree to the Installation. After a short time you get:


The window shows the links:

Python Shell

The directory "C:\Programs\Python\Python39" was filled with the installation of Python. Open it in the Windows Explorer and double click on "python.exe". The Python shell will open where you can type Python statements that will be immediately executed:


We will not be using this window presently so close it.

It is useful for later convenience to create a shortcut for "C:\Programs\Python\Python39\python.exe" say "PY".

IDLE Shell

In the Windows Explorer navigate to "C:\Programs\Python\Python39\Lib\idlelib" and double click on "". Two windows will appear on the screen:


The IDLE Shell can be used as a Python "command interpreter". An interpreter can useful for simple calculations but not for programs because everything will be lost after we close the window. We will write Python programs and save them for future usage. To this purpose click on "File/New File":


A new window "untitled" appears.

The First Python Program

Into the "untitled" window type:

# My first Python program
print("Hello World")

The first line starting with "#" is a "comment", that is not executed by Python. The second line is a command to print the "string" (a message) inside the quotes. Use the menu command "File/Save As" to save the window content in the file "" in "D:\Devl\Python". The name of the program window changes to "". Python programs (also called "scripts") should have the extension ".py".


Select the menu item "Run/Run Module" (or press F5) to execute the program. The string "HelloWorld" is written onto the Shell window.


Congratulations - you developed your first Python program!

When you remain with IDLE, then create a shortcut (say to "C:\Programs\Python\Python39\Lib\idlelib\" and put it on your desktop.


IDLE is then started by a double click on the icon.

Notepad++ and a Windows Shell

Probably all developers on Windows have the excellent, free editor "Notepad++" and I recommend to download it. Use the "Installer" on the download page and install the latest available version (currently 8.1.4 - 32-bit) in "C:\Programs\Notepad++". You can write your Python programs with this editor and save them in your development folder ("D:\Devl\Python").

For easy access create a shortcut for "C:\Programs\Notepad++\notepad++.exe", name it "Notepad++" and put it on the desktop. Double click this shortcut and in the Notepad++ open your "" program.


Modify your program as you like and save it again. Execute this program using "python.exe" (or using the shortcut "PY" if you have defined it) in a Windows command shell. A simple method is to start the "Windows Power Shell". Right click on the Windows Start Menu on the left bottom of the screen and select "Windows Power Shell". Then navigate to the directory with your Python programm. Execute the program as "PY" (or "python.exe").


If you do not have the "Windows Power Shell" then use the standard "cmd" window. Right click on the Windows Start Menu and select "Run", then enter "cmd" into the Open field and press OK.


In the command shell navigate to the directory with your Python programm. Execute the program as "python.exe".


Further Steps



New Comment