Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Cpu:
- def __init__(self):
- self.name = self._cpu().strip()
- self.load = psutil.cpu_percent(1, True)
- @staticmethod
- def _cpu():
- return get_registry_value(
- "HKEY_LOCAL_MACHINE",
- "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0",
- "ProcessorNameString")
Advertisement
Add Comment
Please, Sign In to add comment