def getPiDict(port,appname='salome',full=True):
from Utils_Identity import getShortHostName
- host = os.getenv("HOSTNAME")
+ # get hostname by special function in all cases to
+ # have always same result in lower case at win32
+ host = getShortHostName()
if not host:
- host = os.getenv("HOST")
+ host = os.getenv("HOSTNAME")
if not host:
- host = getShortHostName()
+ host = os.getenv("HOST")
filedict = []
filedict.append( os.getenv('USER') ) # user name
import sys, os, re
#import commands
from server import *
+from Utils_Identity import getShortHostName
# -----------------------------------------------------------------------------
#os.system("rm -f " + upath + "/omninames* " + upath + "/dummy " + upath + "/*.log")
print "Name Service... "
- hname=os.environ["HOST"] #commands.getoutput("hostname")
+ #hname=os.environ["HOST"] #commands.getoutput("hostname")
+ hname=getShortHostName()
print "hname=",hname
f=open(os.environ["OMNIORB_CONFIG"])
#log files localization
import os, commands, sys, re
+from Utils_Identity import getShortHostName
if sys.platform == "win32":
# temporarily using home directory for Namning Service logs
#os.system("rm -f " + upath + "/omninames* " + upath + "/dummy " + upath + "/*.log")
print "Name Service... "
- hname=os.environ["HOST"] #commands.getoutput("hostname")
+ #hname=os.environ["HOST"] #commands.getoutput("hostname")
+ hname=getShortHostName()
+
print "hname=",hname
f=open(os.environ["OMNIORB_CONFIG"])
from Utils_Identity import getShortHostName
if os.getenv("HOSTNAME") == None:
- if os.getenv("HOST") == None:
+ #if os.getenv("HOST") == None:
os.environ["HOSTNAME"]=getShortHostName()
- else:
- os.environ["HOSTNAME"]=os.getenv("HOST")
+ #else:
+ # os.environ["HOSTNAME"]=os.getenv("HOST")
theComputer = getShortHostName()
from omniORB import CORBA
import CosNaming
import Engines
+from Utils_Identity import getShortHostName
#initialise the ORB
sys.exit(1)
#resolve the name /Containers.dir/FactoryServerPy.object
-myMachine=string.split(os.getenv( "HOSTNAME" ),'.')
-machineName= myMachine[0]
+machineName=getShortHostName()
containerName = "FactoryServerPy"
name = [CosNaming.NameComponent("Containers","dir"),
CosNaming.NameComponent(machineName,"dir"),