add back write method and keep track of events for (future) event view

This commit is contained in:
Nick 2011-02-14 12:25:04 +01:00
parent 077f35ec5c
commit 23f64a5440
1 changed files with 6 additions and 0 deletions

View File

@ -92,6 +92,9 @@ class ConsoleUI(component.Component):
def __init__(self, args=None): def __init__(self, args=None):
component.Component.__init__(self, "ConsoleUI", 2) component.Component.__init__(self, "ConsoleUI", 2)
# keep track of events for the log view
self.events = []
try: try:
locale.setlocale(locale.LC_ALL, '') locale.setlocale(locale.LC_ALL, '')
self.encoding = locale.getpreferredencoding() self.encoding = locale.getpreferredencoding()
@ -160,3 +163,6 @@ class ConsoleUI(component.Component):
def on_client_disconnect(self): def on_client_disconnect(self):
component.stop() component.stop()
def write(self, s):
self.events.append(s)