Python Programming for Developers

Contact Us for Dates
4 days practical workshop for up to 12 people.

Contact us for Onsite Price

A 4 day introduction to Python Programming for software developers that covers basic language constructs, file I/O, OO programming, command line processing, managing processes and XML web clients. The focus is on using best practices and techniques to develop professional quality programs and scripts. Optionally this course can be customized by adding modules on Numeric Python and Plotting that are described the companion course Python Programming for Scientists.


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
  • Manipulate data using simple and complex regular expressions
  • Design and develop user defined classes for handling structured data
  • Read data from a web server

Who it is for

Computer Programmers who wish to learn Python

Training Course Prerequisites

  • This course is designed for programmers who know at least one programming or scripting language: no prior knowledge of Python or OO programming is assumed.


Chapter 1 Python Introduction

  • Variables and Objects
  • Console I/O
  • IF statements and indentation

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 and Tuples
  • 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
  • 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 and generators

Chapter 12 Classes and Data Structures

  • Classes and objects
  • Constructors
  • Object methods and special methods

Chapter 13 Designing Classes

  • Supporting subscripts and slices
  • Building an iterator class
  • Working with the resource manager

Chapter 14 Text Handling with Regular Expressions

  • Basic pattern matching
  • Pattern repetitions
  • Capture groups

Chapter 15 File processing

  • Working with CSV files
  • Working with fixed field files

Chapter 16 Web Clients

  • Reading data from a web page URL
  • Parsing XML using ElementTree

Chapter 17 Calling C Code

  • Calling C functions
  • Passing data between C and Python