gpt4 book ai didi

Python 检索 RUID?

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:14:39 28 4
gpt4 key购买 nike

我在 linux 上使用 2.7 之前的 python 版本,想知道如何检索 RUID?

2.7 及更高版本从 os 包中获得了 getresuid,但我似乎找不到 2.6 的等效项

最佳答案

您可以尝试使用 psutil 库。试试 uids功能:

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

关于Python 检索 RUID?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32096962/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com