Ejemplo n.º 1
0
    def setStructuralInfo(self):
        """ Set all the structural info coming from the server. """
        
        self.dict_struct_info = self.client.getStruturalInfo()

        if self.dict_struct_info is not False:
            self.label_OS_value.set_text(self.dict_struct_info["os"])
            self.label_cpu_value.set_text(self.dict_struct_info["cpu"])
            self.label_ram_value.set_text(K.memoryResizer(self.dict_struct_info["ram_total"]))
Ejemplo n.º 2
0
 def createStringWithPercents(value1, total):
     """ Return a string with 2 values and the percent. """
     return K.memoryResizer(value1) + " of " + K.memoryResizer(total)\
              + " used (" + str(100*int(value1)/int(total)) + "%)"