def wait_for_queue(handle):
    """
    Read from ``sbatch`` output whether the queue is full.

    :param object handle: sbatch handle
    :return: ``True`` if queue is full, else ``False``
    :rtype: :py:obj:`bool`
    """
    
    for f in (handle.stdout, handle.stderr):
        for line in f:
            if ("maximum number of jobs" in line or
                # A rare SLURM error, but may cause chaos in the 
                # information/accounting system
                "unable to accept job" in line):
                return True
    return False