{"height":"190","description":"PythonRecipe \u306b 163:\u30d5\u30a1\u30a4\u30eb\u306b\u4e00\u884c\u633f\u5165\u3059\u308b \u3068\u3057\u3066\u66f8\u3044\u3066\u304d\u307e\u3057\u305f\u3002\u3053\u3053\u306f\u304a\u304b\u3057\u3044\u3068\u304b\u3001\u3053\u3046\u66f8\u304f\u3079\u304d\u3068\u3044\u3046\u30a2\u30a4\u30c7\u30a3\u30a2\u304c\u3042\u308b\u65b9\u3001\u3069\u3046\u305e\u66f8\u304d\u63db\u3048\u3066\u3057\u307e\u3063\u3066\u304f\u3060\u3055\u3044\u3002\u3088\u308d\u3057\u304f\u304a\u9858\u3044\u3057\u307e\u3059\u3002 import tempfile import os import stat def _rename(f1, f2): u\"\"\" f1 \u3092 f2 \u306b\u30ea\u30cd\u30fc\u30e0\u3059\u308b\u3002 Windows \u4e0a\u3067\u306f\u30ea\u30cd\u30fc\u30e0\u5148\u306b\u30d5\u30a1\u30a4\u30eb\u304c\u5b58\u5728\u3059\u308b\u3068 os.rename \u304c WindowsError \u4f8b\u5916\u3068\u306a\u308b\u3002 \u3053\u308c\u3092\u9632\u3050\u305f\u3081\u30ea\u30cd\u30fc\u30e0\u5148\u30d5\u30a1\u30a4\u30eb\u3092\u524a\u9664\u3059\u308b\u3002 \"\"\" if os.name == 'nt': os.remove(f2\u2026","provider_name":"Hatena Blog","version":"1.0","published":"2008-03-08 02:03:09","width":"100%","author_name":"fgshun","url":"https://fgshun.hatenablog.com/entry/20080308/1204995789","title":"\u30d5\u30a1\u30a4\u30eb\u306b\uff11\u884c\u633f\u5165\u3059\u308b Python \u30b9\u30af\u30ea\u30d7\u30c8\u6295\u7a3f","image_url":null,"categories":["Python"],"type":"rich","blog_title":"\u9280\u6708\u306e\u7b26\u53f7","author_url":"https://blog.hatena.ne.jp/fgshun/","provider_url":"https://hatena.blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ffgshun.hatenablog.com%2Fentry%2F20080308%2F1204995789\" title=\"\u30d5\u30a1\u30a4\u30eb\u306b\uff11\u884c\u633f\u5165\u3059\u308b Python \u30b9\u30af\u30ea\u30d7\u30c8\u6295\u7a3f - \u9280\u6708\u306e\u7b26\u53f7\" 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://fgshun.hatenablog.com/"}