Salome HOME
import SalomePro v1.2c
[modules/kernel.git] / src / Utils / utilities.py
1 #  SALOME Utils : general SALOME's definitions and tools
2 #
3 #  Copyright (C) 2003  CEA/DEN, EDF R&D
4 #
5 #
6 #
7 #  File   : utilities.py
8 #  Module : SALOME
9
10 import SALOME_Trace
11 GLogger = SALOME_Trace.SALOME_Trace()
12
13 def MYTRACE ():
14     if __debug__:
15         str = "- Trace "
16         GLogger.putMessage(str + "  : ")
17         
18
19 def REPERE():
20     if __debug__:
21         GLogger.putMessage("   --------------  \n")
22
23
24 def BEGIN_OF(msg):
25     if __debug__:
26         REPERE(); MYTRACE();
27         GLogger.putMessage("Begin of : "+ msg + "\n")
28         REPERE();
29
30
31 def END_OF(msg):
32     if __debug__:
33         REPERE(); MYTRACE();
34         GLogger.putMessage("Normale end of : "+ msg + "\n")
35         REPERE();
36
37 def MESSAGE(msg):
38     if __debug__:
39         MYTRACE()
40         GLogger.putMessage(msg + "\n")
41
42 def SCRUTE(var_name, var_value):
43     MYTRACE();
44     GLogger.putMessage(var_name + " = " + str(var_value) + "\n")
45
46