Guest User

SMPL

a guest
Jan 13th, 2017
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.37 KB | None | 0 0
  1.  
  2.  
  3.     class Cpu:
  4.         def __init__(self):
  5.             self.name = self._cpu().strip()
  6.             self.load = psutil.cpu_percent(1, True)
  7.  
  8.  
  9.         @staticmethod
  10.         def _cpu():
  11.             return get_registry_value(
  12.                 "HKEY_LOCAL_MACHINE",
  13.                 "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0",
  14.                 "ProcessorNameString")
Advertisement
Add Comment
Please, Sign In to add comment