how to make computer go in sleep mode using pythn
import time
print("This is how to pause a program")
time.sleep(5)
print("Did you saw that i slept for 5 seconds")
how to make computer go in sleep mode using pythn
import time
print("This is how to pause a program")
time.sleep(5)
print("Did you saw that i slept for 5 seconds")
how to make computer go in sleep mode using pythn
import time
How_long = 5
time.sleep(How_long)
print("Look I got printed after 5 seconds")
how to make computer go in sleep mode using pythn
import screen_brightness_control as screen
sent_the_brightness = screen.set_brightness(10)
get = screen.get_brightness()
print(get)
how to make computer go in sleep mode using pythn
import psutil
import time
import pyttsx3
import os
while True:
time.sleep(5)
battery = psutil.sensors_battery()
print("Battery percentage : ", battery.percent)
print("Power plugged in : ", battery.power_plugged)
print()
if battery.percent < 25 and battery.power_plugged == False:
print("Your battey is low on power")
pyttsx3.speak("Your battery is low on power")
if battery.percent <= 20 and battery.power_plugged == False:
pyttsx3.speak("power in fast")
time.sleep(5)
pyttsx3.speak("Turning my prosegers on")
time.sleep(10)
if battery.power_plugged == False: os.system("shutdown /s /t 1")
elif battery.percent > 95 and battery.power_plugged == True:
pyttsx3.speak("Your laptop has charged enough")
print("Your laptop has charged enough")
how to make computer go in sleep mode using pythn
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")
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us