First, the module classification:
1. Standard library module: Python comes with, directly using the import can be used directly;
2. Third-party library: External use, need to download first (pip install module_name)
3. Program Customization Module: The module of its own definition
Second, the process of module call (import)
1. First execute the code of the module;
2. The module is then used as a variable for the caller;
Iii. introduction of various import methods
Iv. the order in which to search for file paths when importing modules
1. First search the folder path where the current execution file is located, you can use Sys.path to view the current path;
2. Therefore, if the imported module does not belong to the current executable file under the folder, you can use the Append function, now the imported file belongs to the folder to join the Sys.path,
Or
3. In Summary, we in the actual use, the import should be the final run the entire program of the file belongs to the folder, do not use the debugging process of a certain PY file path as the basis to import;
Python Module Tutorial