# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2011 EDF R&D
+# Copyright (C) 2011-2012 EDF R&D
#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser 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.
+# 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
+# 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
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
# Author(s): Guillaume Boulant (23/03/2011)
#
# Preparing the configuration parameters
#
import os
+from salome.smesh.spadder.configreader import ConfigReader, printConfig
+
+configReader = ConfigReader()
+defaultConfig = configReader.getDefaultConfig()
+printConfig(defaultConfig)
+
from salome.smesh import spadder
-pathpadderexe=os.path.join(spadder.getTestDataDir(),"padder.exe")
-pathpadderenv=os.path.join(spadder.getTestDataDir(),"envPadder.sh")
file_concrete=os.path.join(spadder.getTestDataDir(),"concrete.med")
file_steelbar=os.path.join(spadder.getTestDataDir(),"ferraill.med")
# the catalog of SPADDER components, then load the component
# MeshJobManager, and finally configure this component.
#
-from salome.smesh import spadder
spadder.loadSpadderCatalog()
salome.salome_init()
component = salome.lcc.FindOrLoadComponent("FactoryServer","MeshJobManager")
-config = MESHJOB.ConfigParameter(resname="localhost",
- binpath=pathpadderexe,
- envpath=pathpadderenv)
+config = MESHJOB.ConfigParameter(resname=defaultConfig.resname,
+ binpath=defaultConfig.binpath,
+ envpath=defaultConfig.envpath)
component.configure("localhost",config)
#
#
# Start the execution of the job identified by its job id.
#
-component.start(jobid)
-
+ok=component.start(jobid)
#
# This part illustrates how you can follow the execution of the job.