Module overview
If the module is a logical way to organize Python code, then the file is the method of organizing the module on the physical layer.
Therefore, * * A file is considered a standalone module, and a module can also be viewed as a file. The file name of the module is modulo
The name of the block plus the extension. py. Unlike other languages in which you can import classes (Class), you are importing module or module properties in Python * *.
Module name space
A namespace is a relational mapping of names to objects.
Import Module Import Module overall
Way One
import module1import module2...import moduleN
Way Two
import module1[, module2[,... moduleN]]
Import module properties (from ... import ...)
Calling From-import can import the name into the current namespace, which means that you do not need to use the attribute/period property identifier to access the module's identifier. For example, you would need to access the Var name in the modules module that was imported like this:
From module import name1[, name2[,... Namen]]
Renaming a module or property after importing
...............
Package
Package is a hierarchical file directory structure, the module corresponds to a single file, the package corresponds to a directory. As with classes and modules, the package also uses the period property to identify the elements that are accessing them. Import the modules in the package using standard import and From-import statements.
Python Modules and Packages