python操作excel用到3个模块,分别是xlrd,xlwt,xlutils;;;;xlrd用来读excel,xlwt用来写excel,xlutils用来修改excel 。 xlrd模块 xlwt模块 xlutils模块 Read More
posted @ 2018-02-10 20:03 笨笨的妞 Views(275) Comments(0) Diggs(0) Edit
setting.py tools.py student.py start.py * Restarting with stat * Debugger is active! * Debugger PIN: 290-225-122 * Running on http://127.0.0.1:9999/ ( Read More
posted @ 2018-01-23 11:30 笨笨的妞 Views(391) Comments(0) Diggs(0) Edit
封装redis函数 Read More
posted @ 2018-01-23 10:55 笨笨的妞 Views(142) Comments(0) Diggs(0) Edit
安装pymysql pip install mysql 步骤: 1.建立连接 指定ip、端口号、密码、账号、数据库 2.建立游标 3.执行sql语句 4.获取结果或提交 5.关闭游标,关闭连接 封装mysql函数 Read More
posted @ 2018-01-23 10:45 笨笨的妞 Views(135) Comments(0) Diggs(0) Edit
函数基础 函数定义 函数 也就是方法、功能,说白了,函数就是把一堆代码组合到一起,变成一个整体。 函数的作用:提高代码的复用性 注:函数不调用不会被执行 练习:下面代码运行结果是什么? 解析:很多人觉得是10,因为test()函数中,设置a为全局变量,且a的值为5,所以test1()函数中引用全局变 Read More
posted @ 2018-01-08 11:44 笨笨的妞 Views(165) Comments(0) Diggs(0) Edit
打开文件 文件打开的方式--如果打开文件没有指定默认读模式 r 读模式 文件不存在是报错,不可写r+ 读写模式 文件不存在时报错w 写模式 不可读,写的内容会覆盖之前的内容w+ 写读模式 写的内容会覆盖之前的内容a 追加不可读 a+ 追加读写模式 文件不存在是新建,可读可写,追加不覆盖 文件方法 文 Read More
posted @ 2017-12-25 18:28 笨笨的妞 Views(183) Comments(0) Diggs(0) Edit
字符串方法 注:字符串和元组一样都是不可变的,以下函数不会改变原来字符串的值,可以将其赋给一个新的变量 String 模块 import string string.ascii_letters 元组 元组定义好之后不能再改变,应用:连接数据库,ip、端口号、db、username、password Read More
posted @ 2017-12-25 17:30 笨笨的妞 Views(304) Comments(0) Diggs(0) Edit
字典定义 d={key1:value1,key2:value2,key3:value3,...} 字典无序,取值比较方便 字典增删改查 字典遍历 字典嵌套 数组嵌套字典,字典再嵌套字典 字典嵌套字典嵌套数组 字典实例--注册、登录 要求:注册要求有用户名、密码、确认密码,三者均不能为空,判断用户名是 Read More
posted @ 2017-12-24 23:07 笨笨的妞 Views(188) Comments(0) Diggs(0) Edit
定义list-->l=[] list增删改查 list内置函数 reverse 元素反转 sort 可对纯整型或纯字符型排序,不能对整数和字符串混合的数组排序 extend 合并两个list list切片 实例:注册--功能:输入uname和password,写成死循环一直注册,如果用户名已经存在, Read More
posted @ 2017-12-24 18:26 笨笨的妞 Views(170) Comments(0) Diggs(0) Edit
在jmeter.properties 这个文件里面 找到sampleresult.default.encoding=xx 后面xx改成utf-8,然后取消注释 解决jmeterbody里面中文显示不出来找到 JSyntaxTextArea然后把注释取消就行了 解决请求参数中午乱码 请求页面 cont Read More
posted @ 2017-12-21 20:51 笨笨的妞 Views(165) Comments(0) Diggs(0) Edit