import os
“”“请关注 www.jjddlc.com”""
“”“作者:Pgabc”""
def datedown_log(item_nv, itemnv_nv, starttime_wm, endtime_wm):
# 数据下载结果写入datadown_log.txt文件
f = open(‘d:/log/datadown_log.txt’, ‘a’)
content_wm = “{},{}‘数据处理开始时间:’,{},’,结束时间: ',{} \r\n”.format(item_nv, itemnv_nv, starttime_wm, endtime_wm)
f.write(content_wm)
f.close()
print(‘下载’, item_nv, itemnv_nv, ‘数据库结果写入datadown_log.txt! %s’ % (endtime_wm))
if name==“main”:
item_nv = ‘stock_daily’
itemnv_nv = ‘股票日线’
starttime_wm = ‘2019-05-17 16:00’
endtime_wm = ‘2019-05-17 18:00’
datedown_log(item_nv, itemnv_nv, starttime_wm, endtime_wm)