def _pad(input):

    _len = len(input)
    if _len == Card.length:
        return input
    elif _len > Card.length:
        strlen = _len % Card.length
        if strlen == 0:
            return input
        else:
            return input + ' ' * (Card.length - strlen)

    # minimum length is 80
    else:
        strlen = _len % Card.length
        return input + ' ' * (Card.length - strlen)
Pad blank space to the input string to be multiple of 80.
dataset/ETHPy150Open spacetelescope/PyFITS/pyfits/card.py/_pad