美文网首页
一段自己都不忍心看的垃圾代码,但总归解决问题了

一段自己都不忍心看的垃圾代码,但总归解决问题了

作者: 成功在于实践 | 来源:发表于2020-07-06 16:59 被阅读0次

    后期直接写入Excel文件,具体要怎么循环,再想想吧。

    print("'Area'   ,'EQ全路径',   '*类型',  "
          "'*浏览名'   ,'显示名'  ,'描述'   ,'是否记录历史'   ,'是否周期存储','存储周期'    ,"
          "'默认值'    ,'工程单位' ,量程上限   ,量程下限   ,'显示精度' ,'采样周期(毫秒)'"
          " ,'百分比死区(0.1%)'  ,'近零死区(0.1%)'   ,'是否限制在量程范围',   "
          "'是否有采集通道','  链路设备全路径'    ,'标签名'")
    for i in range(1,11):
            print(f"Area1,EQ1,AI,AI{i},,AI{i},TRUE,TRUE,10,0,,100,0,1,500,0,0,TRUE,TRUE,Site1.Network1.Device1,AI{i}")
            print(f"Area1,EQ2,AI,AI{i},,AI{i},TRUE,TRUE,10,0,,100,0,1,500,0,0,TRUE,TRUE,Site1.Network1.Device2,AI{i}")
            print(f"Area1,EQ3,AI,AI{i},,AI{i},TRUE,TRUE,10,0,,100,0,1,500,0,0,TRUE,TRUE,Site1.Network1.Device3,AI{i}")
            print(f"Area1,EQ4,AI,AI{i},,AI{i},TRUE,TRUE,10,0,,100,0,1,500,0,0,TRUE,TRUE,Site1.Network1.Device4,AI{i}")
            print(f"Area1,EQ5,AI,AI{i},,AI{i},TRUE,TRUE,10,0,,100,0,1,500,0,0,TRUE,TRUE,Site1.Network1.Device5,AI{i}")
            print(f"Area1,EQ6,AI,AI{i},,AI{i},TRUE,TRUE,10,0,,100,0,1,500,0,0,TRUE,TRUE,Site1.Network1.Device6,AI{i}")
            print(f"Area1,EQ7,AI,AI{i},,AI{i},TRUE,TRUE,10,0,,100,0,1,500,0,0,TRUE,TRUE,Site1.Network1.Device7,AI{i}")
            print(f"Area1,EQ8,AI,AI{i},,AI{i},TRUE,TRUE,10,0,,100,0,1,500,0,0,TRUE,TRUE,Site1.Network1.Device8,AI{i}")
            print(f"Area1,EQ9,AI,AI{i},,AI{i},TRUE,TRUE,10,0,,100,0,1,500,0,0,TRUE,TRUE,Site1.Network1.Device9,AI{i}")
            print(f"Area1,EQ10,AI,AI{i},,AI{i},TRUE,TRUE,10,0,,100,0,1,500,0,0,TRUE,TRUE,Site1.Network1.Device10,AI{i}")
            print(f"Area1,EQ11,AI,AI{i},,AI{i},TRUE,TRUE,10,0,,100,0,1,500,0,0,TRUE,TRUE,Site1.Network1.Device11,AI{i}")
            print(f"Area1,EQ12,AI,AI{i},,AI{i},TRUE,TRUE,10,0,,100,0,1,500,0,0,TRUE,TRUE,Site1.Network1.Device12,AI{i}")
            print(f"Area1,EQ13,AI,AI{i},,AI{i},TRUE,TRUE,10,0,,100,0,1,500,0,0,TRUE,TRUE,Site1.Network1.Device13,AI{i}")
            print(f"Area1,EQ14,AI,AI{i},,AI{i},TRUE,TRUE,10,0,,100,0,1,500,0,0,TRUE,TRUE,Site1.Network1.Device14,AI{i}")
            print(f"Area1,EQ15,AI,AI{i},,AI{i},TRUE,TRUE,10,0,,100,0,1,500,0,0,TRUE,TRUE,Site1.Network1.Device15,AI{i}")
            print(f"Area1,EQ16,AI,AI{i},,AI{i},TRUE,TRUE,10,0,,100,0,1,500,0,0,TRUE,TRUE,Site1.Network1.Device16,AI{i}")
            print(f"Area1,EQ17,AI,AI{i},,AI{i},TRUE,TRUE,10,0,,100,0,1,500,0,0,TRUE,TRUE,Site1.Network1.Device17,AI{i}")
            print(f"Area1,EQ18,AI,AI{i},,AI{i},TRUE,TRUE,10,0,,100,0,1,500,0,0,TRUE,TRUE,Site1.Network1.Device18,AI{i}")
            print(f"Area1,EQ19,AI,AI{i},,AI{i},TRUE,TRUE,10,0,,100,0,1,500,0,0,TRUE,TRUE,Site1.Network1.Device19,AI{i}")
            print(f"Area1,EQ20,AI,AI{i},,AI{i},TRUE,TRUE,10,0,,100,0,1,500,0,0,TRUE,TRUE,Site1.Network1.Device20,AI{i}")
    

    相关文章

      网友评论

          本文标题:一段自己都不忍心看的垃圾代码,但总归解决问题了

          本文链接:https://www.haomeiwen.com/subject/vxkgqktx.html