summaryrefslogtreecommitdiffstats
path: root/module/cli/printer.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-05-10 21:23:46 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-05-10 21:23:46 +0200
commit60ae0ee3dce4715621b9964c91ad96e08e123204 (patch)
tree251aeb85742a32a8f3711879e4071a66e59bdc26 /module/cli/printer.py
parentfixes netload free (diff)
downloadpyload-60ae0ee3dce4715621b9964c91ad96e08e123204.tar.xz
rewritten cli, closed #275, #304
Diffstat (limited to 'module/cli/printer.py')
-rw-r--r--module/cli/printer.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/module/cli/printer.py b/module/cli/printer.py
new file mode 100644
index 000000000..c62c1800e
--- /dev/null
+++ b/module/cli/printer.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+def blue(string):
+ return "\033[1;34m" + unicode(string) + "\033[0m"
+
+def green(string):
+ return "\033[1;32m" + unicode(string) + "\033[0m"
+
+def yellow(string):
+ return "\033[1;33m" + unicode(string) + "\033[0m"
+
+def red(string):
+ return "\033[1;31m" + unicode(string) + "\033[0m"
+
+def cyan(string):
+ return "\033[1;36m" + unicode(string) + "\033[0m"
+
+def mag(string):
+ return "\033[1;35m" + unicode(string) + "\033[0m"
+
+def white(string):
+ return "\033[1;37m" + unicode(string) + "\033[0m"
+
+def println(line, content):
+ print "\033[" + str(line) + ";0H\033[2K" + content \ No newline at end of file