#!/usr/bin/env python
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
#
# 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
#
#
+# Usage: BuildPyExamplesFromCPP.py <examples.in> <output directory>
fCpp=file(sys.argv[1],"r")
cppCont=fCpp.readlines() ; del fCpp
cppCont=discardPythonFrom(cppCont) # remove Python-only contents from Cpp
+# Save CPP and PY examples in two separate dox files
outFileName=os.path.join(sys.argv[2],os.path.basename(sys.argv[1]))
-f=file(os.path.splitext(outFileName)[0]+".dox","w")
-f.writelines(cppCont+pyCont) ; del f
+f=file(os.path.splitext(outFileName)[0]+"CPP.dox","w")
+f.writelines(cppCont) ; del f
+
+f=file(os.path.splitext(outFileName)[0]+"PY.dox","w")
+f.writelines(pyCont) ; del f