Python 3 Script to Control (Increase or Decrease) Window 10 OS Screen Brightness Using wmi Library Full Project For Beginners



import wmi
brightness = 40 # percentage [0-100] For changing thee screen 
c = wmi.WMI(namespace='wmi')
methods = c.WmiMonitorBrightnessMethods()[0]    
methods.WmiSetBrightness(brightness, 0)



Here you need to install the above module by below command



pip install wmi



And then you can provide value in range of 1 to 100 for brightness level of windows 10

Leave a Reply