def call_and_wait_with_input(command, input_string, wait = True, **popen_kwargs):
    if subprocess.mswindows:
        startupinfo = subprocess.STARTUPINFO()
        startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
        popen_kwargs['startupinfo'] = startupinfo

    # For the subprocess, extend the env PATH to include the 'add_to_PATH' setting.
    extended_env = get_extended_env()

    process = subprocess.Popen(
        command,
        stdout=subprocess.PIPE,
        stderr=subprocess.PIPE,
        stdin=subprocess.PIPE,
        env=extended_env,
        **popen_kwargs)

    if wait:
        stdout, stderr = process.communicate(encode_bytes(input_string))
        exit_code = process.wait()
        return (exit_code, crlf2lf(decode_bytes(stdout)), crlf2lf(decode_bytes(stderr)))
    else:
        process.stdin.write(encode_bytes(input_string))
        process.stdin.close()
        return process
save a link into the user's history
dataset/ETHPy150Open SublimeHaskell/SublimeHaskell/sublime_haskell_common.py/call_and_wait_with_input--crossover with--dataset/ETHPy150Open bitly/bitly-api-python/bitly_api/bitly_api.py/Connection.user_link_save