Copyright (c) Hyperion Entertainment and contributors.
AmigaOS Manual: Python Getting Started
Contents
Running Python programs
Using Python interactively
How to write Python programs
Amiga.py
This program shows how to use print() to display text on the screen. Print() is a function which can print the given object to the screen or to a file. In the following example text "Amiga. The Computer For the Creative Mind." will be printed on the screen. The text in the source code is surrounded by single quotes (') but you can also use double quotes (").
Program 1. Amiga.py
# A simple program print( 'Amiga. The Computer For the Creative Mind.' )
Enter the above program using your favourite text editor, and save it as PYTHON:Scripts/Amiga.py. To run the program, open a Shell window and type:
Python PYTHON:Scripts/Amiga.py
You should see the following text in your Shell window:
Amiga. The Computer for the Creative Mind.