Salome HOME
Merge 'master' branch into 'V9_dev' branch
authorrnv <rnv@opencascade.com>
Thu, 18 Jan 2018 17:26:12 +0000 (20:26 +0300)
committerrnv <rnv@opencascade.com>
Thu, 18 Jan 2018 17:26:12 +0000 (20:26 +0300)
21 files changed:
1  2 
bin/salomeContext.py
doc/salome/examples/example19
doc/salome/kernel_services.dox
doc/salome/python_doc_compl.dox
idl/SALOME_Component.idl
src/KERNEL_PY/__init__.py
src/KERNEL_PY/kernel/enumerate.py
src/KERNEL_PY/kernel/services.py
src/KERNEL_PY/salome_iapp.py
src/KERNEL_PY/salome_test.py
src/Launcher/Test/test_launcher.py
src/ModuleCatalog/SALOME_ModuleCatalog_Acomponent_impl.cxx
src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx
src/ParallelContainer/SALOME_ParallelContainerProxy_i.cxx
src/SALOMEDS/SALOMEDS_StudyBuilder.cxx
src/SALOMEDS/Test/TestSALOMEDS.cxx
src/SALOMESDS/SALOMESDS_DataScopeServer.cxx
src/SALOMESDS/SALOMESDS_DataScopeServer.hxx
src/SALOMESDS/SALOMESDS_PickelizedPyObjRdExtServer.cxx
src/SALOMESDS/SALOMESDS_PickelizedPyObjRdWrServer.cxx
src/SALOMESDS/TestSalomeSDS.py

Simple merge
index afa10acb7b2898cb7bb2c7de04af2e2ef4ebc125,19bd49ec0356d2b994d98ada62fdcd84323e9fb5..45785ad4cf1edbfa643ffe4493a0e459c06d4731
@@@ -304,10 -304,10 +304,10 @@@ ior = batchmode_geompy.orb.object_to_st
  addStudy(ior)
  
  GraphName = myGraph.Name()
- print("Befor save ",)
 -print "Before save ",
++print("Before save ",)
  nodes = myGraph.Nodes()
  length_bs = len(nodes)
 -print "ListOfNodes length = ", length_bs
 +print("ListOfNodes length = ", length_bs)
  names=[]
  for node in nodes:
          names.append(node.Name())
@@@ -425,9 -425,9 +425,9 @@@ if res 
          Graph=SuperV.getGraph(ior)
          ListOfNodes=Graph.Nodes()
          length_as= len(ListOfNodes)
 -        print "ListOfNodes length = ", length_as
 +        print("ListOfNodes length = ", length_as)
          if length_as != length_bs:
-                 raise RuntimeErrror, "defferent length of nodes after study open"
+                 raise RuntimeErrror, "different length of nodes after study open"
  #aChildIterator.Next()
  
  Names = []
@@@ -525,9 -525,9 +525,9 @@@ if res 
          Graph=SuperV.getGraph(ior)
          ListOfNodes=Graph.Nodes()
          length_as= len(ListOfNodes)
 -        print "ListOfNodes length = ", length_as
 +        print("ListOfNodes length = ", length_as)
          if length_as != length_bs:
-                 raise RuntimeErrror, "defferent length of nodes after study open"
+                 raise RuntimeErrror, "different length of nodes after study open"
  #aChildIterator.Next()
  
  Names = []
