def getpwall(): """ getpwall() -> list_of_entries Return a list of all available password database entries, in arbitrary order. See pwd.__doc__ for more on password database entries. """ entries = [] try: while True: entries.append(struct_passwd(_posix.getpwent())) except NullPointerException: return entries
def getpwall(): """ getpwall() -> list_of_entries Return a list of all available password database entries, in arbitrary order. See pwd.__doc__ for more on password database entries. """ entries = [] while True: entry = _posix.getpwent() if not entry: break entries.append(struct_passwd(entry)) return entries