摘要: svgelementXpath = "//div[12]/*[name()='svg']/*[name()='g']/*[name()='g'][2]/*[name()='g'][1]/*[name()='image']" svgelem = driver.find_element_by_xpath 阅读全文
posted @ 2017-04-22 16:14 随便了888 阅读(3229) 评论(0) 推荐(0) 编辑
摘要: selenium等待特定元素加载完毕 is_disappeared = WebDriverWait(driver, 8, 0.5, ignored_exceptions=TimeoutException).until(lambda x: x.find_element_by_id("id").is_d 阅读全文
posted @ 2017-04-20 20:27 随便了888 阅读(15558) 评论(1) 推荐(1) 编辑
摘要: import pandas as pd import numpy as np df = pd.read_csv("result.csv") # csv # df = pd.read_excel("sample.xlsx") # excel df.to_excel("sample.xlsx", index=False) # write data... 阅读全文
posted @ 2017-04-20 16:40 随便了888 阅读(32140) 评论(0) 推荐(0) 编辑
摘要: import ctypes message = ctypes.windll.user32.MessageBoxA(0,'message','tips',0) 阅读全文
posted @ 2017-04-19 21:26 随便了888 阅读(3037) 评论(0) 推荐(0) 编辑
摘要: Python 判断是否存在Excel表,无则生成,有则删除重建 阅读全文
posted @ 2017-04-19 19:06 随便了888 阅读(14825) 评论(0) 推荐(0) 编辑
摘要: switch_source()用于获取文本信息rewrite_source()用于将信息顺序轮换,其参数times表示要轮换多少次,def switch_source(): tmp = [] with open('switch_source.txt','r') as ss: for i in ss: 阅读全文
posted @ 2017-04-17 08:30 随便了888 阅读(428) 评论(0) 推荐(0) 编辑
摘要: pip install pandas pip install openpyxl import pandas as pd class Excel(): def __init__(self): pass def get_index(self): datas = pd.read_excel('satisfaction.xlsx',sheetnam... 阅读全文
posted @ 2017-04-16 23:29 随便了888 阅读(249) 评论(0) 推荐(0) 编辑
摘要: 1、类的访问限制:要让内部属性不被外部访问,可以把在属性的名称前加上两个下划线__,在Python中,实例的变量名如果以__开头,就变成了一个私有变量(private),只有内部可以访问,外部不能访问如std.__name访问报错。但可以通过std._Student__name访问 阅读全文
posted @ 2017-04-16 11:09 随便了888 阅读(1372) 评论(0) 推荐(0) 编辑
摘要: 1、个人理解定义:在一个函数A内部定义一个函数B,并在定义的内部函数B内对这个函数A的变量进行引用,那么内部函数B就是闭包。 2、特性:在内部函数内不能对A函数的变量进行更改 (但是可以将其封装到一个容器内,如列表,再对其进行更改即可) 3、应用场景:函数上次运行结果作为此次函数参数调用 4、返回闭 阅读全文
posted @ 2017-04-09 22:07 随便了888 阅读(330) 评论(0) 推荐(0) 编辑
摘要: 将列表val_list中包含的非法字符去掉,illegal_char是非法字符列表 阅读全文
posted @ 2017-04-08 23:33 随便了888 阅读(5973) 评论(3) 推荐(0) 编辑