コード例 #1
0
ファイル: _psosx.py プロジェクト: hybridlogic/psutil
def get_system_users():
    retlist = []
    rawlist = _psutil_osx.get_system_users()
    for item in rawlist:
        user, tty, hostname, tstamp = item
        if tty == '~':
            continue  # reboot or shutdown
        if not tstamp:
            continue
        nt = nt_user(user, tty or None, hostname or None, tstamp)
        retlist.append(nt)
    return retlist
コード例 #2
0
def get_system_users():
    retlist = []
    rawlist = _psutil_osx.get_system_users()
    for item in rawlist:
        user, tty, hostname, tstamp = item
        if tty == '~':
            continue  # reboot or shutdown
        if not tstamp:
            continue
        nt = nt_user(user, tty or None, hostname or None, tstamp)
        retlist.append(nt)
    return retlist
コード例 #3
0
ファイル: _psosx.py プロジェクト: basketwill/psutil
def get_system_users():
    retlist = []
    rawlist = _psutil_osx.get_system_users()
    for item in rawlist:
        user, tty, hostname, tstamp = item
        if tty == '~':
            continue  # reboot or shutdown
        if not tstamp:
            continue
        if tty:
            abstty = os.path.join("/dev", tty)
            if os.path.exists(abstty):
                tty = abstty
        nt = ntuple_user(user, tty, hostname or None, tstamp)
        retlist.append(nt)
    return retlist
コード例 #4
0
ファイル: _psosx.py プロジェクト: tamentis/psutil
def get_system_users():
    retlist = []
    rawlist = _psutil_osx.get_system_users()
    for item in rawlist:
        user, tty, hostname, tstamp = item
        if tty == '~':
            continue  # reboot or shutdown
        if not tstamp:
            continue
        if tty:
            abstty = os.path.join("/dev", tty)
            if os.path.exists(abstty):
                tty = abstty
        nt = ntuple_user(user, tty, hostname or None, tstamp)
        retlist.append(nt)
    return retlist