Flat file database

Art Decco please.dont at email.com
Tue Dec 23 03:56:46 EST 2003


"Paul Rubin" <http://phr.cx@NOSPAM.invalid> wrote >
> Most web hosts offer you access to a database, typically MySQL.  Use
> that if you can.  Implementing what you're asking is harder than it
> sounds.  What happens if two people connect to your application both
> try to update the database at the same time?

Actually, I've done it before in Perl. Perl makes multithreaded access to
files pretty easy (on Unix).

But this case is much easier. It's just for personal use. I'll probably be
the only user, so a minimal backup is all I need to do for data integrity. I
don't need record locking or even file locking. Of course that may make my
case so unusual that no module exists, but it's worth asking before I once
again reinvent the concept of a simple flat-file database as I, and most
other programmers, have done so many times before.

And I don't think MySQL is available without switching to a more expensive
type of account. This application, essentially a fancy Christmas card list,
just isn't worth all that trouble, but it would be nice if someone knows of
a Python module that makes simple text file management a little easier.









More information about the Python-list mailing list