Convert CRLF to LF

This commit is contained in:
Micke Prag 2012-08-13 16:45:35 +02:00
parent 4065f7dc40
commit 4ff3cfd56c
5 changed files with 1276 additions and 1276 deletions

View file

@ -1,47 +1,47 @@
import telldus
import time
telldus.tdInit()
devices = telldus.tdGetNumberOfDevices()
print "Devices: %d\n" % devices
allMethods = telldus.TELLSTICK_TURNON | telldus.TELLSTICK_TURNOFF | telldus.TELLSTICK_BELL | telldus.TELLSTICK_DIM
for i in xrange(devices):
deviceid = telldus.tdGetDeviceId(i)
if deviceid:
name = telldus.tdGetName(deviceid)
print "%s - %s\n" % (deviceid, name)
methods = telldus.tdMethods(deviceid, allMethods)
if methods & telldus.TELLSTICK_TURNON:
print " * TurnOn\n"
telldus.tdTurnOn(deviceid)
time.sleep(1)
if methods & telldus.TELLSTICK_TURNOFF:
print " * TurnOff\n"
telldus.tdTurnOff(deviceid)
time.sleep(1)
if methods & telldus.TELLSTICK_BELL:
print " * Bell\n"
telldus.tdBell(deviceid)
time.sleep(1)
if methods & telldus.TELLSTICK_TOGGLE:
print " * Toggle\n"
if methods & telldus.TELLSTICK_DIM:
print " * Dim\n"
telldus.tdDim(deviceid, 128)
time.sleep(1)
telldus.tdClose()
import telldus
import time
telldus.tdInit()
devices = telldus.tdGetNumberOfDevices()
print "Devices: %d\n" % devices
allMethods = telldus.TELLSTICK_TURNON | telldus.TELLSTICK_TURNOFF | telldus.TELLSTICK_BELL | telldus.TELLSTICK_DIM
for i in xrange(devices):
deviceid = telldus.tdGetDeviceId(i)
if deviceid:
name = telldus.tdGetName(deviceid)
print "%s - %s\n" % (deviceid, name)
methods = telldus.tdMethods(deviceid, allMethods)
if methods & telldus.TELLSTICK_TURNON:
print " * TurnOn\n"
telldus.tdTurnOn(deviceid)
time.sleep(1)
if methods & telldus.TELLSTICK_TURNOFF:
print " * TurnOff\n"
telldus.tdTurnOff(deviceid)
time.sleep(1)
if methods & telldus.TELLSTICK_BELL:
print " * Bell\n"
telldus.tdBell(deviceid)
time.sleep(1)
if methods & telldus.TELLSTICK_TOGGLE:
print " * Toggle\n"
if methods & telldus.TELLSTICK_DIM:
print " * Dim\n"
telldus.tdDim(deviceid, 128)
time.sleep(1)
telldus.tdClose()