def __take_screenshot_cb(self, frame_): if frame_.is_visible(): return True take_screenshot() frame_.show() return False
def handle_key_press(key): take_screenshot()