'$monitor=Get-WmiObject -Namespace root/WMI -ClassName WmiMonitorBrightnessMethods', '$monitor.WmiSetBrightness(0,50)'
'$monitor=Get-WmiObject -Namespace root/WMI -ClassName WmiMonitorBrightnessMethods; $monitor.WmiSetBrightness(0,50)'
import subprocess
proc = subprocess.Popen(['powershell', '$monitor=Get-WmiObject -Namespace root/WMI -ClassName WmiMonitorBrightnessMethods; $monitor.WmiSetBrightness(0,50)'])
proc.wait()
Get-WmiObject -Namespace root/WMI -Class WmiMonitorBrightnessMethods).WmiSetBrightness(5,20)
>>> count = 13
>>> list_iter = []
>>> O = 1
>>> b = 2.7
>>> rou = 3
>>> for im in xrange(count):
... list_iter.append(round((O+sum(list_iter))/(b-1), rou))
...
>>> list_iter
[0.588, 0.934, 1.484, 2.356, 3.742, 5.944, 9.44, 14.993, 23.812, 37.819, 60.066, 95.399, 151.516]
>>> for im in xrange(count):
... exec 'c'+str(im)+'='+str(list_iter[im])
...
>>> c3
2.356
>>> c0
0.588
>>> c12
151.516
list_iter = []
o = 1 # 'O' - одно из самых неудачных наименований переменной (в прочем, 'o' не многим лучше :))
b = 2.7
rou = 3
for c in range(13):
list_iter.append(round((o+sum(list_iter))/(b-1), rou))
>>> list_iter
[0.588, 0.934, 1.484, 2.356, 3.742, 5.944, 9.44, 14.993, 23.812, 37.819, 60.066, 95.399, 151.516]