|
|
|
@ -17,6 +17,7 @@
|
|
|
|
|
|
|
|
|
|
import sys, struct, termios, fcntl
|
|
|
|
|
from cl_utils import _toUNICODE
|
|
|
|
|
import cl_overriding
|
|
|
|
|
|
|
|
|
|
class color_print(object):
|
|
|
|
|
_printSysOut = sys.stdout
|
|
|
|
@ -115,7 +116,10 @@ class color_print(object):
|
|
|
|
|
|
|
|
|
|
def defaultPrint(self, string):
|
|
|
|
|
self._printSysOut.write(string)
|
|
|
|
|
try:
|
|
|
|
|
self._printSysOut.flush()
|
|
|
|
|
except IOError:
|
|
|
|
|
cl_overriding.exit(1)
|
|
|
|
|
|
|
|
|
|
def printLine(self, argL, argR, offsetL=0, printBR=True):
|
|
|
|
|
"""Печатает справа и слева консоли цветные сообщения"""
|
|
|
|
@ -156,7 +160,10 @@ class color_print(object):
|
|
|
|
|
colorDict[''](rightString)
|
|
|
|
|
if printBR:
|
|
|
|
|
self._printSysOut.write("\n")
|
|
|
|
|
try:
|
|
|
|
|
self._printSysOut.flush()
|
|
|
|
|
except IOError:
|
|
|
|
|
cl_overriding.exit(1)
|
|
|
|
|
|
|
|
|
|
def printNotOK(self, string, offsetL=0, printBR=True):
|
|
|
|
|
"""Вывод на печать в случае сбоя"""
|
|
|
|
|