摘要: os.path os.path 模块主要用于获取文件的属性。 以下是 os.path 模块的几种常用方法: 方法说明 os.path.abspath(path) 返回绝对路径 os.path.basename(path) 返回文件名 os.path.commonprefix(list) 返回list 阅读全文
posted @ 2020-08-07 14:14 凤鸣朝阳水龙吟 阅读(89) 评论(0) 推荐(0)
摘要: 第一个Java程序 1 public class Hello{ 2 public static void main(String[] args){ 3 System.out.println("Hello, world!"); 4 } 5 } 类名:Hello,区分大小写,首字母大写。 main方法: 阅读全文
posted @ 2020-08-07 09:27 凤鸣朝阳水龙吟 阅读(77) 评论(0) 推荐(0)
摘要: 一。异常 1.selenium.common.exceptions.StaleElementReferenceException: Message: The element reference of <div class="deal-cnt"> is stale; either the elemen 阅读全文
posted @ 2020-06-05 17:03 凤鸣朝阳水龙吟 阅读(650) 评论(0) 推荐(0)
摘要: 一。CSV Data Set Config 1.如果CSV第一行为变量名,别忘了忽略第一行打打勾。 2.ShareMode: All thread:是指在CSV Data Set Config配置元件作用域范围内的所有线程共享一个数据源文件. 也就是说在JMeter测试执行过程中,JMeter仅打开 阅读全文
posted @ 2020-06-04 17:13 凤鸣朝阳水龙吟 阅读(169) 评论(0) 推荐(0)
摘要: 1 import time 2 from multiprocessing import Pool 3 4 def decorator_timer(old_func): 5 def new_func(*arg,**dict_arg): 6 t1 = time.time() 7 result = old 阅读全文
posted @ 2020-05-31 20:18 凤鸣朝阳水龙吟 阅读(548) 评论(0) 推荐(0)
摘要: 1 def larger100(x): 2 if x>100: 3 return True 4 else: 5 return False 6 for item in filter(larger100,[2,200,100]): 7 print(item) #打印200 8 a_list = [5,9 阅读全文
posted @ 2020-05-31 13:45 凤鸣朝阳水龙吟 阅读(115) 评论(0) 推荐(0)
摘要: 1 matrix = [[1,2,3,4],[5,6,7,8],[9,10,11,12]] 2 list_row = [row[0] for row in matrix] 3 print(list_row)#[1, 5, 9] 4 list = [[row[i] for row in matrix] 阅读全文
posted @ 2020-05-31 13:18 凤鸣朝阳水龙吟 阅读(126) 评论(0) 推荐(0)
摘要: 1 def add(x,y): 2 print(x+y) 3 #return x+y 4 x = [1,2,3] 5 y = [4,5,6] 6 print('type(zip(x,y)):',type(zip(x,y)))#zip class 7 print('for i,j in zip(x,y 阅读全文
posted @ 2020-05-30 19:52 凤鸣朝阳水龙吟 阅读(225) 评论(0) 推荐(0)
摘要: 装饰器例子: 1 import time 2 3 def math_type(type = ''): 4 def decorator_time(math_closure): 5 def new_func(*args, **argss): 6 print(type) 7 start = time.ti 阅读全文
posted @ 2020-05-30 17:15 凤鸣朝阳水龙吟 阅读(130) 评论(0) 推荐(0)
摘要: win8打开任务管理器 ①同时Ctrl + Shift + Esc键,可以轻松的调出任务管理器 ②通过Win + R键调出运行框,然键入taskmgr.exe,而后回车键就可以了; ③Win + X键调出菜单,就可以看到任务管理,选择即可; ④在windows8.1传统桌面任务栏右键调出菜单,选择任 阅读全文
posted @ 2020-05-27 14:59 凤鸣朝阳水龙吟 阅读(226) 评论(0) 推荐(0)