def _get_line(current_output):
    """ Back up in the output buffer to
        find the start of the current line,
        and return the entire line.
    """
    myline = []
    index = len(current_output)
    while index:
        index -= 1
        try:
            s = str(current_output[index])
        except:
            raise
        myline.append(s)
        if '\n' in s:
            break
    myline = ''.join(reversed(myline))
    return myline.rsplit('\n', 1)[-1]
