Editors¶
Interactive Shell¶
With the interactive shell you can easily run most of the examples in this tutorial. Later, you will also learn how to easily include code written to a file as a module.
Type python3
in the terminal:
$ python3
Python 3.13.0 (main, Oct 7 2024, 05:02:14) on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
Open a terminal window and enter python3
:
$ python3
Python 3.13.0 (main, Oct 7 2024, 05:02:14) [Clang 15.0.0 (clang-1500.1.0.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
Note
If you get the error message Command not found, you can run
Update Shell Profile
, which can be found in
Applications/Python3.10
.
You can start the interactive Python shell in
.Alternatively, you can search for the directly executable file
Python.exe
, for example in
C:\Users\VEIT\AppData\Local\Programs\Python\Python310-64
and
then double-click.
You can scroll through previous entries with the arrow keys Home, End, Page up and Page down and repeat with the Enter key.
Exiting the interactive shell¶
To exit the interactive shell, simply use Ctrl-d on Linux and macOS or
Ctrl-z on Windows. Alternatively, you can type exit()
.
IDLE¶
IDLE is the acronym for Integrated Development and Learning Environment and combines an interactive interpreter with tools for code editing and debugging. It is very easy to run on the various platforms:
Enter the following into your terminal:
$ idle-python3.13
You can start IDLE in
You can scroll through the history of previous commands with the alt-p and alt-n keys.