理解module, script, library, package in Python

  • Overview

    Python modules and Python packages are two mechanisms that facilitate modular programming.

    A script is a Python file that’s intended to be run directly.

    A module is a Python file that’s intended to be imported into scripts or other modules.

    A package is a collection of related modules that work together to provide certain functionality.

    A library is an umbrella term that loosely means “a bundle of code”. These can have tens of even hundreds of individual modules that can provide a wide range of functionality.

    • Matplotlib is a plotting library.
    • The Python Standard Library contains hundreds of modules for performing common tasks

    Only package and module have a well-defined meaning specific to Python.

你可能感兴趣的:(#,小白学Python,module,library,script,package,setup)