Entering edit mode
5.3 years ago
howardha98
•
0
Hi I have a python question: I tried to write a script that would print out the contents of files with same name but located in many different directories . But somehow it doesnt seem to work. Can you please help??
lvspath = "/org/seg/projects/n5t/scv/users/hha/safe1/PDV/dsg_scla_en_1r1w*/lvs/lvs.sum" # Can I use wild card here?
with open(lvspath) as f:
head = f.readlines()[1:4] #just want to read 5 lines per file
for line in head:
print line,