def writeInsulator(self, openetran): grid = self.Insulator.layout() status = 0 # Status = 1 when no widgets are left to delete while status == 0: status = Add_Delete_Widgets.deleteInsulator(self, grid) # Number of insulators in the system num = len(openetran['insulator']) if num > 1: for k in range(num - 1): Add_Delete_Widgets.addInsulator(self, grid) writeWidgets(openetran, grid, 'insulator', 3, 4, 0)
def deleteInsulator(): Add_Delete_Widgets.deleteInsulator(self, self.Insulator.layout())