--- KavCalc.old/KavCalc.py +++ KavCalc/KavCalc.py @@ -65,15 +65,15 @@ # Get user input. Quit if user tries to quit. Wait for # buttons clicked or hotkeys pressed. for event in pygame.event.get (): - if event.type is QUIT: + if event.type == QUIT: return - elif event.type is KEYDOWN and event.key is K_ESCAPE: + elif event.type == KEYDOWN and event.key == K_ESCAPE: return - elif event.type is MOUSEBUTTONDOWN: + elif event.type == MOUSEBUTTONDOWN: clicked = functions.buttons_clicked ( buttonGroup, pygame.mouse.get_pos () ) for b in clicked: b.clicked () - elif event.type is KEYDOWN: + elif event.type == KEYDOWN: # print event.key, event.mod, event.unicode keyed = functions.buttons_keyed ( buttonGroup, event.unicode, event.key ) for b in keyed: