Python gets this data from the module's path attribute sys. This path is list, and if you want to add a new path to the path, just use the method append.
For example, to add a directory /home/me/mypyto a path, simply do:
import sys
sys.path.append("/home/me/mypy")
source
share