1. If there is no __init__.py file under the file, the program will not consider this to be a python package.
2. This is required if you want to use the From package import *. The file that contains the method in the module does not contain a class:
#coding =utf-8
Import A
A.say ()
From Import b
B.say ()
Use from Bao Import *
Write under __init__.py file: __all__==[' A ', ' B '] where a B is the file name under this package
3. Examples introduced when a class is included in a module
# The 1th approach introduced
From Bao2Import a
from bao2 Import b
A.a.say ()
B.b.say ()
#引入的第二种方式
from bao2.a import a
from bao2.b import b
A.a.say ()
B.b.say ()
# 3rd method introduced
from bao import *
A.say ()
B.say ()
The third way to do before you need to write the following content
What the __init__.py file inside the Bao2 needs to write
#coding =utf-8
Import a (Class A)
Import b (class B)
Python chapter Nineth modules and Packages (2)