2MODULES, LIBRARIES, AND FRAMEWORKS

image

Modules are an essential part of what makes Python extensible. Without them, Python would just be a language built around a monolithic interpreter; it wouldn’t flourish within a giant ecosystem that allows developers to build applications quickly and simply by combining extensions. In this chapter, I’ll introduce you to some of the features that make Python modules great, from the built-in modules you need to know to externally managed frameworks.

The Import System

To use modules and libraries in your programs, you have to import them using the import keyword. As an example, Listing 2-1 imports the all-important ...

Get Serious Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.