8 desc
= json
.JSONDecoder().decode('\n'.join(sys
.stdin
.readlines()))
10 # I think it is better to just let it throw an error
11 #if "dev" not in desc or "log" not in desc:
14 for devicename
, dev
in desc
["dev"].items():
15 dev
= desc
["dev"][devicename
]
16 typepath
= os
.path
.join(os
.path
.dirname(__file__
), dev
["type"], "generate.py")
17 # if not os.path.exists(typepath):
18 # print("Cannot find a handler for endpoint type " + dev["type"])
22 ctx
= imp
.load_source("generate", typepath
)