Python Programming

This course focuses on software development using the Python programming language, and provides its participants with practical knowledge and experience more than any other similar course.

The course was developed for people with basic knowledge in software development. It can be either a programming course that was taken in the past or practical experience.

The course includes 90 academic hours delivered in 18 weekly meetings, that take place in class, and 180 academic hours (and beyond) that take place at home. The training material (slides, video clips, assignments, solutions and code samples) for the entire course is organized on the e-learning platform we use during the course. Each meeting includes a theoretical lecture together with practical practice (at least 40% of each meeting). The practical practice includes coding by the instructor followed by the students and coding by the students with the assistance of the instructor. Each meeting is captured on video in order to allow the students effective learning process at home.

The course includes lots of relatively small assignments and a final project the students will develop as an open source project and place it as a module other Python developers will be able to use.


Meeting

Topic

1

Introduction
What is Python?
Why Python?
Real World Examples
Python History
Python Domains
Database Programming
The Python Software Foundation
The First Program
The Python Virtual Machine
Jython
IronPython
SL4A
Modules Import
Pythons Versions
Comments
The Python Package Index,

The Interactive Console

2

Types
Introduction
The Program Structure
The Built-in Types
The type Function
Dynamically Typed
Types Categories
The Numbers Category
The Sequences Category
The Set Category
The Mappings Category
Numeric Types
Numeric Literals
Mixed Types Conversion
Types Conversion
Variables
Complex Numbers
Hexadecimal, Octal and Binary
Binary Operations
Built-in Numeric Tools
Decimal Type
Fraction Type
Boolean Type
Numeric Extensions
Dynamic Typing
Variables, Objects and Refrence
Objects are Garbage Collected
Shared References
The sys.getrefcount() Function
Working with Files
Common File Operations

3

Operators 
Introduction
Standard Operators
Operators Precedence
Floor and Classic Divisions
Chained Multiple Comparisons
Unlimited Precision Integers
Binary Operators
The -- Operators
The is Operator

4

Statements

Introduction
The Syntax
Try Statements
Assignments
Basic Form Assignment
Tuple and List Unpacking Assignment
Sequence Assignment
Extended Sequence Assignment
Multiple Target Assignments
Augmented Assignments
Useful Patterns
Variables Names Rules
Variables Names Conventions
Names Don’t Have Types
Expression Statements
The print Built-in Function
The if Statements
Multiway Branching
Truth Tests
The if/else Ternary Expression
The while Loop
The for Loop

Iterators
Lists Comprehensions
Extended List Comprehensions
The range Function
The map Function
The zip function
The filter Function
Multiple Iterators
Dictionary Iterators
The dir Function
The del Keyword
The None Constant

5

Functions
Introduction
The def Statement
Function Attributes
Variables Scope
The Local Scope

The nonlocal Keyword
The nonlocal Statement
The Global Scope
The LEGB Rule
Accessing Globals
Nested Functions
Returned Functions
Arguments
Sequence Returned Value
The func(name) Syntax
The func(name=value) Syntax

The func(*name) Syntax
The func(**name) Syntax
Indirect Function Call
Functions Are Objects
Functions Annotations
Anonymous Functions (Lambda)
The main Function
The __name__ Special Variable

6

Modules
Introduction
The import Statement
The from Statement
The as Statement
First Time Only

7

Object Oriented Programming
Introduction
Simple Class Definition
The Simples Python Class Definition
The __init__ Function
Inheritance
The super() Function
Polymorphism
Overriding and Overloading
Static Methods
Static Variables
Multiple Inheritance
Private Variables

8

Object Oriented Programming
Properties
The str Class
Magic Methods
The __str__ Magic Method
Operators Overloading
Binary Operators Overloading

Assignment Operators Overloading

Unary Operators Overloading
Comparison Operators Overloading
Data Classes

9

Exceptions
Introduction
The try, raise & except Statement
User Defined Exceptions
The finally Statement
The try, except & else Statement
Handling Multiple Exceptions
The as Optional Part
Accepting Multiple Exceptions
The with Statement

