def getgrall(): """ getgrall() -> list of tuples Return a list of all available group database entries, in arbitrary order. """ groups = [] try: while True: groups.append(struct_group(_posix.getgrent())) except NullPointerException: return groups
def getgrall(): """ getgrall() -> list of tuples Return a list of all available group database entries, in arbitrary order. """ groups = [] while True: group = _posix.getgrent() if not group: break groups.append(struct_group(group)) return groups