1: 2: 3: 4:
dir = '/home/talog_data/' for filename in os.listdir(dir): if re.search('PartnerL', filename): print "file name: -->:", filename
1: 2: 3:
fn = 'OUT20090121155642-PartnerL-x7xT' hhmm = fn[11:11+4] print(hhmm) # 1556