def judegNames(self,event): name=self.lb.get(self.lb.curselection()) self.curs.set(name) j=jn.judgeName() if self.judgeC.get()==1: self.mailIndex = j.printEmail(name) for i in xrange(len(self.m)): self.m[i].config(fg=self.fg_color[self.mailIndex[i]]) elif self.judgeC.get()==2: self.domIndex = jn.judgeDomain(name) for i in xrange(len(self.d)): self.d[i].config(fg=self.fg_color[self.domIndex[i]]) elif self.judgeC.get()==3: self.mailIndex = j.printEmail(name) self.domIndex = jn.judgeDomain(name) for i in xrange(len(self.m)): self.m[i].config(fg=self.fg_color[self.mailIndex[i]]) for i in xrange(len(self.d)): self.d[i].config(fg=self.fg_color[self.domIndex[i]])
def judegNames(self, event): name = self.lb.get(self.lb.curselection()) self.curs.set(name) j = jn.judgeName() if self.judgeC.get() == 1: self.mailIndex = j.printEmail(name) for i in xrange(len(self.m)): self.m[i].config(fg=self.fg_color[self.mailIndex[i]]) elif self.judgeC.get() == 2: self.domIndex = jn.judgeDomain(name) for i in xrange(len(self.d)): self.d[i].config(fg=self.fg_color[self.domIndex[i]]) elif self.judgeC.get() == 3: self.mailIndex = j.printEmail(name) self.domIndex = jn.judgeDomain(name) for i in xrange(len(self.m)): self.m[i].config(fg=self.fg_color[self.mailIndex[i]]) for i in xrange(len(self.d)): self.d[i].config(fg=self.fg_color[self.domIndex[i]])
def generateNames(self): t=gn.generateName(self.gendict.get()) self.names=[] cho=self.judgeC.get() for i in xrange(self.genTimes.get()): n=t.getNames(self.genC.get()) if cho==4: domI=jn.judgeDomain(n) print domI if sum(domI)==len(self.domain): self.names.append(n) else: self.names.append(n) self.nameRes.set(tuple(self.names))
def generateNames(self): t = gn.generateName(self.gendict.get()) self.names = [] cho = self.judgeC.get() for i in xrange(self.genTimes.get()): n = t.getNames(self.genC.get()) if cho == 4: domI = jn.judgeDomain(n) print domI if sum(domI) == len(self.domain): self.names.append(n) else: self.names.append(n) self.nameRes.set(tuple(self.names))