Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to stop python for some time in python

import mouse
import time
import os
import pyttsx3
while True:
    before_sleep = mouse.get_position()
    time.sleep(600)
    after_sleep = mouse.get_position()
    if before_sleep == after_sleep:
        pyttsx3.speak("Going to shut down")
        os.system("shutdown /s /t 1")
 
PREVIOUS NEXT
Tagged: #stop #python #time #python
ADD COMMENT
Topic
Name
7+2 =