1.2. The Python language

Authors: Chris Burns, Christophe Combelles, Emmanuelle Gouillart, Gaël Varoquaux

Python for scientific computing

We introduce here the Python language. Only the bare minimum necessary for getting started with Numpy and Scipy is addressed here. To learn more about the language, consider going through the excellent tutorial https://docs.python.org/tutorial. Dedicated books are also available, such as Dive into Python 3.

../../_images/python-logo.png

Tip

Python is a programming language, as are C, Fortran, BASIC, PHP, etc. Some specific features of Python are as follows:

  • an interpreted (as opposed to compiled) language. Contrary to e.g. C or Fortran, one does not compile Python code before executing it. In addition, Python can be used interactively: many Python interpreters are available, from which commands and scripts can be executed.
  • a free software released under an open-source license: Python can be used and distributed free of charge, even for building commercial software.
  • multi-platform: Python is available for all major operating systems, Windows, Linux/Unix, MacOS X, most likely your mobile phone OS, etc.
  • a very readable language with clear non-verbose syntax
  • a language for which a large variety of high-quality packages are available for various applications, from web frameworks to scientific computing.
  • a language very easy to interface with other languages, in particular C and C++.
  • Some other features of the language are illustrated just below. For example, Python is an object-oriented language, with dynamic typing (the same variable can contain objects of different types during the course of a program).

See https://www.python.org/about/ for more information about distinguishing features of Python.