Python - screenshot

Which module’s screenshot is fastest ? 1. PIL 2. Pyautogui I hope you can also tell me the speed with[per second] Thank you very much for your help !!!

18th Jan 2020, 7:03 AM
Ethan - avatar
1 Answer
Can you use them to take screenshots? You can compare their speed using timeit module: import timeit timeit.timeit( stmt = <string>, setup = <string>, number = <integer> ) Where: stmt represents the repeated code. setup represents a code that will be only ran once useful for importing modules and other definitions. number is the amount of repeats of stmt. return value is the total time taken in seconds (setup is ignored).
18th Jan 2020, 9:59 AM
Seb TheS
Seb TheS - avatar