flying-wyf

python编程快速上手之第18章实践项目参考答案(18.14.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.')

 

posted on 2017-06-08 21:56  flying-wyf  阅读(126)  评论(0编辑  收藏  举报

导航