vilasini97

Untitled

Jun 16th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.    
  2.     def OnClick(self, event):                                        
  3.         name = event.GetEventObject().GetLabelText()
  4.  
  5.         cursor= self.conn.execute("SELECT * FROM ELEMENT where SYMBOL==?", [name])
  6.  
  7.         elements = cursor.fetchall()
  8.  
  9.         print elements
  10.  
  11.         cursor= self.conn.execute("SELECT ATOMIC_NUMBER FROM ELEMENT where SYMBOL = ?", [name])
  12.  
  13.         numbers = cursor.fetchall()
  14.  
  15.         print numbers
  16.         atomicnumber = numbers[0][0]
  17.  
  18.         cursor= self.conn.execute("SELECT MOL_NUMBER FROM LINK where ELEMENT_NUMBER = ?", [atomicnumber])
  19.  
  20.         mnumbers = cursor.fetchall()
  21.         print mnumbers
  22.         combinations = atomicnumber[0][0]
  23.     def intersect (*combination ):
  24.         sets = iter(map(set, combinations))
  25.         result = st.next()
  26.         for s in sets:
  27.              results = result.intersection (s)
  28.         return result
Add Comment
Please, Sign In to add comment