Python Programming
Course Description
The course explains why you would want to use Python, the main application areas and clarifies its advantages (and disadvantages). All the language fundamentals are covered – data types, control flow and functions. Then the I/O capabilities, powerful data structures and the object oriented facilities are presented.
Course Duration
4 days
Course Objectives
On completion of this course, delegates will:
• understand the main application areas where Python is appropriate;
• use language idioms for faster development and readable code;
• use the sophisticated language data structures effectively;
• take advantage of the object oriented facilities;
• handle errors and exceptions;
• be aware of and use the main libraries.
• understand the main application areas where Python is appropriate;
• use language idioms for faster development and readable code;
• use the sophisticated language data structures effectively;
• take advantage of the object oriented facilities;
• handle errors and exceptions;
• be aware of and use the main libraries.
Course Content
Introduction
What is Python; Portability; Performance; Libraries; Comparing with other Scripting Languages; Python versions; Jython and IronPython; Using the interpreter; Working with Source Files; Byte-compiled .pyc files; Indentation; Comments & Document strings
Data Types
Numbers; Strings; Variables; Sequences; Lists; Tuples; Maps and Dictionaries
Control Flow
if statement; while statement; for loop; break statement; exec and eval
Functions
Defining a Function; Function Parameters; Default Parameter Values; Named Parameters; Local and Global Variables; Call by Value; Swap Function; Passing Lists as parameters; Lambda Forms
Classes
Classes; Objects; Object Attributes; Class Attributes; Class Methods; The __init__ method; Dynamic Attributes
More on Classes
Intrinsic attributes; Inheritance; Polymorphism; Operator Overloading; Creating Classes at run-time
Modules and Packages
What is Package; What is a Module; importing; Using the sys module; dir()
Exception Handling
Try-Except; Try-Finally; Handling Exceptions; Raising Exceptions; User Defined Exceptions
The Python Standard Library
Operating System Interface Modules; Regular Expressions; Maths Libraries; The sys module; Command Line Arguments; Threads and Processes
Input/Output
File I/O; Formatting; Pickling and Unpickling
The Way Ahead
Other interesting topics in Python
What is Python; Portability; Performance; Libraries; Comparing with other Scripting Languages; Python versions; Jython and IronPython; Using the interpreter; Working with Source Files; Byte-compiled .pyc files; Indentation; Comments & Document strings
Data Types
Numbers; Strings; Variables; Sequences; Lists; Tuples; Maps and Dictionaries
Control Flow
if statement; while statement; for loop; break statement; exec and eval
Functions
Defining a Function; Function Parameters; Default Parameter Values; Named Parameters; Local and Global Variables; Call by Value; Swap Function; Passing Lists as parameters; Lambda Forms
Classes
Classes; Objects; Object Attributes; Class Attributes; Class Methods; The __init__ method; Dynamic Attributes
More on Classes
Intrinsic attributes; Inheritance; Polymorphism; Operator Overloading; Creating Classes at run-time
Modules and Packages
What is Package; What is a Module; importing; Using the sys module; dir()
Exception Handling
Try-Except; Try-Finally; Handling Exceptions; Raising Exceptions; User Defined Exceptions
The Python Standard Library
Operating System Interface Modules; Regular Expressions; Maths Libraries; The sys module; Command Line Arguments; Threads and Processes
Input/Output
File I/O; Formatting; Pickling and Unpickling
The Way Ahead
Other interesting topics in Python
Who should attend?
Programmers and technical managers interested in using the power of a sophisticated language suitable for rapid development with extensive libraries especially for GUI/graphics/web/network development.
Pre-requisites
The course is intended for programmers who have used an object oriented language. Programmers with experience of a language such as C or Perl or Unix shells would also gain from attending but ideally you should have some object oriented knowledge