File: client.py

package info (click to toggle)
python-orbit 0.3.1-12
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,492 kB
  • ctags: 801
  • sloc: sh: 9,444; ansic: 5,642; python: 1,141; makefile: 126
file content (16 lines) | stat: -rwxr-xr-x 357 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env python

import sys, CORBA
from _GlobalIDL import Echo

if len(sys.argv) < 2:
	print "Usage: %s [num iterations]" % sys.argv[0]
	sys.exit(1)

orb = CORBA.ORB_init()
ior = open("ior").readline()
client = orb.string_to_object(ior)

for i in range( int(sys.argv[1]) ):
	client, f = client.echoString("Hello, world [%d]" % i)
	print "[client]", f