Simple merge
Simple merge
Simple merge
index 08c13f38ddba527704a17a79c9469b979951dbc3,47b0b2c43beb1f9b88f17f363df43c8bdad70514..9c78533a928ebd85c6d974dc7b957636d5e8f2bc
@@@ -162,12 -166,40 +162,12 @@@ if not flags
  #    pass
  
  orb, lcc, naming_service, cm,sg=None,None,None,None,None
 -myStudyManager, myStudyId, myStudy, myStudyName=None,None,None,None
 -
 -def setCurrentStudy(theStudy):
 -    """
 -    Change current study : an existing one given by a study object.
 -
 -    :param theStudy: the study CORBA object to set as current study
 -    """
 -    global myStudyId, myStudy, myStudyName
 -    myStudyId, myStudy, myStudyName =salome_study.setCurrentStudy(theStudy)
 -
 -def setCurrentStudyId(theStudyId=0):
 -    """
 -    Change current study : an existing or new one given by Id.
 -
 -    :param theStudyId: the study Id (optional argument)
 -           0      : create a new study (default).
 -           n (>0) : try connection to study with Id = n, or create a new one
 -                      if study not found.
 -    """
 -    global myStudyId, myStudy, myStudyName
 -    myStudyId, myStudy, myStudyName =salome_study.setCurrentStudyId(theStudyId)
 +myStudy, myStudyName=None,None
  
  salome_initial=1
 -def salome_init(theStudyId=0,embedded=0):
 +def salome_init(embedded=0):
      """
-     Performs only once SALOME general purpose initialization for scripts.
+     Performs only once SALOME general purpose initialisation for scripts.
 -    optional argument : theStudyId
 -      When in embedded interpreter inside IAPP, theStudyId is not used
 -      When used without GUI (external interpreter)
 -        0      : create a new study (default).
 -        n (>0) : try connection to study with Id = n, or create a new one
 -                 if study not found.
 -                 If study creation, its Id may be different from theStudyId !
      Provides:
      orb             reference to CORBA
      lcc             a LifeCycleCorba instance
index ad04448afe98395c7bca4dc6b855c9570af58bd5,2190b2a018078669d706ffc9b2527a5d64dbfe2d..2ff423acaabbf5f37ccddfec9427c9c73c28a15d
@@@ -62,18 -61,18 +62,18 @@@ class Enumerate(object)
          Return true if this enumerate contains the specified key string
          @key a key string to test
          """
 -        return (key in self._dict_keynumbers.keys())
 +        return key in self._dict_keynumbers
  
      ## Returns true if the specified integer value is defined as an identifier
-     #  in this enumarate.
+     #  in this enumerate.
      #  \param value a value to test
      def isValid(self, value):
          """
          Returns true if the specified integer value is defined as an identifier
-         in this enumarate.
+         in this enumerate.
          @value a value to test
          """
 -        return (value in self._dict_keynumbers.values())
 +        return value in self._dict_numberkeys
  
      ## Returns the list of keys in this enumerate.
      def listkeys(self):
index e14023b7e84afbae17d12aebe9fde18408c7ce7b,57cdf9b7efc3233a4bf7224e013c4f117ae1de16..31038407cb42185ad0616797a62beb34c2c0537a
@@@ -120,18 -120,24 +120,18 @@@ def getComponentList()
      obj = salome.naming_service.Resolve('Kernel/ModulCatalog')
      catalog = obj._narrow(SALOME_ModuleCatalog.ModuleCatalog)
      if not catalog:
-         raise RuntimeError("Can't accesss module catalog")
 -        raise RuntimeError, "Can't access module catalog"
++        raise RuntimeError("Can't access module catalog")
      return catalog.GetComponentList()
  
 -## Get a study manager to create and manage %SALOME studies
 -#  \ingroup service
 -def getStudyManager():
 -    """Get a study manager to create and manage SALOME studies"""
 -    return salome.myStudyManager
 -
  import SALOMEDS
 -## Get a study manager to create and manage SALOME studies
 -#  \warning you should use instead the variable salome.myStudyManager
 +## Get a study to create SALOME study
 +#  \warning you should use instead the variable salome.myStudy. 
  #  This function is given for illustration of usage of the naming service
  #  \ingroup service
 -def __getStudyManager_demo():
 +def __getStudy_demo():
      """
 -    Get a study manager to create and manage SALOME studies. WARN: you
 -    should use instead the variable salome.myStudyManager. This
 +    Get a study to create SALOME study. WARN: you
 +    should use instead the variable salome.myStudy. This
      function is given for illustration of usage of the naming service
      """
      naming_service = SALOME_NamingServicePy_i( orb )
