Global training solutions for engineers creating the world's electronics products

Essential Python


COVID-19 Update: View Doulos COVID News Updates »

This course is available Live Online worldwide: View the Live Online full course description »

Limited In-Person schedule available in Europe from September 2020: View dates and locations »


Standard Level - 3 days

Why Learn Python? Watch the video now! 

Python is a general purpose programming language that was designed to be compact, easy to use, easy to extend, and which has a large standard library and a very active development community. As well as being a general purpose programming language, Python is widely used as a scripting language, a glue language, for data science and machine learning, and for software test.

Essential Python is intended for professionals working in the electronic systems hardware and embedded software development flows. The training is for people who need to learn Python quickly to get a specific job done. It focusses on the most commonly used features of the Python language and teaches you all you need to know to start using Python properly and effectively.

Essential Python is delivered as a 3-day public face-to-face training course or 4 sessions of live online training.

Workshops comprise approximately 50% of class time and are based around carefully designed hands-on exercises to reinforce learning.

Who should attend?

Essential Python is a hands-on programming course aimed at software, hardware, and support engineers who need to use Python for scripting development and tool flows, for hardware verification, for software test, for data science and machine learning, or for running Python on embedded devices.

What will you learn?
  • The syntax and semantics of the Python language
  • Python development environments, documentation, and resources
  • Details of some of the most commonly used modules in the Python Standard Library
  • How to use Python as a language for scripting tool flows
  • How to use the Numpy, Matplotlib, and Pandas modules for numerical computation and data science.
  • How to extend Python with C
  • How to use Python for software test
Pre-requisites

This course assumes you already know how to write computer programs. Delegates should have a good working knowledge of at least one programming language or hardware description language, suitable examples being C, C++, Java, Perl, VHDL, or SystemVerilog. An understanding of object-oriented programming would be beneficial, but is not absolutely essential.

This course is not suitable as an introductory course in computer programming, that is, this course does not teach Python as a first programming language. Please contact Doulos direct to discuss and assess your specific experience against the pre-requisites.

Training materials

Doulos training materials are renowned for being the most comprehensive and user friendly available. Their style, content and coverage is unique, and has made them sought after resources in their own right. The materials include:

  • Fully indexed class notes creating a complete reference manual
  • Workbook full of practical examples and solutions to help you apply your knowledge
Structure and Content

Introduction

What is Python? • The Python World • Python Implementations • The Python Shell • Running Python Programs From a File • The Python Command Line

Language Basics

Numbers • Strings • Type Conversions • Built-in Functions • String Index • String Slice • String Methods • Find and Replace • Splitting Strings • Simple Formatting

Control Statements

Comments • if Statements • Comparison and Boolean Operators • Conditional Expression • Operators • for Statements • break • continue • while Statements • assert Statements • Functions • global Variables • nonlocal Variables • Lines and Continuation • IDLE 

Lists, Tuples, and Dictionaries

Lists • Length, Concatenate, Repeat • Append, Insert, Pop, Extend, Remove • Loops and Lists • Sorting Lists • List Comparison • Tuples • Dictionaries • Sets 

Formatting

F-Strings • Field Width, Justification, Padding • Number Base, Comma, Sign • Floating Point 

Files and Exceptions

Reading Standard Input • Writing to a File • Writing Files using Print • Reading from a File • Variations • readline • Exceptions • Context Manager 

Classes

Classes • Objects • Methods • Constructors • Data Attributes • Class Variables and Instance Variables • Class vs Object vs Function vs Method • The LEGB Scope Rule • Documentation Strings 

Inheritance

Inheritance • Overriding • Overriding Built-in Methods • Overriding __str__ • Overriding the Constructor • Virtual Method Calls • Multiple Inheritance • Testing Class Relationships • Tying Variables to a Class • Duck Typing 

Copying Objects

Copying Instance Objects • Copying Lists • Shallow Copying 

Iterators and Generators

Sequence, Iterator, Iterable • Iterable Unpacking • Generators • List Comprehensions • Generator Expressions • lambda • map • filter, enumerate • zip • join • Dictionary Comprehensions 

Exploring Functions

Default and Keyword Arguments • Argument Lists • None • Functions as Objects • Higher-Order Functions • Decorator Pattern • A Useful Decorator • Closures 

Modules

import • from ... import • __name__ • Running Modules from the Command Line • Packages • The Python Package Index • pip 

The Standard Library

math • random • statistics • datetime • time • timeit • os • os.path • shutil • glob • sys • subprocess 

Regular Expressions

match • search • findall • Filter the Output from Another Program • sub • Basic Regular Expression Syntax 

NumPy

The NumPy Array • A 2-D Array • More Dimensions • Initializing Arrays • Arithmetic Series • Random Arrays • Copying the Shape of an Array • reshape • Adding Dimensions • ravel • transpose • Sorting • Reduction Functions • Plotting with Matplotlib

NumPy Broadcasting and Indexing

Elementwise Operations • Elementwise Compare • Combining Arrays and Scalars • Broadcasting • Row and Column Vectors • One-Hot Encoding • Dot Product • Vectorizing a Function • Array-of-Indices • Array-of-Booleans • Grids • linspace-like ogrid • Concatentate and Stack • Split • Tile

Matplotlib

Plotting with Lines, Colors, and Markers • Text and Legend • Matplotlib APIs • Subplots • Subplots versus Figures in pyplot API • Log Axes • Types of Plot • Histogram • Plotting an Array as a Grid • Scatterplot • Numpy meshgrid • 3-D Surface Plot • Pandas • Seaborn • Seaborn Pairplot

Pandas

Pandas Data Structures • Pandas Series • Automatic Alignment • Pandas DataFrame • index and columns • Importing and Exporting DataFrames • Alignment • Basic Statistics • Histogram • Plotting • Handling Undefined Data • Fill Options • Data Transformations • SQL-like Merge • Outer Merge • Groupby • Hierarchical Index • Hierarchical Row and Column Indexes • Stack • Unstack •  Pivot Table • Selection • Slice, Concat • dict of Series • Querying a DataFrame

Virtual Environments and Shipping

Creating and Activating Virtual Environments • Sandboxing • Freezing and Cloning • PyInstaller

Extending Python with C

Extending Python • Numba • C Foreign Function Interface • Building and Running with CFFI • Compiling from C Header and Source Files • Building from a Shared Object File • Pointers and Structures • CFFI Build Script • ffi.new • Cython • Compile with Cython • Speed Comparision • Cython Language

Test-Driven Development

What is TDD? • The TDD Process • The Four-Phase Test Pattern • Fakes and Test Doubles 

Pytest

A Simple Test • A Failing Test • Test Discovery • Grouping Tests in a Class • Testing that an Exception is Raised • Skipped Tests and Expected Failures • Test Summary Report • Running in a Temporary Directory • Monkey Patch Test Fixture • User-Defined Test Fixture

Customized Topics (on-site, team-based training)

We can also present supplemental content to address the specific requirements of your team, for example:

  • Command line arguments
  • Multithreading and multiprocessing
  • Networking
  • pySerial
  • Magic Methods
  • Python Coding Style and Guidelines
  • Moving from Python 2 to Python 3

 

Please contact Doulos to discuss your specific requirements.

Course Dates

3 Dec 2020 Ankara, TR Enquire

Looking for team-based training, or other locations?

Complete an enquiry form and a Doulos representative will get back to you.

Enquiry FormPrice on request

Next dates for this course