Most efficient way to write data out to a text file?

candiazoo at attbi.com candiazoo at attbi.com
Thu Jun 27 13:38:15 EDT 2002


Based on my profile, it looks like several of my functions could be revised.
The fix_date_range function converts a string (a year) to an integer, performs a
series of tests on it, and ends up returning a string date range (YYYY-YYYY)
based on the values...

to_string is where I built my output record.  I'll try a few things with it...

Mike

On Thu, 27 Jun 2002 01:28:22 GMT, candiazoo at attbi.com wrote:

>I assume some sort of block i/o or preallocating a large block of file space
>would be the best way to do it?  I am outputting about 700,000 records to a text
>file and my program only spits out about 20 records per second.  This is using
>standard file open and write...
>
>This is on a W2K machine... perhaps I should use the win32file interface?  Any
>thoughts/opinions?
>
>Thank you!
>
>Mike J.




More information about the Python-list mailing list