def __init__(self, no_input=False): try: with open(HIST_FILE, 'rb') as f: self._history = simplejson.loads(f.read()) self._history.reverse() except (IOError, simplejson.scanner.JSONDecodeError): pass self.no_input = no_input if not self.no_input: self.command_mode = CommandMode(self) self.playlist = get_silverlining_playlist()