def __init__(self, bat_num, refresh_period): AppletModel.__init__(self, refresh_period) self.bat_num = bat_num self.is_discharging = False self.bat_dir = "/sys/class/power_supply/BAT"+str(self.bat_num)+"/" self.energy_full = 0 self.energy_now = 0 self.percent = 100 self.__initEnergyFull()
def __init__(self): AppletView.__init__(self) AppletModel.__init__(self, 0.1) self.__text = "" self.color = "#FFFFFF" self.date_format = "%a %d %b %H:%M"
def __init__(self, refresh_period): AppletModel.__init__(self, refresh_period) self.__stat_path = "/proc/stat" self.__nbr_cpu = self.__countNbrCpu() self.__cpu_usage = array( self.__nbr_cpu + 1, 0) self.__old_cpu_stat = array2d( self.__nbr_cpu + 1, 2, 0)
def __init__(self, refresh_period): AppletModel.__init__(self, refresh_period) self.__vol = 0