Package PyDSTool :: Module common :: Class Verbose
[hide private]
[frames] | no frames]

Class Verbose

source code

object --+
         |
        Verbose

A class to handle reporting. Set the fileo attribute to any file instance to handle the output. Default is sys.stdout

Instance Methods [hide private]
 
__init__(self, level)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
setLevel(self, level)
set the verbosity to one of the Verbose.levels strings
source code
 
report(self, s, level='helpful')
print message s to self.fileo if self.level>=level.
source code
 
report_error(self, s)
print message s to self.fileo if self.level>=level.
source code
 
wrap(self, fmt, func, level='helpful', always=True)
return a callable function that wraps func and reports it output through the verbose handler if current verbosity level is higher than level
source code
 
ge(self, level)
return true if self.level is >= level
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]
  levels = ('silent', 'error', 'helpful', 'debug', 'debug-annoyi...
  vald = {'debug': 3, 'debug-annoying': 4, 'error': 1, 'helpful'...
  _commandLineVerbose = None
  i = 4
  level = 'debug-annoying'
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, level)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

report(self, s, level='helpful')

source code 

print message s to self.fileo if self.level>=level. Return value indicates whether a message was issue.

report_error(self, s)

source code 

print message s to self.fileo if self.level>=level. Return value indicates whether a message was issued

wrap(self, fmt, func, level='helpful', always=True)

source code 

return a callable function that wraps func and reports it output through the verbose handler if current verbosity level is higher than level

if always is True, the report will occur on every function call; otherwise only on the first time the function is called


Class Variable Details [hide private]

levels

Value:
('silent', 'error', 'helpful', 'debug', 'debug-annoying')

vald

Value:
{'debug': 3,
 'debug-annoying': 4,
 'error': 1,
 'helpful': 2,
 'silent': 0}