Created
June 15, 2013 21:31
-
-
Save thearn/5789653 to your computer and use it in GitHub Desktop.
Screen capture using python PIL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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