diff options
author | Benoit Foucher <benoit@zeroc.com> | 2010-01-06 12:43:48 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2010-01-06 12:43:48 +0100 |
commit | bc2e4034079842cde62b6b44c4bdcd6a954f4f46 (patch) | |
tree | 0afd6dbfade2a57978227193d5dccdc267e89d7b /py/demo/Ice/async/Client.py | |
parent | bug 4495 - clean up book demos (diff) | |
download | ice-bc2e4034079842cde62b6b44c4bdcd6a954f4f46.tar.bz2 ice-bc2e4034079842cde62b6b44c4bdcd6a954f4f46.tar.xz ice-bc2e4034079842cde62b6b44c4bdcd6a954f4f46.zip |
Merged Mark's pythonami branch
Diffstat (limited to 'py/demo/Ice/async/Client.py')
-rwxr-xr-x | py/demo/Ice/async/Client.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/py/demo/Ice/async/Client.py b/py/demo/Ice/async/Client.py index 00aec3329f9..5060086e531 100755 --- a/py/demo/Ice/async/Client.py +++ b/py/demo/Ice/async/Client.py @@ -13,11 +13,11 @@ import sys, os, traceback, threading, Ice Ice.loadSlice('Hello.ice') import Demo -class AMI_Hello_sayHelloI: - def ice_response(self): +class Callback: + def response(self): pass - def ice_exception(self, ex): + def exception(self, ex): if isinstance(ex, Demo.RequestCanceledException): print "Demo.RequestCanceledException" else: @@ -54,7 +54,8 @@ class Client(Ice.Application): if c == 'i': hello.sayHello(0) elif c == 'd': - hello.sayHello_async(AMI_Hello_sayHelloI(), 5000) + cb = Callback() + hello.begin_sayHello(5000, cb.response, cb.exception) elif c == 's': hello.shutdown() elif c == 'x': |