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
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
def testConvert(self): fTxt = open(self.file_path,'r') fOfx = open(self.file_path+".ofx",'w') convert(fTxt,fOfx)
def testConvert(self): fTxt = open(self.file_path, 'r') fOfx = open(self.file_path + ".ofx", 'w') convert(fTxt, fOfx)