I would like to merge a few dat files in a directory and exclude certain dat files as previously I have already marked out the files that I need and do not need. Below is an example of my codes
def onAssemble(self,event):
with open("index.dat", 'r') as file:
data = file.readlines()
print data
i = 1
fn = "python.dat"
f = open(fn)
output = []
for line in data:
if not "*" in line:
output.append(line)
f.close()
t = open(fn, 'w')
t.writelines(output)
t.close()