First Steps#

About Python#

Python is a flexible and popular programming language that is easy to learn and can be used on almost all operating systems such as Linux, Windows, or macOS. A large and strong developer community provides many libraries for free, which can be installed and used as packages in Python. Besides engineering and scientific data analysis, Python also supports the development of web applications and services, desktop applications (graphical user interfaces - GUIs), scripting, and Jupyter notebooks. Python is used by many scientific institutions and software developers, but also more and more in other industries. This Python tutorial is tailored for engineers and scientists in the field of hydraulics and eco-morphodynamics.

The content on the following pages is based on Jupyter notebooks and flavored with information from python.org. The descriptions aim to provide solid knowledge for the efficient use of Python.

Just one way to learn Python

This eBook is designed for providing Water Resources Researchers and Engineers with a baseline for Python-based workflow automation. Yet, there are always many possibilities to write code with many more sophisticated gimmicks, which are not all listed and explained in this eBook.

Get Started with JupyterLab#

This eBook builds on Jupyter notebooks that are linked to mybinder.org. Thus, there are a couple of options for working with the following tutorials:

  • Run the Jupyter notebooks in your webbrowser by clicking on the Binder buttons at the top of the every page. Clicking on the rocket button at the top of every page and on Binder has the same effect. Important: this option does not enable saving your changes.

  • Google’s Colab service also enables running the Jupyter notebooks from this eBook online. To run open one of this eBook’s Jupyter notebooks in Google Colab, click on the rocket button at the top of the page and on Colab. If you have an account with google, you may also save your edits in Google Drive.

  • Run the Jupyter notebooks locally on your own computer by cloning hydro-informatics/jupyter-python-course: git clone https://github.com/hydro-informatics/jupyter-python-course.git Note that this option requires a local installation of Jupyter (Lab).