Renklendirme için kendi yöntemimizi de yapabilirz biz, değil mi? ;)

This commit is contained in:
Barış Metin
2005-06-16 17:57:49 +00:00
parent 467268f5e3
commit 9711df9de5
+3 -3
View File
@@ -1,7 +1,7 @@
# generic user interface
import sys
from output import *
from colors import colorize
# put the interface directly in the module
# since the UI is _unique_
@@ -19,11 +19,11 @@ def error(msg):
# default UI implementation
class CLI:
def info(self, msg):
sys.stdout.write(blue(msg))
sys.stdout.write(colorize(msg, 'blue'))
sys.stdout.flush()
def error(self,msg):
sys.stdout.write(bold(red(msg)))
sys.stdout.write(colorize(msg, 'red'))
sys.stdout.flush()
# default UI is CLI
impl = CLI()