예제 #1
0
# Get configuration
with open('/user/config/radio/radio.json') as settings_file:
    settings = json.load(settings_file)

serial_port = settings["port"]
serial_speed = int(settings["speed"])

Socket.Start(socket_port)


"""
State management
"""

codes, actions = State.getCodes()


"""
Json (to move to JsonParser)
"""


def is_json(jsonLine):
    try:
        json_object = json.loads(jsonLine)
    except ValueError, e:
        return False
    return True

"""