def prompt(name, default=None):

    prompt = name + (default and ' [%s]' % default or '')
    prompt += name.endswith('?') and ' ' or ': '
    while True:
        rv = input(prompt)
        if rv:
            return rv
        if default is not None:
            return default
Return user input from command line.
dataset/ETHPy150Open tony/tmuxp/tmuxp/cli.py/prompt