def write(self, p_str):
        for segment in RE_SPLIT.split(p_str):
            if not segment:
                # Empty string. p_str probably starts with colors so the first item is always ''.
                continue
            if not RE_SPLIT.match(segment):
                # No color codes, print regular text.
                self._original_stream.write(segment)
                self._original_stream.flush()
                continue
            for color_code in (int(c) for c in RE_NUMBER_SEARCH.findall(segment)[0].split(';')):
                if color_code in self.COMPILED_CODES:
                    self.colors = self.COMPILED_CODES[color_code]
Schedules an action to be executed after duetime.
dataset/ETHPy150Open Robpol86/colorclass/colorclass/windows.py/WindowsStream.write--crossover with--dataset/ETHPy150Open ReactiveX/RxPY/rx/concurrency/immediatescheduler.py/ImmediateScheduler.schedule_relative