예제 #1
0
	def on_status(self, status):
		try:
			print "|" + "_"*78 + "|"
			print utils.add_symbol(utils.colorize(status.author.screen_name, "B_CYAN"), 90)
			for line in self.status_wrapper.wrap(status.text):
				print utils.add_symbol_end(line, 80)
			timestamp = utils.colorize("at " + status.created_at.strftime("%A, %d/%m/%y, %H:%M:%S") + " from " + status.source, "CYAN")
			print utils.add_symbol(timestamp, 90)
		except:
			print 'error'
예제 #2
0
    def on_status(self, status):
        try:
			print "|" + "_"*78 + "|"
			print utils.add_symbol(utils.colorize(status.author.screen_name, "B_CYAN"), 90)
			for line in self.status_wrapper.wrap(status.text):
				print utils.add_symbol_end(line, 80)
			timestamp = utils.colorize("at " + status.created_at.strftime("%A, %d/%m/%y, %H:%M:%S") + " from " + status.source, "CYAN")
			print utils.add_symbol(timestamp, 90)
            #print self.status_wrapper.fill(status.text)
            #print '\n %s  %s  via %s\n' % (status.author.screen_name, status.created_at, status.source)
        except:
            # Catch any unicode errors while printing to console
            # and just ignore them to avoid breaking application.
            print 'error'