1 # -*- coding: utf-8 -*-
9 from developpeur import DEVELOPPEUR
19 developpeur.sortie.write( "import de "+__name__+" : $Id: execute.py,v 1.1 2003/03/06 14:36:11 eficas Exp $" )
20 developpeur.sortie.write( "\n" )
21 developpeur.sortie.flush()
26 def __init__ ( self, texte, contexte=None, verbeux=1 ) :
28 assert( type(texte) == types.StringType )
33 message.MESSAGE( "execution de "+texte )
35 exec texte in contexte
40 developpeur.sortie.write( "\n\n\n" )
41 message.MESSAGE( "Exception interceptee" )
42 scrute.SCRUTE( texte )
43 scrute.SCRUTE( contexte )
44 scrute.SCRUTE( e.__class__.__name__ )
45 scrute.SCRUTE( str(e) )
46 developpeur.sortie.write( "\n\n\n" )
47 developpeur.sortie.flush()
57 if __name__ == "__main__" :
58 class Ex(Exception) : pass
61 raise Ex( "y a bel et bien un erreur" )
70 scrute.SCRUTE(str(ee))
71 scrute.SCRUTE(ee.__class__)