def validate_stdin(context, param, value):
    # check if input is a file or stdin
    if value.name == '<stdin>':
        # raise error if stdin is empty
        if sys.stdin.isatty():
            raise click.BadParameter('you need to pipe something to stdin')
    return value
Return a Python object compiled from a string.
dataset/ETHPy150Open robinandeer/chanjo/chanjo/utils.py/validate_stdin--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/cherrypy/cherrypy/lib/reprconf.py/unrepr