#		Copyright (C) 2015 Noa-Emil Nissinen (4shadoww)

import sys
from core import colors

errorstr = "["+colors.bold+colors.red+"err"+colors.end+"] "
infostr = "["+colors.bold+colors.blue+"inf"+colors.end+"] "
warningstr = "["+colors.bold+colors.yellow+"war"+colors.end+"] "
successstr = "["+colors.bold+colors.green+"suf"+colors.end+"] "

def animline(message, last=False):
	sys.stdout.write("\033[K")
	if last == False:
		sys.stdout.write(message+"\r")
	else:
		sys.stdout.write(message+"\n")

def animError(message, last=False):
	sys.stdout.write("\033[K")
	if last == False:
		sys.stdout.write(errorstr+message+"\r")
	else:
		sys.stdout.write(errorstr+message+"\n")

def animWarning(message, last=False):
	sys.stdout.write("\033[K")
	if last == False:
		sys.stdout.write(warningstr+message+"\r")
	else:
		sys.stdout.write(warningstr+message+"\n")

def animInfo(message, last=False):
	sys.stdout.write("\033[K")
	if last == False:
		sys.stdout.write(infostr+message+"\r")
	else:
		sys.stdout.write(infostr+message+"\n")

def animSuccess(message, last=False):
	sys.stdout.write("\033[K")
	if last == False:
		sys.stdout.write(successstr+text+"\r")
	else:
		sys.stdout.write(successstr+text+"\n")
@@ -1,11 +1,17 @@
 #
-%09%09
+        
 Copyrigh
@@ -364,33 +364,36 @@
 e, last=False):%0A
-%09
+    
 sys.stdout.write
@@ -395,33 +395,36 @@
 write(%22%5C033%5BK%22)%0A
-%09
+    
 if last == False
@@ -417,34 +417,40 @@
  last == False:%0A
-%09%09
+        
 sys.stdout.write
@@ -460,33 +460,42 @@
 ssage+%22%5Cr%22)%0A
-%09
+    
 else:%0A
-%09%09
+        
 sys.stdout.w
@@ -542,33 +542,36 @@
 e, last=False):%0A
-%09
+    
 sys.stdout.write
@@ -573,33 +573,36 @@
 write(%22%5C033%5BK%22)%0A
-%09
+    
 if last == False
@@ -595,34 +595,40 @@
  last == False:%0A
-%09%09
+        
 sys.stdout.write
@@ -647,33 +647,42 @@
 ssage+%22%5Cr%22)%0A
-%09
+    
 else:%0A
-%09%09
+        
 sys.stdout.w
@@ -740,33 +740,36 @@
 e, last=False):%0A
-%09
+    
 sys.stdout.write
@@ -771,33 +771,36 @@
 write(%22%5C033%5BK%22)%0A
-%09
+    
 if last == False
@@ -793,34 +793,40 @@
  last == False:%0A
-%09%09
+        
 sys.stdout.write
@@ -847,33 +847,42 @@
 ssage+%22%5Cr%22)%0A
-%09
+    
 else:%0A
-%09%09
+        
 sys.stdout.w
@@ -939,33 +939,36 @@
 e, last=False):%0A
-%09
+    
 sys.stdout.write
@@ -970,33 +970,36 @@
 write(%22%5C033%5BK%22)%0A
-%09
+    
 if last == False
@@ -992,34 +992,40 @@
  last == False:%0A
-%09%09
+        
 sys.stdout.write
@@ -1043,33 +1043,42 @@
 ssage+%22%5Cr%22)%0A
-%09
+    
 else:%0A
-%09%09
+        
 sys.stdout.w
@@ -1143,17 +1143,20 @@
 False):%0A
-%09
+    
 sys.stdo
@@ -1174,17 +1174,20 @@
 033%5BK%22)%0A
-%09
+    
 if last 
@@ -1192,26 +1192,32 @@
 t == False:%0A
-%09%09
+        
 sys.stdout.w
@@ -1236,28 +1236,40 @@
 str+
-text
+message
 +%22%5Cr%22)%0A
-%09
+    
 else:%0A
-%09%09
+        
 sys.
@@ -1296,14 +1296,18 @@
 str+
-text
+message
 +%22%5Cn%22)
+%0A

change indent, fix