help with loops

2006-03-08 Thread Catalina Scott A Contr AFCA/EVEO
Paul, I will check out difflib thanks.   Scott -- http://mail.python.org/mailman/listinfo/python-list

RE: help with loops

2006-03-06 Thread Catalina Scott A Contr AFCA/EVEO
(",") 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,

RE: help with loops

2006-03-06 Thread Catalina Scott A Contr AFCA/EVEO
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

help with loops

2006-03-06 Thread Catalina Scott A Contr AFCA/EVEO
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

Newbie needs help with regex strings

2005-12-14 Thread Catalina Scott A Contr AFCA/EVEO
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