{"id":67787,"date":"2018-08-13T15:08:52","date_gmt":"2018-08-13T06:08:52","guid":{"rendered":"https:\/\/www.sejuku.net\/blog\/?p=67787"},"modified":"2024-05-06T11:50:30","modified_gmt":"2024-05-06T02:50:30","slug":"%e3%80%90%e3%81%93%e3%82%8c%e3%81%a7%e3%83%90%e3%83%83%e3%83%81%e3%83%aa%ef%bc%81%e3%80%91python%e3%81%aeos%e3%83%a2%e3%82%b8%e3%83%a5%e3%83%bc%e3%83%ab%e4%bd%bf%e3%81%84%e6%96%b9%e3%81%be%e3%81%a8","status":"publish","type":"post","link":"https:\/\/www.sejuku.net\/blog\/67787","title":{"rendered":"\u3010\u3053\u308c\u3067\u30d0\u30c3\u30c1\u30ea\uff01\u3011Python\u306eos\u30e2\u30b8\u30e5\u30fc\u30eb\u4f7f\u3044\u65b9\u307e\u3068\u3081"},"content":{"rendered":"\n<p>os\u30e2\u30b8\u30e5\u30fc\u30eb\u306f\u3001<b>OS\u306b\u4f9d\u5b58\u3057\u3066\u3044\u308b\u3055\u307e\u3056\u307e\u306a\u6a5f\u80fd\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306e\u30e2\u30b8\u30e5\u30fc\u30eb<\/b>\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u4e3b\u306b\u30d5\u30a1\u30a4\u30eb\u3084\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u64cd\u4f5c\u304c\u53ef\u80fd\u3067\u3001\u30d5\u30a1\u30a4\u30eb\u306e\u4e00\u89a7\u3084path\u3092\u53d6\u5f97\u3067\u304d\u305f\u308a\u3001\u65b0\u898f\u306b\u30d5\u30a1\u30a4\u30eb\u30fb\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u3053\u3067\u306f\u3001\u305d\u3093\u306a\u4fbf\u5229\u306aos\u30e2\u30b8\u30e5\u30fc\u30eb\u306b\u3064\u3044\u3066\u3001\u4ee5\u4e0b\u306e\u5185\u5bb9\u3067\u89e3\u8aac\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"box01\">\n\n\n\n<ul class=\"wp-block-list\">\n<li><b>os.walk()\u306e\u4f7f\u3044\u65b9<\/b><\/li>\n\n\n\n<li><b>os.system()\u306e\u4f7f\u3044\u65b9<\/b><\/li>\n\n\n\n<li><b>os.listdir()\u306e\u4f7f\u3044\u65b9<\/b><\/li>\n\n\n\n<li><b>os.path()\u306e\u4f7f\u3044\u65b9<\/b><\/li>\n\n\n\n<li><b>os.environ()\u306e\u4f7f\u3044\u65b9<\/b><\/li>\n\n\n\n<li><b>os.mkdir()\u306e\u4f7f\u3044\u65b9<\/b><\/li>\n\n\n\n<li><b>os.rename()\u306e\u4f7f\u3044\u65b9<\/b><\/li>\n\n\n\n<li><b>os remove()\u306e\u4f7f\u3044\u65b9<\/b><\/li>\n<\/ul>\n\n\n\n<\/div>\n\n\n\n<p>os\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u4f7f\u7528\u3067\u304d\u308b\u4e3b\u8981\u306a\u30e1\u30bd\u30c3\u30c9\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u305c\u3072\u53c2\u8003\u306b\u3057\u3066\u304f\u3060\u3055\u3044\uff01<\/p>\n\n\n\n<p>\u672c\u8a18\u4e8b\u3092\u8aad\u3080\u524d\u306b\u3001Python\u304c\u3069\u3093\u306a\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u306a\u306e\u304b\u3092\u304a\u3055\u3089\u3044\u3057\u3066\u304a\u304d\u305f\u3044\u4eba\u306f\u6b21\u306e\u8a18\u4e8b\u3092\u53c2\u8003\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<p>\u2192&nbsp;<a href=\"https:\/\/www.sejuku.net\/blog\/7720\">Python\u3068\u306f\uff1f\u7279\u5fb4\u3084\u3067\u304d\u308b\u3053\u3068\u3001\u6d3b\u7528\u4f8b\u3092\u308f\u304b\u308a\u3084\u3059\u304f\u7c21\u5358\u306b\u89e3\u8aac<\/a><\/p>\n\n\n\n<p>\u306a\u304a\u3001\u305d\u306e\u4ed6\u306ePython\u306e\u8a18\u4e8b\u306b\u3064\u3044\u3066\u306f<a href=\"https:\/\/www.sejuku.net\/blog\/147190\" target=\"_blank\" rel=\"noopener\">\u3053\u3061\u3089<\/a>\u306b\u307e\u3068\u3081\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">os.walk()<\/h2>\n\n\n\n<p>os.walk()\u306f\u3001<b>\u30d5\u30a1\u30a4\u30eb\u3084\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u4e00\u89a7\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u306e\u30e2\u30b8\u30e5\u30fc\u30eb<\/b>\u3067\u3059\u3002\u5f15\u6570\u3067\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u540d\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u306b\u3088\u308a\u3001\u30d5\u30a1\u30a4\u30eb\u3084\u7279\u5b9a\u306e\u62e1\u5f35\u5b50\u306e\u4e00\u89a7\u3084\u30d5\u30a1\u30a4\u30eb\u30d1\u30b9\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u305f\u3068\u3048\u3070\u3001\u30d5\u30a1\u30a4\u30eb\u306e\u4e00\u89a7\u3092\u53d6\u5f97\u3057\u305f\u3044\u5834\u5408\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u69cb\u6210<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">test\/\n\u2523 dirA\n\u2503 \u2523 a-1.txt\n\u2503 \u2523 a-2.txt\n\u2503 \u2517 dirD\/\n\u2503 \u2517 d-1.txt\n\u2503\n\u2523 dirB\/\n\u2503 \u2523 b-1.py\n\u2503 \u2517 b-2.py\n\u2503\n\u2517 dirC\/\n\u3000 \u2523 c-1.txt\n\u3000 \u2517 c-2.txt<\/pre>\n\n\n\n<p>\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import os\n \nfor curDir, dirs, files in os.walk(\"test\"):\n    for f in files:\n        print(os.path.join(curDir, f))<\/pre>\n\n\n\n<p>\u5b9f\u884c\u7d50\u679c\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">b-2.py\nb-1.py\nc-1.txt\nc-2.txt\na-2.txt\na-1.txt\nd-1.txt<\/pre>\n\n\n\n<p>os.walk()\u306e\u8a73\u3057\u3044\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066\u306f\u3001\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3067\u8a73\u3057\u304f\u89e3\u8aac\u3057\u3066\u3044\u307e\u3059\uff01<br>            <a href=\"https:\/\/www.sejuku.net\/blog\/63816\" class=\"blog-card-anchor\">\n                <div class=\"blog-card\">\n                <div class=\"blog-card-content\">\n                    <div class=\"blog-card-thumbnail\">\n                    <img decoding=\"async\" class=\"blog-card-thumbnail-img\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/07\/image-53-150x86.jpg\">\n                    <\/div>\n                    <div class=\"blog-card-title-wrap\">\n                    <div class=\"blog-card-title\">\u3010python\u5165\u9580\u3011os.walk\u3092\u4f7f\u3063\u3066\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u8d70\u67fb\u3092\u3057\u3066\u307f\u3088\u3046\uff01<\/div>\n                    <div class=\"blog-card-update-date\">\u66f4\u65b0\u65e5\uff1a2024\u5e745\u67086\u65e5<\/div>\n                    <\/div>\n                <\/div>\n                <\/div>\n            <\/a>\n            <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">os.system()<\/h2>\n\n\n\n<p>os.system()\u306f<b>Unix\u306e\u30b3\u30de\u30f3\u30c9\u3092Python\u3067\u8a18\u8ff0\u3059\u308b\u305f\u3081\u306e\u30e2\u30b8\u30e5\u30fc\u30eb<\/b>\u3067\u3059\u3002\u305f\u3068\u3048\u3070\u3001Unix\u30b3\u30de\u30f3\u30c9\u3067\u30d5\u30a1\u30a4\u30eb\u306e\u4e00\u89a7\u3092\u53d6\u5f97\u3059\u308bls\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u5834\u5408\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import os\n \nos.system(\"ls\")<\/pre>\n\n\n\n<p>\u3053\u306e\u3088\u3046\u306b\u5f15\u6570\u306b\u30b3\u30de\u30f3\u30c9\u3092\u6307\u5b9a\u3059\u308c\u3070\u3001Unix\u30b3\u30de\u30f3\u30c9\u540c\u69d8\u306e\u7d50\u679c\u304c\u5f97\u3089\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p>os.system()\u306b\u3064\u3044\u3066\u306f\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3067\u8a73\u3057\u304f\u89e3\u8aac\u3057\u3066\u3044\u307e\u3059\uff01<br>            <a href=\"https:\/\/www.sejuku.net\/blog\/65485\" class=\"blog-card-anchor\">\n                <div class=\"blog-card\">\n                <div class=\"blog-card-content\">\n                    <div class=\"blog-card-thumbnail\">\n                    <img decoding=\"async\" class=\"blog-card-thumbnail-img\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/07\/image28-150x86.jpg\">\n                    <\/div>\n                    <div class=\"blog-card-title-wrap\">\n                    <div class=\"blog-card-title\">\u3010python\u3011os.system\u306f\u3082\u3046\u53e4\u3044!?subprocess\u3067\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3088\u3046!<\/div>\n                    <div class=\"blog-card-update-date\">\u66f4\u65b0\u65e5\uff1a2024\u5e745\u67086\u65e5<\/div>\n                    <\/div>\n                <\/div>\n                <\/div>\n            <\/a>\n            <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">os.listdir()<\/h2>\n\n\n\n<p>os.listdir()\u306f<b>\u30d5\u30a1\u30a4\u30eb\u3084\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u4e00\u89a7\u3092\u78ba\u8a8d\u3059\u308b\u3068\u304d\u306b\u4f7f\u7528<\/b>\u3057\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001\u30d5\u30a1\u30a4\u30eb\u306e\u4e00\u89a7\u3092\u53d6\u5f97\u3057\u305f\u3044\u5834\u5408\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u69cb\u6210<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u2514\u2500\u2500 dir\n    \u251c\u2500\u2500 sample1.txt\n    \u251c\u2500\u2500 sample2.txt\n    \u251c\u2500\u2500 sample3.txt\n    \u251c\u2500\u2500 subdir1\n    \u2514\u2500\u2500 subdir2<\/pre>\n\n\n\n<p>\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import os\n \npath = '.\/dir'\n \nflist = os.listdir(path)\nprint(flist)<\/pre>\n\n\n\n<p>\u5b9f\u884c\u7d50\u679c\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">['subdir2', 'Untitled.ipynb', 'test2.csv', 'subdir1', 'test1.csv', '.ipynb_checkpoints', 'sample1.txt', 'sample2.txt', 'sample3.txt']<\/pre>\n\n\n\n<p>os.listdir()\u306b\u3064\u3044\u3066\u306f\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3067\u8a73\u3057\u304f\u89e3\u8aac\u3057\u3066\u3044\u307e\u3059\uff01<br>            <a href=\"https:\/\/www.sejuku.net\/blog\/63568\" class=\"blog-card-anchor\">\n                <div class=\"blog-card\">\n                <div class=\"blog-card-content\">\n                    <div class=\"blog-card-thumbnail\">\n                    <img decoding=\"async\" class=\"blog-card-thumbnail-img\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/07\/image-34-150x86.jpg\">\n                    <\/div>\n                    <div class=\"blog-card-title-wrap\">\n                    <div class=\"blog-card-title\">\u3010python\u5165\u9580\u3011os.listdir\u3067\u30d5\u30a1\u30a4\u30eb\u30fb\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u4e00\u89a7\u3092\u53d6\u5f97<\/div>\n                    <div class=\"blog-card-update-date\">\u66f4\u65b0\u65e5\uff1a2024\u5e745\u67086\u65e5<\/div>\n                    <\/div>\n                <\/div>\n                <\/div>\n            <\/a>\n            <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">os.path()<\/h2>\n\n\n\n<p>os.path()\u30e2\u30b8\u30e5\u30fc\u30eb\u306f\u3001<b>\u300c\u30d5\u30a1\u30a4\u30eb\u3084\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u5b58\u5728\u78ba\u8a8d\u300d\u3001\u300c\u6307\u5b9a\u3057\u305f\u30d1\u30b9\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u306e\u53d6\u5f97\u300d\u3001\u300c\u30d1\u30b9\u3084\u30d5\u30a1\u30a4\u30eb\u540d\u306e\u7d50\u5408\u300d\u306a\u3069\u306e\u7528\u9014\u3067\u4f7f\u7528<\/b>\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4ee5\u4e0b\u306e\u8868\u306fos.path()\u3067\u3088\u304f\u4f7f\u308f\u308c\u308b\u30e1\u30bd\u30c3\u30c9\u306e\u4e00\u89a7\u3067\u3059\u3002<br>\n<table id=\"tablepress-580\" class=\"tablepress tablepress-id-580\">\n<tbody class=\"row-striping row-hover\">\n<tr class=\"row-1\">\n\t<td class=\"column-1\">exists()<\/td><td class=\"column-2\">\u30d5\u30a1\u30a4\u30eb\u53ca\u3073\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u5b58\u5728\u78ba\u8a8d\u304c\u3067\u304d\u307e\u3059\u3002\u623b\u308a\u5024\u306fBool\u578b\u306b\u306a\u308a\u307e\u3059\u3002<\/td>\n<\/tr>\n<tr class=\"row-2\">\n\t<td class=\"column-1\">isdir()<\/td><td class=\"column-2\">\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u5b58\u5728\u78ba\u8a8d\u304c\u3067\u304d\u307e\u3059\u3002\u623b\u308a\u5024\u306fBool\u3002<\/td>\n<\/tr>\n<tr class=\"row-3\">\n\t<td class=\"column-1\">isfile()<\/td><td class=\"column-2\">\u30d5\u30a1\u30a4\u30eb\u306e\u5b58\u5728\u78ba\u8a8d\u304c\u3067\u304d\u307e\u3059\u3002\u623b\u308a\u5024\u306fBool\u3002<\/td>\n<\/tr>\n<tr class=\"row-4\">\n\t<td class=\"column-1\">basename()<\/td><td class=\"column-2\">\u6307\u5b9a\u3055\u308c\u305f\u30d1\u30b9\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u8fd4\u3057\u307e\u3059\u3002<\/td>\n<\/tr>\n<tr class=\"row-5\">\n\t<td class=\"column-1\">dirname()<\/td><td class=\"column-2\">\u6307\u5b9a\u3055\u308c\u305f\u30d1\u30b9\u304b\u3089\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u9664\u3044\u305f\u3082\u306e\u3092\u8fd4\u3057\u307e\u3059\u3002<\/td>\n<\/tr>\n<tr class=\"row-6\">\n\t<td class=\"column-1\">split()<\/td><td class=\"column-2\">\u6307\u5b9a\u3055\u308c\u305f\u30d1\u30b9\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u3068\u3001\u305d\u308c\u307e\u3067\u306e\u30d1\u30b9\u3092\u8fd4\u3057\u307e\u3059\u3002<\/td>\n<\/tr>\n<tr class=\"row-7\">\n\t<td class=\"column-1\">splitext()<\/td><td class=\"column-2\">\u6307\u5b9a\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u306e\u62e1\u5f35\u5b50\u3068\u62e1\u5f35\u5b50\u3092\u9664\u304f\u30d5\u30a1\u30a4\u30eb\u540d\u307e\u3067\u306e\u30d1\u30b9\u3092\u8fd4\u3057\u307e\u3059\u3002<\/td>\n<\/tr>\n<tr class=\"row-8\">\n\t<td class=\"column-1\">join()<\/td><td class=\"column-2\">\u30d1\u30b9\u3068\u30d5\u30a1\u30a4\u30eb\u540d\u306a\u3069\u3092\u7d50\u5408\u3055\u305b\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<!-- #tablepress-580 from cache --><\/p>\n\n\n\n<p>os.path()\u306b\u3064\u3044\u3066\u306f\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3067\u8a73\u3057\u304f\u89e3\u8aac\u3057\u3066\u3044\u307e\u3059\uff01<br>            <a href=\"https:\/\/www.sejuku.net\/blog\/63651\" class=\"blog-card-anchor\">\n                <div class=\"blog-card\">\n                <div class=\"blog-card-content\">\n                    <div class=\"blog-card-thumbnail\">\n                    <img decoding=\"async\" class=\"blog-card-thumbnail-img\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/07\/image-24-150x86.jpg\">\n                    <\/div>\n                    <div class=\"blog-card-title-wrap\">\n                    <div class=\"blog-card-title\">\u3010python\u5165\u9580\u3011\u30d1\u30b9\u540d\u64cd\u4f5c\u306fos.path()\u3092\u6d3b\u7528\u3057\u3088\u3046\uff01<\/div>\n                    <div class=\"blog-card-update-date\">\u66f4\u65b0\u65e5\uff1a2024\u5e745\u67086\u65e5<\/div>\n                    <\/div>\n                <\/div>\n                <\/div>\n            <\/a>\n            <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">os.environ()<\/h2>\n\n\n\n<p>os.environ()\u306f<b>\u74b0\u5883\u5909\u6570\u3092\u53d6\u5f97\u3057\u305f\u308a\u3001\u66f8\u304d\u8fbc\u307f\u30fb\u4e0a\u66f8\u304d\u3059\u308b\u3068\u304d<\/b>\u306b\u4f7f\u308f\u308c\u307e\u3059\u3002\u74b0\u5883\u5909\u6570\u3068\u306f\u30b7\u30b9\u30c6\u30e0\u304c\u53c2\u7167\u3057\u3066\u3044\u308b\u5171\u901a\u306e\u5909\u6570\u306e\u3053\u3068\u3067\u3001\u74b0\u5883\u306b\u95a2\u3059\u308b\u30c7\u30fc\u30bf\u3084\u5171\u901a\u3067\u4f7f\u7528\u3059\u308b\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9\u306a\u3069\u3092\u4fdd\u6301\u3059\u308b\u305f\u3081\u306b\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u305f\u3068\u3048\u3070\u3001Python\u3067\u74b0\u5883\u5909\u6570\u306e\u66f8\u304d\u8fbc\u307f\u3092\u884c\u3046\u3068\u304d\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import os\n \nos.environ[\"PHASE\"] = \"staging\"\n \nprint(\"env(): \" + os.environ[\"PHASE\"])<\/pre>\n\n\n\n<p>\u5b9f\u884c\u7d50\u679c\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">env(): staging<\/pre>\n\n\n\n<p>os.environ()\u306b\u3064\u3044\u3066\u306f\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3067\u8a73\u3057\u304f\u89e3\u8aac\u3057\u3066\u3044\u307e\u3059\uff01<br>            <a href=\"https:\/\/www.sejuku.net\/blog\/64673\" class=\"blog-card-anchor\">\n                <div class=\"blog-card\">\n                <div class=\"blog-card-content\">\n                    <div class=\"blog-card-thumbnail\">\n                    <img decoding=\"async\" class=\"blog-card-thumbnail-img\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/07\/image19-150x86.jpg\">\n                    <\/div>\n                    <div class=\"blog-card-title-wrap\">\n                    <div class=\"blog-card-title\">\u3010Python\u5165\u9580\u3011os.environ()\u3092\u4f7f\u3063\u3066\u74b0\u5883\u5909\u6570\u3092\u6d3b\u7528\u3057\u3088\u3046\uff01<\/div>\n                    <div class=\"blog-card-update-date\">\u66f4\u65b0\u65e5\uff1a2024\u5e745\u67086\u65e5<\/div>\n                    <\/div>\n                <\/div>\n                <\/div>\n            <\/a>\n            <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">os.mkdir()<\/h2>\n\n\n\n<p>os.mkdir()\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u7c21\u5358\u306b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001dir\u914d\u4e0b\u306bsub\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u308b\u5834\u5408\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import os\n \npath = '.\/dir\/sub'\n \nos.mkdir(path)<\/pre>\n\n\n\n<p>os.mkdir()\u306b\u3064\u3044\u3066\u306f\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3067\u8a73\u3057\u304f\u89e3\u8aac\u3057\u3066\u3044\u307e\u3059\uff01<br>            <a href=\"https:\/\/www.sejuku.net\/blog\/63634\" class=\"blog-card-anchor\">\n                <div class=\"blog-card\">\n                <div class=\"blog-card-content\">\n                    <div class=\"blog-card-thumbnail\">\n                    <img decoding=\"async\" class=\"blog-card-thumbnail-img\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/07\/image-52-150x86.jpg\">\n                    <\/div>\n                    <div class=\"blog-card-title-wrap\">\n                    <div class=\"blog-card-title\">\u3010Python\u5165\u9580\u3011\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u7c21\u5358\u306b\u4f5c\u6210\u3059\u308b\uff5cos.mkdir\u30fbos.makedirs<\/div>\n                    <div class=\"blog-card-update-date\">\u66f4\u65b0\u65e5\uff1a2024\u5e745\u67086\u65e5<\/div>\n                    <\/div>\n                <\/div>\n                <\/div>\n            <\/a>\n            <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">os.rename()<\/h2>\n\n\n\n<p>os.rename()\u306f<b>\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u6307\u5b9a\u3057\u305f\u540d\u79f0\u306b\u5909\u66f4\u3059\u308b\u3068\u304d\u306b\u4f7f\u7528<\/b>\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>os.rename()\u306f\u5909\u66f4\u524d\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u3068\u5909\u66f4\u5f8c\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u30b5\u30f3\u30d7\u30eb\u3067\u306f\u300csample_00.txt\u300d\u3092\u300csample_01.txt\u300d\u306b\u5909\u66f4\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import os\n \n# \u5909\u66f4\u524d\u30d5\u30a1\u30a4\u30eb\npath1 = '.\/dir\/sample_00.txt'\n \n# \u5909\u66f4\u5f8c\u30d5\u30a1\u30a4\u30eb\npath2= '.\/dir\/sample_01.txt'\n \n# \u30d5\u30a1\u30a4\u30eb\u540d\u306e\u5909\u66f4\nos.rename(path1, path2)\n \n# \u30d5\u30a1\u30a4\u30eb\u306e\u5b58\u5728\u78ba\u8a8d\nprint(os.path.exists(path2))<\/pre>\n\n\n\n<p>\u5b9f\u884c\u7d50\u679c\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">True<\/pre>\n\n\n\n<p>os rename()\u306b\u3064\u3044\u3066\u306f\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3067\u8a73\u3057\u304f\u89e3\u8aac\u3057\u3066\u3044\u307e\u3059\uff01<br>            <a href=\"https:\/\/www.sejuku.net\/blog\/63732\" class=\"blog-card-anchor\">\n                <div class=\"blog-card\">\n                <div class=\"blog-card-content\">\n                    <div class=\"blog-card-thumbnail\">\n                    <img decoding=\"async\" class=\"blog-card-thumbnail-img\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/07\/image35-150x86.jpg\">\n                    <\/div>\n                    <div class=\"blog-card-title-wrap\">\n                    <div class=\"blog-card-title\">\u3010Python\u5165\u9580\u3011os.rename\u3067\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u5909\u66f4\u3059\u308b\u65b9\u6cd5\u3092\u89e3\u8aac\uff01<\/div>\n                    <div class=\"blog-card-update-date\">\u66f4\u65b0\u65e5\uff1a2024\u5e745\u67086\u65e5<\/div>\n                    <\/div>\n                <\/div>\n                <\/div>\n            <\/a>\n            <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">os remove()<\/h2>\n\n\n\n<p>os.remove()\u306f<b>\u30d5\u30a1\u30a4\u30eb\u3092\u524a\u9664\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528<\/b>\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u524a\u9664\u3059\u308b\u306b\u306fos.remove()\u306e\u5f15\u6570\u306b\u524a\u9664\u3057\u305f\u3044\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u30d1\u30b9\u304b\u3089\u6307\u5b9a\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u30b5\u30f3\u30d7\u30eb\u3067\u306f\u3001\u300c.\/dir\/sample.txt\u300d\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u524a\u9664\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import os\n \npath = '.\/dir\/sample.txt'\n \nos.remove(path)\n \nprint(os.path.exists(path))<\/pre>\n\n\n\n<p>\u5b9f\u884c\u7d50\u679c\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">False<\/pre>\n\n\n\n<p>os remove()\u306b\u3064\u3044\u3066\u306f\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3067\u8a73\u3057\u304f\u89e3\u8aac\u3057\u3066\u3044\u307e\u3059\uff01<br>            <a href=\"https:\/\/www.sejuku.net\/blog\/63679\" class=\"blog-card-anchor\">\n                <div class=\"blog-card\">\n                <div class=\"blog-card-content\">\n                    <div class=\"blog-card-thumbnail\">\n                    <img decoding=\"async\" class=\"blog-card-thumbnail-img\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/07\/image-114-150x86.jpg\">\n                    <\/div>\n                    <div class=\"blog-card-title-wrap\">\n                    <div class=\"blog-card-title\">\u3010Python\u5165\u9580\u3011\u30d5\u30a1\u30a4\u30eb\u30fb\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u524a\u9664\uff5cos.remove\u30fbos.rmdir<\/div>\n                    <div class=\"blog-card-update-date\">\u66f4\u65b0\u65e5\uff1a2024\u5e745\u67086\u65e5<\/div>\n                    <\/div>\n                <\/div>\n                <\/div>\n            <\/a>\n            <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u307e\u3068\u3081<\/h2>\n\n\n\n<p>\u3053\u3053\u3067\u306f\u3001OS\u306b\u4f9d\u5b58\u3057\u3066\u3044\u308b\u3055\u307e\u3056\u307e\u306a\u6a5f\u80fd\u3092\u5229\u7528\u3067\u304d\u308bos\u30e2\u30b8\u30e5\u30fc\u30eb\u306b\u3064\u3044\u3066\u3001\u4ee5\u4e0b\u306e\u5185\u5bb9\u3092\u89e3\u8aac\u3057\u307e\u3057\u305f\u3002<br><div class=\"box01\"><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>os.walk()\u306e\u4f7f\u3044\u65b9<\/li>\n\n\n\n<li>os.system()\u306e\u4f7f\u3044\u65b9<\/li>\n\n\n\n<li>os.listdir()\u306e\u4f7f\u3044\u65b9<\/li>\n\n\n\n<li>os.path()\u306e\u4f7f\u3044\u65b9<\/li>\n\n\n\n<li>os.environ()\u306e\u4f7f\u3044\u65b9<\/li>\n\n\n\n<li>os.mkdir()\u306e\u4f7f\u3044\u65b9<\/li>\n\n\n\n<li>os.rename()\u306e\u4f7f\u3044\u65b9<\/li>\n\n\n\n<li>os remove()\u306e\u4f7f\u3044\u65b9<\/li>\n<\/ul>\n\n\n\n<p><\/div><br>os\u30e2\u30b8\u30e5\u30fc\u30eb\u306f\u30d5\u30a1\u30a4\u30eb\u3084\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u64cd\u4f5c\u3067\u3088\u304f\u4f7f\u308f\u308c\u307e\u3059\u306e\u3067\u3001\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066\u306f\u3057\u3063\u304b\u308a\u3068\u7406\u89e3\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>os\u30e2\u30b8\u30e5\u30fc\u30eb\u306f\u3001OS\u306b\u4f9d\u5b58\u3057\u3066\u3044\u308b\u3055\u307e\u3056\u307e\u306a\u6a5f\u80fd\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u3059\u3002 \u4e3b\u306b\u30d5\u30a1\u30a4\u30eb\u3084\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u64cd\u4f5c\u304c\u53ef\u80fd\u3067\u3001\u30d5\u30a1\u30a4\u30eb\u306e\u4e00\u89a7\u3084path\u3092\u53d6\u5f97\u3067\u304d\u305f\u308a\u3001\u65b0\u898f\u306b\u30d5\u30a1\u30a4\u30eb\u30fb\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002  [&hellip;]<\/p>\n","protected":false},"author":16433,"featured_media":67788,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"swell_btn_cv_data":"","footnotes":""},"categories":[2350],"tags":[],"class_list":["post-67787","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python-study"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u3010\u3053\u308c\u3067\u30d0\u30c3\u30c1\u30ea\uff01\u3011Python\u306eos\u30e2\u30b8\u30e5\u30fc\u30eb\u4f7f\u3044\u65b9\u307e\u3068\u3081 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0<\/title>\n<meta name=\"description\" content=\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010\u3053\u308c\u3067\u30d0\u30c3\u30c1\u30ea\uff01\u3011Python\u306eos\u30e2\u30b8\u30e5\u30fc\u30eb\u4f7f\u3044\u65b9\u307e\u3068\u3081 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.sejuku.net\/blog\/67787\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010\u3053\u308c\u3067\u30d0\u30c3\u30c1\u30ea\uff01\u3011Python\u306eos\u30e2\u30b8\u30e5\u30fc\u30eb\u4f7f\u3044\u65b9\u307e\u3068\u3081 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\" \/>\n<meta property=\"og:description\" content=\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010\u3053\u308c\u3067\u30d0\u30c3\u30c1\u30ea\uff01\u3011Python\u306eos\u30e2\u30b8\u30e5\u30fc\u30eb\u4f7f\u3044\u65b9\u307e\u3068\u3081 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sejuku.net\/blog\/67787\" \/>\n<meta property=\"og:site_name\" content=\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/sejuku2013\" \/>\n<meta property=\"article:published_time\" content=\"2018-08-13T06:08:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-06T02:50:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/08\/image8.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"700\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@samuraijuku\" \/>\n<meta name=\"twitter:site\" content=\"@samuraijuku\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/67787#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/67787\"},\"author\":{\"name\":\"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/person\\\/d20c57b59dba15001519a8a671183095\"},\"headline\":\"\u3010\u3053\u308c\u3067\u30d0\u30c3\u30c1\u30ea\uff01\u3011Python\u306eos\u30e2\u30b8\u30e5\u30fc\u30eb\u4f7f\u3044\u65b9\u307e\u3068\u3081\",\"datePublished\":\"2018-08-13T06:08:52+00:00\",\"dateModified\":\"2024-05-06T02:50:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/67787\"},\"wordCount\":199,\"publisher\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/67787#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/08\\\/image8.jpg\",\"articleSection\":[\"Python\u5b66\u7fd2\"],\"inLanguage\":\"ja\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/67787\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/67787\",\"name\":\"\u3010\u3053\u308c\u3067\u30d0\u30c3\u30c1\u30ea\uff01\u3011Python\u306eos\u30e2\u30b8\u30e5\u30fc\u30eb\u4f7f\u3044\u65b9\u307e\u3068\u3081 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/67787#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/67787#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/08\\\/image8.jpg\",\"datePublished\":\"2018-08-13T06:08:52+00:00\",\"dateModified\":\"2024-05-06T02:50:30+00:00\",\"description\":\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010\u3053\u308c\u3067\u30d0\u30c3\u30c1\u30ea\uff01\u3011Python\u306eos\u30e2\u30b8\u30e5\u30fc\u30eb\u4f7f\u3044\u65b9\u307e\u3068\u3081 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/67787#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/67787\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/67787#primaryimage\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/08\\\/image8.jpg\",\"contentUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/08\\\/image8.jpg\",\"width\":700,\"height\":400},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/67787#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010\u3053\u308c\u3067\u30d0\u30c3\u30c1\u30ea\uff01\u3011Python\u306eos\u30e2\u30b8\u30e5\u30fc\u30eb\u4f7f\u3044\u65b9\u307e\u3068\u3081\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\",\"name\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\",\"description\":\"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u306e\u3059\u3079\u3066\u304c\u30b3\u30b3\u306b\u3002\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\",\"name\":\"\u682a\u5f0f\u4f1a\u793eSAMURAI\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo.png\",\"contentUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo.png\",\"width\":600,\"height\":600,\"caption\":\"\u682a\u5f0f\u4f1a\u793eSAMURAI\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/sejuku2013\",\"https:\\\/\\\/x.com\\\/samuraijuku\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCCFOQO5aDK0xXam4cUQXT8g\\\/featured\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/person\\\/d20c57b59dba15001519a8a671183095\",\"name\":\"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d91ed20aaa7f873a0f4f35586561303460c1e3864746dddb6ebe0fb093c1952d?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d91ed20aaa7f873a0f4f35586561303460c1e3864746dddb6ebe0fb093c1952d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d91ed20aaa7f873a0f4f35586561303460c1e3864746dddb6ebe0fb093c1952d?s=96&d=mm&r=g\",\"caption\":\"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8\"},\"description\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u587e\u306f\u300c\u4eba\u751f\u3092\u5909\u3048\u308b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u300d\u3092\u30b3\u30f3\u30bb\u30f3\u30d7\u30c8\u306b\u3001\u904e\u53bb\u591a\u304f\u306e\u30d5\u30ea\u30fc\u30e9\u30f3\u30b9\u30a8\u30f3\u30b8\u30cb\u30a2\u3092\u8f29\u51fa\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u3067\u3059\u3002\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8\u3067\u306f\u6280\u8853\u7cfb\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u4e2d\u5fc3\u306b\u6709\u7528\u306a\u60c5\u5831\u3092\u767a\u4fe1\u3057\u3066\u3044\u304d\u307e\u3059\u3002\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/author\\\/samurai-tech\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u3010\u3053\u308c\u3067\u30d0\u30c3\u30c1\u30ea\uff01\u3011Python\u306eos\u30e2\u30b8\u30e5\u30fc\u30eb\u4f7f\u3044\u65b9\u307e\u3068\u3081 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010\u3053\u308c\u3067\u30d0\u30c3\u30c1\u30ea\uff01\u3011Python\u306eos\u30e2\u30b8\u30e5\u30fc\u30eb\u4f7f\u3044\u65b9\u307e\u3068\u3081 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.sejuku.net\/blog\/67787","og_locale":"ja_JP","og_type":"article","og_title":"\u3010\u3053\u308c\u3067\u30d0\u30c3\u30c1\u30ea\uff01\u3011Python\u306eos\u30e2\u30b8\u30e5\u30fc\u30eb\u4f7f\u3044\u65b9\u307e\u3068\u3081 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","og_description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010\u3053\u308c\u3067\u30d0\u30c3\u30c1\u30ea\uff01\u3011Python\u306eos\u30e2\u30b8\u30e5\u30fc\u30eb\u4f7f\u3044\u65b9\u307e\u3068\u3081 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","og_url":"https:\/\/www.sejuku.net\/blog\/67787","og_site_name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","article_publisher":"https:\/\/www.facebook.com\/sejuku2013","article_published_time":"2018-08-13T06:08:52+00:00","article_modified_time":"2024-05-06T02:50:30+00:00","og_image":[{"width":700,"height":400,"url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/08\/image8.jpg","type":"image\/jpeg"}],"author":"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8","twitter_card":"summary_large_image","twitter_creator":"@samuraijuku","twitter_site":"@samuraijuku","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.sejuku.net\/blog\/67787#article","isPartOf":{"@id":"https:\/\/www.sejuku.net\/blog\/67787"},"author":{"name":"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/person\/d20c57b59dba15001519a8a671183095"},"headline":"\u3010\u3053\u308c\u3067\u30d0\u30c3\u30c1\u30ea\uff01\u3011Python\u306eos\u30e2\u30b8\u30e5\u30fc\u30eb\u4f7f\u3044\u65b9\u307e\u3068\u3081","datePublished":"2018-08-13T06:08:52+00:00","dateModified":"2024-05-06T02:50:30+00:00","mainEntityOfPage":{"@id":"https:\/\/www.sejuku.net\/blog\/67787"},"wordCount":199,"publisher":{"@id":"https:\/\/www.sejuku.net\/blog\/#organization"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/67787#primaryimage"},"thumbnailUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/08\/image8.jpg","articleSection":["Python\u5b66\u7fd2"],"inLanguage":"ja"},{"@type":"WebPage","@id":"https:\/\/www.sejuku.net\/blog\/67787","url":"https:\/\/www.sejuku.net\/blog\/67787","name":"\u3010\u3053\u308c\u3067\u30d0\u30c3\u30c1\u30ea\uff01\u3011Python\u306eos\u30e2\u30b8\u30e5\u30fc\u30eb\u4f7f\u3044\u65b9\u307e\u3068\u3081 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","isPartOf":{"@id":"https:\/\/www.sejuku.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.sejuku.net\/blog\/67787#primaryimage"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/67787#primaryimage"},"thumbnailUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/08\/image8.jpg","datePublished":"2018-08-13T06:08:52+00:00","dateModified":"2024-05-06T02:50:30+00:00","description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010\u3053\u308c\u3067\u30d0\u30c3\u30c1\u30ea\uff01\u3011Python\u306eos\u30e2\u30b8\u30e5\u30fc\u30eb\u4f7f\u3044\u65b9\u307e\u3068\u3081 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","breadcrumb":{"@id":"https:\/\/www.sejuku.net\/blog\/67787#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sejuku.net\/blog\/67787"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.sejuku.net\/blog\/67787#primaryimage","url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/08\/image8.jpg","contentUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/08\/image8.jpg","width":700,"height":400},{"@type":"BreadcrumbList","@id":"https:\/\/www.sejuku.net\/blog\/67787#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sejuku.net\/blog\/"},{"@type":"ListItem","position":2,"name":"\u3010\u3053\u308c\u3067\u30d0\u30c3\u30c1\u30ea\uff01\u3011Python\u306eos\u30e2\u30b8\u30e5\u30fc\u30eb\u4f7f\u3044\u65b9\u307e\u3068\u3081"}]},{"@type":"WebSite","@id":"https:\/\/www.sejuku.net\/blog\/#website","url":"https:\/\/www.sejuku.net\/blog\/","name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","description":"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u306e\u3059\u3079\u3066\u304c\u30b3\u30b3\u306b\u3002","publisher":{"@id":"https:\/\/www.sejuku.net\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sejuku.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/www.sejuku.net\/blog\/#organization","name":"\u682a\u5f0f\u4f1a\u793eSAMURAI","url":"https:\/\/www.sejuku.net\/blog\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2023\/07\/logo.png","contentUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2023\/07\/logo.png","width":600,"height":600,"caption":"\u682a\u5f0f\u4f1a\u793eSAMURAI"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/sejuku2013","https:\/\/x.com\/samuraijuku","https:\/\/www.youtube.com\/channel\/UCCFOQO5aDK0xXam4cUQXT8g\/featured"]},{"@type":"Person","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/person\/d20c57b59dba15001519a8a671183095","name":"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/secure.gravatar.com\/avatar\/d91ed20aaa7f873a0f4f35586561303460c1e3864746dddb6ebe0fb093c1952d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/d91ed20aaa7f873a0f4f35586561303460c1e3864746dddb6ebe0fb093c1952d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d91ed20aaa7f873a0f4f35586561303460c1e3864746dddb6ebe0fb093c1952d?s=96&d=mm&r=g","caption":"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8"},"description":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u587e\u306f\u300c\u4eba\u751f\u3092\u5909\u3048\u308b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u300d\u3092\u30b3\u30f3\u30bb\u30f3\u30d7\u30c8\u306b\u3001\u904e\u53bb\u591a\u304f\u306e\u30d5\u30ea\u30fc\u30e9\u30f3\u30b9\u30a8\u30f3\u30b8\u30cb\u30a2\u3092\u8f29\u51fa\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u3067\u3059\u3002\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8\u3067\u306f\u6280\u8853\u7cfb\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u4e2d\u5fc3\u306b\u6709\u7528\u306a\u60c5\u5831\u3092\u767a\u4fe1\u3057\u3066\u3044\u304d\u307e\u3059\u3002","url":"https:\/\/www.sejuku.net\/blog\/author\/samurai-tech"}]}},"_links":{"self":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts\/67787","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/users\/16433"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/comments?post=67787"}],"version-history":[{"count":0,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts\/67787\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/media\/67788"}],"wp:attachment":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/media?parent=67787"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/categories?post=67787"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/tags?post=67787"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}