def first_sentence(str):
    """
    Return the first sentence of a string - everything up to the period,
    or the whole text if there is no period.

    >>> first_sentence('')
    ''
    >>> first_sentence('Incomplete')
    ''
    >>> first_sentence('The first sentence.  This is ignored.')
    'The first sentence.'

    """
    return str[0:str.find('.') + 1]