Wrap-Up

Overview

Teaching: 10 min
Exercises: 0 min
Questions
  • What have we learned?

  • What else is out there and where do I find it?

Objectives
  • Name and locate scientific Python community sites for software, workshops, and help.

Leslie Lamport once said, “Writing is nature’s way of showing you how sloppy your thinking is.” The same is true of programming: many things that seem obvious when we’re thinking about them turn out to be anything but when we have to explain them precisely.

Different ways to interact with Python

We have been interacting in notebooks, using Jupyter Lab. There are various other ways to interact with Python.

Notebooks

Notebooks can be accessed via the Jupyter Lab interface, or the ‘classic’ notebook interface can be launched with:

jupyter notebook

From the Jupyter Lab notebook interface, a notebook can be saved to a .py text file by selecting File > Save and Export Notebook As > Executable Script.

From the classic notebook interface, select File > Download as > Python (.py).

Command Line

From a terminal / Anaconda prompt window, the Python interpeter can be accessed by running python. Commands can be entered at the prompt and results can be printed to the terminal output.

From a terminal / Anaconda prompt window, .py files can run with:

python name_of_file.py

Spyder

Spyder is a popular graphical development environment for working with Python, and has similar features to R Studio and Matlab.

When installing the full version of Anaconda, Spyder is included in the installation, and a shortcut to launch the software in the Windows Start Menu. The program can also be launched from a terminal / Anaconda prompt, by running:

spyder

To install spyder using the conda command:

conda install -c conda-forge spyder

Python supports a large and diverse community across academia and industry.

Key Points

  • Python supports a large and diverse community across academia and industry.