1 # Copyright (C) 2016-2023 CEA, EDF
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Lesser General Public License for more details.
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 rep=("namespace ParaMEDMEM","namespace MEDCoupling")
22 rep=("ParaMEDMEM::","MEDCoupling::")
23 #rep=("ParaMEDMEMImpl::","MEDCouplingImpl::")
25 #rep=("_ParaMEDMEM__","_MEDCoupling__")
26 #rep=("ParaMEDMEM_","MEDCoupling_")
27 #rep=("ParaMEDMEMData","MEDCouplingData")
29 #rep=("ParaMEDMEM_1","MEDCoupling_1")
32 f=file(fi) ; lines=f.readlines() ; del f
33 lines2=[line.replace(*rep) for line in lines]
35 f=file(fi,"w") ; f.writelines(lines2) ; f.flush()
40 def rep1(dirname,rep):
42 for fi in os.listdir(dirname):
43 fi2=os.path.join(dirname,fi)
44 if not os.path.isfile(fi2):
49 dirs=["MEDCoupling","MEDCoupling/Test","MEDLoader","MEDLoader/Swig","MEDLoader/Test","MEDPartitioner","MEDPartitioner/Test","MEDPartitioner_Swig","RENUMBER","RENUMBER_Swig","INTERP_KERNELTest","ParaMEDMEM","ParaMEDLoader","ParaMEDMEMTest","ParaMEDMEM_Swig","doc/user/doxygen/fakesources","doc/user/doxygen/doxy2swig","doc/user/doxygen/doxfiles","/home/H87074/salome/DEV/modules/src/MED/src/MEDCouplingCorba","/home/H87074/salome/DEV/modules/src/MED/src/MEDCouplingCorba/Client","/home/H87074/salome/DEV/modules/src/MED/src/MEDCouplingCorba/Test","/home/H87074/salome/DEV/modules/src/MED/src/MEDCalc/cmp","/home/H87074/salome/DEV/modules/src/MED/src/MEDCalculator","/home/H87074/salome/DEV/modules/src/MED/src/MEDCalculator/Swig","/home/H87074/salome/DEV/modules/src/MED/src/MEDCalculator/Test","/home/H87074/salome/DEV/modules/src/PARAVIS/src/Plugins/MEDReader/IO"]
52 print(rep1(dirname,rep))
53 """for r,dirs,fis in os.walk(dirname):
55 if os.path.splitext(fi)[1] not in [".dox",".doxy"]:
57 i+=rep0(os.path.join(r,fi),rep)