From: André Ribes Date: Wed, 16 Jun 2010 09:27:41 +0000 (+0200) Subject: - Répertoire bin: datassim to adao X-Git-Tag: V6_4_0rc3~147 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1f69c74dc2d19fd4ce154d99a0c0798057b23ae9;p=modules%2Fadao.git - Répertoire bin: datassim to adao --- diff --git a/bin/AdaoYacsSchemaCreator.py b/bin/AdaoYacsSchemaCreator.py new file mode 100644 index 0000000..4a1f913 --- /dev/null +++ b/bin/AdaoYacsSchemaCreator.py @@ -0,0 +1,55 @@ +#!/usr/bin/python +#-*-coding:iso-8859-1-*- +# Copyright (C) 2008-2009 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# -- +# Author : André RIBES (EDF R&D) +# -- + +import sys +import os +import traceback +import logging +logging.basicConfig(level=logging.DEBUG, format='%(levelname)-8s %(message)s') + +print "-- Starting AdaoYacsSchemaCreator --" + +# Check some basics variables +if "ADAO_ROOT_DIR" not in os.environ: + logging.fatal("You have to define ADAO_ROOT_DIR") + sys.exit(1) + +try: + from daYacsSchemaCreator.run import * + from daYacsSchemaCreator.help_methods import * +except: + logging.fatal("Import of ADAO python modules failed !" + + "\n add ADAO python installation directory in your PYTHONPATH") + traceback.print_exc() + sys.exit(1) + +# Parse arguments +from optparse import OptionParser +usage = "usage: %prog [options] config_file yacs_schema_filename" +version="%prog 0.1" +my_parser = OptionParser(usage=usage, version=version) +(options, args) = my_parser.parse_args() +check_args(args) + +config_file = args[0] +yacs_schema_filename = args[1] +create_schema(config_file, yacs_schema_filename) diff --git a/bin/DatassimYacsSchemaCreator.py b/bin/DatassimYacsSchemaCreator.py deleted file mode 100644 index 2f16117..0000000 --- a/bin/DatassimYacsSchemaCreator.py +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/python -#-*-coding:iso-8859-1-*- -# Copyright (C) 2008-2009 EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# -- -# Author : André RIBES (EDF R&D) -# -- - -import sys -import os -import traceback -import logging -logging.basicConfig(level=logging.DEBUG, format='%(levelname)-8s %(message)s') - -print "-- Starting DatassimYacsSchemaCreator --" - -# Check some basics variables -if "DATASSIM_ROOT_DIR" not in os.environ: - logging.fatal("You have to define DATASSIM_ROOT_DIR") - sys.exit(1) - -try: - from daYacsSchemaCreator.run import * - from daYacsSchemaCreator.help_methods import * -except: - logging.fatal("Import of DATASSIM python modules failed !" + - "\n add DATASSIM python installation directory in your PYTHONPATH") - traceback.print_exc() - sys.exit(1) - -# Parse arguments -from optparse import OptionParser -usage = "usage: %prog [options] config_file yacs_schema_filename" -version="%prog 0.1" -my_parser = OptionParser(usage=usage, version=version) -(options, args) = my_parser.parse_args() -check_args(args) - -config_file = args[0] -yacs_schema_filename = args[1] -create_schema(config_file, yacs_schema_filename) diff --git a/bin/Makefile.am b/bin/Makefile.am index f5d9783..fd3cce8 100644 --- a/bin/Makefile.am +++ b/bin/Makefile.am @@ -1,5 +1,5 @@ include $(top_srcdir)/adm_local/make_common_starter.am -bin_SCRIPTS = DatassimYacsSchemaCreator.py qtEficas_datassim_study.py +bin_SCRIPTS = AdaoYacsSchemaCreator.py qtEficas_adao_study.py -EXTRA_DIST = DatassimYacsSchemaCreator.py qtEficas_datassim_study.py.in +EXTRA_DIST = AdaoYacsSchemaCreator.py qtEficas_adao_study.py.in diff --git a/bin/qtEficas_adao_study.py.in b/bin/qtEficas_adao_study.py.in new file mode 100644 index 0000000..12c498f --- /dev/null +++ b/bin/qtEficas_adao_study.py.in @@ -0,0 +1,21 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +""" + Ce module sert à lancer EFICAS pour Adao +""" + +import sys +# Configuration de l'installation +INSTALLDIR = "@EFICAS_DIR@" +sys.path[:0]=[INSTALLDIR] +ADAO_INSTALL_DIR = "@PYTHON_SITE@/salome/daEficas" +sys.path[:0]=[ADAO_INSTALL_DIR] + +# Configuration +import prefs +import prefs_ADAO + +# Modules Eficas +from InterfaceQT4 import eficas_go +eficas_go.lance_eficas(code=prefs.code) diff --git a/bin/qtEficas_datassim_study.py.in b/bin/qtEficas_datassim_study.py.in deleted file mode 100644 index 5fcf963..0000000 --- a/bin/qtEficas_datassim_study.py.in +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -""" - Ce module sert à lancer EFICAS pour Datassim -""" - -import sys -# Configuration de l'installation -INSTALLDIR = "@EFICAS_DIR@" -sys.path[:0]=[INSTALLDIR] -DATASSIM_INSTALL_DIR = "@PYTHON_SITE@/salome/daEficas" -sys.path[:0]=[DATASSIM_INSTALL_DIR] - -# Configuration -import prefs -import prefs_DATASSIM - -# Modules Eficas -from InterfaceQT4 import eficas_go -eficas_go.lance_eficas(code=prefs.code)