2018年7月28日
摘要: 1 网络编程 http://docs.python-requests.org/zh_CN/latest/user/quickstart.html from urllib.request import urlopen from urllib.parse import urlencode url = ' 阅读全文
posted @ 2018-07-28 21:34 better0903 阅读(177) 评论(0) 推荐(0) 编辑
  2018年7月21日
摘要: 1 mysql补充 cur = conn.cursor(cursor=pymysql.cursors.DictCursor) #直接获取的数据转换为字典格式的 cur.description #直接获取的描述信息 fileds = [filed[0] for filed in cur.descrip 阅读全文
posted @ 2018-07-21 21:34 better0903 阅读(124) 评论(0) 推荐(0) 编辑
  2018年7月8日
摘要: 1 函数map和filter #map()和filter循环帮你调用函数的 1.1 函数map import os import time def makdir(dir_name): if not os.path.isdir(dir_name): os.mkdir(dir_name) return 阅读全文
posted @ 2018-07-08 22:47 better0903 阅读(142) 评论(0) 推荐(0) 编辑
  2018年7月6日
摘要: 1 函数 1.1 字符串格式化方法 Python中字符串格式化输出的几种方法: https://www.cnblogs.com/hongzejun/p/7670923.html 字符串格式化另外一种方式format方式 #字符串format()方法 #第一种 import datetime msg 阅读全文
posted @ 2018-07-06 23:16 better0903 阅读(168) 评论(0) 推荐(0) 编辑
  2018年6月24日
摘要: 1 文件读写补充 文件修改 方法1:简单粗暴直接: 1、 先获取到文件里面的所有内容 2、 然后修改文件里面的内容 3、 清空原来文件里面的内容 4、 重新写入 f = open('test1.txt','r+') f.seek(0) all_data = f.read() new_data = a 阅读全文
posted @ 2018-06-24 21:33 better0903 阅读(99) 评论(0) 推荐(0) 编辑
  2018年6月3日
摘要: 1、字符串常用方法 name1 = 'shuipingzuo' print(name1.capitalize()) #将字符串首字母大写 print(name1.center(50,'*')) #将字符串居中,50表示整个字符串长度50,如果字符串本身不够50,则后后面定义的*号前后补齐 print 阅读全文
posted @ 2018-06-03 23:22 better0903 阅读(218) 评论(0) 推荐(0) 编辑
  2018年5月31日
摘要: 1 Jmeter分布式压测 1、 其他的压力机启动jmeter-server.bat 2、在控制机上,找到jmeter的bin目录下打开jmeter.properties文件,找到remote_hosts=localhost:1099,192.168.3.114:1099,192.168.3.115 阅读全文
posted @ 2018-05-31 22:30 better0903 阅读(264) 评论(1) 推荐(0) 编辑
  2018年5月20日
摘要: 一、接口测试 接口测试就是功能测试,比UI测试还简单; 接口就是从数据库查到数据,返回回来; 一般接口返回的是json格式字符串;json是一种通用的数据类型; 前端和后端 客户端、服务端 越底层发现bug修复bug成本是越低的; Get与POST请求的区别 Get请求:它的请求数据是放在url里面 阅读全文
posted @ 2018-05-20 23:54 better0903 阅读(612) 评论(0) 推荐(0) 编辑