摘要: #!/usr/bin/python # -*- coding: UTF-8 -*- """数据库备份""" import os import time import sched import re import smtplib from email.mime.text import MIMEText from email.header import Header from email.... 阅读全文
posted @ 2018-08-07 20:11 睡到自然醒ccc 阅读(216) 评论(0) 推荐(0)
摘要: import time #循环生成器 def traversal_list(alist, i): while True: length = len(alist) i = i%(length) yield alist[i] i += 1 def traversal_list2(alist): i = 0 ... 阅读全文
posted @ 2018-08-07 20:07 睡到自然醒ccc 阅读(431) 评论(0) 推荐(0)
摘要: 下载安装 yagmail import yagmail #链接邮箱服务器 #此处的password是授权码 yag= yagmail.SMTP( user="843092012@qq.com", password="xumeagqowzcgbfji", host='smtp.qq.com') # 邮 阅读全文
posted @ 2018-08-07 20:05 睡到自然醒ccc 阅读(247) 评论(0) 推荐(0)
摘要: 循环一个目录将下面的所有png或者jpg文件全部缩小一定比例; from PIL import Image import os,re work_dir = 'C:\\Users\\Administrator\\Desktop\\imge' for parent, dirnames, filename 阅读全文
posted @ 2018-08-07 20:02 睡到自然醒ccc 阅读(984) 评论(0) 推荐(0)