00001 #!/usr/bin/env python 00002 00003 import sys 00004 from omniORB import CORBA 00005 import Hello 00006 00007 orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID) 00008 00009 ior = sys.argv[1] 00010 obj = orb.string_to_object(ior) 00011 00012 hw = obj._narrow(Hello.World) 00013 00014 if hw is None: 00015 print "Object reference is not an Hello::World" 00016 sys.exit(1) 00017 00018 result = hw.hello() 00019 00020 print "The object said '%s'." % (result)