Paul, I will check out difflib thanks.
Scott
--
http://mail.python.org/mailman/listinfo/python-list
(",")
for line2 in file2.readlines():
list2 = line2.split(",")
if (list1[3] == list2[6] and list1[4] == list2[8]):
print line
Thanks,
Scott
-Original Message-
From: Catalina Scott A Contr AFCA/EVEO
Sent: Monday,
I was trying to compare each line of file1 with each line of file2. Your
solution worked perfectly.
Thanks!
Scott
-Original Message-
From: Tim Chase [mailto:[EMAIL PROTECTED]
Sent: Monday, March 06, 2006 9:17 AM
To: Catalina Scott A Contr AFCA/EVEO
Cc: python-list@python.org
Subject
Hello,
I am not having luck writing code to do what I want and
could use a hand.
I have two files and I want to pull out lines from file 2 if
certain conditions are found if file 1.
for line in readfile1:
list1 = line.split(',')
for line in readfile2:
li
I have a file with lines in the following format.
pie=apple,quantity=1,cooked=yes,ingredients='sugar and cinnamon'
Pie=peach,quantity=2,ingredients='peaches,powdered sugar'
Pie=cherry,quantity=3,cooked=no,price=5,ingredients='cherries and sugar'
I would like to pull out some of the values and wri