def __init__(self, original, new_redirect, wrap_buffer=False):
        '''
        :param stream original:
            The stream to be wrapped (usually stdout/stderr).

        :param stream new_redirect:
            Usually IOBuf (below).

        :param bool wrap_buffer:
            Whether to create a buffer attribute (needed to mimick python 3 s
            tdout/stderr which has a buffer to write binary data).
        '''
        self._redirect_to = (original, new_redirect)
        if wrap_buffer and hasattr(original, 'buffer'):
            self.buffer = IORedirector(original.buffer, new_redirect.buffer, False)

        :param stream original:
            The stream to be wrapped (usually stdout/stderr).

        :param stream new_redirect:
            Usually IOBuf (below).

        :param bool wrap_buffer:
            Whether to create a buffer attribute (needed to mimick python 3 s
            tdout/stderr which has a buffer to write binary data).
        
debugger/src/_pydevd_bundle/pydevd_io.py