{"categories":["Python","APUE"],"blog_title":"atsuoishimoto's diary","author_name":"atsuoishimoto","provider_name":"Hatena Blog","provider_url":"https://hatena.blog","url":"https://atsuoishimoto.hatenablog.com/entry/20110307/1299456377","image_url":null,"title":"Python\u3067\u5b66\u3076\u300c\u8a73\u89e3 UNIX\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u300d(\u305d\u306e1) \u7b2c1\u7ae0 \u6982\u8ad6","description":"1.1 \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306e\u5168\u3066\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30ea\u30b9\u30c8\u3059\u308b import sys, os if len(sys.argv) != 2: sys.exit(\"a single argument (the directory name) is required\") try: filenames = os.listdir(sys.argv[1]) except OSError: sys.exit(\"can't open {0}\".format(sys.argv[1])) for filename in filenames: print filename sys.exit(0) Python\u3067\u306f\u3001opendi\u2026","published":"2011-03-07 09:06:17","type":"rich","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fatsuoishimoto.hatenablog.com%2Fentry%2F20110307%2F1299456377\" title=\"Python\u3067\u5b66\u3076\u300c\u8a73\u89e3 UNIX\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u300d(\u305d\u306e1) \u7b2c1\u7ae0 \u6982\u8ad6 - 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/","author_url":"https://blog.hatena.ne.jp/atsuoishimoto/","width":"100%","height":"190","version":"1.0"}