import re, os, sys
sys.stdout = open('c:\\Fummy_Tasks\\RECONSTR_ANALYSIS\\04052010\\test1_Strings\\log1.txt', 'a')
memdump = open('c:\\Fummy_Tasks\\RECONSTR_ANALYSIS\\04052010\\test1_Strings\\test.txt','rb')
count = 1
while 1:
memdump_line = memdump.readline()
if not memdump_line:break
evidence = open('c:\\Fummy_Tasks\\RECONSTR_ANALYSIS\\04052010\\test1_Strings\\word1.txt','rb')
for x in range (0,len(memdump_line)-3):
while 1:
evidence_line = evidence.readline()
if not evidence_line:break
if memdump_line[x]==evidence_line[0] and memdump_line[x+1]==evidence_line[1] and memdump_line[x+2]==evidence_line[2]:
print memdump_line
print count
count = count+1
evidence.close()
memdump.close()
Please Help!
*****I have in txt:
be and the
help
and jake
jak dkjfh fjhk and
and helo
kjf and and kl
and and
****I have in word1.txt:
and
The output memdump line is only printing with line starting with "and" but I want the code to print everyline where and is located.
PLEASE HELP! i AM NEW IN PYTHON CODE
THANKS