def writeArrester(self, openetran): grid = self.Arrester.layout() status = 0 # Status = 1 when no widgets are left to delete while status == 0: status = Add_Delete_Widgets.deleteArrester(self, grid) # Number of arresters in the system num = len(openetran['arrester']) if num > 1: for k in range(num - 1): Add_Delete_Widgets.addArrester(self, grid) writeWidgets(openetran, grid, 'arrester', 4, 4, 1)
def newArrester(): Add_Delete_Widgets.addArrester(self, self.Arrester.layout())