how to write a line in a text file

Andrew Dalke dalke at dalkescientific.com
Wed Jul 27 00:26:31 EDT 2005


> en.karpachov at ospaz.ru wrote:
>> Well, it's what (R)DBMS are for, but plain files are not.

Steven D'Aprano wrote:
> This isn't 1970, users expect more from professional 
> programs than "keep your fingers crossed that nothing 
> bad will happen". That's why applications have multiple 
> levels of undo (and some of them even save the undo 
> history in the file) and change-tracking, and auto-save 
> and auto-backup. 

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.

				Andrew
				dalke at dalkescientific.com




More information about the Python-list mailing list