Since I'm on such a roll here and have your attention I'm gonna throw one more at you :)
My service is passing a datetime through a callback to the client. The client sees it as a Reference. I played around with it in an interpreter and dug into the python source a little, but haven't seen how to get the datetime value back. I do see methods on the datetime class, but not the value. What am I doing wrong?
Thanks
My simple example:
$ cat server.py
from configit import conf_from_file
from datetime import datetime
config = conf_from_file('../development.py')
from BridgePython import Bridge
class SimpleHandler(object):
def simple(self, callback=None):
if callback:
callback(datetime.now())
bridge = Bridge(api_key=config.private_api_key)
bridge.publish_service('simple', SimpleHandler())
bridge.connect()
$ cat client.py
from configit import conf_from_file
config = conf_from_file('../development.py')
from BridgePython import Bridge
bridge = Bridge(api_key=config.public_api_key)
client = None
def service_response(resp):
print(resp)
service = bridge.get_service('simple')
service.simple(service_response)
"""
Prints out:
$ python client.py
<BridgePython.reference.Reference object at 0x10b84f8d0>
Haven't figured out how to get this Reference object to give me the datetime.
"""