def get_text(prompt='', msg=None, input=input):
    """Prompt user to enter multiple lines of text."""
    print((msg or 'Enter text.') + " End with ^D or a '.' as first character.")
    lines = []
    while True:
        try:
            line = input(prompt)
        except EOFError:
            break
        if line == '.':
            break
        lines.append(line)
    return '\n'.join(lines)
