From d1b620843525686382dca0d7dc2b63969214544b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Saltvik?= Date: Sat, 4 Aug 2012 22:16:04 +0200 Subject: [PATCH] four spaces --- bindings/python/example/__init__.py | 58 ++++++++++++++--------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/bindings/python/example/__init__.py b/bindings/python/example/__init__.py index 8118f690..f5b15316 100644 --- a/bindings/python/example/__init__.py +++ b/bindings/python/example/__init__.py @@ -9,34 +9,34 @@ print "Devices: %d\n" % devices allMethods = telldus.TELLDUS_TURNON | telldus.TELLDUS_TURNOFF | telldus.TELLDUS_BELL | telldus.TELLDUS_DIM for i in xrange(devices): - deviceid = telldus.tdGetDeviceId(i) - name = tdGetName(deviceid) - - print "%s - %s\n" % (deviceid, name) - - methods = telldus.tdMethods(deviceid, allMethods) - - if methods & telldus.TELLDUS_TURNON: - print " * TurnOn\n" - telldus.tdTurnOn(deviceid) - time.sleep(1) - - if methods & telldus.TELLDUS_TURNOFF: - print " * TurnOff\n" - telldus.tdTurnOff(deviceid) - time.sleep(1) - - if methods & telldus.TELLDUS_BELL: - echo " * Bell\n" - telldus.tdBell(deviceid) - time.sleep(1) - - if methods & telldus.TELLDUS_TOGGLE: - print " * Toggle\n" - - if methods & telldus.TELLDUS_DIM: - print " * Dim\n" - telldus.tdDim(deviceid, 128) - time.sleep(1) + deviceid = telldus.tdGetDeviceId(i) + name = tdGetName(deviceid) + + print "%s - %s\n" % (deviceid, name) + + methods = telldus.tdMethods(deviceid, allMethods) + + if methods & telldus.TELLDUS_TURNON: + print " * TurnOn\n" + telldus.tdTurnOn(deviceid) + time.sleep(1) + + if methods & telldus.TELLDUS_TURNOFF: + print " * TurnOff\n" + telldus.tdTurnOff(deviceid) + time.sleep(1) + + if methods & telldus.TELLDUS_BELL: + echo " * Bell\n" + telldus.tdBell(deviceid) + time.sleep(1) + + if methods & telldus.TELLDUS_TOGGLE: + print " * Toggle\n" + + if methods & telldus.TELLDUS_DIM: + print " * Dim\n" + telldus.tdDim(deviceid, 128) + time.sleep(1) telldus.tdClose() \ No newline at end of file