Salome HOME
Antoine a ajouté appels.py
[tools/eficas.git] / Utilites / appels.py
1 """
2 Module appels
3 -------------
4     le module appels ...
5 """
6
7 import sys
8 sortie=sys.stderr
9 sortie.write( "import de "+__name__+" : $Id$" )
10 sortie.write( "\n" )
11
12
13 def APPELS() :
14
15     """
16     Fonction APPELS
17     ---------------
18     La fonction APPELS ...
19     ..
20
21
22     Usage :
23         from appels import APPELS
24         APPELS()
25     """
26
27     print  "Passage dans APPELS"
28 ### try :
29 ###     1/0
30 ### except :
31 ###     import traceback
32 ###     trace=traceback.extract_stack()
33 ###     print trace
34
35     import traceback
36     trace=traceback.extract_stack()
37
38     trace.reverse()
39
40     decalage=""
41     if len(trace)>2 :
42         for e in trace[2:-1] :
43             fic,numero,fonc,inst = e
44             print decalage+fic+":"+str(numero)+": "+fonc,inst
45             decalage += "\t"
46
47     fic,numero,fonc,inst = trace[-1]
48     print decalage+fic+":"+str(numero)+": "+"__main__",inst
49
50
51     return
52
53
54 if __name__ == "__main__" :
55         APPELS()