X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FTools%2FZCracksPlug%2F__init__.py;h=6d0ff1529ee42f259d849321b89005a3febd5d1b;hp=ed56ab165946dcf6ec85c0dfaf6d5b140165b80e;hb=d9f4b53e489dd5857db264ede6acded7b076c9f1;hpb=976def5878c6e3905816b97c67d6eadccc39673d diff --git a/src/Tools/ZCracksPlug/__init__.py b/src/Tools/ZCracksPlug/__init__.py index ed56ab165..6d0ff1529 100644 --- a/src/Tools/ZCracksPlug/__init__.py +++ b/src/Tools/ZCracksPlug/__init__.py @@ -1,6 +1,25 @@ +# Copyright (C) 2016-2022 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 +# + import sys, os, shutil, pickle, tempfile -import main, genereCrack, Zset -import utilityFunctions as uF +from Zcracks import main, genereCrack, Zset +from Zcracks import utilityFunctions as uF os.environ['QT_QPA_PLATFORM_PLUGIN_PATH']=os.path.join(os.environ['QTDIR'],'plugins','platforms') @@ -19,16 +38,16 @@ def IHM(): def SCRIPT(dataFile=None, data=None, dim=3, names=None): if dim!=3 and dim!=2: - print 'ERROR' + print('ERROR') return(False) if dataFile==None and data==None: - print 'One of dataFile or data is mandatory' + print('One of dataFile or data is mandatory') return(False) if data==None: data=pickle.load(open(dataFile,'r')) - print data + print(data) tmpdir=tempfile.mkdtemp(prefix='tmpZcracks') @@ -45,7 +64,7 @@ def SCRIPT(dataFile=None, data=None, dim=3, names=None): for f in [crackMed, crackedMed, saneGeo, crackGeo, crackedGeo]: if os.path.isfile(f): os.remove(f) - print crackMed + print(crackMed) genereCrack.main(data, crackMed) goOn=os.path.isfile(crackMed)