X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=bin%2FsalomeConsole.py;h=0a80ae6625935d44b50ac590ae52339439ef7658;hb=9ed27bb6b3a18d7554fa762bcbfc74d6018843a4;hp=c7875d06c577eaf24a3729c92e14f382f2a0f0be;hpb=e6bfea36374791cd31c274a2f97df90dc60ddaf3;p=modules%2Fkernel.git diff --git a/bin/salomeConsole.py b/bin/salomeConsole.py index c7875d06c..0a80ae662 100755 --- a/bin/salomeConsole.py +++ b/bin/salomeConsole.py @@ -1,23 +1,26 @@ #!/usr/bin/env python - -# Copyright (C) 2005 OPEN CASCADE, CEA, EDF R&D, LEG -# PRINCIPIA R&D, EADS CCR, Lip6, BV, CEDRAT +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +# +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either +# License as published by the Free Software Foundation; either # version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software +# +# You should have received a copy of the GNU Lesser General Public +# 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.salome-platform.org/ or email : webmaster.salome@opencascade.com -# +# import os import sys @@ -43,13 +46,14 @@ import SALOME_ModuleCatalog reload(Engines) reload(SALOME) reload(SALOMEDS) +import salome_utils import LifeCycleCORBA import orbmodule from runSalome import * -import Utils_Identity -files = glob.glob(os.path.join(os.environ["HOME"],Utils_Identity.getapplipath(),".omni*.cfg")) +omniorbUserPath = os.getenv("OMNIORB_USER_PATH") +files = glob.glob(os.path.join(omniorbUserPath,".omniORB_"+salome_utils.getUserName()+"_*.cfg")) filename="" if len(files)==1: @@ -62,24 +66,24 @@ else: if rep == "y": filename=f break - + if filename != "": os.environ['OMNIORB_CONFIG']=filename else: rep= raw_input("Do you want to try a local session on port 2810 ? [y|n]") if rep == "y": # Try a local session running on port 2810 - sys.argv=sys.argv+['-ORBInitRef','NameService=corbaname::localhost:2810'] + sys.argv=sys.argv+['-ORBInitRef','NameService=corbaname::localhost:2810']#+['-ORBgiopMaxMsgSize','2097152000'] # 2 GBytes else: sys.exit(1) -print sys.argv +#print sys.argv #direct adress from clt.orb.object_to_string(clt.rootContext) #sys.argv=sys.argv+['-ORBInitRef','NameService=IOR:010000000100000000000000010000000000000023000000010100000a0000006c6f63616c686f737400fa0a0b0000004e616d6553657276696365'] class client(orbmodule.client): - def initNS(self): + def initNS(self,args): # Obtain a reference to the root naming context obj = self.orb.resolve_initial_references("NameService") try: