{"id":10748,"date":"2015-05-11T02:32:00","date_gmt":"2015-05-11T02:32:00","guid":{"rendered":"http:\/\/melotopia.net\/b\/?p=10748"},"modified":"2015-05-11T02:32:00","modified_gmt":"2015-05-11T02:32:00","slug":"10000%ec%a4%84-%eb%a7%88%eb%8b%a4-%ec%9e%90%eb%a5%b4%eb%8a%94-%ed%94%84%eb%a1%9c%ea%b7%b8%eb%9e%a8","status":"publish","type":"post","link":"http:\/\/melotopia.net\/b\/?p=10748","title":{"rendered":"10000\uc904 \ub9c8\ub2e4 \uc790\ub974\ub294 \ud504\ub85c\uadf8\ub7a8"},"content":{"rendered":"<div class=\"desc\">\n<div class=\"tt_article_useless_p_margin\">\n<p>\n          \uce5c\uad6c \uc694\uccad\uc73c\ub85c \uc791\uc131\ud568. wx\ub294 \ud544\uc694\ud568.<br \/>\n          \n<\/p>\n<p>\n\n<\/p>\n<div class=\"txc-textbox\" style=\"border-style: solid; border-width: 1px; border-color: rgb(254, 254, 184); background-color: rgb(254, 254, 184); padding: 10px;\">\n<p>\n           # -*- coding: utf-8 -*-<br \/>\n           <br \/>\n           import wx<br \/>\n           <br \/>\n           import os<br \/>\n           <br \/>\n           import sys<br \/>\n           <br \/>\n           reload(sys)<br \/>\n           <br \/>\n           #sys.setdefaultencoding(&#8216;cp949&#8217;) # if you use windows, uncomment this line. if not, keep this line commented.<\/p>\n<p>           def converting(f):<br \/>\n           <br \/>\n           src=open(f, &#8220;r&#8221;)<br \/>\n           <br \/>\n           header = src.readline()<br \/>\n           <br \/>\n           iteration = 0<br \/>\n           <br \/>\n           eof = &#8220;a&#8221;<br \/>\n           <br \/>\n           while not (eof==&#8221;&#8221;):<br \/>\n           <br \/>\n           tar=open(f[:-4]+&#8221;_&#8221;+str(iteration)+&#8221;.csv&#8221;, &#8220;w&#8221;)<br \/>\n           <br \/>\n           tar.writelines(header)<br \/>\n           <br \/>\n           for i in range(10000):<br \/>\n           <br \/>\n           eof = src.readline()<br \/>\n           <br \/>\n           if eof == &#8220;&#8221;:<br \/>\n           <br \/>\n           break<br \/>\n           <br \/>\n           tar.writelines(eof)<br \/>\n           <br \/>\n           tar.flush()<br \/>\n           <br \/>\n           tar.close()<br \/>\n           <br \/>\n           iteration+=1<br \/>\n           <br \/>\n           src.flush()<br \/>\n           <br \/>\n           src.close()<\/p>\n<p>           class mainframe(wx.Frame):<br \/>\n           <br \/>\n           def __init__(self, *args, **kwds):<br \/>\n           <br \/>\n           kwds[&#8220;style&#8221;] = wx.DEFAULT_FRAME_STYLE<br \/>\n           <br \/>\n           wx.Frame.__init__(self, *args, **kwds)<br \/>\n           <br \/>\n           dig = wx.FileDialog(None, message=&#8221;Choose data files&#8221;, style = wx.FD_MULTIPLE)<br \/>\n           <br \/>\n           if dig.ShowModal() == wx.ID_OK:<br \/>\n           <br \/>\n           for fn in dig.GetPaths():<br \/>\n           <br \/>\n           converting(fn)<\/p>\n<p>           class conv(wx.App):<br \/>\n           <br \/>\n           def OnInit(self):<br \/>\n           <br \/>\n           wx.InitAllImageHandlers()<br \/>\n           <br \/>\n           main = mainframe(None, -1, &#8220;&#8221;)<br \/>\n           <br \/>\n           self.SetTopWindow(main)<br \/>\n           <br \/>\n           main.Show(True)<br \/>\n           <br \/>\n           main.Show(False)<br \/>\n           <br \/>\n           exit()<br \/>\n           <br \/>\n           return 1<\/p>\n<p>           if __name__ == &#8220;__main__&#8221;:<br \/>\n           <br \/>\n           conv = conv(0)<br \/>\n           <br \/>\n           conv.MainLoop()<br \/>\n           \n<\/p>\n<\/div>\n<p>\n\n<\/p>\n<div style=\"width:100%;margin-top:30px;clear:both;height:30px\">\n<div style=\"width:31px;float:left;\">\n<a href=\"\/toolbar\/popup\/abuseReport\/?entryId=3591\" onclick=\"window.open(this.href, 'tistoryThisBlogPopup', 'width=550, height=510, toolbar=no, menubar=no, status=no, scrollbars=no'); return false;\"><br \/>\n<img data-recalc-dims=\"1\" decoding=\"async\" alt=\"\uc2e0\uace0\" src=\"https:\/\/i0.wp.com\/t1.daumcdn.net\/tistory_admin\/static\/ico\/ico_spam_report.png\" style=\"border:0\"\/><br \/>\n<\/a>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\uce5c\uad6c \uc694\uccad\uc73c\ub85c \uc791\uc131\ud568. wx\ub294 \ud544\uc694\ud568. # -*- coding: utf-8 -*- import wx import os import sys reload(sys) #sys.setdefaultencoding(&#8216;cp949&#8217;) # if you use windows, uncomment this line. if not, keep this line commented. def converting(f): src=open(f, &#8220;r&#8221;) header = src.readline() iteration = 0 eof = &#8220;a&#8221; while not (eof==&#8221;&#8221;): tar=open(f[:-4]+&#8221;_&#8221;+str(iteration)+&#8221;.csv&#8221;, &#8220;w&#8221;) tar.writelines(header) for i in range(10000): [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[12],"tags":[],"class_list":["post-10748","post","type-post","status-publish","format-standard","hentry","category-12"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8o6gA-2Nm","jetpack-related-posts":[],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=\/wp\/v2\/posts\/10748","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10748"}],"version-history":[{"count":0,"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=\/wp\/v2\/posts\/10748\/revisions"}],"wp:attachment":[{"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10748"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10748"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10748"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}