Salome HOME
Join modifications from branch BR_3_1_0deb
[samples/hello.git] / bin / myrunSalome.py
1 #!/usr/bin/env python
2
3 def test(clt):
4    """
5         Test function that creates an instance of HELLO component
6         usage : hello=test(clt)
7    """
8    # create an LifeCycleCORBA instance
9    import LifeCycleCORBA
10    lcc = LifeCycleCORBA.LifeCycleCORBA(clt.orb)
11    import HELLO_ORB
12    hello = lcc.FindOrLoadComponent("FactoryServer", "HELLO")
13    return hello
14
15 #
16
17 if __name__ == "__main__":
18    import user
19    from runSalome import *
20    clt,args = main()
21    
22    #
23    #  Impression arborescence Naming Service
24    #
25    
26    if clt != None:
27      print
28      print " --- registered objects tree in Naming Service ---"
29      clt.showNS()
30      session=clt.waitNS("/Kernel/Session")
31      catalog=clt.waitNS("/Kernel/ModulCatalog")
32      import socket
33      container =  clt.waitNS("/Containers/" + socket.gethostname().split('.')[0] + "/FactoryServer")