Esempio n. 1
0
 def SetColor(self, foreground_color):
     self._Escape(AsBytes('%dm' % self.color_map[foreground_color]))
Esempio n. 2
0
 def Reset(self):
     self._Escape(AsBytes('0m'))
Esempio n. 3
0
 def _Escape(self, code):
     PushWriteBinary()
     try:
         sys.stdout.write(AsBytes('\033[') + code)
     finally:
         PopWriteBinary()