2 # Copyright (C) 2008-2016 EDF R&D
4 # This file is part of SALOME ADAO module
6 # This library is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU Lesser General Public
8 # License as published by the Free Software Foundation; either
9 # version 2.1 of the License.
11 # This library is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # Lesser General Public License for more details.
16 # You should have received a copy of the GNU Lesser General Public
17 # License along with this library; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 # Author: André Ribes, andre.ribes@edf.fr, EDF R&D
28 from optparse import OptionParser
29 from daYacsSchemaCreator.methods import *
30 from daYacsSchemaCreator.help_methods import *
32 def create_schema(config_file, yacs_schema_filename):
38 raise ValueError("\n\n Exception in loading %s"%config_file)
40 if "study_config" not in locals():
41 raise ValueError("\n\n Cannot found study_config in %s\n"%str(config_file))
43 globals()['study_config'] = locals()['study_config']
45 check_study(study_config)
46 proc = create_yacs_proc(study_config)
47 write_yacs_proc(proc, yacs_schema_filename)