python how to take a screenshot code example
Example 1: screenshot in python
import pyautogui
class gng() :
myScreenshot = pyautogui.screenshot()
myScreenshot.save('C:\File\Code\save.png')
gng()
Example 2: python windows take screenshot pil
import PIL.ImageGrab
im = PIL.ImageGrab.grab()
im.show()
Example 3: python take screenshot
#pip3 install PrtSc
import PrtSc.PrtSc as Screen
screenshot=PrtSc.PrtSc(True,'filename.png')