10

Collections
Introduction
Sets Overview
Sets’ Operators

Sets’ Methods
Iterating Sets

Creating Sets

Sets Comprehension
Lists Duplicates Removal

Frozen Sets

Strings
Strings Literals

Single and Double Quoted Strings

Implicit Concatenation
The len Function
Escape Code Sequences
Raw Strings

Triple Quotes

Strings Concatenation
The in Operator

Indexing and Slicing

Strings Conversion
Characters Conversion
Strings Methods
Strings Formatting Expression
Dictionary Based String Formatting
Mutable and Immutable Types
Lists Overview

Lists Operations

Dictionaries Overview

Dictionary Operations

Dictionary in Operator

Tuples Overview

Tuples Operations
The copy Function
The copy Module

Copy and Deep Copy

11

Files
Introduction
The open Function
The close Function
The read Function
The readlines and writelines Functions
Binary Files
Encoding
Text Files End of Lines
Random Access Files
The with Statement
Handling Binary Data
The byte string Type
The FileExistsError Exception
The FileNotFoundError Exception
The IsADirectoryError Exception
The NotADirectoryError Exception
The PermissionError Exception
Data Streaming
The pipes Module

Directories
Introduction
The os.popen Function
The os.listdir Function
The os.listdir Function
The os.curdir Variable
The os.curdir Variable
The glob Module

12

Regular Expressions
Introduction
Literals as Regular Expressions
The re.compile Function
The match Method
Meta Characters
Character Classes
Predefined Character Classes
Alternation
Quantifiers
Greedy & Reluctant Quantifiers
Boundaries
The findall Method

13

Functional Programming
Introduction
Recursive Functions
Pure Functions
Lambda Expressions
High Order Functions
Immutable Data

The yield Statement
Lazy Evaluation
Recursion instead of Loop

14

Networking System Tools
Introduction
Getting Data Over HTTP Protocol
Getting Host IP
Introduction to TCP/IP Protocols
TCP/IP Client Server Development

 
Parsing XML
Introduction
XML Parsing

The DOM Parsing
 
Parsing JSON
Introduction
The json Module
The json.dumps Function
The json.loads Function

15

Threads
Introduction
The _thread Module
The threading Module
The Thread Class
The current_thread Function
The enumerate Function
The active_count Function
The get_ident Function
The main_thread Function
The stack_size Function

The join Method
Daemon Threads
The Condition Class
The Semaphore Class

16

Text Processing
Introduction
Strings Utilities
String Methods
Templates

Unit Testing
Introduction
The unittest Module
The pytest Framework

Profiling
Introduction
The cProfile Module

Command Line
Introduction
The python Utility
The sys.argv Attribute
Environment Variables
The argparse Module

   
Logging
Introduction
The logging Module

Introspection
Introduction
Finding Available Modules
The dir Function
The type Function

Assertions
Introduction
The assert Statement

Databases
Introduction
The DB-API Interface
The PyMySQL Driver
Creating Connection
The INSERT Query
The SELECT Query
The UPDATE Query
The DELETE Query

Decorators
Introduction
Decorator Development

17

Packages
Introduction
The sys.path Variable
The __init__.py File
The as Statement
The from import Statement
 
Virtual Machine
Introduction
Python VM Phases
The dis Module
Python Virtual Machines

Garbage Collector
Introduction
The CPython’s Garbage Collector
The gc Module

 
Documentation
Introduction
The PyDoc Tool
 

18

Design Patterns
Singleton
Factory Method
Abstract Factory



Changes:
(1) The topic ‘Design Patterns’ was added. The required time was arranged by covering more topics in meetings 16 and 17. 13/11/2017
(2) The topics ‘Databases’ and ‘Decorators’ were added. The required time was arranged in the expense of practice.
(3) The main function and the __name__ special variable were added to the ‘Functions’ topic.