Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def OnClick(self, event):
- name = event.GetEventObject().GetLabelText()
- cursor= self.conn.execute("SELECT * FROM ELEMENT where SYMBOL==?", [name])
- elements = cursor.fetchall()
- print elements
- cursor= self.conn.execute("SELECT ATOMIC_NUMBER FROM ELEMENT where SYMBOL = ?", [name])
- numbers = cursor.fetchall()
- print numbers
- atomicnumber = numbers[0][0]
- cursor= self.conn.execute("SELECT MOL_NUMBER FROM LINK where ELEMENT_NUMBER = ?", [atomicnumber])
- mnumbers = cursor.fetchall()
- print mnumbers
- combinations = atomicnumber[0][0]
- def intersect (*combination ):
- sets = iter(map(set, combinations))
- result = st.next()
- for s in sets:
- results = result.intersection (s)
- return result
Add Comment
Please, Sign In to add comment