Course : Python: Object-Oriented Programming

Python: Object-Oriented Programming






INTER
IN-HOUSE
CUSTOM

Training at your location, our location or remotely

Ref. PYT
  5d - 35h00
Would you like to transpose this course—without changes—for your company?

Download in PDF format

Share this course by email






Teaching objectives
At the end of the training, the participant will be able to:
Master the syntax of the Python language
Acquire the essential notions of object-oriented programming
Know and implement different Python modules
Designing graphic interfaces
Implementing tools for testing and evaluating the quality of a Python program

Course schedule

1
Syntax of Python language

  • Identifiers and references. Coding conventions and naming rules.
  • Blocks and comments.
  • Available data types.
  • Variables, formated display, local and global scope.
  • Working with numeric types, working with character strings.
  • Working with dynamic tables (list), static tables (tuple) and dictionaries.
  • Using files.
  • The if/elif/else conditional structure.
  • Logical operators and comparison operators.
  • while and for iterator loops. Break/continue iteration interrupts.
  • The range function.
  • Writing and documenting functions.
  • Lambda expressions.
  • Generators.
  • Structuring code into modules.
  • Hands-on work¤Installing and getting started with the Python interpreter.

2
Object-Oriented Approach

  • The principles of the Object paradigm.
  • Defining an object (state, behavior, identity).
  • The notion of a class, attributes, and methods.
  • Encapsulating data.
  • Communication between objects.
  • Inheritance, transmitting a class's characteristics.
  • Notion of polymorphism.
  • Association between classes.
  • Interfaces.
  • Overview of UML.
  • Diagrams of classes, sequences, activities, etc.
  • Notion of design patterns.
  • Hands-on work ¤UML modeling of a simple case study.

3
Object-Oriented Programming in Python

  • The particular features of the Python Object model.
  • Writing classes and instantiating them.
  • Constructors and destructors.
  • Attribute and method access protection.
  • The need for the Self parameter.
  • Simple inheritance, multiple inheritance, polymorphism.
  • Notions of visibility.
  • Special methods.
  • Introspection.
  • Implementing interfaces.
  • Best practices and common design models.
  • The use of the exception mechanism for error management.
  • Hands-on work ¤Exercises in different object-oriented concepts by implementing the case study.

4
Use of StdLib

  • Passing arguments on the command line.
  • The use of the Python regular expression engine with the "re" module, special characters, cardinality.
  • Working with the file system.
  • Overview of some important modules of the standard library: “sys”, “os”, “os.path” modules.
  • Packaging and installing a Python library.
  • Access to the relational database, the operation of the API DB.
  • Hands-on work ¤Implementing Python modules: Regular expressions, accessing a database

5
QA tools

  • Static code analysis tools (pylint, pychecker).
  • Analyzing analysis reports (types of messages, warnings, errors).
  • Automatic documentation extraction.
  • The Python debugger (step-by-step execution and post-mortem analysis).
  • Test-driven development.
  • Python unit test modules (Unittest., etc.).
  • Automating tests, aggregating tests.
  • Code coverage tests, profiling.
  • Hands-on work ¤Using the tools pylint and pychecker to check Python code. Implementing unit tests.

6
Creating the TkInter HMI

  • The principles of programming graphical user interfaces
  • Overview of the TkInter library.
  • The main containers.
  • Overview of the widgets available (Button, Radiobutton, Entry, Label, Listbox, Canvas, Menu, Scrollbar, Text, etc.).
  • The window manager.
  • Placement of components, different layouts.
  • Event management, the "event" object.
  • Multi-window applications.
  • Hands-on work ¤Designing a graphical user interface with the Tkinter library.

7
Python/C interface

  • Overview of the Ctypes module.
  • Loading a C library.
  • Calling a function.
  • Rewriting a Python function in C with the Python/C API.
  • Creating C modules for Python.
  • The Python interpreter in C.
  • Using the code profiler.
  • Hands-on work¤Calling functions written in C from Python. Creating C modules for Python with Pyrex.

8
Conclusion

  • Critical analysis of Python.
  • Evolution of the language.
  • Webography and bibliography elements.


Dates and locations
Select your location or opt for the remote class then choose your date.
Remote class

Dernières places
Date garantie en présentiel ou à distance
Session garantie