def get_stdin_data():
<EOL>mode = os.fstat(sys.stdin.fileno()).st_mode<EOL>stdin_is_pipe_or_file = stat.S_ISFIFO(mode) or stat.S_ISREG(mode)<EOL>if stdin_is_pipe_or_file:<EOL><INDENT>input_data = sys.stdin.read()<EOL>if input_data:<EOL><INDENT>return ustr(input_data)<EOL><DEDENT><DEDENT>return False<EOL>
Helper function that returns data send to stdin or False if nothing is send