Created
January 13, 2017 13:16
-
-
Save philippkeller/a3779a26da9d126c3ee912dfd07f6b19 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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