Salome HOME
EDF-CCAR : Rename runSalome.py in myrunSalome.py : it's a custom runSalome module
[samples/pyhello.git] / bin / myrunSalome.py
1 #!/usr/bin/env python
2
3 def test(clt):
4    """
5         Test function that creates an instance of PYHELLO component
6         usage : pyhello=test(clt)
7    """
8    # create an LifeCycleCORBA instance
9    import LifeCycleCORBA 
10    lcc = LifeCycleCORBA.LifeCycleCORBA(clt.orb)
11    import PYHELLO_ORB
12    pyhello = lcc.FindOrLoadComponent("FactoryServerPy", "PYHELLO")
13    return pyhello
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] + "/FactoryServerPy")