Merge branch 'dev' of https://github.com/Fairy-Oracle-Sanctuary/NeoBot into dev
This commit is contained in:
16
import sys.py
Normal file
16
import sys.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
import sys
|
||||||
|
import sysconfig
|
||||||
|
|
||||||
|
print(f"Python Version: {sys.version}")
|
||||||
|
|
||||||
|
# 检查 GIL 状态
|
||||||
|
try:
|
||||||
|
# Python 3.13+ free-threading build 才有这个属性
|
||||||
|
is_gil_enabled = sys._is_gil_enabled()
|
||||||
|
print(f"GIL Enabled: {is_gil_enabled}")
|
||||||
|
except AttributeError:
|
||||||
|
print("GIL Status: Unknown (sys._is_gil_enabled not found, likely GIL-enabled build)")
|
||||||
|
|
||||||
|
# 检查 JIT 状态
|
||||||
|
# 目前没有直接的 API 检查 JIT 是否开启,通常看性能或启动日志
|
||||||
|
print("JIT Support: Experimental (Enable with -X jit)")
|
||||||
Reference in New Issue
Block a user