diff options
author | Walter Purcaro <vuolter@gmail.com> | 2015-02-16 21:59:10 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2015-02-16 21:59:10 +0100 |
commit | 8e7d14bae4d3c836f029a1235eb227380acc3f75 (patch) | |
tree | ebd0679642cccb994e70a89a106b394189cb28bc /pyload/utils/printer.py | |
parent | Merge branch 'stable' into 0.4.10 (diff) | |
download | pyload-8e7d14bae4d3c836f029a1235eb227380acc3f75.tar.xz |
Fix plugins to work on 0.4.10
Diffstat (limited to 'pyload/utils/printer.py')
-rw-r--r-- | pyload/utils/printer.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/pyload/utils/printer.py b/pyload/utils/printer.py new file mode 100644 index 000000000..5d333e238 --- /dev/null +++ b/pyload/utils/printer.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# @author: vuolter + +import colorama + +colorama.init(autoreset=True) + +def color(color, text): + return colorama.Fore.(c.upper())(text) + +for c in colorama.Fore: + eval("%(color) = lambda msg: color(%(color), msg)" % {'color': c.lower()} + + +def overline(line, msg): + print "\033[%(line)s;0H\033[2K%(msg)s" % {'line': str(line), 'msg': msg} |