~ubuntu-branches/ubuntu/utopic/python-omniorb/utopic

« back to all changes in this revision

Viewing changes to examples/tests/pserver.py

  • Committer: Bazaar Package Importer
  • Author(s): Floris Bruynooghe
  • Date: 2008-03-26 22:17:38 UTC
  • Revision ID: james.westby@ubuntu.com-20080326221738-r20t9hmikbvcg2vh
Tags: upstream-3.2
ImportĀ upstreamĀ versionĀ 3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
 
2
 
 
3
import sys
 
4
from omniORB import CORBA, PortableServer
 
5
import PerfTest, PerfTest__POA
 
6
 
 
7
class I_i (PerfTest__POA.I):
 
8
 
 
9
    def op0(self,l): return l
 
10
    def op1(self,a): return a
 
11
    def op2(self,a): return a
 
12
    def op3(self,a): return a
 
13
    def op4(self,a): return a
 
14
    def op5(self,a): return a
 
15
    def op6(self,a): return a
 
16
    def op7(self,a): return a
 
17
    def op8(self,a): return a
 
18
    def op9(self,a): return a
 
19
    def opa(self,a): return a
 
20
 
 
21
orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
 
22
poa = orb.resolve_initial_references("RootPOA")
 
23
poa._get_the_POAManager().activate()
 
24
 
 
25
ii = I_i()
 
26
io = ii._this()
 
27
 
 
28
print orb.object_to_string(io)
 
29
 
 
30
if "-l" in sys.argv:
 
31
    print "Running locally...\n\n"
 
32
    import pclient
 
33
    pclient.doTests(orb, poa, io)
 
34
    orb.shutdown(1)
 
35
else:
 
36
    orb.run()