def push_data(self, data):
        """Push some data by putting it in the write buffer.

        Raise `EOFError` if the pipe is already closed.
        """
        if not PipeDispatcher.writable(self):
            raise EOFError('Input pipe closed.')
        elif self.__buffer:
            # Since we have to construct a new string, remove the already-sent data.
            self.__buffer = self.__buffer[self.__offset:] + data
        else:
            self.__buffer = data
        self.__offset = 0
Push some data by putting it in the write buffer.

        Raise `EOFError` if the pipe is already closed.
        
recipes/Python/576967_Asynchronous_pipe_communicatiusing/recipe-576967.py