Back to index

salome-kernel  6.5.0
SALOME_utilities.py
Go to the documentation of this file.
00001 #  -*- coding: iso-8859-1 -*-
00002 # Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00003 #
00004 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00005 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00006 #
00007 # This library is free software; you can redistribute it and/or
00008 # modify it under the terms of the GNU Lesser General Public
00009 # License as published by the Free Software Foundation; either
00010 # version 2.1 of the License.
00011 #
00012 # This library is distributed in the hope that it will be useful,
00013 # but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015 # Lesser General Public License for more details.
00016 #
00017 # You should have received a copy of the GNU Lesser General Public
00018 # License along with this library; if not, write to the Free Software
00019 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00020 #
00021 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00022 #
00023 
00024 #  SALOME Utils : general SALOME's definitions and tools
00025 #  File   : SALOME_utilities.py
00026 #  Module : SALOME
00027 #
00028 import SALOME_Trace
00029 GLogger = SALOME_Trace.SALOME_Trace()
00030 
00031 from launchConfigureParser import verbose
00032 
00033 def MYTRACE ():
00034     if verbose():
00035         str = "- Trace "
00036         GLogger.putMessage(str + "  : ")
00037         
00038 
00039 def REPERE():
00040     if verbose():
00041         GLogger.putMessage("   --------------  \n")
00042 
00043 
00044 def BEGIN_OF(msg):
00045     if verbose():
00046         REPERE(); MYTRACE();
00047         GLogger.putMessage("Begin of : "+ str(msg) + "\n")
00048         REPERE();
00049 
00050 
00051 def END_OF(msg):
00052     if verbose():
00053         REPERE(); MYTRACE();
00054         GLogger.putMessage("Normale end of : "+ str(msg) + "\n")
00055         REPERE();
00056 
00057 def MESSAGE(msg):
00058     if verbose():
00059         MYTRACE()
00060         GLogger.putMessage(str(msg) + "\n")
00061 
00062 def SCRUTE(var_name, var_value):
00063     MYTRACE();
00064     GLogger.putMessage(var_name + " = " + str(var_value) + "\n")
00065 
00066