How to take Screenshot in python | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

How to take Screenshot in python

for my other project need help : === Question : Display a dataframe where unemployment was greater than 8.5%. Take a screen-shot. ==== I wrote below code in first cell : "import pandas as pd file_csv=("https://s3-api.us-geo.objectstorage.softlayer.net/cf-courses-data/CognitiveClass/PY0101EN/projects/coursera_project/clean_unemployment.csv") df['unemployment']>8.5 " It outputs some value, But how to take a screen shot

20th Apr 2019, 6:28 AM
Sakthi Upaash
Sakthi Upaash - avatar
4 Answers
+ 1
Using python to take screen shot
23rd Apr 2019, 12:21 PM
Sakthi Upaash
Sakthi Upaash - avatar
+ 1
Thanks Thomas, will try and let the forum know
24th Apr 2019, 1:36 AM
Sakthi Upaash
Sakthi Upaash - avatar
0
Use python itself to take a screenshot? Or how to take a screenshot using windows/mac/linux? Which do you mean?
23rd Apr 2019, 11:26 AM
Trigger
Trigger - avatar
0
Using the MSS Module you can do this: from mss import mss with mss() as sct: sct.shot() Another option is ImageGrab, though it is worth noting that ImageGrab will only work with Windows OS from PIL import ImageGrab snapshot = ImageGrab.grab() save_path = "C:\\Users\\YourUser\\Desktop\\MySnapshot.jpg" snapshot.save(save_path)
23rd Apr 2019, 5:30 PM
Trigger
Trigger - avatar