2 # Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License.
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Lesser General Public License for more details.
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
26 st=st.replace("C++","Python")
27 st=st.replace("Cxx","Py")
28 st=st.replace("Cpp","Py")
29 st=st.replace("cxx","py")
30 st=st.replace("cpp","py")
33 fCpp=file(sys.argv[1],"r")
34 cppCont=fCpp.readlines() ; del fCpp
36 pyCont=[elt.replace("medcouplingcppexamples","medcouplingpyexamples") for elt in pyCont]
37 pyCont=[Cpp2Python(elt) for elt in pyCont]
39 outFileName=os.path.join(sys.argv[2],os.path.basename(sys.argv[1]))
41 f=file(os.path.splitext(outFileName)[0]+".dox","w")
42 f.writelines(cppCont+pyCont) ; del f