X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FTools%2Fpadder%2Fspadderpy%2F__init__.py;h=b007628c4ab21e2d1e11af2675a1ce13d3ab0eda;hp=025dfe4efab909a0d4831da5cf5207826a3bcb1a;hb=0fc0831670e27a5611b941c52dc152fd63964515;hpb=bd8f1aee7c78f7d2eb82bd4fec5e08c9e3d280ce diff --git a/src/Tools/padder/spadderpy/__init__.py b/src/Tools/padder/spadderpy/__init__.py index 025dfe4ef..b007628c4 100644 --- a/src/Tools/padder/spadderpy/__init__.py +++ b/src/Tools/padder/spadderpy/__init__.py @@ -1,9 +1,9 @@ -# Copyright (C) 2011-2013 EDF R&D +# Copyright (C) 2011-2020 EDF R&D # # 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 -# version 2.1 of the License. +# version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -53,38 +53,38 @@ def getTestPadderDataDir(): return datadir import MESHJOB # to get the enum constant values -from MESHJOB import MeshJobParameter, MeshJobParameterList +from MESHJOB import MeshJobFile, MeshJobFileList DEFAULT_CONCRETE_FILENAME=os.path.join(getTestDataDir(),'concrete.med') DEFAULT_STEELBAR_LISTFILENAME=[ os.path.join(getTestDataDir(),'ferraill.med') ] -def getMeshJobParameterList(concrete_filename=DEFAULT_CONCRETE_FILENAME, +def getMeshJobFileList(concrete_filename=DEFAULT_CONCRETE_FILENAME, steelbar_listfilename=DEFAULT_STEELBAR_LISTFILENAME): ''' This helper function creates a complete set of parameters (a - MeshJobParameterList) for a simple test case, i.e. a case with a + MeshJobFileList) for a simple test case, i.e. a case with a concrete filename and a single steelbar filename. ''' - # Note that a CORBA sequence (MeshJobParameterList) is mapped on a + # Note that a CORBA sequence (MeshJobFileList) is mapped on a # simple list in python - meshJobParameterList = [] + meshJobFileList = [] # We can add some parameters - param = MeshJobParameter( + param = MeshJobFile( file_name = concrete_filename, file_type = MESHJOB.MED_CONCRETE, group_name = "concrete") - meshJobParameterList.append(param) + meshJobFileList.append(param) for steelbar_filename in steelbar_listfilename: - param = MeshJobParameter( + param = MeshJobFile( file_name = steelbar_filename, file_type = MESHJOB.MED_STEELBAR, group_name = "steelbar") - meshJobParameterList.append(param) + meshJobFileList.append(param) - return meshJobParameterList + return meshJobFileList def getSpadderCatalogFilename(): @@ -98,11 +98,11 @@ def loadSpadderCatalog(): import SALOME_ModuleCatalog catalog = obj._narrow(SALOME_ModuleCatalog.ModuleCatalog) if not catalog: - raise RuntimeError, "Can't accesss module catalog" + raise RuntimeError("Can't access module catalog") filename = getSpadderCatalogFilename() catalog.ImportXmlCatalogFile(filename) from salome.kernel import services - print "The list of SALOME components is now:" - print services.getComponentList() + print("The list of SALOME components is now:") + print(services.getComponentList())