def __init__(self, history, themeName=DEFAULT_THEME_NAME): self.history = history self.promptText = None self.promptStyle = None self.responseStyle = None self.inputLimit = None # Initialize the transcripts self.transcripts = [[]] self.transcript = self.transcripts[0] # Set the themes self.onThemeSet = NamedSignal('onThemeSet') self.setTheme(themeName) # Install the filter and document listener self.filter = CommandDocumentFilter() self.setDocumentFilter(self.filter) self.listener = CommandDocumentListener(self.history) self.addDocumentListener(self.listener)