Every time I need to use absolute import, for example:
from my_package.my_module import my_function
I declare my package to the $PYTHONPATH
by writing down these code lines into my __ init __.py file located a the root of my package directory:
import sys
import os
sys.path.insert(0, os.getcwd())
But I find this solution totally inexpressive... Is this functionality natively supported by the Python standard library?