我们从Python开源项目中,提取了以下1个代码示例,用于说明如何使用pyautogui.FAILSAFE。
def __init__(self): pyautogui.PAUSE = 1 # set the pause equals to one pyautogui.FAILSAFE = True # Sets the Fail safe to be one display_screensize() # Printing the size of the display self.x, self.y = self.get_positions() print(self.x) print(self.y)