项目地址
https://github.com/WindowSSnake/Snake-PC-Info
类别
Python
项目标题
Snake PC Info - 开源的 Windows 硬件信息检测工具
项目描述
一个基于 Python + PyQt5 的 Windows 硬件信息检测工具,支持 CPU、内存、磁盘、S.M.A.R.T.、GPU、网络等全面检测,并新增硬件日志分析功能(扫描 Windows 系统事件日志中的硬件错误和警告)。内置 Python 环境,无需额外安装,开箱即用。
亮点
- 全面硬件信息检测 + 系统事件日志分析
- 时间范围筛选:1天 / 3天 / 7天 / 30天
- 一键导出 TXT 报告
- 中英文切换 + 暗色/亮色主题
- 内置 Python 环境,无需安装
示例代码
import json
import os
class TranslationLoader:
"""
翻译加载器(单例模式)
负责加载 locale/ 目录下的 JSON 语言文件
"""
_instance = None
_data = {}
_event_data = {}
_current_lang = 'zh'
def __new__(cls):
if cls._instance is None:
cls._instance = super().__new__(cls)
return cls._instance
def __init__(self):
# 避免重复初始化
if not hasattr(self, '_initialized'):
self._initialized = True
self._data = {}
self._event_data = {}
self._current_lang = 'zh'
def load_language(self, lang='zh'):
"""
加载指定语言的 JSON 文件
- lang: 'zh' 或 'en'
"""
self._current_lang = lang
locale_dir = os.path.join(os.path.dirname(__file__), 'locale')
# ----- 加载界面文本 -----
ui_file = os.path.join(locale_dir, f'{lang}.json')
if os.path.exists(ui_file):
try:
with open(ui_file, 'r', encoding='utf-8') as f:
self._data = json.load(f)
except Exception as e:
print(f"[TranslationLoader] 加载 {ui_file} 失败: {e}")
self._data = self._load_fallback('zh')
else:
self._data = self._load_fallback('zh')
截图或演示视频

项目地址
https://github.com/WindowSSnake/Snake-PC-Info
类别
Python
项目标题
Snake PC Info - 开源的 Windows 硬件信息检测工具
项目描述
一个基于 Python + PyQt5 的 Windows 硬件信息检测工具,支持 CPU、内存、磁盘、S.M.A.R.T.、GPU、网络等全面检测,并新增硬件日志分析功能(扫描 Windows 系统事件日志中的硬件错误和警告)。内置 Python 环境,无需额外安装,开箱即用。
亮点
示例代码
import json import os class TranslationLoader: """ 翻译加载器(单例模式) 负责加载 locale/ 目录下的 JSON 语言文件 """ _instance = None _data = {} _event_data = {} _current_lang = 'zh' def __new__(cls): if cls._instance is None: cls._instance = super().__new__(cls) return cls._instance def __init__(self): # 避免重复初始化 if not hasattr(self, '_initialized'): self._initialized = True self._data = {} self._event_data = {} self._current_lang = 'zh' def load_language(self, lang='zh'): """ 加载指定语言的 JSON 文件 - lang: 'zh' 或 'en' """ self._current_lang = lang locale_dir = os.path.join(os.path.dirname(__file__), 'locale') # ----- 加载界面文本 ----- ui_file = os.path.join(locale_dir, f'{lang}.json') if os.path.exists(ui_file): try: with open(ui_file, 'r', encoding='utf-8') as f: self._data = json.load(f) except Exception as e: print(f"[TranslationLoader] 加载 {ui_file} 失败: {e}") self._data = self._load_fallback('zh') else: self._data = self._load_fallback('zh')截图或演示视频