Salome HOME
Adding Datastream and DSC_User, not compile for now
[modules/kernel.git] / src / TestContainer / TestComponentPy.py
index b6c2484631b151d525e25ecd96dcd7dd083f7e21..4cfa5b89697573f38bd54c2e3e7c77140a93a46e 100755 (executable)
@@ -19,7 +19,7 @@
 #  License along with this library; if not, write to the Free Software 
 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
 # 
-#  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 #
 #
@@ -34,7 +34,6 @@ import string
 from omniORB import CORBA
 import CosNaming
 import Engines
-from Utils_Identity import getShortHostName
 
 
 #initialise the ORB
@@ -49,7 +48,8 @@ if rootContext is None:
     sys.exit(1)
 
 #resolve the name /Containers.dir/FactoryServerPy.object
-machineName= getShortHostName()
+myMachine=string.split(os.getenv( "HOSTNAME" ),'.')
+machineName= myMachine[0]
 containerName = "FactoryServerPy"
 name = [CosNaming.NameComponent("Containers","dir"),
         CosNaming.NameComponent(machineName,"dir"),
@@ -62,7 +62,7 @@ except CosNaming.NamingContext.NotFound, ex:
     sys.exit(1)
 
 container = obj._narrow(Engines.Container)
-print container._get_machineName()
+print container.getHostName()
 comp = container.load_impl("SALOME_TestComponentPy","SALOME_TestComponentPy")
 print comp._get_instanceName()
 comp.ping()