Python

Hans-Petter Halvorsen

What is Python?

Python is an open source and cross-platform programming language, that has become increasingly popular over the last ten years. It was first released in 1991. Latest version is 3.7.0. CPython is the reference implementation of the Python programming language. Written in C, CPython is the default and most widely-used implementation of the language.

Python is a mult-purpose programming languages (due to its many extensions), examples are scientific computing and calculations, simulations, web development (using, eg., the Django Web framework), etc.

The programming language is maintained and available from (Python Software Foundation):

https://www.python.org

Here you can download the basic Python features in one package, which includes the Python programming language interpreter, and a basic code editor, or an integrated development environment, called IDLE.

 

Read the following textbooks for more information about Python:

 

Python Programming

 

- This is a textbook in Python Programming with lots of Practical Examples and Exercises. You will learn the necessary foundation for basic programming with focus on Python. This textbook is written in LaTeX.

You find Source Code and additional Examples below.

 

 

Python for Science and Engineering

 

- This is a textbook in Python Programming with lots of Examples, Exercises, and Practical Applications within Mathematics, Simulations, etc. The focus is on numerical calculations in mathematics and engineering. Necessary theory is presented in addition to many practical examples. This textbook is written in LaTeX.

This textbook is available as an "Early Preview" edition.

You find Source Code and additional Examples below.

 

 

Python for Control Engineering

 

- This is a textbook in Python Programming with lots of Examples, Exercises, and Practical Applications within Mathematics, Simulations, Control Systems, DAQ, Database Systems, etc. The focus is on the use of Python within measurements, data collection (DAQ), control technology, both analysis of control systems (stability analysis, frequency response, ...) and implementation of control systems (PID, etc.). Required theory is presented in addition to many practical examples and exercises in Python. This textbook is written in LaTeX.

This textbook is available as an "Early Preview" edition.

You find Source Code and additional Examples below.

 

 

Python for Software Development

 

- This is a textbook in Python Programming with lots of Examples, Exercises, and Practical Applications within Software Systems, Software Development, Software Engineering, Database Systems, Web Application Desktop Applications, GUI Applications, etc. The focus is on the use of Python for creating modern Software Systems. Required theory is presented in addition to many practical examples and exercises in Python. This textbook is written in LaTeX.

This textbook is available as an "Early Preview" edition.

You find Source Code and additional Examples below.

 

 

Note! These are "working documents" that are more or less updated continuously with new contents. See the Questions and Comments section if you have questions, if you find bugs or want new topics, examples, etc.

 


 

Python Resources

Below you find lots of resources regarding Python.

 

Python Tutorials

Here are some Python Tutorials:

 

Python Packages

Rather than having all of its functionality built into its core, Python was designed to be highly extensible. This approach has advantages and disadvantages. An disadvantage is that you need to install these packages separately and then later import these modules in your code.

These packages need to be downloaded and installed separately, or you choose to use, e.g., a distribution package like Anaconda.

Some important packages are:

Lots of other packages exists, depening on what you are going to solve.

 

Anaconda

Anaconda includes Python, the Jupyter Notebook, and other commonly used packages for scientific computing and data science.

They offer a free version (Anaconda Distribution) and a paid version (Enterprise)

Anaconda is available for Windows, macOS, and Linux 

 

Web: https://www.anaconda.com

Wikipedia: https://en.wikipedia.org/wiki/Anaconda_(Python_distribution)

 

Spyder and the Python packages (NumPy, SciPy, matplotlib, ...) mention above +++ are included in the Anaconda Distribution.

 

 

Python Editors

An Editor is a program where you create your code (and where you can run and test it). Most Editors have also features for Debugging.

For simple Python programs you can use the IDLE Editor, but for more advanced programs a better editor is recommended.

Examples of Python Editors:

 

Spyder

Spyder is an open source cross-platform integrated development environment (IDE) for scientific programming in the Python language.

Web: https://www.spyder-ide.org

Wikipedia: https://en.wikipedia.org/wiki/Spyder_(software)

Spyder is included in the Anaconda Distribution.

 

Visual Studio Code

Visual Studio Code is a multi-purpose source code editor developed by Microsoft for Windows, Linux and macOS.

Web: https://code.visualstudio.com   

Resources:

 

Visual Studio

Microsoft Visual Studio is an integrated development environment (IDE) from Microsoft. It is used to develop computer programs, as well as websites, web apps, web services and mobile apps. The deafult (main) programming language in Visual studio is C#, but many other programming languages are supported.

Visual studio is available for Windows and macOS.

Visual Studio (from 2017), has integrated support for Python, it is called "Python Support in Visual Studio".

Web: https://visualstudio.microsoft.com

Wikipedia: https://en.wikipedia.org/wiki/Microsoft_Visual_Studio

 

 

Python Integration in LabVIEW

LabVIEW is a graphical programming language well suited for hard-ware integration, taking measurements and data logging.

Go to my LabVIEW page in order to learn more about LabVIEW.

Download Python Integration in LabVIEW Examples

Programming Resources

Below you will find more interesting Programming resources


HTML

Learn more about HTML Programming

ASP.NET

Learn ASP.NET Web Programming



LabVIEW

Learn Basic LabVIEW Programming

MATLAB

LabVIEW programming and Training



Software Engineering

Software Development and Enginnering Resources

Database Systems

Database Systems, Structured Query Language



Visual Studio/C#

Visual Studio and C# programming resources

Industrial IT

Industrial IT resources

Questions and Comments