/slides-python-imports-talk

Slides, sample code and notebook from my Python Imports talk

Primary LanguageJupyter Notebook

slides-python-imports-talk

Here are the slides, example code programs and notebooks from this talk.

Contents

Code Samples

  1. Modules are loaded exactly once
  2. Custom import
  3. Stitching submodules
  4. Export decorator
  5. Fun with directories and zip
  6. Auto installing
  7. How you run the module affects import subsystem

Notebooks

  1. Modules have own unique view of global variables
  2. Explore guts of loaded modules
  3. From x import y, actually loads entire module
  4. Live module reloading gotchas

References:

Image source credits

David Beazley Talk, "Python Imports, Modules, Packages, live and let die"

Erik Westra's Book "Modular Programming with Python"