(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.
Return root package and all sub-packages.
Return root package and all sub - packages .
def get_packages(package):
    """
    Return root package and all sub-packages.
    """
    return [dirpath
            for dirpath, dirnames, filenames in os.walk(package)
            if os.path.exists(os.path.join(dirpath, '__init__.py'))]
def get_packages ( package ) : return [ dirpath for dirpath , dirnames , filenames in os . walk ( package ) if os . path . exists ( os . path . join ( dirpath , '__init__.py' ) ) ]