1 #-*-coding:iso-8859-1-*-
2 # Copyright (C) 2008-2009 EDF R&D
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU 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
19 # Author : André RIBES (EDF R&D)
26 logging.basicConfig(level=logging.DEBUG, format='%(levelname)-8s %(message)s')
28 print "-- Starting AdaoYacsSchemaCreator --"
30 # Check some basics variables
31 if "ADAO_ROOT_DIR" not in os.environ:
32 logging.fatal("You have to define ADAO_ROOT_DIR")
36 from daYacsSchemaCreator.run import *
37 from daYacsSchemaCreator.help_methods import *
39 logging.fatal("Import of ADAO python modules failed !" +
40 "\n add ADAO python installation directory in your PYTHONPATH")
45 from optparse import OptionParser
46 usage = "usage: %prog [options] config_file yacs_schema_filename"
48 my_parser = OptionParser(usage=usage, version=version)
49 (options, args) = my_parser.parse_args()
53 yacs_schema_filename = args[1]
54 create_schema(config_file, yacs_schema_filename)