# -*- coding: utf-8 -*-
import wx
import os
import sys
import os.path
reload(sys)
sys.setdefaultencoding('cp949')
def myfileopen(f):
    myf=open("my.bat","a")
    myf.write(" "+str(f))
    myf.close()

class mainframe(wx.Frame):
    def __init__(self, *args, **kwds):
        kwds["style"] = wx.DEFAULT_FRAME_STYLE
        wx.Frame.__init__(self, *args, **kwds)
        dig = wx.FileDialog(None, message="Choose data files", style = wx.FD_MULTIPLE)
        if dig.ShowModal() == wx.ID_OK:
            if os.path.isfile("my.bat"):
                myf=open("my.bat","a")
            else:
                myf=open("my.bat","w")
                myf.write("C:\\Notepad\\notepad.exe")
            myf.close()
            for fn in dig.GetPaths():
                myfileopen(fn)

class conv(wx.App):
    def OnInit(self):
        wx.InitAllImageHandlers()
        main = mainframe(None, -1, "")
        self.SetTopWindow(main)
        main.Show(True)
        main.Show(False)
        exit()
        return 1

if __name__ == "__main__":
    conv = conv(0)
    conv.MainLoop()



...이딴걸 어따 써먹지...

신고
by snowall 2014.09.16 02:17

티스토리 툴바