how to write a line in a text file

Jeff Schwab jeffrey.schwab at
Wed Aug 10 18:51:07 CEST 2005

Calvin Spealman wrote:
> On 7/31/05, James Dennett <jdennett at> wrote:
>>Peter Hansen wrote:
>>>Steven D'Aprano wrote:
>>>Given that ZODB and PySQLite are simply Python extension modules, which
>>>get bundled by your builder tool and are therefore installed
>>>transparently along with your app by your installer, this is a total
>>>non-issue at least with those packages.
>>>After all, it's not 1970 any more. ;-)
>>Indeed; since 1970 we learned to prefer straightforward
>>file formats where possible, reserving use of databases
>>for structured data where the extra costs are justified.
>>Sometime maybe databases will get better to the point
>>that we don't need to distinguish so much between them
>>and filesystems, but we're not there yet.  Managing raw
>>files, carefully, still has a place.
>>-- James
> Filesystems are a horrible way to organize information, and even worse
> at structuring it. The mentality that there are any benefits of
> low-overhead the outweigh the benefits of minimal database layers,
> such as ZODB, BSD DB, and SQLite, is a large part of the reason we are
> still stuck with such a mess. Those "extra costs" are so minimal, that
> you wouldn't even notice them, if you hadn't convinced yourself of
> their presense before performing or researching any realy benchmarks.
> A simple RDBMS can be much easier to work with than any flat file
> format, will likely be far faster in processing the data, and has the
> benefit of years of coding making the code that actually reads and
> writes your data as fast and stable as possible.

You don't use files?  You're telling me that instead of copying & 
modifying my friend's bashrc, I should be querying a bunch of tables 
with SQL?  Bull.  Ordinary files, preferably in line-separated or tagged 
formats, are going to be a lot easier for most of us to work for a long 
time to come.  This is especially true now that we have lots of good 
libraries for working with XML-based formats.

More information about the Python-list mailing list