| Home | Trees | Index | Help |
|---|
| Package xmpp :: Module debug :: Class Debug |
|
| Method Summary | |
|---|---|
__init__(self,
active_flags,
log_file,
prefix,
sufix,
time_stamp,
flag_show,
validate_flags,
welcome)
| |
returns currently active flags. | |
returns 1 if any flags where actually set, otherwise 0. | |
is_active(self,
flag)
| |
Show(self,
flag,
msg,
prefix)
| |
flag can be of folowing types:... | |
filter out any dupes. | |
init param might contain nested lists, typically from group flags. | |
if multiple instances of Debug is used in same app, some flags might be created multiple time, filter out dupes | |
verify that flag is defined. | |
| Class Variable Summary | |
|---|---|
dict |
colors = {'warn': '\x1b[33;1m', 'stop': '\x1b[30;1m', 'o...
|
| Method Details |
|---|
active_get(self)returns currently active flags. |
active_set(self, active_flags=None)returns 1 if any flags where actually set, otherwise 0. |
show(self, msg, flag=None, prefix=None, sufix=None, lf=0)
flag can be of folowing types:
None - this msg will always be shown if any debugging is on
flag - will be shown if flag is active
(flag1,flag2,,,) - will be shown if any of the given flags
are active
if prefix / sufix are not given, default ones from init will be used
lf = -1 means strip linefeed if pressent
lf = 1 means add linefeed if not pressent
|
_append_unique_str(self, lst, item)filter out any dupes. |
_as_one_list(self, items)init param might contain nested lists, typically from group flags. This code organises lst and remves dupes |
_remove_dupe_flags(self)if multiple instances of Debug is used in same app, some flags might be created multiple time, filter out dupes |
_validate_flag(self, flags)verify that flag is defined. |
| Class Variable Details |
|---|
| Home | Trees | Index | Help |
|---|
| Generated by Epydoc 2.1 on Sun Dec 26 09:52:57 2004 | http://epydoc.sf.net |