def list_policies(): import pkgutil import Chain policies = [] for _, name, ispkg in pkgutil.iter_modules(path=[os.path.dirname(Chain.__file__)]): if not ispkg: policies.append(name) return policies