def __init__(self, sScratch): if type(sScratch) is str: strListPass = sScratch.split("\n\n") self.topo1 = Pass(strListPass[0]) self.scratch = Pass(strListPass[1]) self.topo2 = Pass(strListPass[2]) self.__equalLength() else: raise NameError('no such constructor')
def read_pass_data(filePath): with open(filePath) as file: strData = file.read() pas = Pass(strData) return pas
def ex(): la = QApplication(sys.argv) pass1 = Pass() pass1.show() la.exec()