Creating a directory structure and modifying files automatically in Python

John Nagle nagle at animats.com
Tue May 8 00:50:33 EDT 2012


On 5/7/2012 9:09 PM, Steve Howell wrote:
> On May 7, 8:46 pm, John Nagle<na... at animats.com>  wrote:
>> On 5/6/2012 9:59 PM, Paul Rubin wrote:
>>
>>> Javier<nos... at nospam.com>    writes:
>>>> Or not... Using directories may be a way to do rapid prototyping, and
>>>> check quickly how things are going internally, without needing to resort
>>>> to complex database interfaces.
>>
>>> dbm and shelve are extremely simple to use.  Using the file system for a
>>> million item db is ridiculous even for prototyping.
>>
>>      Right.  Steve Bellovin wrote that back when UNIX didn't have any
>> database programs, let alone free ones.
>>
>
> It's kind of sad that the Unix file system doesn't serve as an
> effective key-value store at any kind of nontrivial scale.  It would
> simplify a lot of programming if filenames were keys and file contents
> were values.

    You don't want to go there in a file system.  Some people I know
tried that around 1970.  "A bit is a file.  An ordered collection of 
files is a file".  Didn't work out.

    There are file models other than the UNIX one.  Many older systems
had file versioning.  Tandem built their file system on top of their
distributed, redundant database system.  There are backup systems
where the name of the file is its hash, allowing elimination of
duplicates.  Most of the "free online storage" sites do that.

					John Nagle



More information about the Python-list mailing list