Python Programming for Scientists
Contact Us for Dates
4 days practical workshop for up to 12 people.
Only £1580 per person
Contact us for Onsite Price
A 4 day introduction to Python Programming for scientists that covers basic language constructs, file I/O, OO programming, command line processing, managing processes and numeric python. The focus is on using best practices and techniques to develop professional quality programs and scripts.
Layout
This course comprises a mix of theory, demonstrations and hands on exercises. Approximately 50% of the time is hands-on.
Training Course Objectives
- Understand Python syntax, flow control, data structures and objects
- Read and write files
- Develop scripts for use in a Linux or Windows environment
- Understand best practices for error handling, recovery and logging
- Work with operating system processes
- Techniques for handling CSV and fixed field files
- Design and develop user defined classes for handling structured data
- Manipulate numeric data using NumPy and matplotlib
Who it is for
Scientists who wish to learn Python
Training Course Prerequisites
- This course is designed for scientists who know at least one programming or scripting language: no prior knowledge of Python or OO programming is assumed.
Chapters
Chapter 1 Python Introduction
- Variables and Objects
- Console I/O
- IF statements
Chapter 2 Python Objects
- Object notation
- String and numeric data
- WHILE loop
Chapter 3 Functions
- Functions
- Arguments and return values
- Importing modules
Chapter 4 Sequences
- List
- FOR loop
- List comprehension
Chapter 5 Exceptions
- Handling exceptions with TRY-EXCEPT statements
- Raising exceptions
- Exception safe code and the WITH statement
Chapter 6 File Handling
- Reading and writing files
- Working with the file system
Chapter 7 Data Collections
- Sets
- Dictionaries
Chapter 8 Working with modules
- Organising modules
- Using PYTHONPATH
- Building Libraries
Chapter 9 Command line processing
- Command line processing
- Command line options
- Exit codes and exit functions
Chapter 10 Managing processes
- Using subprocess to run commands
- Reading sub command?s STDOUT and STDERR
- Writing to a sub command?s STDIN
Chapter 11 Advanced Functions
- Variable arguments lists and named argument lists
- Function pointers
- Lambdas
Chapter 12 Classes and Data Structures
- Classes and objects
- Constructors
- Object methods and special methods
Chapter 13 Numeric Python
- Using the numpy module
- Building N dimensional arrays
- Array operations and aggregate methods
Chapter 14 Plotting
- Using the matplotlib module
- Generating line charts and bar charts
- Labelling axes and plots and adding annotations
Chapter 15 Designing Classes
- Supporting subscripts and slices
- Building an iterator class
- Working with the resource manager
Chapter 16 File processing
- Working with CSV files
- Working with fixed field files