摘要: import xlwt #写excelimport xlrd #读excelimport xlutils #修改excelbook = xlwt.Workbook()#创建booksheet = book.add_sheet('sheet1')#创建表sheet.write(0,0,'id')#指定 阅读全文
posted @ 2018-10-04 20:31 apollecn 阅读(204) 评论(0) 推荐(0) 编辑
摘要: 打开cmd,输入pip install xpinyin,安装第三方插件,xpinyin为汉字转拼音的插件。pip install pymysql 操作mysql的pip install xlwt 以下三个操作excel的pip install xlrdpip install xlutils可以从py 阅读全文
posted @ 2018-10-04 19:38 apollecn 阅读(463) 评论(0) 推荐(0) 编辑
摘要: 加密的模块import hashlib# import md5 #这个是python2里面的 后面的方法可以直接md5,不用hashlib.md5password='123123'# print(password.encode())#转成二进制类型的才可以加密m = hashlib.md5(pass 阅读全文
posted @ 2018-10-04 14:17 apollecn 阅读(137) 评论(0) 推荐(0) 编辑
摘要: #和时间相关的操作import timetime.sleep(30) #以秒为单位# 格式化好的时间 20180915 14:08:53# 时间戳为从计算机诞生那天到现在过了多少秒res = time.strftime('%Y-%m-%d %H:%M:%S') #取当前的格式化日期,Y大写为2018 阅读全文
posted @ 2018-10-04 13:49 apollecn 阅读(168) 评论(0) 推荐(0) 编辑