References:

Motivation

If you are running a script (module) which incokes another module form command line (e.g. unit testing), without a __init__.py file (even empty) defined in the same directory, most likely it’s gonna raise ‘no module named…’ error.
Or when you are running a script with ‘import xx from x’, it’s gonna be a long prefix.
These functionalities can be packed into the *__init__.py* file.

Implementation

Python ‘import’ function internally invokes ‘import’ method. You can directly use it as well. I am lazy taking notes today, so pls go to following link for details.