Basics --- the definition of python modules, import

 

# 1. Definitions: Module: used to organize the python code (variable, function, class, logic: implement a function) logically, essentially ending .py python file 
#         Package: organization module for logically, essentially a directory (must have a _init_.py file) 

# 2. import method module_name import, module2_name 
  # import import QJH M1, M2, M3 
  # import import * all QJH from 
  # from QJH import Logger AS logger_hhh new definition name 

# 3 .import nature (route search and route search elements) 
# nature of imported modules is to explain it python file 
# import module_name ------ "Module1 
# import package is essentially performed in the packet _init_.py file 

# 4. optimization introduced 

# classification module 5

 

 

 

 

 

Guess you like

Origin www.cnblogs.com/qjhh/p/12602279.html
Recommended