Introduction to Python
SSI
Administration
- Combination of lectures, 'live coding' practical sessions, and exercises
Why Python?
- Free, well-documented, runs almost everywhere
- Large (and growing) user base among researchers and scientists
- Simple, readable, flexible, powerful language and easier for beginners to grasp
- Great for team working
- Python aim - only one way to do something
- Programs look very similar, easy for others to read
- Want to teach basic programming concepts that can be applied to other programming languages
What can you use it for?
- Almost anything - it's general purpose!
- Used in many fields
- Bioinformatics, Biology, Data visualisation, Engineering, Software development, etc.
- Used for processing data, general scripting, mapping, web applications, frameworks, numerical processing, education, HPC, at Google, ...
We'll be teaching Python 3
- Python 3 is currently the standard version
- Python 3 has many advantages over Python 2
- Many consistency improvements - removing redundancy
- In places, simply more sensible e.g. integer division
- Python 2 support will end in 2020
- 'Short version: Python 2.x is legacy, Python 3.x is the present and future of the language'
Distributions of Python
A basic Python installation:
- Python interpreter
- Tools to install additional and manage Python packages
Anaconda Python Distribution:
- Targeted at data science
- Integrated set of over 720 Python packages
- Easier package installation and compatibility
Many different kinds of Python
On top of a Python installation:
- Python interpreter - via the command line
- Jupyter Notebook - mix code, commentary, and results
- Python scripts - a 'program' in a file to run
- PyCharm - edit, run, and debug Python scripts