python
冷雨寒风
这个作者很懒,什么都没留下…
展开
-
datatime处理时间可能用到
import datetimeimport time#自己定义年月日a = time.strptime("2019-12-29","%Y-%m-%d")b = datetime.date(a.tm_year,a.tm_mon,a.tm_mday)print("自己定义年月日 %s" % b)#自己定义时分秒c = time.strptime("11:11:11","%H:%M:...原创 2020-02-15 17:12:36 · 165 阅读 · 0 评论 -
python-使用xlrd读取一行或一列的数据
#! -*- coding=utf-8 -*-import xlrddata = xlrd.open_workbook("F:/信息对接测试数据.xls")st = data.sheet_by_index(0)#读取一整列的数据lie = [str(st.cell_value(i, 1)) for i in range(1, st.nrows)]#读取一整行的数据hang ...原创 2020-01-28 13:22:13 · 18132 阅读 · 1 评论 -
python学习
python100天:https://github.com/jackfrued/Python-100-Dayshttps://github.com/buptatx/myPython100Days/blob/master/scripts/test.py原创 2019-05-07 16:06:36 · 62 阅读 · 0 评论 -
pip 指定python版本安装第三方库
pip3 install xxxx python3版本pip install xxxx python2版本原创 2019-05-16 13:53:27 · 2121 阅读 · 0 评论 -
selenium 定位遇到的问题
1.输入框只有一个p标签,不是body的那种 可以先切换到输入框所在的iframe,然后定位到输入框标签p,通过click()方法点击一下,获取到焦点,然后调用ActionChains(self.driver).send_keys("qa-test").perform()这样文本可以输入到输入框中了。2,上传图片 定位到上传图片的按钮,click(),然后使用os....原创 2019-06-11 17:43:17 · 262 阅读 · 0 评论 -
python-Charles返回数据转换成json或String
# -*- coding: utf-8 -*-s = "app_id=110&biz_data=DSZ2HqLuZkVI09JW0ns-lQ%3D%3D&imei=5af10ceb2358b8951bad1f91bc5eb10501f8391a&method=com.insurance.handler.insurance.banner&otaKey=e8...原创 2019-07-12 15:45:19 · 1217 阅读 · 0 评论 -
python redis库修改redis数据
#!/usr/bin/env python#!coding=utf-8import redisclass MyRedisTool: def __init__(self, mhost, mport, myauth): self.mredis = redis.Redis(host=mhost, port=mport, password=myauth, db=5)...原创 2019-07-17 15:37:55 · 893 阅读 · 0 评论 -
selenium xpath定位
https://www.cnblogs.com/hanmk/p/8997786.html原创 2019-08-22 15:22:57 · 81 阅读 · 0 评论