2017-04-03から1日間の記事一覧
起動して入力をわたしたい。 cmd1= "cat" p = subprocess.Popen(cmd1.strip().split(" "), stdin=subprocess.PIPE) p.stdin.write("Hello World\n".encode('utf8')) コマンドを起動するときに、 stdin に PIPEを指定する。実行中の python と サブプロセスの…
起動して入力をわたしたい。 cmd1= "cat" p = subprocess.Popen(cmd1.strip().split(" "), stdin=subprocess.PIPE) p.stdin.write("Hello World\n".encode('utf8')) コマンドを起動するときに、 stdin に PIPEを指定する。実行中の python と サブプロセスの…