DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Screen Log

09.30.2009
| 3310 views |
  • submit to reddit
        save the code in .pyw file if you don't want a command-line window show when running.

from ImageGrab import grab
from time import sleep
from time import localtime,strftime

while 1:
    im=grab()
    im=im.convert('L')
    filename=strftime('%d%H%M',localtime())
    im.save(r'c:\tmp\%s.jpg'%filename,quality=15)
    sleep(300)
    i=i+1