Module \ Package
Module: Force AH. From logical organization Python code (variables, functions, classes, logic: Implementing a function) is essentially the. py python file, (file name: test.py, corresponding module name: TEST) Package: Logically organize the module, essentially a directory (must take a __ init__.py file)
Importing method: Import test Import test,test1,test2.....form Test import * Don't mind using-slow form test import m1,m2,m3 ... from test import lo Nger as Logger_name fast
Import essence (path search and search path) The essence of importing a module is to interpret the Python file again, the import test-> test.py--> test.py path--Sys.path The essence of the package is to execute the __init__.py file from. Import test current catalog imported Import optimization form Test import m1,m2,m3 ... from test import longer as Logger_name fast
Python Common module Day06