#coding=utf8
from Lib.AutoSendMail import AutoMail
from Lib.XQL import RunXQL
from Lib.mangerResultFile import FileManger
def Run():
fm= FileManger()
fm.clearResultCSV()
sender=raw_input("发送人:")
reciver=raw_input("接收人:")
smtpServer=raw_input("发送邮件服务(如:mail.ximalaya.com',smtp.163.c0m):")
password=raw_input("密码:")
ject=raw_input("邮件名:")
sendfile=fm.getLastFileWithPath()
RunXQL()
fm.moveCSVToSave()
AutoMail(sender,reciver,smtpServer,password,ject,sendfile)
if __name__=="__main__":
Run()
之前该项目的整体组织结构如下:不懂的可以私信我,这代码不是通用的,是为了减轻工作量,忙里偷懒。感兴趣可以操作下:
config.xml:
#download path
C:\Users\e.wang\Downloads
#save data file path
E:\PythonDemo\XQLSendMail\Report