summaryrefslogtreecommitdiff
path: root/protobuf/demo/python/Client.py
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2015-03-19 11:08:42 -0230
committerDwayne Boone <dwayne@zeroc.com>2015-03-19 11:08:42 -0230
commit7c75df06e571dfa1e60e07fdbab952d75d844d83 (patch)
treeb3816e08686320eed257c6c05e21f43be2ee1d2e /protobuf/demo/python/Client.py
parentRename demo top level directories. (diff)
downloadice-7c75df06e571dfa1e60e07fdbab952d75d844d83.tar.bz2
ice-7c75df06e571dfa1e60e07fdbab952d75d844d83.tar.xz
ice-7c75df06e571dfa1e60e07fdbab952d75d844d83.zip
Removed protobuf demos
Diffstat (limited to 'protobuf/demo/python/Client.py')
-rw-r--r--protobuf/demo/python/Client.py70
1 files changed, 0 insertions, 70 deletions
diff --git a/protobuf/demo/python/Client.py b/protobuf/demo/python/Client.py
deleted file mode 100644
index ca79c2de5d4..00000000000
--- a/protobuf/demo/python/Client.py
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/usr/bin/env python
-# **********************************************************************
-#
-# Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.
-#
-# This copy of Ice Protobuf is licensed to you under the terms
-# described in the ICE_PROTOBUF_LICENSE file included in this
-# distribution.
-#
-# **********************************************************************
-
-import sys, traceback, Ice
-
-Ice.loadSlice('Hello.ice')
-import Demo
-from Person_pb2 import Person
-
-def menu():
- print """
-usage:
-t: send greeting
-s: shutdown server
-x: exit
-?: help
-"""
-
-class Client(Ice.Application):
- def run(self, args):
- if len(args) > 1:
- print self.appName() + ": too many arguments"
- return 1
-
- hello = Demo.HelloPrx.checkedCast(self.communicator().propertyToProxy('Hello.Proxy'))
- if not hello:
- print args[0] + ": invalid proxy"
- return 1
-
- menu()
-
- p = Person()
- p.id = 1
- p.name = "Fred Jones"
- p.email = "fred@jones.com"
-
- c = None
- while c != 'x':
- try:
- c = raw_input("==> ")
- if c == 't':
- hello.sayHello(p)
- elif c == 's':
- hello.shutdown()
- elif c == 'x':
- pass # Nothing to do
- elif c == '?':
- menu()
- else:
- print "unknown command `" + c + "'"
- menu()
- except KeyboardInterrupt:
- break
- except EOFError:
- break
- except Ice.Exception, ex:
- print ex
-
- return 0
-
-app = Client()
-sys.exit(app.main(sys.argv, "config.client"))