top band

Thursday 1:20 p.m.–4:40 p.m.

Modules and Packages: Live and Let Die!

David Beazley

Audience level:
Python Core (language, stdlib, etc.)


All Python programmers use the import statement, but do you really know how it works and what it allows? This tutorial aims to take a deep dive into every diabolical issue related to modules, packages, and imports. When we're done, you'll finally be ready to unleash your million line micro framework on the world!


This tutorial aims to cover a wide assortment of advanced topics related to modules, packages, and the import statement. Topics will include, but are not limited to the following: - Basics of modules and packages. - What can be imported? - Module compilation (.pyc files, etc.) - Construction of sys.path - Namespace packages - Virtual environments - Circular module dependencies - Package relative imports - Module splitting (splitting modules into multiple files) - Import hooks - Module imports and threads - Module reloading

Student Handout

No handouts have been provided yet for this tutorial

bottom band background