index 4a2521a60a24ba586e99f2c8bdf546053d2385e8,8c6f8d7cd5b82248a578be1838dc7798657f0f27..24deed4111d47b32031ea73a31bde64692d08dda
@@@ -89,13 -94,13 +89,13 @@@ class SalomeOutsideGUI(object)
      
      def SelectedCount(self):
          """Get the number of active selections"""
-         print("SalomeOutsideGUI: no selection mecanism available outside GUI")
 -        print "SalomeOutsideGUI: no selection mechanism available outside GUI"
++        print("SalomeOutsideGUI: no selection mechanism available outside GUI")
          return 0
      
      def getSelected(self, i):
          """Get the selection number i """
-         print("SalomeOutsideGUI: no selection mecanism available outside GUI")
-         return None
 -        print "SalomeOutsideGUI: no selection mechanism available outside GUI"
++        print("SalomeOutsideGUI: no selection mechanism available outside GUI")
+         return none
      
      def AddIObject(self, Entry):
          """Add an entry"""
index 15fa6891737eff0277de6a923105502e9d655b5a,76dceacd467a9874ce0f7e58d8ff434286e39b21..4c4c05110c2e0c75c31f833b4801ab8c4480bc2d
@@@ -54,65 -54,65 +54,66 @@@ print("================================
  obj = salome.naming_service.Resolve('Kernel/ModulCatalog')
  catalog = obj._narrow(SALOME_ModuleCatalog.ModuleCatalog)
  if not catalog:
-     raise RuntimeError("Can't accesss module catalog")
 -    raise RuntimeError, "Can't access module catalog"
 -print "OK"
 -print
++    raise RuntimeError("Can't access module catalog")
 +print("OK")
  
 -print "======================================================================"
 -print "           %d. Check modules availability in the module catalog " % step; step+=1
 -print "======================================================================"
 +print()
 +
 +print("======================================================================")
 +print("           %d. Check modules availability in the module catalog " % step); step+=1
 +print("======================================================================")
  
  for module in [ "GEOM", "SMESH", "MEDFactory", "PVSERVER"]:
 -    print
 -    print "--- Check %s ..." % module
 +    print()
 +    print("--- Check %s ..." % module)
      comp = catalog.GetComponent(module)
      if not comp:
 -        raise RuntimeError, "Component %s is not found in Module Catalog." % module
 -    print "OK"
 +        raise RuntimeError("Component %s is not found in Module Catalog." % module)
 +    print("OK")
      pass
  
 -print
 +print()
  
 -print "======================================================================"
 -print "           %d. Test Data Server " % step; step+=1
 -print "======================================================================"
 +print("======================================================================")
 +print("           %d. Test Data Server " % step); step+=1
 +print("======================================================================")
  
 -print
 -print "--- Create new component ..."
 +print()
 +print("--- Create new component ...")
  comp = builder.NewComponent("TEST")
  if not comp:
 -    raise RuntimeError, "Can't create new component"
 -print "OK"
 +    raise RuntimeError("Can't create new component")
 +print("OK")
  
 -print
 -print "--- Create AttributeName ..."
 +print()
 +print("--- Create AttributeName ...")
  A = builder.FindOrCreateAttribute(comp, "AttributeName")
  if not A:
 -    raise RuntimeError, "Can't create AttributeName attribute"
 +    raise RuntimeError("Can't create AttributeName attribute")
  A.SetValue("TEST")
  if A.Value() != "TEST":
 -    raise RuntimeError, "Error : wrong value of  AttributeName"
 -print "OK"
 +    raise RuntimeError("Error : wrong value of  AttributeName")
 +print("OK")
  
 -print
 -print "--- Create AttributeReal ..."
 +print()
 +print("--- Create AttributeReal ...")
  A = builder.FindOrCreateAttribute(comp, "AttributeReal")
  if not A:
 -    raise RuntimeError, "Can't create AttributeReal attribute"
 +    raise RuntimeError("Can't create AttributeReal attribute")
  A.SetValue(0.0001)
  if A.Value() != 0.0001:
 -    raise RuntimeError, "Error : wrong value of  AttributeReal"
 -print "OK"
 +    raise RuntimeError("Error : wrong value of  AttributeReal")
 +print("OK")
  
 -print
 +print()
  
 -print "======================================================================"
 -print "           %d. Test Geometry " % step; step+=1
 -print "======================================================================"
 +print("======================================================================")
 +print("           %d. Test Geometry " % step); step+=1
 +print("======================================================================")
  
  from salome.geom import geomBuilder
 -geompy = geomBuilder.New(salome.myStudy)
 +geompy = geomBuilder.New()
  
  ShapeTypeCompSolid = 1
  ShapeTypeSolid = 2
Simple merge
index 240d60a8a4035e94cacb9694ae1c57f7af9717ef,5ee49c0be2218e1689c822d9c9f25e87a26b0b18..9e574d2747cca4c8d965122c71e9b0b0cfc20c20
@@@ -42,9 -42,10 +42,9 @@@ static int MYDEBUG = 0
  //----------------------------------------------------------------------
  // Function : SALOME_ModuleCatalog_AcomponentImpl
  // Purpose  : Constructor
- //            Affect the component name, type,icone
 -//            Affect the component name, type, icon, and bool to define 
 -//            if it's multi-study or not.
++//            Affect the component name, type,icon
  //            Affect too the constraint and the interfaces of the component
- //            and the pathes prefixes for all computers
+ //            and the path prefixes for all computers
  //----------------------------------------------------------------------  
  SALOME_ModuleCatalog_AcomponentImpl::SALOME_ModuleCatalog_AcomponentImpl
  (SALOME_ModuleCatalog::ComponentDef &C) : _Component(C)
Simple merge
index 860e53d6a692a0ccdb27806874175b752a7961cb,c12add197c20b9ccb78dd8b0a87c7b1e4d7b284f..fed46259265c0983f14143c090e71f8ace199328
@@@ -162,6 -167,9 +167,7 @@@ namespace SALOMESD
      SALOME::KeyWaiter_ptr waitForKeyInVar(const char *varName, const SALOME::ByteVec& keyVal);
      SALOME::KeyWaiter_ptr waitForKeyInVarAndKillIt(const char *varName, const SALOME::ByteVec& keyVal, SALOME::Transaction_out transac);
      void atomicApply(const SALOME::ListOfTransaction& transactions);
 -  private:
 -    PyObject *getPyCmpFunc();
+     SALOME::RequestSwitcher_ptr getRequestSwitcher();
    private:
      PortableServer::POA_var _poa_for_key_waiter;
      std::list< KeyWaiter * > _waiting_keys;
index 3caceef906eb4c17a3775ac5fff76496c0b76ed6,b5f1aa0b8892bbe65b12921ae15dd54e65f7dae1..155085b4772fc565d220972f6ae63512ced3f3e5
@@@ -51,16 -51,14 +51,16 @@@ def work(t)
      import TestSalomeSDSHelper0
      import os,subprocess
      fname=os.path.splitext(TestSalomeSDSHelper0.__file__)[0]+".py"
 -    proc=subprocess.Popen(["python",fname],stdout=subprocess.PIPE,stderr=subprocess.PIPE)
 +    proc = subprocess.Popen(["python3", fname], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
      out,err=proc.communicate()
      if proc.returncode!=0:
 -      print out
 -      print err
 +      print("-------------- work -----------")
 +      print(out)
 +      print(err)
 +      print("~~~~~~~~~~~~~~ work ~~~~~~~~~~~")
      return proc.returncode
    
- def func_test7(scopeName,l,l2,cv):
+ def func_test7(scopeName,cv,cv2,cv3,sharedNum):
      salome.salome_init()
      varName="a"
      zeValue={"ab":[4,5,6]}