Packages and Package Directories

This chapter provides introductions and tutorial examples about on packages and package directories. Topics include introduction of packages and package directories; importing package directories to create packages; accessing package members; importing package members only; importing sub-modules and sub-directories.


These sections are omitted from this Web preview version. To view the full content, see information on how to obtain the full version this book.

What Is Package

What Is Sub-Module

What Is Sub-Package

"from package import *" Statement

Using __all__ List in Package

"import" Statement Summary

What Is the __main__.py File

"python -m package|module" Command


Takeaways:

Table of Contents

 About This Book

 Running Python Code Online

 Python on macOS Computers

 Python on Linux Computers

 Built-in Data Types

 Variables, Operations and Expressions

 Statements - Execution Units

 Function Statement and Function Call

 Iterators, Generators and List Comprehensions

 Classes and Instances

 Modules and Module Files

Packages and Package Directories

 "sys" and "os" Modules

 "pathlib" - Object-Oriented Filesystem Paths

 "pip" - Package Installer for Python

 SciPy.org - Python Libraries for Science

 pandas - Data Analysis and Manipulation

 Anaconda - Python Environment Manager

 Jupyter Notebook and JupyterLab

 References

 Full Version in PDF/EPUB