예제 #1
0
nodeproxy.call("get")


####
# Use node facades to perform all messaging transparently.
# Local uses
# Asynchronous
def callback(*args):
    print "callback%s" % (args, )


def errback(*args):
    print "errback%s" % (args, )


nodefacade = facade.as_node_facade("//urchin" + nodeurl, True)
deferred = nodefacade.getattr("name")
deferred.register(callback, errback)

deferred = nodefacade.get()
deferred.register(callback, errback)

deferred = nodefacade.set(0)
deferred.register(callback, errback)

deferred = nodefacade.get()
deferred.register(callback, errback)

# Synchronous
nodefacade = facade.as_node_facade("//urchin" + nodeurl)
nodefacade.getattr("name")
예제 #2
0
파일: testing.py 프로젝트: mcruse/monotone
nodeproxy.call("set", 1)
nodeproxy.call("get")



####
# Use node facades to perform all messaging transparently.
# Local uses
# Asynchronous
def callback(*args):
    print "callback%s" % (args,)

def errback(*args):
    print "errback%s" % (args,)

nodefacade = facade.as_node_facade("//urchin" + nodeurl, True)
deferred = nodefacade.getattr("name")
deferred.register(callback, errback)

deferred = nodefacade.get()
deferred.register(callback, errback)

deferred = nodefacade.set(0)
deferred.register(callback, errback)

deferred = nodefacade.get()
deferred.register(callback, errback)

# Synchronous
nodefacade = facade.as_node_facade("//urchin" + nodeurl)
nodefacade.getattr("name")
예제 #3
0
nodeproxy.call("get")
nodeproxy.call("set", 1)
nodeproxy.call("get")


####
# Use node facades to perform all messaging transparently.
# Local uses
# Asynchronous
def callback(*args):
    print "callback%s" % (args,)

def errback(*args):
    print "errback%s" % (args,)

nodefacade = facade.as_node_facade("//urchin" + nodeurl, True)
deferred = nodefacade.getattr("name")
deferred.register(callback, errback)

deferred = nodefacade.get()
deferred.register(callback, errback)

deferred = nodefacade.set(1)
deferred.register(callback, errback)

deferred = nodefacade.get()
deferred.register(callback, errback)

# Synchronous
nodefacade = facade.as_node_facade("//urchin" + nodeurl)
nodefacade.getattr("name")