I\'ve written a fairly simple script to prevent a PC from going to sleep.
from pyautogui import move from time import sleep