1 #-*-coding:iso-8859-1-*-
3 # Copyright (C) 2008-2015 EDF R&D
5 # This file is part of SALOME ADAO module
7 # This library is free software; you can redistribute it and/or
8 # modify it under the terms of the GNU General Public
9 # License as published by the Free Software Foundation; either
10 # version 2.1 of the License.
12 # This library is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # Lesser General Public License for more details.
17 # You should have received a copy of the GNU Lesser General Public
18 # License along with this library; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 # Author: André Ribes, andre.ribes@edf.fr, EDF R&D
27 logging.basicConfig(level=logging.WARNING, format='%(levelname)-8s %(message)s')
29 logging.debug("-- Starting AdaoYacsSchemaCreator --")
31 # Check some basics variables
32 if "ADAO_ROOT_DIR" not in os.environ:
33 logging.fatal("You have to define ADAO_ROOT_DIR")
37 from daYacsSchemaCreator.run import *
38 from daYacsSchemaCreator.help_methods import *
40 logging.fatal("Import of ADAO python modules failed !" +
41 "\n add ADAO python installation directory in your PYTHONPATH")
46 from optparse import OptionParser
47 usage = "usage: %prog [options] config_file yacs_schema_filename"
49 my_parser = OptionParser(usage=usage, version=version)
50 (options, args) = my_parser.parse_args()
54 yacs_schema_filename = args[1]
55 create_schema(config_file, yacs_schema_filename)