2021年7月25日

Python读取YAML配置文件【简易版】

摘要: 自动化测试过程中,参数配置可以放在YMAL文件管理,以list或者dict数据格式存放参数,Python脚本能够方便读取YAML文件内容。 Python package安装: pip install PyYAML 举例如下: YAML配置文件,test_data.yml - username: 'u 阅读全文

posted @ 2021-07-25 11:06 Zhangwill 阅读(253) 评论(0) 推荐(0) 编辑

2020年12月18日

使用Python脚本计算文件MD5值

摘要: 为了方便在Windows环境计算文件MD5值。 使用Python完成一个脚本,实现md5sum功能。 代码: import os import sys import hashlib def md5sum(file): if not os.path.exists(file): return "md5s 阅读全文

posted @ 2020-12-18 15:05 Zhangwill 阅读(1713) 评论(0) 推荐(0) 编辑

2019年4月29日

windows远程登录报错 CredSSP不支持Oracle

摘要: https://support.microsoft.com/en-us/help/4093492/credssp-updates-for-cve-2018-0886-march-13-2018 阅读全文

posted @ 2019-04-29 11:23 Zhangwill 阅读(153) 评论(0) 推荐(0) 编辑

2019年4月25日

Python argparse用法

摘要: python.exe .\test.py -husage: test.py [-h] [-i APP_ID] [-d CONFIG_DIR] [-f CONFIG_FILE] this is for test. optional arguments: -h, --help show this hel 阅读全文

posted @ 2019-04-25 09:59 Zhangwill 阅读(194) 评论(0) 推荐(0) 编辑

2019年1月16日

使用python调用其他脚本

摘要: p.communicate()等待Popen任务执行完成。 阅读全文

posted @ 2019-01-16 21:00 Zhangwill 阅读(172) 评论(0) 推荐(0) 编辑

2019年1月4日

Python3 多线程例子

摘要: import threading, zipfile class AsyncZip(threading.Thread): def __init__(self, infile, outfile): threading.Thread.__init__(self) self.infile = infile self.outfile = outfi... 阅读全文

posted @ 2019-01-04 22:47 Zhangwill 阅读(177) 评论(0) 推荐(0) 编辑

2018年12月24日

Python PIL 图像缩小、拼接

摘要: 比较各种不同取样方式的图像缩放效果。 结果图: 原图左上角细节如下: 阅读全文

posted @ 2018-12-24 23:21 Zhangwill 阅读(5559) 评论(1) 推荐(0) 编辑

2018年12月22日

Python3源码学习-requests

摘要: 源码:https://github.com/small99/AutoLink 本地安装包 version.txt记录版本号。 通过requests GET最新git上版本号。 阅读全文

posted @ 2018-12-22 16:14 Zhangwill 阅读(260) 评论(0) 推荐(0) 编辑

2018年12月2日

Python闭包举例

摘要: Python闭包的条件: 1、函数嵌套。在外部函数内,定义内部函数。 2、参数传递。外部函数的局部变量,作为内部函数参数。 3、返回函数。外部函数的返回值,为内部函数。 举例如下: 阅读全文

posted @ 2018-12-02 10:36 Zhangwill 阅读(166) 评论(0) 推荐(0) 编辑

2018年11月13日

【牛客网刷题】饥饿的小易

摘要: 题目描述 小易总是感觉饥饿,所以作为章鱼的小易经常出去寻找贝壳吃。最开始小易在一个初始位置x_0。对于小易所处的当前位置x,他只能通过神秘的力量移动到 4 * x + 3或者8 * x + 7。因为使用神秘力量要耗费太多体力,所以它只能使用神秘力量最多100,000次。贝壳总生长在能被1,000,0 阅读全文

posted @ 2018-11-13 09:31 Zhangwill 阅读(553) 评论(0) 推荐(0) 编辑

导航