首页 > 代码库 > python编程快速上手之第18章实践项目参考答案(18.4.1)

python编程快速上手之第18章实践项目参考答案(18.4.1)

import pyautogui, time

print(Press Ctrl-C to quit.)
try:
  while True:
    time.sleep(10)
    pyautogui.moveRel(1, 0, duration=0.25)
    time.sleep(10)
    pyautogui.moveRel(-1, 0, duration=0.25)
except KeyboardInterrupt:
  print(\nDone.)

 

python编程快速上手之第18章实践项目参考答案(18.4.1)