当前位置: 首页>>代码示例>>Python>>正文


Python ATT_IOT.deleteDevice方法代码示例

本文整理汇总了Python中ATT_IOT.deleteDevice方法的典型用法代码示例。如果您正苦于以下问题:Python ATT_IOT.deleteDevice方法的具体用法?Python ATT_IOT.deleteDevice怎么用?Python ATT_IOT.deleteDevice使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ATT_IOT的用法示例。


在下文中一共展示了ATT_IOT.deleteDevice方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: setup

# 需要导入模块: import ATT_IOT [as 别名]
# 或者: from ATT_IOT import deleteDevice [as 别名]
def setup(mylist):
    R=int(mylist[1])
    A=int(mylist[2])
    E=int(mylist[3])
    IOT.connect()
    
    for x in range(0, R):
        dtype = "RaspberryPi" + str(x)
        print("complete device name: "+dtype)
        devlist=IOT.createDevice(dtype, "lightSensor", True)
        with open('devicess.txt', 'a') as file_:
            file_.write(devlist[1] + " "+devlist [0] + '\n')

    for x in range(0, A):
        dtype = "Arduino" +str(x)
        devlist=IOT.createDevice(dtype, "lightSensor", True)
        with open('devicess.txt', 'a') as file_:
            file_.write(devlist[1] + " "+devlist [0] + '\n')

    for x in range(0, E):
        dtype = "IntelDevice"+str(x)
        devlist=IOT.createDevice(dtype, "lightSensor", True)
        with open('devicess.txt', 'a') as file_:
            file_.write(devlist[1] + " "+devlist [0] + '\n')
        IOT.deleteDevice()
开发者ID:samrudh,项目名称:finalRound_teamOops_IndiaHacks,代码行数:27,代码来源:create_d_test.py

示例2: open

# 需要导入模块: import ATT_IOT [as 别名]
# 或者: from ATT_IOT import deleteDevice [as 别名]


IOT.ClientId = "teamoopsindiahacks"
IOT.ClientKey ="5zgkgpfpxee"

#old setting working
#IOT.ClientId = "indiahack_oops"
#IOT.ClientKey ="1tbxrq5itbs"
IOT.connect()


# delete the output file devicess.txt

results=[]
with open('devicess.txt') as inputfile:
    results = list(csv.reader(inputfile))
    str1 =  ""
    print "inside file read"
    for line in results:
        print "inside lines... "
        str1 = ''.join(line)
        a = str1.split('\t')
        name= a[0]
        idd = 0
        IOT.DeviceId = str(a[1])
        print "This id deviceid:" + '\n'
        print IOT.DeviceId
       
        IOT.deleteDevice()
开发者ID:samrudh,项目名称:finalRound_teamOops_IndiaHacks,代码行数:31,代码来源:delete.py


注:本文中的ATT_IOT.deleteDevice方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。