PY
Python Examples


Python is a scripting language.

This directory contains some simple examples of Python scripts.

Licensing:

The computer code and data files described on this web page are distributed under the GNU LGPL license.

Languages:

General language examples include: a C version and a C++ version and a FORTRAN77 version and a FORTRAN90 version and a MATLAB version and a Python version.

Related Data and Programs:

Simple example programs or scripts are also available for a C version, and a C++ version, and a FORTRAN77 version, and a FORTRAN90 version, and a MATLAB version.

Source Code:

HELLO is a simple example to print out "Hello, world!".

MAIN_DEMO shows how a Python file can include text that only executes if the file is called directly, as a "main program". In that case, the text might, for instance, run a demonstration or test of the functions within the file.

SUPPRESS_SPACES demonstrates that, when printing, you can suppress the spaces that are automatically inserted between successively printed items.

You can go up one level to the PYTHON source codes.


Last revised on 28 May 2015.