随笔分类 -  python-基础

摘要: 阅读全文
posted @ 2018-11-16 14:03 红豆· 阅读(708) 评论(0) 推荐(0)
摘要:tomorrow 模块: from tomorrow import threads 使用 BeautifulReport 不会生成多个测试报告 将包放在 / python / site-packages / 阅读全文
posted @ 2018-11-16 13:14 红豆· 阅读(313) 评论(0) 推荐(0)
摘要:一起运行: 添加测试用例运作: 多个py包,py文件用例运行: 阅读全文
posted @ 2018-11-11 15:18 红豆· 阅读(178) 评论(0) 推荐(0)
摘要:1.查询 import pymysql conn = pymysql.connect(host='127.0.0.1', user='root', passwd='root', db='test') cur = conn.cursor() 查询 sql = "select * from info" 阅读全文
posted @ 2018-11-09 13:48 红豆· 阅读(184) 评论(0) 推荐(0)
摘要:xlrd模块:只能读xls文件 data = xlrd.open_workbook('excelFile.xls') 打开excel文件 获取表 r_sheet = data.sheet_names() 获取所有的表名 table = data.sheets()[0] 通过索引获取表 table = 阅读全文
posted @ 2018-11-09 11:25 红豆· 阅读(242) 评论(0) 推荐(0)
摘要:在Python中,通常有这几种方式来表示时间:1)时间戳 2)格式化的时间字符串 3)元组(struct_time)共九个元素。 1)time.localtime([secs]):将一个时间戳转换为当前时区的struct_time。secs参数未提供,则以当前时间为准。 2)time.gmtime( 阅读全文
posted @ 2018-11-08 22:03 红豆· 阅读(214) 评论(0) 推荐(0)