Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
$ python script.py
Printing current values ...
Object a contains value 1
Object b contains value 2
Writing data for loop number 0 ...
Change json data (y/n) ? --type 'exit' to quit-- : y
jsonDict = dict(a=1,b=2)
i=0
print('Printing current values ...')
for key, modbusObject in jsonDict.items():
print("Object {} contains value {}".format(key, modbusObject))
print('Writing data for loop number '+str(i)+' ...')
# server.send_message_to_all(jsonDict)
#print('ho ho ho')
i += 1
cmd = raw_input('Change json data (y/n) ? --type \'exit\' to quit-- : ')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.