gpt4 book ai didi

python - 如何在 Python 中获取用户名?

转载 作者:IT老高 更新时间:2023-10-28 21:50:51 25 4
gpt4 key购买 nike

Possible Duplicate:
Is there a portable way to get the current username in Python?

如何获取执行给定脚本的帐户的用户名?

最佳答案

import getpass
print getpass.getuser()

关于python - 如何在 Python 中获取用户名?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4325416/

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