methods to parse big foreign ascii-file?
pyth at devel.trillke.net
Wed Jun 12 12:05:51 EDT 2002
tommorrow i want to convince an old skool C-programmer to
use python. We are going to make a one-day project :-)
It involves reading 50MB+ files of a strange ascii-format
containing names, floats and flags all around. These items
span multiple lines and should be grouped in lists or objects.
How would you go about it? Options that come to my mind:
- using the re module to parse line for line and
try to get it all right by hand.
- come up with a grammar and let a parser do
the hard work (which one?)
- using some module i don't yet know?
thanks for pointers or comments,
More information about the Python-list