예제 #1
0
파일: players.py 프로젝트: chrisnorman7/lme
 def notify(self, text, colours = True, disconnect = False):
  text = '%s' % text
  if self.transport:
   self.transport.protocol.sendLine(
    util.format_colour(text) if colours else text,
    disconnect = disconnect
   )
   return True
  else:
   return False
예제 #2
0
def test_format_colour():
 logger.info(util.format_colour('{bold_on}This text should be {fg_blue}blue{fg_default}{bold_off}.{reset}'))