コード例 #1
0
ファイル: functions.py プロジェクト: chrisnorman7/mmc2
def output(text, process = False, speak = True):
 """Output a line of text."""
 if process:
  command_parser.handle_incoming(text)
 else:
  gag_blank = application.config.get('application', 'gag_blank')
  text_stripped = text.strip()
  for x in xrange(text.count(beep)):
   wx.Bell()
  if text_stripped or not gag_blank:
   application.frame.output.write((text_stripped if gag_blank else text) + '\n')
   if speak:
    say(text_stripped, ignore_blank = True)
コード例 #2
0
ファイル: connection.py プロジェクト: chrisnorman7/mmc2
 def dataReceived(self, data):
  for line in data.split('\r\n'):
   application.lines += 1
   application.frame.SetStatusText('Lines received: %s.' % application.lines)
   command_parser.handle_incoming(line)