コード例 #1
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)
コード例 #2
0
ファイル: pisurf_resonant.py プロジェクト: jackey-qiu/tdl
 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)
コード例 #3
0
ファイル: pisurf_resonant.py プロジェクト: FHe/tdl
 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
コード例 #4
0
ファイル: pisurf_resonant.py プロジェクト: ttrainor/_tdl
 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