Working with Huge Text Files
Al Christians
achrist at easystreet.com
Fri Mar 18 21:44:23 EST 2005
Michael Hoffman wrote:
> mensanator at aol.com wrote:
>
>> It will only be this simple if you can guarantee that the original
>> file is actually sorted by the first field.
>
>
> And if not you can either sort the file ahead of time, or just keep
> reopening the files in append mode when necessary. You could sort them
> in memory in your Python program but given the size of these files I
> think one of the other alternatives would be simpler.
There used to be a very nice sort program for PC's that came from
someplace in Nevada. It cost less than $100 and could sort files
faster than most programming languages could read or write them. For
linux, you've gotta figure out the posix sort. If you do, please splain
it to me.
Al
More information about the Python-list
mailing list