def setresel(self, event): if event.GetString() == '': None else: self.resel = str(event.GetString()) if str.lower(self.resel) not in database.keys(): print 'unknown element: ' + self.resel else: f_par = database[str.lower(self.resel)] f = (f_par[0] + f_par[2] + f_par[4] + f_par[6] + f_par[8]) self.showZ.SetValue(str(round(f, 0))) self.allrasd.ZR = round(f, 0)
def setresel(self,event): if event.GetString() == '': None else: self.resel = str(event.GetString()) if str.lower(self.resel) not in database.keys(): print 'unknown element: '+self.resel else: f_par = database[str.lower(self.resel)] f = (f_par[0] + f_par[2] + f_par[4] + f_par[6] + f_par[8]) self.showZ.SetValue(str(round(f,0))) self.allrasd.ZR = round(f,0)
def setresel(self,event): if event.GetString() == '': pass try: self.resel = str(event.GetString()) if str.lower(self.resel) not in database.keys(): print 'unknown element: '+self.resel else: f_par = database[str.lower(self.resel)] f = (f_par[0] + f_par[2] + f_par[4] + f_par[6] + f_par[8]) self.showZ.SetValue(str(round(f,0))) self.allrasd.ZR = round(f,0) self.nb.MainControlPage.el = str.lower(self.resel) if str.lower(self.resel) not in self.nb.runningDB.keys(): self.nb.runningDB[str.lower(self.resel)] = database[str.lower(self.resel)] except ValueError: pass
def setresel(self, event): if event.GetString() == '': pass try: self.resel = str(event.GetString()) if str.lower(self.resel) not in database.keys(): print 'unknown element: ' + self.resel else: f_par = database[str.lower(self.resel)] f = (f_par[0] + f_par[2] + f_par[4] + f_par[6] + f_par[8]) self.showZ.SetValue(str(round(f, 0))) self.allrasd.ZR = round(f, 0) self.nb.MainControlPage.el = str.lower(self.resel) if str.lower(self.resel) not in self.nb.runningDB.keys(): self.nb.runningDB[str.lower( self.resel)] = database[str.lower(self.resel)] except ValueError: pass