Parse Large File - Python Tools

SK skunix at hotmail.com
Mon Aug 19 04:50:17 EDT 2002


Hi All,

I want to parse a large text file( size = 30MB ). Is there any already
available python tools ?

Say, I want to match the following pattern:-

Line "This is first line" followed by line "This is second line" 
followed by "This is fifth line". 

Result should be match SUCCESS ONLY for File1.txt as input and NOT for
File2.txt


File1.txt
--------
 This is first line
 This is second line
 This is NOT first line
 This is NOT second line
 This is fifth line 
 This is NOT fifth line


File2.txt
--------
 This is first line
 This is fifth line 
 This is second line
 This is NOT first line
 This is NOT second line
 This is NOT fifth line
 

Any pointers appreciated? 

/S



More information about the Python-list mailing list