合并下载的股票数据

    xiaoxiao2021-03-25  199

    #-*- coding: utf-8 -*- import os import shutil path = "/root/stock_py/data/data_tick1/" target = "/root/stock_py/data/stockresult1.txt" print target appendfile = open(target, 'a+') for roots, dirs, files in os.walk(path):     for ifile in files:         tempfile = roots + '/' + ifile         openfile = open(tempfile)         print tempfile         shutil.copyfileobj(openfile, appendfile)         openfile.close() appendfile.close()
    转载请注明原文地址: https://ju.6miu.com/read-157.html

    最新回复(0)