def identityPumpPolicy(queue, target):
    """
    L{identityPumpPolicy} is a policy which delivers each chunk of data written
    to the given queue as-is to the target.

    This isn't a particularly realistic policy.

    @see: L{loopbackAsync}
    """
    while queue:
        bytes = queue.get()
        if bytes is None:
            break
        target.dataReceived(bytes)
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/protocols/loopback.py/identityPumpPolicy/original