读取csv文件: def readCsv(): rows=[] with file(r'E:\py\py01\Data\system.csv','rb') as f: reads=csv.reader(f) for i in reads: rows.append(i) print rows return rows写入csv文件: def writer(): with file(r'E:\py\py01\Data\system.csv','wb') as f: writer=csv.writer(
这个方法可以实现,登录获取的token放入CSV文件,供后续调用,这里没有用登录举例 FileWriter fstream = new FileWriter("E:\\apache-jmeter-5.0\\demo\\CSVDoc\\token.csv",true); BufferedWriter out = new BufferedWriter(fstream); out.write("code"+vars.get("name")+"