123

# -*- coding: utf-8 -*-
"""
Created on Wed Mar 21 13:16:37 2018

@author: BinghanSong
"""

import os
from datetime import datetime
def getFileName(path):
'''Get the file with special name '''
f_list = os.listdir(path)
dat_list=[]
f_path = os.path
for i in f_list:
if os.path.splitext(i)[1] == '.mea':
dat_list.append(i)
return dat_list
data_list=getFileName('./DIODE_CV25/')
#print(data_list)
with open('device_table.txt', 'r') as device_table:
device_list=[(i.split("\t")[0],i.split("\t")[1].split("\n")[0]) for i in device_table]
print(device_list[0][1],len(device_list))
for i in device_list:
with open('./DIODE_CV25/Die_0_0_var_'+i[1]+'_25_cv.mea', 'r') as device_cal_data:
data_cal=[k.split("\t")[1].split("\n")[0] for k in device_cal_data if k]
print(data_cal)
with open('./DIODE_CV25/Die_0_0_var_'+i[0]+'_25_cv.mea', 'r') as device_data:
data=[j for j in device_data]

上一篇:关于Java Calendar


下一篇:设计模式-2工厂设计模式