X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FTools%2FZCracksPlug%2FcasTests%2FlaunchCas.py;h=5ef7d8737a4ca9f5d49558a12a93365aa31db652;hp=4672776ec901f77b553ea1717468fb5be5a746fc;hb=0fc0831670e27a5611b941c52dc152fd63964515;hpb=651e7566c8d9c267c71320c63d3742a92426aa3e diff --git a/src/Tools/ZCracksPlug/casTests/launchCas.py b/src/Tools/ZCracksPlug/casTests/launchCas.py index 4672776ec..5ef7d8737 100644 --- a/src/Tools/ZCracksPlug/casTests/launchCas.py +++ b/src/Tools/ZCracksPlug/casTests/launchCas.py @@ -1,7 +1,25 @@ +# Copyright (C) 2016-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, 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 +# 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 +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# from Zcracks import genereCrack, Zset from Zcracks import utilityFunctions as uF -import genereCube +from . import genereCube from math import sqrt @@ -19,7 +37,7 @@ import string #tmpdir = "/local00/home/B27118/projets/Zcracks/Zcracks/casTests/tmpdir" #if not os.path.isdir(tmpdir): os.mkdir(tmpdir) tmpdir=tempfile.mkdtemp(prefix='tmpZcracks') -print "tmpdir=", tmpdir +print("tmpdir=", tmpdir) #meshgemsdir=os.environ('MESHGEMSHOME') #if len(meshgemsdir) > 0: @@ -27,7 +45,7 @@ print "tmpdir=", tmpdir #uF.removeFromSessionPath('LD_LIBRARY_PATH', meshgems) def LAUNCH(listCas=[]): - if type(listCas)!=list: listCas=[listCas] + if not isinstance(listCas, list): listCas=[listCas] N=20 L=1. @@ -194,18 +212,18 @@ def LAUNCH(listCas=[]): OK=[] NOOK=[] - for s in synthese.keys(): + for s in synthese: if synthese[s]: OK.append(s) else: NOOK.append(s) - print 'OK:' - print OK - print ' ' - print 'NOOK:' - print NOOK - print ' ' + print('OK:') + print(OK) + print(' ') + print('NOOK:') + print(NOOK) + print(' ') return(synthese)