Guest User

Untitled

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