• 9663920875
  • leo@leonardtopno.com
  • Bengaluru, India
Blog
How to keep your machine awake using this simple python script

How to keep your machine awake using this simple python script

Problem Statement: Python script to keep your windows/mac awake


import pyautogui
import time


def remain_awake():
    while True:
        pyautogui.FALLSAFE = False
        pyautogui.move(0,2)
        time.sleep(58)


# Driver Code
if __name__ == "__main__":
    remain_awake()

Practice Problem Link:

Share via
Copy link
Powered by Social Snap