def get_packages(package):
    return [dirpath
            for dirpath, dirnames, filenames in os.walk(package)
            if os.path.exists(os.path.join(dirpath, '__init__.py'))]
Return root package and all sub-packages.
dataset/ETHPy150Open un33k/python-slugify/setup.py/get_packages