X-Git-Url: http://git.treefish.org/~alex/logalert.git/blobdiff_plain/082f53238d44c1b52dc6a8110ec7dc4c56aa41df..6b34e849bedd62deb8ef4964c399f3e6ebd87bb7:/src/misc.py?ds=inline diff --git a/src/misc.py b/src/misc.py index 8d8253d..821159f 100644 --- a/src/misc.py +++ b/src/misc.py @@ -48,3 +48,11 @@ def create_msg(title, icon, logfile, text, lines): for line in lines: msg += line + "\n" msg += "" return msg + +def print_list(lst, ptr): + txt = '[' + for i in range(0, len(lst)): + txt += str( lst[(ptr + i) % len(lst)] ) + if i < len(lst) - 1: txt += ', ' + txt += ']' + return txt