{"categories":["Python","APUE"],"blog_title":"atsuoishimoto's diary","type":"rich","height":"190","image_url":null,"blog_url":"https://atsuoishimoto.hatenablog.com/","published":"2011-03-10 09:13:13","width":"100%","provider_url":"https://hatena.blog","version":"1.0","author_name":"atsuoishimoto","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fatsuoishimoto.hatenablog.com%2Fentry%2F20110310%2F1299715993\" title=\"Python\u3067\u5b66\u3076\u300c\u8a73\u89e3 UNIX\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u300d(\u305d\u306e3) \u7b2c3\u7ae0 \u30d5\u30a1\u30a4\u30eb\u5165\u51fa\u529b - 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>","title":"Python\u3067\u5b66\u3076\u300c\u8a73\u89e3 UNIX\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u300d(\u305d\u306e3) \u7b2c3\u7ae0 \u30d5\u30a1\u30a4\u30eb\u5165\u51fa\u529b","url":"https://atsuoishimoto.hatenablog.com/entry/20110310/1299715993","author_url":"https://blog.hatena.ne.jp/atsuoishimoto/","description":"3.1 \u6a19\u6e96\u5165\u529b\u30d5\u30a1\u30a4\u30eb\u304c\u30b7\u30fc\u30af\u53ef\u80fd\u3067\u6709\u308b\u304b\u3069\u3046\u304b\u3092\u8abf\u3079\u308b import os try: os.lseek(0,0,os.SEEK_CUR) except OSError: print \"cannot seek\" else: print \"seek OK\" lseek()\u304c\u5931\u6557\u3059\u308b\u3068\u3001OSError\u4f8b\u5916\u304c\u767a\u751f\u3059\u308b\u3002 3.2 lseek()\u3067\u30d5\u30a1\u30a4\u30eb\u5185\u90e8\u306b\u9593\u9699\u3092\u4f5c\u6210\u3059\u308b import os, stat, sys def creat(filename, mode): return os.open(filename, os.O_WRONLY | os.O_CREAT | os.O_TRUNC, mo\u2026","provider_name":"Hatena Blog"}