{"id":990,"date":"2019-05-01T16:47:17","date_gmt":"2019-05-01T07:47:17","guid":{"rendered":"http:\/\/int-info.com\/?page_id=990"},"modified":"2019-07-02T12:42:36","modified_gmt":"2019-07-02T03:42:36","slug":"pylearnweb05","status":"publish","type":"page","link":"http:\/\/int-info.com\/index.php\/pylearnweb05\/","title":{"rendered":"PyLearn WEB 05"},"content":{"rendered":"<h4 style=\"padding: 0.1em 0.3em; border-left: 10px solid #1E88E5; border-bottom: 3px solid #B0BEC5;\"> \u306f\u3058\u3081\u306b <\/h4>\n<p>\u4f55\u3089\u304b\u306e\u30c7\u30d0\u30a4\u30b9\u3084\u30a6\u30a7\u30d6\u306a\u3069\u3067\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u305f\u3068\u3057\u307e\u3059\u3002\u3053\u308c\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u3068\u3001\u81ea\u52d5\u7684\u306b\u6a5f\u68b0\u5b66\u7fd2\u3084\u7d71\u8a08\u306a\u3069\u3067\u52d5\u7684\u306b\u89e3\u6790\u304c\u884c\u308f\u308c\u3001\u305d\u306e\u89e3\u6790\u7d50\u679c\u3092\u8996\u899a\u7684\u306b\u308f\u304b\u308a\u3084\u3059\u304f\u30f4\u30a3\u30b8\u30e5\u30a2\u30e9\u30a4\u30ba\u306b\u51fa\u529b\u3059\u308bweb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u4f5c\u6210\u3092\u8003\u3048\u307e\u3059\u3002\u3053\u306e\u6642\u3001\u30d6\u30e9\u30a6\u30b6\u304b\u3089\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3055\u308c\u305fCSV\u30d5\u30a1\u30a4\u30eb\u3092\u3069\u306e\u3088\u3046\u306bpython\u306e\u5909\u6570\u306b\u6e21\u3059\u304b\u304c\u4e00\u3064\u306e\u8ab2\u984c\u3068\u306a\u308a\u307e\u3059\u3002\u672c\u30da\u30fc\u30b8\u3067\u306f\u3001\u3053\u306e\u89e3\u6c7a\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><\/br><\/p>\n<h4 style=\"padding: 0.1em 0.3em; border-left: 10px solid #1E88E5; border-bottom: 3px solid #B0BEC5;\"> CSV\u30c7\u30fc\u30bf\u306e\u7528\u610f <\/h4>\n<p>\u307e\u305a\u3001\u30a8\u30af\u30bb\u30eb\u306a\u3069\u3092\u958b\u304d\u3001\u30c7\u30fc\u30bf\u3092\u5165\u529b\u3057\u307e\u3059\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/int-info.com\/wp-content\/uploads\/2019\/07\/Img.png\" alt=\"\" width=\"812\" height=\"222\" class=\"aligncenter size-full wp-image-1253\" srcset=\"http:\/\/int-info.com\/wp-content\/uploads\/2019\/07\/Img.png 812w, http:\/\/int-info.com\/wp-content\/uploads\/2019\/07\/Img-300x82.png 300w, http:\/\/int-info.com\/wp-content\/uploads\/2019\/07\/Img-768x210.png 768w\" sizes=\"auto, (max-width: 812px) 100vw, 812px\" \/><\/p>\n<p>\u6b21\u306b\u3001\u4fdd\u5b58\u3092\u884c\u3044\u307e\u3059\u304c\u3001\u3053\u306e\u624b\u7d9a\u304d\u306f\u7d50\u69cb\u91cd\u8981\u3067\u3059\u3002Mac\u3067csv\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u308b\u3068\u304d\u3001UTF-8\u3068\u660e\u793a\u3055\u308c\u3066\u3044\u308bCSV\u30d5\u30a1\u30a4\u30eb\u5f62\u5f0f\u3068\u3001\u4f55\u3082\u8a18\u8f09\u3055\u308c\u3066\u3044\u306a\u3044CSV\u30d5\u30a1\u30a4\u30eb\u5f62\u5f0f\u306b\u3088\u308b\u4fdd\u5b58\u304c\u9078\u629e\u3067\u304d\u307e\u3059\u3002\u524d\u8005\u306futf-8\u3067\u4fdd\u5b58\u3055\u308c\u3001\u5f8c\u8005\u306e\u5834\u5408\u306fsift-jis\u3067\u4fdd\u5b58\u3055\u308c\u307e\u3059\u3002\u6df7\u4e71\u3057\u306a\u3044\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002sift-jis\u306f\u65e5\u672c\u3067\u3057\u304b\u901a\u7528\u3057\u306a\u3044\u6587\u5b57\u30b3\u30fc\u30c9\u306a\u306e\u3067\u3001utf-8\u3067\u4fdd\u5b58\u3057\u307e\u3057\u3087\u3046\u3002\u3059\u306a\u308f\u3061\u3001\u753b\u50cf\u306e\u9078\u629e\u80a2\u3092\u9078\u3093\u3067\u4fdd\u5b58\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/int-info.com\/wp-content\/uploads\/2019\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2019-05-02-17.18.10.png\" alt=\"\" width=\"372\" height=\"170\" class=\"aligncenter size-full wp-image-1002\" srcset=\"http:\/\/int-info.com\/wp-content\/uploads\/2019\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2019-05-02-17.18.10.png 372w, http:\/\/int-info.com\/wp-content\/uploads\/2019\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2019-05-02-17.18.10-300x137.png 300w\" sizes=\"auto, (max-width: 372px) 100vw, 372px\" \/><\/p>\n<p><\/br><\/p>\n<h4 style=\"padding: 0.1em 0.3em; border-left: 10px solid #1E88E5; border-bottom: 3px solid #B0BEC5;\"> \u30b3\u30fc\u30c9 <\/h4>\n<p>atom\u3067\u65b0\u898f\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3001\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u30b3\u30d4\u30da\u3067\u8cbc\u308a\u4ed8\u3051\u3001\u30bf\u30fc\u30df\u30ca\u30eb\u4e0a\u3067\u300cpython3 xxx.py\u300d\u3068\u6253\u3061\u3001\u30b5\u30fc\u30d0\u3092\u8d77\u52d5\u3055\u305b\u3066\u304f\u3060\u3055\u3044\u3002\u305d\u306e\u5f8c\u3001\u30d6\u30e9\u30a6\u30b6\u3067localhost:9999\u3068\u6253\u3061\u3053\u307f\u3001\u30da\u30fc\u30b8\u3092\u8868\u793a\u3055\u305b\u3066\u304f\u3060\u3055\u3044\u3002\u305d\u306e\u5f8c\u3001csv\u30d5\u30a1\u30a4\u30eb\u3092\u9078\u629e\u3057\u3001\u30dc\u30bf\u30f3\u3092\u62bc\u3059\u3068\u3001\u305d\u306e\u4e2d\u8eab\u304cpython\u306e\u5909\u6570(rawdat)\u306b\u4ee3\u5165\u3055\u308c\u3001\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u306a\u304a\u3001\u5de8\u5927\u306a\u30d5\u30a1\u30a4\u30eb\u306e\u6271\u3044\u3092\u907f\u3051\u308b\u305f\u3081\u306b\u3001rawdat\u306e\u9577\u3055\u3092\u6e2c\u5b9a\u3057\u3001Limit\u4ee5\u4e0a\u3067\u3042\u308c\u3070\u89e3\u6790\u3057\u306a\u3044\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre>\r\n# -*- coding: utf-8 -*-\r\nfrom bottle import route, run, get, post, request, debug\r\n\r\n# CSV\u30d5\u30a1\u30a4\u30eb\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u30da\u30fc\u30b8\r\n@get('\/')\r\ndef InputFile():\r\n    t= '''\r\n        <form action=\"\/SavePage\" method=\"post\" enctype=\"multipart\/form-data\">\r\n        <input type=\"file\" name=\"csvdat\" \/>\r\n        <input value=\"push\" type=\"submit\" \/>\r\n        <\/form>\r\n    '''\r\n    return t\r\n\r\n\r\n# \u30d5\u30a1\u30a4\u30eb\u306e\u4e2d\u8eab\u3092\u89e3\u6790\u3059\u308b\u30da\u30fc\u30b8\r\n@post('\/SavePage')\r\ndef SaveFile():\r\n\r\n    getdat = request.files.csvdat\r\n    rawdat = getdat.file.read()\r\n    FileSize = len(rawdat)\r\n    Limit = 5000 #\u30b5\u30a4\u30ba\u4e0a\u9650\r\n\r\n    if FileSize >= Limit:\r\n        return \"\u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba\u304c\u5927\u304d\u3059\u304e\u308b\u305f\u3081\u51e6\u7406\u3092\u884c\u3044\u307e\u305b\u3093\uff01\uff08\" + str(FileSize) + \"bytes\uff09\"\r\n    elif FileSize < Limit:\r\n        # \u51e6\u7406\u3092\u5b9f\u884c\uff01\r\n        return \"\u51e6\u7406\u3092\u7d42\u4e86\u3057\u307e\u3057\u305f\u3002\uff08\" + str(FileSize) + \"bytes\uff09<br>\u30d5\u30a1\u30a4\u30eb\u306e\u4e2d\u8eab: \" + str(rawdat)\r\n    else:\r\n        return \"\u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba\u304c\u4e0d\u660e\u306a\u306e\u3067\u3001\u51e6\u7406\u3092\u884c\u3044\u307e\u305b\u3093\u3002\"\r\n\r\n# \u30b5\u30fc\u30d0\u306e\u8d77\u52d5\uff08\u4e00\u756a\u4e0b\u306b\u66f8\u304f\u3053\u3068\uff09\r\nrun(reloader=True, port=9999)\r\n<\/pre>\n<p>\u30dd\u30a4\u30f3\u30c8\u306f8\u884c\u76ee\u306ecsvdat\uff08HTML\uff09\u3067\u3059\u3002\u3053\u3053\u3067\u3001HTML\u306b\u3066\u5b9a\u7fa9\u3065\u3051\u3089\u308c\u305fcsvdat\u306b\u5bfe\u3057\u3066\u3001CSV\u30c7\u30fc\u30bf\u304c\u4fdd\u6301\u3055\u308c\u307e\u3059\u3002\u305d\u306e\u5f8c\u300120\u884c\u76ee\u3067python\u306e\u5909\u6570\u3067\u3042\u308bgetdat\u306b\u3053\u306e\u60c5\u5831\u304c\u6e21\u3055\u308c\u300121\u884c\u76ee\u3067python\u306e\u5909\u6570\u3067\u3042\u308brawdat\u306bCSV\u30d5\u30a1\u30a4\u30eb\u306e\u4e2d\u8eab\u304cbytes\u578b\u3067\u6e21\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><\/br><\/p>\n<h4 style=\"padding: 0.1em 0.3em; border-left: 10px solid #1E88E5; border-bottom: 3px solid #B0BEC5;\"> bytes\u578b\u3078\u306e\u5bfe\u5fdc <\/h4>\n<p>\u306a\u304a\u3001\u300cgetdat = request.files.csvdat, rawdat = getdat.file.read()\u300d\u306b\u3066CSV\u30d5\u30a1\u30a4\u30eb\u306e\u4e2d\u8eab\u3092rawdat\u306b\u4ee3\u5165\u3057\u3066\u3044\u307e\u3059\u304c\u3001rawdat\u306fpython\u306b\u304a\u3051\u308bbytes\u578b\u3068\u547c\u3070\u308c\u308b\u578b\u306e\u5909\u6570\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306f\u3001\u5168\u89d2\u6587\u5b57\u309216\u9032\u6570\u3067\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u3082\u3057\u304b\u3059\u308b\u3068\u76f4\u611f\u7684\u306b\u6271\u3046\u306b\u304f\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\u3053\u308c\u3092\u89e3\u6c7a\u3059\u308b\u305f\u3081\u306b\u3001bytes\u578b\u3092str\u578b\u306b\u5909\u63db\u3057\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u306f\u3001\u6271\u3046CSV\u30d5\u30a1\u30a4\u30eb\u306e\u6587\u5b57\u30b3\u30fc\u30c9\u3092\u77e5\u308b\u3053\u3068\u304c\u5fc5\u8981\u3067\u3059\u3002\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u6253\u3061\u8fbc\u3080\u3053\u3068\u3067\u3001\u6587\u5b57\u30b3\u30fc\u30c9\u3092\u8abf\u3079\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre>\r\nnkf -guess xxx.csv\r\n<\/pre>\n<p>\u3059\u308b\u3068\u3001\u304a\u305d\u3089\u304f\u591a\u304f\u306e\u5834\u5408\u300cshift-jis\u300d\u304b\u300cutf-8\u300d\u304c\u8fd4\u3063\u3066\u304f\u308b\u3068\u601d\u3044\u307e\u3059\u3002\u3053\u308c\u3092python\u306e\u30b3\u30fc\u30c9\u4e0a\u3067bytes\u578b\u3092str\u578b\u306b\u30ad\u30e3\u30b9\u30c8\u3059\u308b\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n<pre>\r\nrawdat_dec = rawdat.decode('shift_jis')\r\nrawdat_dec = rawdat.decode('UTF-8')\r\n<\/pre>\n<p>\u3069\u3061\u3089\u304b\u4e00\u65b9\u304c\u6b63\u89e3\u3067\u3059\u3002\u305f\u3060\u3057\u3001\u304d\u3061\u3093\u3068nkf\u3067\u78ba\u8a8d\u3057\u305f\u6587\u5b57\u30b3\u30fc\u30c9\u3092\u6307\u5b9a\u3057\u306a\u3044\u3068\u3001\u30a8\u30e9\u30fc\u306b\u306a\u308b\u306e\u3067\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002\u3068\u306f\u3044\u3048\u3001\u30e6\u30fc\u30b6\u304c\u3069\u3061\u3089\u3092\u4f7f\u7528\u3059\u308b\u306e\u304b\u306f\u672a\u77e5\u6570\u3067\u3059\u3002\u3053\u3046\u3044\u3063\u305f\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3059\u308b\u3068\u3044\u3044\u3067\u3059\u3002<\/p>\n<pre>\r\nfrom bottle import route, run, get, post, request, debug\r\n\r\n# CSV\u30d5\u30a1\u30a4\u30eb\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u30da\u30fc\u30b8\r\n@get('\/')\r\ndef InputFile():\r\n    t= '''\r\n        <form action=\"\/SavePage\" method=\"post\" enctype=\"multipart\/form-data\">\r\n        <input type=\"file\" name=\"csvdat\" \/>\r\n        <input value=\"push\" type=\"submit\" \/>\r\n        <\/form>\r\n    '''\r\n    return t\r\n\r\n\r\n# \u30d5\u30a1\u30a4\u30eb\u306e\u4e2d\u8eab\u3092\u89e3\u6790\u3059\u308b\u30da\u30fc\u30b8\r\n@post('\/SavePage')\r\ndef SaveFile():\r\n\r\n    getdat = request.files.csvdat\r\n    rawdat = getdat.file.read()\r\n    FileSize = len(rawdat)\r\n    Limit = 5000 #\u30b5\u30a4\u30ba\u4e0a\u9650\r\n\r\n    try:\r\n        Dec_rawdat = rawdat.decode(\"shift_jis\")\r\n    except:\r\n        Dec_rawdat = rawdat.decode(\"UTF-8\")\r\n\r\n    if FileSize >= Limit:\r\n        return \"\u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba\u304c\u5927\u304d\u3059\u304e\u308b\u305f\u3081\u51e6\u7406\u3092\u884c\u3044\u307e\u305b\u3093\uff01\uff08\" + str(FileSize) + \"bytes\uff09\"\r\n    elif FileSize < Limit:\r\n        # \u51e6\u7406\u3092\u5b9f\u884c\uff01\r\n        return \"\u51e6\u7406\u3092\u7d42\u4e86\u3057\u307e\u3057\u305f\u3002\uff08\" + str(FileSize) + \"bytes\uff09<br>\u30d5\u30a1\u30a4\u30eb\u306e\u4e2d\u8eab: \" + Dec_rawdat\r\n    else:\r\n        return \"\u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba\u304c\u4e0d\u660e\u306a\u306e\u3067\u3001\u51e6\u7406\u3092\u884c\u3044\u307e\u305b\u3093\u3002\"\r\n\r\n# \u30b5\u30fc\u30d0\u306e\u8d77\u52d5\uff08\u4e00\u756a\u4e0b\u306b\u66f8\u304f\u3053\u3068\uff09\r\nrun(reloader=True, port=9999)\r\n<\/pre>\n<p>\u30dd\u30a4\u30f3\u30c8\u306f24\u301c27\u884c\u76ee\u3067\u3059\u3002\u306f\u3058\u3081\u306bsift_jis\u3078\u306e\u30c7\u30b3\u30fc\u30c9\u3092\u8a66\u307f\u3066\u3001\u305d\u308c\u304c\u30c0\u30e1\u3060\u3063\u305f\u3089utf-8\u3078\u306e\u30c7\u30b3\u30fc\u30c9\u3092\u8a66\u307f\u307e\u3059\u3002<\/p>\n<p><\/br><\/p>\n<h4 style=\"padding: 0.1em 0.3em; border-left: 10px solid #1E88E5; border-bottom: 3px solid #B0BEC5;\"> \u30c7\u30fc\u30bf\u306e\u53d6\u308a\u51fa\u3057 <\/h4>\n<p>\u524d\u8ff0\u306e\u30b3\u30fc\u30c9\u306b\u3088\u308a\u3001Dec_rawdat\u306b\u5bfe\u3057\u3001CSV\u30d5\u30a1\u30a4\u30eb\u306e\u4e2d\u8eab\u3092\u66f8\u304d\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002CSV\u30d5\u30a1\u30a4\u30eb\u306e1\u30bb\u30eb\u306e\u30c7\u30fc\u30bf\u30921\u30641\u3064\u5206\u5272\u3057\u3066\u4fdd\u5b58\u3057\u306a\u3051\u308c\u3070\u3001\u89e3\u6790\u306a\u3069\u306e\u5229\u7528\u3067\u304d\u307e\u305b\u3093\u3002\u3053\u306e\u305f\u3081\u306b\u306f\u3001\u5927\u304d\u304f\u5206\u3051\u3066\u4ee5\u4e0b3\u3064\u306e\u624b\u7d9a\u304d\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<ul>\n<li>\u30b4\u30df\u3092\u9664\u53bb\u3059\u308b\u3002<\/li>\n<li>\u6539\u884c\u30b3\u30fc\u30c9\u3067\u30c7\u30fc\u30bf\u3092\u5206\u5272\u3059\u308b\u3053\u3068\u3067\u3001\u884c\u6210\u5206\u306e\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u51fa\u3059\u3002<\/li>\n<li>\u30ab\u30f3\u30de\uff08,\uff09\u3067\u30c7\u30fc\u30bf\u3092\u5206\u5272\u3059\u308b\u3053\u3068\u3067\u3001\u5217\u6210\u5206\u306e\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u51fa\u3059\u3002<\/li>\n<\/ul>\n<p>\u3053\u3053\u3067\u3044\u3046\u30b4\u30df\u306e\u9664\u53bb\u3068\u306f\u3001\u4eba\u9593\u306e\u76ee\u306b\u306f\u898b\u3048\u306a\u3044\u6539\u884c\u3092\u8868\u3059\u30b3\u30fc\u30c9\u306a\u3069\u3067\u3059\u3002\u3053\u308c\u3092\u6d88\u3055\u306a\u3044\u3068\u3001\u30c7\u30fc\u30bf\u306e\u4e2d\u306b\u3001\u6539\u884c\u30b3\u30fc\u30c9\u306a\u3069\u304c\u6df7\u3056\u3063\u3066\u3057\u307e\u3046\u306e\u3067\u3001\u8a08\u7b97\u306a\u3069\u304c\u3067\u304d\u306a\u304f\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306b\u3001\u9577\u3044\u6587\u5b57\u5217\u306e\u30c7\u30fc\u30bf\u3092\u3001\u6539\u884c\u3092\u767a\u898b\u3057\u30011\u884c1\u884c\u5206\u5272\u3055\u308c\u305f\u30c7\u30fc\u30bf\u306b\u5909\u63db\u3057\u307e\u3059\u3002\u6700\u5f8c\u306b\u3001\u305d\u306e\u30c7\u30fc\u30bf\u3092\u30ab\u30f3\u30de\u3067\u533a\u5207\u308b\u3053\u3068\u3067\u3001CSV\u30d5\u30a1\u30a4\u30eb\u306e\u30bb\u30eb1\u30641\u3064\u304c\u5206\u5272\u3055\u308c\u305f\u30c7\u30fc\u30bf\u3092\u5165\u624b\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u3092\u5b9f\u73fe\u3059\u308b\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002\u4e0a\u306e\u30b3\u30fc\u30c9\u3067\u3001Dec_rawdat\u3092\u751f\u6210\u3057\u305f\u5f8c\u306b\u5165\u308c\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre>\r\n\r\n# \u30b4\u30df\u306e\u9664\u53bb\r\nDec_rawdat = Dec_rawdat.replace(\"\\ufeff\",\"\") # \u30c6\u30ad\u30b9\u30c8\u958b\u59cb\u30b3\u30fc\u30c9\r\nDec_rawdat = Dec_rawdat.replace(\"\\r\",\"\") # \u6539\u884c\u30b3\u30fc\u30c9\r\n\r\n# \u6539\u884c\u3067\u30c7\u30fc\u30bf\u533a\u5207\u308a\u3057\u3001\u30ea\u30b9\u30c8\u3078\r\nLineDat = Dec_rawdat.split(os.linesep)\r\n\r\n# \u30ab\u30f3\u30de\u3067\u30c7\u30fc\u30bf\u533a\u5207\u308a\r\nCSVdat = []\r\nfor i in range(0,len(LineDat)):\r\n   CSVdat.append(LineDat[i].split(\",\"))\r\n\r\n# \u30c7\u30fc\u30bf\u8868\u793a\r\nprint(CSVdat)\r\n<\/pre>\n<p>\u306f\u3058\u3081\u306b\u3001replace\u95a2\u6570\u3067\u3001\u30b4\u30df\u3068\u306a\u308b\u6587\u5b57\u30b3\u30fc\u30c9\uff08\\ufeff, \\r\uff09\u3092\u3001\u4f55\u3082\u306a\u3044\u6587\u5b57\u306b\u5909\u63db\u3057\u307e\u3059\u3002\u305d\u306e\u5f8c\u3001split\u95a2\u6570\u3067\u3001\u6539\u884c\u3092\u610f\u5473\u3059\u308blinesep\u533a\u5207\u308a\u3067\u3001\u30c7\u30fc\u30bf\u3092\u5206\u5272\u3057\u3001\u30ea\u30b9\u30c8\u306b\u683c\u7d0d\u3057\u307e\u3059\u3002\u6700\u5f8c\u306b\u3001split\u95a2\u6570\u3067\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002\u3053\u306e\u624b\u7d9a\u304d\u3067\u3001\u5909\u6570CSVdat\u306b\u5bfe\u3057\u30011\u30bb\u30eb1\u30bb\u30eb\u304c\u5206\u5272\u3055\u308c\u305f\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u306f\u3058\u3081\u306b \u4f55\u3089\u304b\u306e\u30c7\u30d0\u30a4\u30b9\u3084\u30a6\u30a7\u30d6\u306a\u3069\u3067\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u305f\u3068\u3057\u307e\u3059\u3002\u3053\u308c\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u3068\u3001\u81ea\u52d5\u7684\u306b\u6a5f\u68b0\u5b66\u7fd2\u3084\u7d71\u8a08\u306a\u3069\u3067\u52d5\u7684\u306b\u89e3\u6790\u304c\u884c\u308f\u308c\u3001\u305d\u306e\u89e3\u6790\u7d50\u679c\u3092\u8996\u899a\u7684\u306b\u308f\u304b\u308a\u3084\u3059\u304f\u30f4\u30a3\u30b8\u30e5\u30a2\u30e9\u30a4\u30ba\u306b\u51fa\u529b\u3059\u308bweb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7<\/p><\/div>\n<div class=\"blog-btn\"><a href=\"http:\/\/int-info.com\/index.php\/pylearnweb05\/\" class=\"home-blog-btn\">\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-990","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/int-info.com\/index.php\/wp-json\/wp\/v2\/pages\/990","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/int-info.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/int-info.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/int-info.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/int-info.com\/index.php\/wp-json\/wp\/v2\/comments?post=990"}],"version-history":[{"count":14,"href":"http:\/\/int-info.com\/index.php\/wp-json\/wp\/v2\/pages\/990\/revisions"}],"predecessor-version":[{"id":1254,"href":"http:\/\/int-info.com\/index.php\/wp-json\/wp\/v2\/pages\/990\/revisions\/1254"}],"wp:attachment":[{"href":"http:\/\/int-info.com\/index.php\/wp-json\/wp\/v2\/media?parent=990"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}