摘要: 1 # 通过对NC文件复制来造数据 2 import os, shutil 3 4 # 遍历的根目录 5 root_dir = "D:\\test_data\\DISASTER\\" 6 # 获取NC文件的时间 7 time_source = '20161228080000' 8 # 生成NC文件的时间 9 time_new = '201812280... 阅读全文
posted @ 2017-08-13 23:04 星瑞 阅读(2004) 评论(0) 推荐(0) 编辑
摘要: 1 # 多线程举例 2 from threading import Thread 3 from threading import current_thread 4 5 6 class messager(Thread): 7 def run(self): 8 for x in range(20): 9 print(curre... 阅读全文
posted @ 2017-08-13 22:41 星瑞 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 1 # 发送html内容的邮件 2 import smtplib, time, os 3 from email.mime.text import MIMEText 4 from email.header import Header 5 6 7 def send_mail_html(file): 8 '''发送html内容邮件''' 9 # 发送邮箱 10... 阅读全文
posted @ 2017-08-13 22:39 星瑞 阅读(16283) 评论(0) 推荐(0) 编辑