2024-03-29 11:01:59 发布
网友
我在linux上使用的是2.7之前的python版本,我想知道如何检索RUID?你知道吗
2.7和更高版本已经从操作系统包中获得了getresuid,但是我似乎找不到与2.6相当的版本
您可以尝试使用psutil库。尝试^{}函数:
psutil
uids()[source] The real, effective and saved user ids of this process as a namedtuple. This is the same as os.getresuid() but can be used for every process PID.Availability: UNIX
uids()[source] The real, effective and saved user ids of this process as a namedtuple. This is the same as os.getresuid() but can be used for every process PID.
os.getresuid()
Availability: UNIX
您可以尝试使用} 函数:
psutil
库。尝试^{相关问题 更多 >
编程相关推荐