{"provider_url":"https://hatena.blog","author_url":"https://blog.hatena.ne.jp/atsuoishimoto/","provider_name":"Hatena Blog","author_name":"atsuoishimoto","height":"190","published":"2011-03-17 11:29:21","blog_title":"atsuoishimoto's diary","title":"Python\u3067\u5b66\u3076\u300c\u8a73\u89e3 UNIX\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u300d(\u305d\u306e5) \u7b2c5\u7ae0 \u6a19\u6e96\u5165\u51fa\u529b\u30e9\u30a4\u30d6\u30e9\u30ea","type":"rich","url":"https://atsuoishimoto.hatenablog.com/entry/20110317/1300328961","version":"1.0","description":"5.1 getc()\u3068putc()\u3092\u7528\u3044\u3066\u6a19\u6e96\u51fa\u529b\u3078\u30b3\u30d4\u30fc\u3059\u308b import sys while True: c = sys.stdin.read(1) if not c: break sys.stdout.write(c) 5.2 fgets()\u3068fputs()\u3092\u7528\u3044\u3066\u6a19\u6e96\u51fa\u529b\u3078\u30b3\u30d4\u30fc\u3059\u308b import sys for line in sys.stdin: sys.stdout.write(line) Python\u306b\u306fgetc()/putc()/fgetc()/fput()\u304c\u306a\u3044\u306e\u3067\u3001\u3053\u3053\u3067\u306f\u4f3c\u305f\u3088\u3046\u306a\u6a5f\u80fd\u3067\u518d\u5b9f\u88c5\u3057\u3066\u307f\u305f\u3002\u30b5\u30f3\u30d7\u30eb5.1 \u306fsys.stdin.read()\u3092\u4f7f\u3063\u3066\u3001\u4e00\u6587\u5b57\u305a\u2026","width":"100%","categories":["Python","APUE"],"image_url":null,"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fatsuoishimoto.hatenablog.com%2Fentry%2F20110317%2F1300328961\" title=\"Python\u3067\u5b66\u3076\u300c\u8a73\u89e3 UNIX\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u300d(\u305d\u306e5) \u7b2c5\u7ae0 \u6a19\u6e96\u5165\u51fa\u529b\u30e9\u30a4\u30d6\u30e9\u30ea - atsuoishimoto&#39;s diary\" 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://atsuoishimoto.hatenablog.com/"}