def isPackage(module):
    if not isinstance(module, types.ModuleType):
        return False
    basename = os.path.splitext(os.path.basename(module.__file__))[0]
    return basename == '__init__'
Given an object return True if the object looks like a package
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/trial/runner.py/isPackage