def __init__(self, fh, close_when_done=False, **keywmap):
        """Wrap a dispatcher around the passed input filehandle.

        `close_when_done` closes the pipe as soon as the buffer is empty after
        the first `push_data()`.  Useful for communicating with subprocesses
        that read stdin to EOF before proceeding.
        """
        self.__buffer = None
        self.__offset = 0
        self.__close_when_done = close_when_done
        PipeDispatcher.__init__(self, fh, **keywmap)
Wrap a dispatcher around the passed input filehandle.

        `close_when_done` closes the pipe as soon as the buffer is empty after
        the first `push_data()`.  Useful for communicating with subprocesses
        that read stdin to EOF before proceeding.
        
recipes/Python/576967_Asynchronous_pipe_communicatiusing/recipe-576967.py