Package linda :: Module debug
[hide private]

Source Code for Module linda.debug

 1  import linda 
 2  from linda import charset, clparser 
 3   
4 -def dprint(msg, level=1):
5 """ 6 This function is responsible for printing out debug messages. 7 @param msg: the message is print out 8 @type msg: string 9 @param level: the debug level, as specified on the command line 10 @type level: integer 11 """ 12 if clparser['debug'] >= level and charset: 13 print _("D:"), 14 print msg.encode(charset)
15
16 -def vprint(msg, level):
17 if clparser['verbose'] >= level and not (level == 2 and \ 18 clparser['debug']) and charset: 19 print _("V:"), 20 print msg.encode(charset)
21