From 7265682a4d57d88956cb54f98f7a470465bbf417 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Mon, 18 Aug 2014 00:52:24 +0200 Subject: cleanup semicolons, whitespace and mutable default arguments --- examples/IoT_TestDevice.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'examples/IoT_TestDevice.py') diff --git a/examples/IoT_TestDevice.py b/examples/IoT_TestDevice.py index 8105aaff..cd80cee2 100755 --- a/examples/IoT_TestDevice.py +++ b/examples/IoT_TestDevice.py @@ -179,13 +179,13 @@ if __name__ == '__main__': # node=opts.nodeid, # jid=xmpp.boundjid.full) - myDevice = TheDevice(opts.nodeid); + myDevice = TheDevice(opts.nodeid) # myDevice._add_field(name="Relay", typename="numeric", unit="Bool"); - myDevice._add_field(name="Temperature", typename="numeric", unit="C"); + myDevice._add_field(name="Temperature", typename="numeric", unit="C") myDevice._set_momentary_timestamp("2013-03-07T16:24:30") - myDevice._add_field_momentary_data("Temperature", "23.4", flags={"automaticReadout": "true"}); + myDevice._add_field_momentary_data("Temperature", "23.4", flags={"automaticReadout": "true"}) - xmpp['xep_0323'].register_node(nodeId=opts.nodeid, device=myDevice, commTimeout=10); + xmpp['xep_0323'].register_node(nodeId=opts.nodeid, device=myDevice, commTimeout=10) xmpp.beClientOrServer(server=True) while not(xmpp.testForRelease()): xmpp.connect() -- cgit v1.2.3 From 3dd379cdf12d885e26f8ec26c54879a95d5f0b84 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Mon, 18 Aug 2014 15:15:14 +0200 Subject: Revert "cleanup semicolons, whitespace and mutable default arguments" This reverts commit 7265682a4d57d88956cb54f98f7a470465bbf417. --- examples/IoT_TestDevice.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'examples/IoT_TestDevice.py') diff --git a/examples/IoT_TestDevice.py b/examples/IoT_TestDevice.py index cd80cee2..8105aaff 100755 --- a/examples/IoT_TestDevice.py +++ b/examples/IoT_TestDevice.py @@ -179,13 +179,13 @@ if __name__ == '__main__': # node=opts.nodeid, # jid=xmpp.boundjid.full) - myDevice = TheDevice(opts.nodeid) + myDevice = TheDevice(opts.nodeid); # myDevice._add_field(name="Relay", typename="numeric", unit="Bool"); - myDevice._add_field(name="Temperature", typename="numeric", unit="C") + myDevice._add_field(name="Temperature", typename="numeric", unit="C"); myDevice._set_momentary_timestamp("2013-03-07T16:24:30") - myDevice._add_field_momentary_data("Temperature", "23.4", flags={"automaticReadout": "true"}) + myDevice._add_field_momentary_data("Temperature", "23.4", flags={"automaticReadout": "true"}); - xmpp['xep_0323'].register_node(nodeId=opts.nodeid, device=myDevice, commTimeout=10) + xmpp['xep_0323'].register_node(nodeId=opts.nodeid, device=myDevice, commTimeout=10); xmpp.beClientOrServer(server=True) while not(xmpp.testForRelease()): xmpp.connect() -- cgit v1.2.3 From afc939708ff71e168f9204f1eab8823b7dc9f875 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Mon, 18 Aug 2014 00:52:24 +0200 Subject: cleanup semicolons, whitespace and mutable default arguments --- examples/IoT_TestDevice.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'examples/IoT_TestDevice.py') diff --git a/examples/IoT_TestDevice.py b/examples/IoT_TestDevice.py index 8105aaff..cd80cee2 100755 --- a/examples/IoT_TestDevice.py +++ b/examples/IoT_TestDevice.py @@ -179,13 +179,13 @@ if __name__ == '__main__': # node=opts.nodeid, # jid=xmpp.boundjid.full) - myDevice = TheDevice(opts.nodeid); + myDevice = TheDevice(opts.nodeid) # myDevice._add_field(name="Relay", typename="numeric", unit="Bool"); - myDevice._add_field(name="Temperature", typename="numeric", unit="C"); + myDevice._add_field(name="Temperature", typename="numeric", unit="C") myDevice._set_momentary_timestamp("2013-03-07T16:24:30") - myDevice._add_field_momentary_data("Temperature", "23.4", flags={"automaticReadout": "true"}); + myDevice._add_field_momentary_data("Temperature", "23.4", flags={"automaticReadout": "true"}) - xmpp['xep_0323'].register_node(nodeId=opts.nodeid, device=myDevice, commTimeout=10); + xmpp['xep_0323'].register_node(nodeId=opts.nodeid, device=myDevice, commTimeout=10) xmpp.beClientOrServer(server=True) while not(xmpp.testForRelease()): xmpp.connect() -- cgit v1.2.3 From a0c6bf15e97a71787ffa4fec1850a995ba1d5446 Mon Sep 17 00:00:00 2001 From: Joshua Downer Date: Wed, 13 May 2015 17:24:06 -0400 Subject: Fixed imports Removed unused modules/packages and added getpass, which was missing. --- examples/IoT_TestDevice.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'examples/IoT_TestDevice.py') diff --git a/examples/IoT_TestDevice.py b/examples/IoT_TestDevice.py index cd80cee2..b85a0b7c 100755 --- a/examples/IoT_TestDevice.py +++ b/examples/IoT_TestDevice.py @@ -11,18 +11,10 @@ See the file LICENSE for copying permission. """ -import os -import sys -# This can be used when you are in a test environment and need to make paths right -sys.path=['/Users/jocke/Dropbox/06_dev/SleekXMPP']+sys.path - +import getpass import logging -import unittest -import distutils.core -import datetime +import sys -from glob import glob -from os.path import splitext, basename, join as pjoin from optparse import OptionParser from urllib import urlopen @@ -39,8 +31,6 @@ else: from sleekxmpp.plugins.xep_0323.device import Device -#from sleekxmpp.exceptions import IqError, IqTimeout - class IoT_TestDevice(sleekxmpp.ClientXMPP): """ -- cgit v1.2.3