O'Reilly logo

The Python 3 Standard Library by Example, Second Edition by Doug Hellmann

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 19. Modules and Packages

Python’s primary extension mechanism uses source code saved to modules and incorporated into a program through the import statement. The features that most developers think of as “Python” are actually implemented as the collection of modules called the Standard Library, the subject of this book. Although the import feature is built into the interpreter itself, the library also includes several modules related to the import process.

The importlib (page 1329) module exposes the underlying implementation of the import mechanism used by the interpreter. It can be used to import modules dynamically at runtime, instead of using the import statement to load them during start-up. Dynamically loading modules is useful ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required