From 2b4d5520dd97f0dc2ec196efff6edea71404e346 Mon Sep 17 00:00:00 2001 From: abd Date: Fri, 3 Oct 2008 08:50:09 +0000 Subject: [PATCH] Win32 Porting Renaming of salome_utilities.py to salome_utils.py because it conflicts in name with SALOME_utilities.py from Utils package (Win32 python is not case sensitive for file system) --- bin/Makefile.am | 2 +- bin/NSparam.py | 2 +- bin/addToKillList.py | 2 +- bin/killSalomeWithPort.py | 6 +++--- bin/runSalome.py | 6 +++--- bin/salome_session.py | 4 ++-- bin/{salome_utilities.py => salome_utils.py} | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) rename bin/{salome_utilities.py => salome_utils.py} (99%) diff --git a/bin/Makefile.am b/bin/Makefile.am index 077743e33..328b52a91 100644 --- a/bin/Makefile.am +++ b/bin/Makefile.am @@ -61,7 +61,7 @@ dist_salomescript_SCRIPTS = \ runSalome.py \ salomeConsole.py \ salome_session.py \ - salome_utilities.py \ + salome_utils.py \ server.py \ setenv.py \ showNS.py \ diff --git a/bin/NSparam.py b/bin/NSparam.py index 2f93c9e54..e209063ff 100755 --- a/bin/NSparam.py +++ b/bin/NSparam.py @@ -31,7 +31,7 @@ def getNSparams(info=""): elif info==port print host else print 2 strings on stdout on one line: host port """ - from salome_utilities import getORBcfgInfo + from salome_utils import getORBcfgInfo my_version, my_host, my_port = getORBcfgInfo() if info=='host': # keep print, stdout used in shell diff --git a/bin/addToKillList.py b/bin/addToKillList.py index 548a8958d..e13aebc5d 100755 --- a/bin/addToKillList.py +++ b/bin/addToKillList.py @@ -29,7 +29,7 @@ def findFileDict(): Detect current SALOME session's port number. Returns port number. """ - from salome_utilities import getPortNumber + from salome_utils import getPortNumber port = getPortNumber() if verbose(): print "myport = ", port return port diff --git a/bin/killSalomeWithPort.py b/bin/killSalomeWithPort.py index 2308505a0..748d8e9d9 100755 --- a/bin/killSalomeWithPort.py +++ b/bin/killSalomeWithPort.py @@ -39,7 +39,7 @@ def getPiDict(port,appname='salome',full=True,hidden=True): - hidden : if True, file name is prefixed with . (dot) symbol; this internal parameter is used to support compatibility with older versions of SALOME """ - from salome_utilities import generateFileName, getTmpDir + from salome_utils import generateFileName, getTmpDir dir = "" if full: # full path to the pidict file is requested @@ -68,7 +68,7 @@ def appliCleanOmniOrbConfig(port): - ${HOME}/${APPLI}/.omniORB_last.cfg the last is removed only if the link points to the first file. """ - from salome_utilities import generateFileName + from salome_utils import generateFileName home = os.getenv("HOME") appli = os.getenv("APPLI") if appli is None: @@ -115,7 +115,7 @@ def killMyPort(port): try: fpid = open(filedict, 'r') # - from salome_utilities import generateFileName + from salome_utils import generateFileName fpidomniNames = generateFileName(os.path.join('/tmp/logs', os.getenv('USER')), prefix="", suffix="Pid_omniNames", diff --git a/bin/runSalome.py b/bin/runSalome.py index aae7d0dfa..334f5bafb 100755 --- a/bin/runSalome.py +++ b/bin/runSalome.py @@ -204,7 +204,7 @@ class LoggerServer(Server): def __init__(self,args): self.args=args self.initArgs() - from salome_utilities import generateFileName + from salome_utils import generateFileName if sys.platform == "win32": dirpath = os.environ["HOME"] else: dirpath = "/tmp" logfile = generateFileName( dirpath, @@ -749,7 +749,7 @@ def searchFreePort(args, save_config=1): if not portIsUsed(NSPORT, ports): print "%s - OK"%(NSPORT) # - from salome_utilities import generateFileName, getHostName + from salome_utils import generateFileName, getHostName hostname = getHostName() # home = os.getenv("HOME") @@ -831,7 +831,7 @@ def no_main(): def main(): """Salome launch as a main application""" import sys - from salome_utilities import getHostName + from salome_utils import getHostName print "runSalome running on %s" % getHostName() args, modules_list, modules_root_dir = setenv.get_config() kill_salome(args) diff --git a/bin/salome_session.py b/bin/salome_session.py index 64e13c951..cbf5a136f 100644 --- a/bin/salome_session.py +++ b/bin/salome_session.py @@ -39,7 +39,7 @@ def getShortHostName(): socket.gethostname() gives short or complete Hostname, depending on defined aliases. """ - from salome_utilities import getShortHostName + from salome_utils import getShortHostName return getShortHostName() def searchFreePort(): @@ -48,7 +48,7 @@ def searchFreePort(): Returns first found free port number. """ print "Searching a free port for naming service:", - from salome_utilities import generateFileName, getHostName + from salome_utils import generateFileName, getHostName hostname = getHostName() NSPORT = 2810 limit = NSPORT+100 diff --git a/bin/salome_utilities.py b/bin/salome_utils.py similarity index 99% rename from bin/salome_utilities.py rename to bin/salome_utils.py index b4349cd20..7b3aadeac 100644 --- a/bin/salome_utilities.py +++ b/bin/salome_utils.py @@ -18,7 +18,7 @@ # # --- # -# File : salome_utilities.py +# File : salome_utils.py # Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) # # --- -- 2.39.2