2018年7月19日

python3加密 解密 签名 验签

摘要: 1 from Crypto import Random 2 from Crypto.Hash import SHA 3 from Crypto.Cipher import PKCS1_v1_5 as Cipher_pkcs1_v1_5 4 from Crypto.Signature import PKCS1_v1_5 as Signature_pkcs1_v1_5 5 from Cry... 阅读全文

posted @ 2018-07-19 10:03 sammy1989 阅读(2071) 评论(0) 推荐(0) 编辑

python3读取xml字符串

摘要: 1 import xml.sax 2 import xml.sax.handler 3 import pprint 4 5 6 class XMLHandler(xml.sax.handler.ContentHandler): 7 def __init__(self): 8 self.buffer = "" 9 self.mappin... 阅读全文

posted @ 2018-07-19 10:01 sammy1989 阅读(7541) 评论(0) 推荐(0) 编辑

2018年4月11日

SETX命令设置环境变量

摘要: 设置用户环境变量 setx NAME "sam" 设置系统环境变量 setx NAME "sam" /m 注意: (1)在某些情况下会出现“setx无效语法 默认选项不能超过‘2’次”的错误,是因为原先的环境变量中存在空格导致的,可使用双引号进行避免。 (2)setx在设置变量的长度超过1024,会 阅读全文

posted @ 2018-04-11 14:48 sammy1989 阅读(14495) 评论(1) 推荐(1) 编辑

2018年4月10日

python需求文件requirements.txt的创建及使用

摘要: 原文地址:https://blog.csdn.net/loyachen/article/details/52028825 python项目中需要包含一个requirements.txt文件,用于记录所有依赖包及其精确的版本号。以便新环境部署。 在虚拟环境中(或工程目录下)使用pip生成: (venv 阅读全文

posted @ 2018-04-10 16:10 sammy1989 阅读(328) 评论(0) 推荐(0) 编辑

2018年4月2日

FlaskWeb开发-Hello World

摘要: app.route:程序实例提供的修饰器,把修饰的函数注册为路由。 路由:处理URL和函数之间关系的程序。 视图函数:像index()这样的函数称为视图函数。 app.run():启动服务器 默认服务器地址:http://127.0.0.1:5000/ 如果想要使用https进行传输,可以加入参数s 阅读全文

posted @ 2018-04-02 17:14 sammy1989 阅读(132) 评论(0) 推荐(0) 编辑

FlaskWeb开发-安装

摘要: 使用虚拟环境 检查系统是否安装virtualenv命令: virtualenv --version 没有的话Windows下可以使用如下命令进行安装: pip install virtualenv 在固定目录下创建Python虚拟环境 先定位到需要创建虚拟环境的文件夹(例:flasky),然后使用v 阅读全文

posted @ 2018-04-02 16:03 sammy1989 阅读(128) 评论(0) 推荐(0) 编辑

2018年3月29日

Git简易教程

摘要: 原网地址:https://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000 创建版本库 第一步:创建一个空目录 pwd命令用于显示当前目录 第二步:通过git init命令把这个目录变成Git可以管 阅读全文

posted @ 2018-03-29 17:39 sammy1989 阅读(135) 评论(0) 推荐(0) 编辑

2018年1月29日

pymssql读取varchar字段中文显示乱码的问题

摘要: actual_result = actual_result.encode('latin1').decode('gbk') 阅读全文

posted @ 2018-01-29 16:13 sammy1989 阅读(263) 评论(0) 推荐(0) 编辑

2018年1月11日

python3用openpyxl读写Excel(xlsx)

摘要: from openpyxl import load_workbook#读取Excel文件 inwb = load_workbook("Auto1.xlsx")#输出每个sheet的名字print(inwb.sheetnames)#读取指定sheet的内容sheet = inwb.get_sheet_ 阅读全文

posted @ 2018-01-11 21:49 sammy1989 阅读(2894) 评论(0) 推荐(0) 编辑

2017年12月19日

python3发送邮件(yagmail)

摘要: # coding:utf-8import yagmail# 链接邮箱服务器yag = yagmail.SMTP(user="xxx@xx.com", password="xxx!!", host='smtp.xxx.com')# 邮箱正文contents = ['This is the body, 阅读全文

posted @ 2017-12-19 17:01 sammy1989 阅读(1749) 评论(0) 推荐(0) 编辑

导航