Skip to content

Instantly share code, notes, and snippets.

@thearn
Created June 15, 2013 21:31
Show Gist options
  • Save thearn/5789653 to your computer and use it in GitHub Desktop.
Save thearn/5789653 to your computer and use it in GitHub Desktop.
Screen capture using python PIL
import time
import Image
import ImageGrab
while True:
time.sleep(0.5)
t = str(time.time()).replace('.','-')
tt = time.time()
img=ImageGrab.grab()
img = img.resize((800,600))
img.save(''.join(['img\\',t,'.png']))
print time.time() - tt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment