{"title":" python \u306e subprocess \u8d77\u52d5\u3067\u3001\u8d77\u52d5\u30b3\u30de\u30f3\u30c9\u306estdin \u306b\u66f8\u304d\u8fbc\u3080","provider_url":"https://hatena.blog","height":"190","type":"rich","description":"\u8d77\u52d5\u3057\u3066\u5165\u529b\u3092\u308f\u305f\u3057\u305f\u3044\u3002 cmd1= \"cat\" p = subprocess.Popen(cmd1.strip().split(\" \"), stdin=subprocess.PIPE) p.stdin.write(\"Hello World\\n\".encode('utf8')) \u30b3\u30de\u30f3\u30c9\u3092\u8d77\u52d5\u3059\u308b\u3068\u304d\u306b\u3001 stdin \u306b PIPE\u3092\u6307\u5b9a\u3059\u308b\u3002\u5b9f\u884c\u4e2d\u306e python \u3068 \u30b5\u30d6\u30d7\u30ed\u30bb\u30b9\u306eSTDIN\u3092\u7e4b\u3044\u3067\u3084\u308b\u3002 \u3053\u308c\u3067 p.write \u304c\u547c\u3079\u308b \u8907\u6570\u30d1\u30a4\u30d7\u3057\u305f\u3044\u3068\u304d \u8907\u6570\u30d1\u30a4\u30d7\u306e\u8d77\u52d5\u3092\u3057\u305f\u3044\u3068\u304d\u306f\u3001\u3053\u3061\u3089\u306e\u30a8\u30f3\u30c8\u30ea\u306b\u66f8\u304d\u307e\u3057\u305f\u3002 python \u3067\u30b3\u30de\u30f3\u30c9\u5b9f\u884c\u3002\u30b5\u30d6\u30d7\u30ed\u30bb\u30b9\u306e\u7d42\u4e86\u5f85\u3061\u30fb\u5f37\u5236\u7d42\u4e86\u30fb\u89aa\u2026","url":"https://takuya-1st.hatenablog.jp/entry/2017/04/03/223506","provider_name":"Hatena Blog","image_url":null,"width":"100%","published":"2017-04-03 22:35:06","categories":["python"],"author_name":"takuya_1st","version":"1.0","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftakuya-1st.hatenablog.jp%2Fentry%2F2017%2F04%2F03%2F223506\" title=\" python \u306e subprocess \u8d77\u52d5\u3067\u3001\u8d77\u52d5\u30b3\u30de\u30f3\u30c9\u306estdin \u306b\u66f8\u304d\u8fbc\u3080 - \u305d\u308c\u30de\u30b0\u3067\uff01\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","blog_url":"https://takuya-1st.hatenablog.jp/","blog_title":"\u305d\u308c\u30de\u30b0\u3067\uff01","author_url":"https://blog.hatena.ne.jp/takuya_1st/"}