how to write a line in a text file

Steven D'Aprano steve at REMOVETHIScyber.com.au
Wed Jul 27 08:00:47 EDT 2005


On Wed, 27 Jul 2005 04:26:31 +0000, Andrew Dalke wrote:

> This isn't 1970.  Why does your app code work directly with
> files?  Use a in-process database library (ZODB, SQLLite,
> BerkeleyDB, etc.) to maintain your system state and let the
> library handle transactions for you.

And when users are happy to install a relational database system in order
for their editor to save their letter to grandma, I'm sure your scheme
will work well for them.

Until then, I'll continue storing my user's data in files. You may, of
course, choose to write buggy code that can lead to data loss, but I
prefer to take a modicum of care not to destroy their data.


-- 
Steven.




More information about the Python-list mailing list