diff options
author | Mark Spruiell <mes@zeroc.com> | 2008-04-22 14:21:13 -0700 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2008-04-22 14:21:13 -0700 |
commit | c4fc985a6c9f68b65c77a572f97da120ac8ebe1c (patch) | |
tree | ad78a69fb54c8b0eb281272332f895d5cc387698 /py/demo/Ice/converter/Client.py | |
parent | IceGrid Win32 build fix (diff) | |
download | ice-c4fc985a6c9f68b65c77a572f97da120ac8ebe1c.tar.bz2 ice-c4fc985a6c9f68b65c77a572f97da120ac8ebe1c.tar.xz ice-c4fc985a6c9f68b65c77a572f97da120ac8ebe1c.zip |
bug 3012 - Python converter demo fixes
Diffstat (limited to 'py/demo/Ice/converter/Client.py')
-rwxr-xr-x | py/demo/Ice/converter/Client.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/py/demo/Ice/converter/Client.py b/py/demo/Ice/converter/Client.py index 0cfa49cb3db..c05f8f31ec8 100755 --- a/py/demo/Ice/converter/Client.py +++ b/py/demo/Ice/converter/Client.py @@ -24,8 +24,14 @@ x: exit """ def decodeString(str): - # TODO: implement properly! - return str + ret = "" + for i in range(0, len(str)): + n = ord(str[i]) + if n < 32 or n > 126: + ret += "\\" + oct(n)[1:] # Skip leading '0' + else: + ret += str[i] + return ret communicator1 = None communicator2 = None @@ -78,8 +84,6 @@ class Client: return 0 - - status = 0 try: @@ -105,7 +109,6 @@ except: traceback.print_exc() status = 1 - if communicator1: try: communicator1.destroy() |