def Trace(func):
 def Decorate(self, *args, **kwargs):
  args_to_show = []
  if (args is not None):
   args_to_show.extend((str(argument) for argument in args))
  if (kwargs is not None):
   args_to_show.extend((('%s=%s' % (key, value)) for (key, value) in kwargs.iteritems()))
  args_string = ', '.join(args_to_show)
  self.log('Entering %s(%s)', func.func_name, args_string)
  self._indent_level += 1
  try:
   return func(self, *args, **kwargs)
  finally:
   self._indent_level -= 1
   self.log('Exiting %s(%s)', func.func_name, args_string)
 return Decorate

def Trace ( func ) : def Decorate ( self , * args , ** kwargs ) : args_to_show = [ ] if ( args is not None ) : args_to_show . extend ( ( str ( argument ) for argument in args ) ) if ( kwargs is not None ) : args_to_show . extend ( ( ( '%s=%s' % ( key , value ) ) for ( key , value ) in kwargs . iteritems ( ) ) ) args_string = ', ' . join ( args_to_show ) self . log ( 'Entering %s(%s)' , func . func_name , args_string ) self . _indent_level += 1 try : return func ( self , * args , ** kwargs ) finally : self . _indent_level -= 1 self . log ( 'Exiting %s(%s)' , func . func_name , args_string ) return Decorate
call stack logging decorator for hardenedmoduleshook class .