{"id":93345,"date":"2024-03-21T16:29:03","date_gmt":"2024-03-21T07:29:03","guid":{"rendered":"https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%a7with%e6%96%87%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/"},"modified":"2024-04-04T17:13:10","modified_gmt":"2024-04-04T08:13:10","slug":"python%e3%81%a7with%e6%96%87%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%a7with%e6%96%87%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/","title":{"rendered":"Python\u3067with\u6587\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p>Python\u306ewith\u6587\u306f\u3001\u30d5\u30a1\u30a4\u30eb\u306e\u30aa\u30fc\u30d7\u30f3\u3084\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u63a5\u7d9a\u306a\u3069\u3001\u624b\u52d5\u3067\u9589\u3058\u308b\u304b\u89e3\u653e\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u30ea\u30bd\u30fc\u30b9\u306e\u53d6\u5f97\u3068\u89e3\u653e\u3092\u7ba1\u7406\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>with\u6587\u306e\u4e00\u822c\u7684\u306a\u5f62\u5f0f\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>with \u8d44\u6e90 as \u53d8\u91cf:\r\n    # \u5728with\u4ee3\u7801\u5757\u4e2d\u4f7f\u7528\u8d44\u6e90\r\n<\/code><\/pre>\n<p>\u305d\u306e\u3046\u3061\u3001\u30ea\u30bd\u30fc\u30b9\u3068\u306f\u30d5\u30a1\u30a4\u30eb\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u63a5\u7d9a\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306a\u3069\u3001\u958b\u3044\u305f\u308a\u9589\u3058\u305f\u308a\u3001\u89e3\u653e\u3057\u305f\u308a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u3053\u3068\u3002\u5909\u6570\u306f\u30ea\u30bd\u30fc\u30b9\u3092\u53c2\u7167\u3059\u308b\u5909\u6570\u3067\u3001with\u30b3\u30fc\u30c9\u30d6\u30ed\u30c3\u30af\u5185\u3067\u306e\u307f\u5229\u7528\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306b\u3001`with` \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u4f7f\u7528\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u306e\u958b\u793a\u4f8b\u3092\u793a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"hljs-keyword\">with<\/span> <span class=\"hljs-built_in\">open<\/span>(<span class=\"hljs-string\">'example.txt'<\/span>, <span class=\"hljs-string\">'r'<\/span>) <span class=\"hljs-keyword\">as<\/span> file:\r\n    data = file.read()\r\n    <span class=\"hljs-built_in\">print<\/span>(data)\r\n<\/code><\/pre>\n<p>\u30b3\u30fc\u30c9\u4f8b\u3067\u306f\u3001with\u3092\u4f7f\u7528\u3057\u3066example.txt\u3068\u3044\u3046\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304d\u3001\u4e2d\u8eab\u3092\u8aad\u307f\u53d6\u3063\u3066\u3044\u307e\u3059\u3002with\u30d6\u30ed\u30c3\u30af\u304c\u7d42\u308f\u308b\u3068\u30d5\u30a1\u30a4\u30eb\u304c\u81ea\u52d5\u3067\u9589\u3058\u3089\u308c\u3001file.close()\u30e1\u30bd\u30c3\u30c9\u3092\u660e\u793a\u7684\u306b\u547c\u3073\u51fa\u3059\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>with\u6587\u3092\u4f7f\u3046\u5229\u70b9\u306f\u3001\u30b3\u30fc\u30c9\u30d6\u30ed\u30c3\u30af\u5185\u3067\u4f8b\u5916\u304c\u767a\u751f\u3057\u305f\u304b\u3069\u3046\u304b\u306b\u95a2\u308f\u3089\u305a\u3001\u30ea\u30bd\u30fc\u30b9\u304c\u9069\u5207\u306b\u9589\u3058\u3089\u308c\u305f\u308a\u89e3\u653e\u3055\u308c\u305f\u308a\u3059\u308b\u70b9\u3067\u3001\u30ea\u30bd\u30fc\u30b9\u6f0f\u308c\u306e\u554f\u984c\u3092\u56de\u907f\u3067\u304d\u308b\u3053\u3068\u3067\u3059\u3002\u305d\u306e\u305f\u3081\u3001with\u6587\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u30ea\u30bd\u30fc\u30b9\u7ba1\u7406\u306e\u30b3\u30fc\u30c9\u3092\u5358\u7d14\u5316\u3067\u304d\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u5805\u7262\u6027\u3082\u9ad8\u307e\u308a\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Python\u306ewith\u6587\u306f\u3001\u30d5\u30a1\u30a4\u30eb\u306e\u30aa\u30fc\u30d7\u30f3\u3084\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u63a5\u7d9a\u306a\u3069\u3001\u624b\u52d5\u3067\u9589\u3058\u308b\u304b\u89e3\u653e\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u30ea\u30bd\u30fc\u30b9\u306e\u53d6\u5f97\u3068\u89e3\u653e\u3092\u7ba1\u7406\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002 with\u6587\u306e\u4e00\u822c\u7684\u306a\u5f62\u5f0f\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002 with \u8d44\u6e90 as [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-93345","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Python\u3067with\u6587\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5 - Blog - Silicon Cloud<\/title>\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.silicloud.com\/ja\/blog\/python\u3067with\u6587\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python\u3067with\u6587\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\" \/>\n<meta property=\"og:description\" content=\"Python\u306ewith\u6587\u306f\u3001\u30d5\u30a1\u30a4\u30eb\u306e\u30aa\u30fc\u30d7\u30f3\u3084\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u63a5\u7d9a\u306a\u3069\u3001\u624b\u52d5\u3067\u9589\u3058\u308b\u304b\u89e3\u653e\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u30ea\u30bd\u30fc\u30b9\u306e\u53d6\u5f97\u3068\u89e3\u653e\u3092\u7ba1\u7406\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002 with\u6587\u306e\u4e00\u822c\u7684\u306a\u5f62\u5f0f\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002 with \u8d44\u6e90 as [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/ja\/blog\/python\u3067with\u6587\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2024-03-21T07:29:03+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-04T08:13:10+00:00\" \/>\n<meta name=\"author\" content=\"\u7dbe\u4e43, \u4e00\u5e0c\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u7dbe\u4e43, \u4e00\u5e0c\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%a7with%e6%96%87%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%a7with%e6%96%87%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/\",\"name\":\"Python\u3067with\u6587\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\"},\"datePublished\":\"2024-03-21T07:29:03+00:00\",\"dateModified\":\"2024-04-04T08:13:10+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/601389077b7f4e4ad6115428e3b73bff\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%a7with%e6%96%87%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%a7with%e6%96%87%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%a7with%e6%96%87%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/ja\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python\u3067with\u6587\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"ja\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/601389077b7f4e4ad6115428e3b73bff\",\"name\":\"\u7dbe\u4e43, \u4e00\u5e0c\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/2228fe98b71141214fb24fb1b5ae44f99bdfa0602bbd89b351f2acd49ece862d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/2228fe98b71141214fb24fb1b5ae44f99bdfa0602bbd89b351f2acd49ece862d?s=96&d=mm&r=g\",\"caption\":\"\u7dbe\u4e43, \u4e00\u5e0c\"},\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/author\/ayanokazuki\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%a7with%e6%96%87%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Python\u3067with\u6587\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5 - Blog - Silicon Cloud","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.silicloud.com\/ja\/blog\/python\u3067with\u6587\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\/","og_locale":"ja_JP","og_type":"article","og_title":"Python\u3067with\u6587\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5","og_description":"Python\u306ewith\u6587\u306f\u3001\u30d5\u30a1\u30a4\u30eb\u306e\u30aa\u30fc\u30d7\u30f3\u3084\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u63a5\u7d9a\u306a\u3069\u3001\u624b\u52d5\u3067\u9589\u3058\u308b\u304b\u89e3\u653e\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u30ea\u30bd\u30fc\u30b9\u306e\u53d6\u5f97\u3068\u89e3\u653e\u3092\u7ba1\u7406\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002 with\u6587\u306e\u4e00\u822c\u7684\u306a\u5f62\u5f0f\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002 with \u8d44\u6e90 as [&hellip;]","og_url":"https:\/\/www.silicloud.com\/ja\/blog\/python\u3067with\u6587\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2024-03-21T07:29:03+00:00","article_modified_time":"2024-04-04T08:13:10+00:00","author":"\u7dbe\u4e43, \u4e00\u5e0c","twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"\u7dbe\u4e43, \u4e00\u5e0c"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%a7with%e6%96%87%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/","url":"https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%a7with%e6%96%87%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/","name":"Python\u3067with\u6587\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website"},"datePublished":"2024-03-21T07:29:03+00:00","dateModified":"2024-04-04T08:13:10+00:00","author":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/601389077b7f4e4ad6115428e3b73bff"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%a7with%e6%96%87%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%a7with%e6%96%87%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%a7with%e6%96%87%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/ja\/blog\/"},{"@type":"ListItem","position":2,"name":"Python\u3067with\u6587\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website","url":"https:\/\/www.silicloud.com\/ja\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"ja"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/601389077b7f4e4ad6115428e3b73bff","name":"\u7dbe\u4e43, \u4e00\u5e0c","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/2228fe98b71141214fb24fb1b5ae44f99bdfa0602bbd89b351f2acd49ece862d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2228fe98b71141214fb24fb1b5ae44f99bdfa0602bbd89b351f2acd49ece862d?s=96&d=mm&r=g","caption":"\u7dbe\u4e43, \u4e00\u5e0c"},"url":"https:\/\/www.silicloud.com\/ja\/blog\/author\/ayanokazuki\/"},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%a7with%e6%96%87%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/93345","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/comments?post=93345"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/93345\/revisions"}],"predecessor-version":[{"id":284888,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/93345\/revisions\/284888"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/media?parent=93345"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/categories?post=93345"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/tags?post=93345"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}