Python import uses Package(dot notation)
import X, is preferredfrom X import *from X import a, b, cX = __import__(X)
Module: Another python source file
Package: A Python package is simply a directory of Python module(s).
__init__.py must exist for declaring as package.
Notes:
Relative imports only work for packages, but when you import a.py
you are running a module instead.
.
├── driver_pkg_import.py
pkg
├── __init__.py
├── dot_import.py
├── module.py
https://docs.python.org/2/tutorial/modules.html http://effbot.org/zone/import-confusion.html http://programmers.stackexchange.com/questions/111871/module-vs-package