smpl_debug.debug

Simplified python debuging.

Functions

check_count(line, fname, t)

Returns true if the count of the line is greater than or equal to t.

file(key, value[, level, times, seperator, ...])

Prints the message msg if level > debug_level to file filename.

file1(_key, _value[, level, times, _back])

Just like file() but times set to 1.

get_count(line, fname)

Returns the counts of the line.

get_frame([_back])

get_line_number([_back])

get_line_number_file([split, _back])

Gets the current filename and the current linenumber within it.

get_line_src([_back])

Gets the current line in the python source.

inc_count(line, fname)

Increments the count of the line.

line(msg_[, tag, level, times, _back])

line1(msg_[, tag, level, times, _back])

Just like line() but times set to 1.

msg(msg[, tag, level, times, line_, _back])

Prints the message msg if level > debug_level and always returns the msg.

msg1(_msg[, tag, level, times, line_, _back])

Just like msg() but times set to 1.

once([_back])

Returns true only one time

reset_count()

Resets global count_times.

reset_table()

Resets global cur_table_line.

reset_times()

Resets global count_times.

table(key, value[, level, times, seperator, ...])

Saves key:value in filename.

table_flush_header([filename, seperator])

Saves the current keys from table() to filename.

table_flush_line([filename, seperator])

Saves the current values from table() to filename

times([t, _back])

Returns true if the count of the current line is greater than or equal to t.