summaryrefslogtreecommitdiff
path: root/py/demo/Ice/async/Client.py
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2010-01-06 12:43:48 +0100
committerBenoit Foucher <benoit@zeroc.com>2010-01-06 12:43:48 +0100
commitbc2e4034079842cde62b6b44c4bdcd6a954f4f46 (patch)
tree0afd6dbfade2a57978227193d5dccdc267e89d7b /py/demo/Ice/async/Client.py
parentbug 4495 - clean up book demos (diff)
downloadice-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-xpy/demo/Ice/async/Client.py9
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':