Skip to content

Instantly share code, notes, and snippets.

@philippkeller
Created January 13, 2017 13:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save philippkeller/a3779a26da9d126c3ee912dfd07f6b19 to your computer and use it in GitHub Desktop.
Save philippkeller/a3779a26da9d126c3ee912dfd07f6b19 to your computer and use it in GitHub Desktop.
$ 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