![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
fnms88
这个作者很懒,什么都没留下…
展开
-
python request自己组装cookies
#-- coding:utf-8 --import unittestimport timeimport sysimport dbimport requestsimport xlrdfrom test1.common.basepage import BasePagefrom utils.config import DATA_PATH, REPORT_PATH, Configfrom utils.file_reader import ExcelReadersys.path.append(‘D原创 2020-06-05 17:53:02 · 524 阅读 · 0 评论 -
python 正则表达式
ss = re.findall (r’“isMerchant”:0,“sessionId”:"(.+?)",“staffType”’, result)获取要匹配的值ss原创 2018-12-07 17:30:09 · 73 阅读 · 0 评论 -
python生成顺序增长的手机号
class Tel_gen():def tel_gen(self):#使用生成器来操作l=(i for i in range(1,100))s0=13600000000tel=[]for i in l:s1=s0+i# print(s1)tel.insert(i,s1)return telprint(Tel_gen().tel_gen())原创 2018-12-26 21:05:58 · 802 阅读 · 0 评论 -
python locust在windows下的安装
原创 2019-01-05 09:59:20 · 2121 阅读 · 1 评论 -
python locust学习笔记
原创 2019-01-05 18:13:26 · 287 阅读 · 0 评论 -
python json dump时,中文乱码问题
f=open(“notebook.json”,“w”,encoding=‘utf-8’)json.dump(book,f,ensure_ascii=False)原创 2019-01-01 12:29:02 · 2144 阅读 · 1 评论 -
python实现增删改查电话本程序笔记
import jsonclass Person():def init(self,name,tel):self.name=nameself.tel=telr=open(“notebook.json”,‘rb’)d=json.load®while True:action=input(“请输入你需要的操作,增加\删除\修改\查询”)if action==‘增加’:name,tel=i...原创 2019-01-02 11:36:03 · 618 阅读 · 0 评论 -
collatz序列
def collatz(number):if number%2==0:no=number//2print(no)else:no=3*number+1print(no)return noreceptno=int(input(“enter your no”))while receptno!=1:receptno=collatz(receptno)欢迎使用Markdown编辑器你...原创 2019-07-11 17:13:26 · 762 阅读 · 0 评论 -
python web开发框架
参考博客:https://www.cnblogs.com/EmptyFS/category/910653.html转载 2018-11-08 15:24:29 · 84 阅读 · 0 评论 -
windows系统安装mysql_python
windows系统安装mysql_python在https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python下载MySQL_python?1.2.5?cp27?none?win_amd64.whl(if你的pycharm安装的是64位的)然后回到MySQL_python?1.2.5?cp27?none?win_amd64.whl所在目录,用...原创 2018-11-13 17:43:48 · 162 阅读 · 0 评论 -
Python的单元测试工具——doctest
https://blog.csdn.net/a464057216/article/details/51866748转载 2018-10-31 17:41:36 · 183 阅读 · 0 评论 -
firefox插件screengrap +python autoit+selenium实现整个网页的长截图功能
笔记:本人用的是python3.6.6 32位的版本,安装成功了pyautoit库及autoit库直接代码如下:import autoitimport unittestimport timeimport sysfrom datetime import datetimefrom actions import Actionsfrom selenium import webdriver...原创 2018-10-02 14:29:25 · 1906 阅读 · 0 评论 -
python调用unittest组织运行测试用例时,autoit按键不能释放,脚本卡住的情况
suite.addTest(Test_PcIndexPage(“test_getindexpage”)) #打开pc首页suite.addTest(Test_Pclogin(“test_pcLogin”)) #登录在第一个脚本的结尾处加上如下代码,再次运行run.py问题解决,笔记一下:)(此为按键脚本: autoit.send (’{LCTRL down}’ + ‘{LSHI...原创 2018-10-09 15:20:17 · 381 阅读 · 1 评论 -
firefox插件网页截图+python win32api+selenium实现整个网页的长截图功能
#ctrl+shift+L快捷键,经实践比screengrap稳定,因为在使用的过程中当driver打开一个新的窗口时,screengrap的快捷键ctrl+shift+!失效了不能使用win32api.keybd_event (17, 0, 0, 0) # ctrlwin32api.keybd_event (16, 0, 0, 0) # shiftwin32api.keybd_eve...原创 2018-10-09 17:02:52 · 1803 阅读 · 0 评论 -
python用requests发送https的请求时,有安全验证
python用requests发送https的请求时,有安全验证,将验证设置为false 即可verify=Falsecontent = {‘login’: ‘1234567890’,‘password’: ‘123456’}r=requests.post(‘url…login’,verify=False,data=content)print(r.status_code)...原创 2018-10-17 10:40:56 · 25764 阅读 · 1 评论 -
python将字符串转换为字典
a=’{“state”:100}’b=json.loads(a)print(b[‘state’])原创 2018-10-17 10:59:30 · 3477 阅读 · 0 评论 -
Python format 格式化函数
参考地址:http://www.runoob.com/python/att-string-format.html转载 2018-10-25 10:49:32 · 185 阅读 · 0 评论 -
编程指南
系统学习python? :https://www.cnblogs.com/shfanzie/p/6081206.html编程指南:https://zhuanlan.zhihu.com/p/19959253?columnSlug=xiao-jing-mo转载 2018-10-23 15:16:33 · 122 阅读 · 0 评论 -
将python文件打包成exe文件
转载:https://blog.csdn.net/u010104435/article/details/71435598?utm_source=blogxgwz0至于怎么安装pyinstaller可以参考python如何安装第三方包我的步骤是:1,打开cmd,切到pyinstaller解压包目录,我直接放在c盘目录下了,所以我的操作是C:\Users\MrLevo>cd C:\py...转载 2018-10-21 21:49:04 · 75 阅读 · 0 评论 -
selenium无法启动firefox浏览器
selenium无法启动firefox浏览器你好! 这是你第一次使用 Markdown编辑器 所展示的欢迎页。如果你想学习如何使用Markdown编辑器, 可以仔细阅读这篇文章,了解一下Markdown的基本语法知识。新的改变selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a mat...原创 2018-09-25 17:58:26 · 1374 阅读 · 0 评论