def key_press(self, key, x, y):
        "Close the application when the player presses ESCAPE"
        if ord(key) == 27:
            # print "Escape!"
            if bool(glutLeaveMainLoop):
                glutLeaveMainLoop()
            else:
                raise Exception("Application quit")
Close the application when the player presses ESCAPE