hi , once gain i need a suggestion from the expert, the prob is that i have 400 folder(folderxyz) in a given directory, and each folder contains some file . now i want to open directory , open each folder one by one and read the files present in it
import os
import sys
import re
import glob
folder_list = os.listdir(os.getcwd())
path = '/global/group/home/ktrip_01/work/whole_proteome/analysis_xenopus_takifugu_tetradon/split_result/filtered_domain/ORTHOMCLV1.4
f for f in folder_list:
if os.path.isdir()os.path.join(dirname,f):
print f
files = os.listdir(f)
for f in files:
if f startswith(all_orthomcl):
fr = open(f,'r')
frlines= fr.readlines()
for line in frlines:
print line