An Intensive Introduction to Python course or equivalent knowledge is required. Participants should:
- Be comfortable writing Python scripts complete with unittests and doctests
- Know the core datatypes list/set/dict/str/float/int/bool/None
- Know most of the builtin functions
- Know how make new and old-style classes and most of the commonly used special methods
- Have a deep understanding of dictionaries and know all of the dictionary methods
- Know how to use list comprehensions and generator expressions for data analysis
- Know how to use Python's regular expression module
- Understand the iterator protocol and how to implement it using for/yield
- Know the core looping idioms including xrange, enumerate, reversed, sorted, and zip
- Know how to use the socket module to write simple network clients and servers including multi-threaded servers and forking servers
This is an intensive four-day course in the Python Programming Language with an emphasis on building applications and achieving a deeper understanding of the language. This is an interactive workshop style class where students learn by creating code and where most of the course material is developed in class using guided discovery.
This course is designed for Engineers, Developers, Testers, QA, and Product Managers.
Upon completion of this course, participants will be able to:
- Review all the Python basics with an eye towards mastery
- Learn the inner workings of the Python object model to improve your ability to understand and control the language.
- Build a sample application for archiving and search documents using unittest,doctest, argparse, sqlite, cmd, xmlrpc, and a http web interface. You will learn to put together well tested, well documented small applications with well-designed user interfaces and web accessibility.
- Learn to use pexpect (a Python version of Expect) and pyserial to communicate directly with hardware. Use these tools to create a clean interface to a piece of Cisco equipment, to create a test suite for the equipment, and to add an HTTP interface.
- Learn to install Python third-party modules and survey the most popular and useful packages.
- Learn more of Python's standard library including the collections module, the profiler, the trace module, and the debugger.
- Gain practice reading code and refactoring for clarity, speed, and maintainability.
Important language features
Motivating use cases for Python's indentation
Use of property()
Else clauses on while-loops and for-loops
Core contain implementation details and performance considerations
Abstract base classes
Iterators, including two-way generators
Develop a complete application (docfinder)
HTTP front-end for docfinder
Command shell front-end for docfinder
With-statement and how to create context managers
Python's command-line toolset