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,38 +1,38 @@
import threading
import telldus
import time
telldus.tdInit()
def turnOn():
print "turning on"
telldus.tdTurnOn(1)
def turnOff():
print "turning off"
telldus.tdTurnOff(1)
def callback(deviceId, method, value, callbackId):
print "callback"
print "DeviceId: %i Method: %i Value: %s" % (deviceId, method, value)
return True
#function to be called when device event occurs, even for unregistered devices
def rawcallback(data, controllerId, callbackId):
print "raw callback"
print "Data: %s ControllerId: %i" % (data, controllerId)
return True
callbackid = telldus.tdRegisterDeviceEvent(callback)
rawcallbackid = telldus.tdRegisterRawDeviceEvent(rawcallback)
print callbackid, rawcallbackid
try:
while(1):
time.sleep(0.5) #don't exit
except KeyboardInterrupt:
print "Exiting"
telldus.tdUnregisterCallback(callbackid)
telldus.tdUnregisterCallback(rawcallbackid)
telldus.tdClose()
import threading
import telldus
import time
telldus.tdInit()
def turnOn():
print "turning on"
telldus.tdTurnOn(1)
def turnOff():
print "turning off"
telldus.tdTurnOff(1)
def callback(deviceId, method, value, callbackId):
print "callback"
print "DeviceId: %i Method: %i Value: %s" % (deviceId, method, value)
return True
#function to be called when device event occurs, even for unregistered devices
def rawcallback(data, controllerId, callbackId):
print "raw callback"
print "Data: %s ControllerId: %i" % (data, controllerId)
return True
callbackid = telldus.tdRegisterDeviceEvent(callback)
rawcallbackid = telldus.tdRegisterRawDeviceEvent(rawcallback)
print callbackid, rawcallbackid
try:
while(1):
time.sleep(0.5) #don't exit
except KeyboardInterrupt:
print "Exiting"
telldus.tdUnregisterCallback(callbackid)
telldus.tdUnregisterCallback(rawcallbackid)
telldus.tdClose()