how to take screenshot using python

Solutions on MaxInterview for how to take screenshot using python by the best coders in the world

showing results for - "how to take screenshot using python"
Ivanna
10 Jul 2017
1please check out my video also - https://www.youtube.com/watch?v=7Tr0mEQhc3M&t=2s
2please subscribe my channel - https://bit.ly/2Me2CfB
3
4# importing the ImageGrab function from PILLOW (PIL) Module
5from PIL import ImageGrab
6
7# to take the screenshot of your pc (Main Function)
8screenshot = ImageGrab.grab()
9
10# saving the screenshot in your pc (screenshot will be saved in the directory you are working)
11screenshot.save()
12
13# To open the screenshot in the default image viewer (Optional)
14screenshot.show()
Lisa
11 Nov 2016
1import pyautogui
2import tkinter as tk
3import time
4root= tk.Tk()
5
6canvas1 = tk.Canvas(root, width = 300, height = 300)
7
8canvas1.pack()
9
10def takeScreenshot ():
11    current_time = time.time()
12    myScreenshot = pyautogui.screenshot()
13    myScreenshot.save(r'D:\videos\Mannuly\Taken'+str(current_time)+".png")
14
15myButton = tk.Button(text='Take Screenshot', command=takeScreenshot, bg='green',fg='white',font= 10)
16canvas1.create_window(150, 150, window=myButton)
17
18root.mainloop()
queries leading to this page
how to take a screenshot using pythoncreate screenshot using pythontaking screenshot of screen pythonhow to screenshot with pythonpython take a screenshothow to take screenshot of screen pythonsave screenshot pythonpython take screenshot of windowpython take a screenshot windowshow to screenshot in pythonscreenshot pythonget screenshot in pythonpython take screenshothow to use python to take screenshothow to take a screenshot pythontake screenshot pythonscreenshot python documenttake screenshot with pythontake screenshot of display pythonscreen shot in pythoncode to take screenshot in pythontake a screenshot using pythonpython screenshot computerhow to take a screenshot in pythonscreenshot in pythonfastest way to take a screenshot with python on windowstake screenshot of program pythonpython screenshotpython image screenshotpython code for taking screenshothow to take screenshot from specific using pythonpython screenshot windowpython how to capture windows screenshotpython script to take screenshot of serpshow do i take a screenshot with pyhtontake screenshot of window pythonscreenshot program in pythonhow to take a screenshot with pythonpython capture screenshothow to take screenshot of a window with pythonpython page screenshothow to let python take screenshotpython take a screen shotscreenshot monitor pythonhow to screenshot using pythonscreen shot pyhtonhow to take screenshot pythonscript to take screenshot automatically pythonscreenshot desktop pythonhow to take screenshot with python on websitepython3 take a screenshothow to take screenshot using pythontake a screenshot of window on pythontake screenshot using pythonhow to take a screenshot python and processi ttake snapshot with pythonpython screenshot screenget screenshot pythonget a full screenshot of python codehow to get screenshot with pythonpython library to take screenshotpython get screenshotget a screenshot pythonpy take screenshothow to take a screenshot on pythontake a screenshot with pythontaken screenshot of window in pythonpython program that can take screenshot of screenhow to take screenshot in pythontaking screenshots with pythonhow to take a screenshot of a page using pythonpython program that screenshots the screenhtml create screenshot pythontake screenshot in pythonscreenshot objects in pythontake a screenshot pythontake a screenshot of a website pythonpython screenshot libraryhow to take screenshot of a window in with pythonhow to take screenshots in pythonhow to take a screen shot using pythonhow to dump screenshot with pythonhow to take a screen shot in python by imagegrabhow to take screenshot with pythonscreenshot using pythonhow to identify a screenshot pythonhow to take screenshot of device using pythonhow do you take a screenshot of a whole page in python 3fpython get screenshot in windowmake screenshot with pythonpython html screenshotscreenshot in url pythonhow to take screenshot using python