def get_text(prompt="", msg=None, input=raw_input):

    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 == ".": #  dot on a line by itself also ends
            break
        lines.append(line)
    return "\n".join(lines)
Prompt user to enter multiple lines of text.
dataset/ETHPy150Open kdart/pycopia/core/pycopia/cliutils.py/get_text