def run(endpoint, name=None):
try:<EOL><INDENT>if os.isatty(<NUM_LIT:0>):<EOL><INDENT>for data in stream_skypipe_output(endpoint, name):<EOL><INDENT>sys.stdout.write(data)<EOL>sys.stdout.flush()<EOL><DEDENT><DEDENT>else:<EOL><INDENT>with skypipe_input_stream(endpoint, name) as stream:<EOL><INDENT>for line in stream_stdin_lines():<EOL><INDENT>stream.send(line)<EOL><DEDENT><DEDENT><DEDENT><DEDENT>except KeyboardInterrupt:<EOL><INDENT>pass<EOL><DEDENT>
Runs the skypipe client