SALOME documentation central

Loading PYHELLO component via LifeCycle service

The method of loading the component is not very different from that is described above. The services of the LifeCycle module are used in this case instead of calling the container directly. The call sequence is contained in the runSalome.Py test() function.

    c=test(clt)
    c.makeBanner("Christian")

The test function creates the LifeCycle object. It then asks for the PYHELLO component to be loaded in the FactoryServer container:

def test(clt):
    """
    Test function that creates an instance of PYHELLO component
    usage : hello=test(clt)
    """
    import LifeCycleCORBA
    lcc = LifeCycleCORBA.LifeCycleCORBA(clt.orb)
    import PYHELLO_ORB
    pyhello = lcc.FindOrLoadComponent("FactoryServePy", "PYHELLO")
    return pyhello

<< Previous
>> Next


Copyright © 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS