2 # Copyright (C) 2008-2011 EDF R&D
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
20 # Author: André Ribes, andre.ribes@edf.fr, EDF R&D
26 from optparse import OptionParser
27 from daYacsSchemaCreator.methods import *
28 from daYacsSchemaCreator.help_methods import *
30 def create_schema(config_file, yacs_schema_filename):
36 logging.fatal("Exception in loading " + config_file)
40 if "study_config" not in locals():
41 logging.fatal("Cannot found study_config in " + str(config_file))
44 globals()['study_config'] = locals()['study_config']
46 check_study(study_config)
47 proc = create_yacs_proc(study_config)
48 write_yacs_proc(proc, yacs_schema_filename)