예제 #1
0
    def POST(self):
        from bbvisa2ofx import bbvisa2ofx
        i = web.input(txtfile={})

        txtFile = i['txtfile'].file
        strOfx = StringIO()
        bbvisa2ofx.convert(txtFile, strOfx, False)

        web.header('Content-Type', 'text/plain') # file type
        web.header('Content-disposition', 'attachment; filename='+ i['txtfile'].filename+'.ofx') # force browser to show "Save as" dialog.

        return strOfx.getvalue() # your blob
예제 #2
0
    def POST(self):
        from bbvisa2ofx import bbvisa2ofx
        i = web.input(txtfile={})

        txtFile = i['txtfile'].file
        strOfx = StringIO()
        bbvisa2ofx.convert(txtFile, strOfx, False)

        web.header('Content-Type', 'text/plain')  # file type
        web.header('Content-disposition',
                   'attachment; filename=' + i['txtfile'].filename +
                   '.ofx')  # force browser to show "Save as" dialog.

        return strOfx.getvalue()  # your blob
예제 #3
0
    def testConvert(self):
        fTxt = open(self.file_path,'r')
        fOfx = open(self.file_path+".ofx",'w')

        convert(fTxt,fOfx)
예제 #4
0
    def testConvert(self):
        fTxt = open(self.file_path, 'r')
        fOfx = open(self.file_path + ".ofx", 'w')

        convert(fTxt, fOfx)