python saving a screentshot with pil

Solutions on MaxInterview for python saving a screentshot with pil by the best coders in the world

showing results for - "python saving a screentshot with pil"
Giovanni
31 Jul 2017
1#python 3
2from PIL import ImageGrab 
3snapshot = ImageGrab.grab()
4save_path = "C:\\Users\\YourUser\\Desktop\\MySnapshot.jpg" #dont forget to write the name and the extension of the file in the end
5snapshot.save(save_path)