mirror of
http://shenjack.top:5100/shenjack/icalingua-python-bot.git
synced 2024-11-23 20:45:06 +08:00
啊?
This commit is contained in:
parent
0ee8091e0d
commit
2f00a3f29a
|
@ -25,8 +25,11 @@ def local_env_info() -> str:
|
||||||
# Python 版本信息
|
# Python 版本信息
|
||||||
cache.write(f"{platform.python_implementation()}: {platform.python_version()}-{platform.python_branch()}({platform.python_compiler()})\n")
|
cache.write(f"{platform.python_implementation()}: {platform.python_version()}-{platform.python_branch()}({platform.python_compiler()})\n")
|
||||||
# 内存信息
|
# 内存信息
|
||||||
|
try:
|
||||||
memory = psutil.virtual_memory()
|
memory = psutil.virtual_memory()
|
||||||
cache.write(f"内存: {memory.free / 1024 / 1024 / 1024:.3f}GB/{memory.total / 1024 / 1024 / 1024:.3f}GB\n")
|
cache.write(f"内存: {memory.free / 1024 / 1024 / 1024:.3f}GB/{memory.total / 1024 / 1024 / 1024:.3f}GB\n")
|
||||||
|
except OSError:
|
||||||
|
cache.write("内存: 未知\n")
|
||||||
return cache.getvalue()
|
return cache.getvalue()
|
||||||
|
|
||||||
def local_env_image() -> bytes:
|
def local_env_image() -> bytes:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user