Exemple #1
0
def getpwuid(uid):
    """
    getpwuid(uid) -> (pw_name,pw_passwd,pw_uid,
                      pw_gid,pw_gecos,pw_dir,pw_shell)
    Return the password database entry for the given numeric user ID.
    See pwd.__doc__ for more on password database entries.
    """
    try:
        return struct_passwd(_posix.getpwuid(uid))
    except NullPointerException:
        raise KeyError, uid
Exemple #2
0
def getpwuid(uid):
    """
    getpwuid(uid) -> (pw_name,pw_passwd,pw_uid,
                      pw_gid,pw_gecos,pw_dir,pw_shell)
    Return the password database entry for the given numeric user ID.
    See pwd.__doc__ for more on password database entries.
    """
    entry = _posix.getpwuid(uid)
    if not entry:
        raise KeyError(uid)
    return struct_passwd(entry)
Exemple #3
0
def getpwuid(uid):
    """
    getpwuid(uid) -> (pw_name,pw_passwd,pw_uid,
                      pw_gid,pw_gecos,pw_dir,pw_shell)
    Return the password database entry for the given numeric user ID.
    See pwd.__doc__ for more on password database entries.
    """
    try:
        return struct_passwd(_posix.getpwuid(uid))
    except NullPointerException:
        raise KeyError, uid
Exemple #4
0
def getpwuid(uid):
    """
    getpwuid(uid) -> (pw_name,pw_passwd,pw_uid,
                      pw_gid,pw_gecos,pw_dir,pw_shell)
    Return the password database entry for the given numeric user ID.
    See pwd.__doc__ for more on password database entries.
    """
    entry = _posix.getpwuid(uid)
    if not entry:
        raise KeyError(uid)
    return struct_passwd(entry)