Python Screenshot


/ Published in: Python
Save to your folder(s)

Probado en python 3.2.2


Copy this code and paste it in your HTML
  1. #probado en python 3.2.2
  2. import PIL.ImageGrab #http://www.lfd.uci.edu/~gohlke/pythonlibs/
  3. import datetime
  4. now = datetime.datetime.now().strftime("%Y-%m-%d %H%M%S")
  5. print(now)
  6. img = PIL.ImageGrab.grab()
  7. img.save(str(str(now) + '.png'),'png')

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.