In this tutorial we will learn how Take screenshot using Python with the help of pyautogui library.

To install pyautogui == pip install pyautogui

  • The code is given below

import pyautogui
im = pyautogui.screenshot()
im.save(r"c:\path\to\my\screenshot.png")

#python

Take screenshot using Python
12.90 GEEK