Virtual Filesystem (Was: Adding ftputil to the Python distribution?)

Stephan Diehl stephan.diehl at gmx.net
Fri Nov 8 10:18:53 EST 2002


Bengt Richter wrote:
>>>...
>>>
>>>http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/skunkweb/skunkweb/pylibs/vfs/
>>>
>>>Features:
>>>
>>>1. implementations for local fs, ftp, zip/tar/tgz archives, and a
>>>>...
>>
>>Thanks, that's excactly what I was thinking of/looking for. And it
>>shows to me that there is nearly nothing that has not been written
in
>>one form or another. I'd really like to see a vfs in the standard
>>python distribution.
> 
> I too. But I believe any given implementation will implicitly reflect
> conventions with respect to operations in abstract name space, and I think
> that ought to be laid out in a PEP before adopting any particular implementation.

Sure, I agree. I was mainly thinking in terms of a protocol like the
DB API for SQL Server.

> 
> Otherwise there is likely to be special limitations, e.g., not being able
> to delegate parsing of path tails to other vfs's mounted within the first, etc.
> Also a virtual name space brings with it opportunity for orderly conventions
> of use as opposed to ad hoc quilts of usage. A PEP can at least draw attention
> to LSB/FHS type issues.
> 
> 
>>Maybe, one day, we'll have a central register for python libraries.
It
>>seems to me that to many people (including me) are reinventing the
>>wheel all the time because they just can't find the right library
for
>>the task at hand and just don't know project xyz that already solved
>>the problem (and doesn't show up when googling)
>>
> 
> As a habitual wheel re-inventor, I'll second the thought ;-)
> 
> OTOH, I think re-inventing has positive aspects sometimes. A certain
> amount of reinventing is necessary for natural selection to have something
> to select from in the evolutionary improvement of things. OTOH2, for
> well-explored problems, it's an indulgence to reinvent something if you can find
> and use something already implemented. (Of course, it _is_ satifying to find
> that you have re-invented, even approximately, an algorithm that some real guru
> has previously invented, and feel that you walked in the same ancient hallowed land,
> even as you realize that you could have spent your time better for practical purposes).

Rereading my original statement I realize that my point was indeed too
narrow.
It is satisfying to reinvent something if it is coupled with a deeper
understanding about the subject. Actually, sometimes it is not
possible to understand something if one has not spend hours thinking
about it (and implementing it).
But then, there are the problems where it is perfectly clear what must
be done and programming is just a tendious task.

> 
> The vfs above is very close to what I was talking about recently. But not
> exactly, and not quite from the same POV. And any discussion of general
> or genericized (v)file access will garner reminders that lisp has a lot
> of prior art ;-)
> 
> My main thought before was that a virtual name space can be platform
> independent (or at least contain such a subspace), and that could serve
> the purpose of platform independence for Python.

So, finally, Python will be the OS :-)
Why not, actually? The discussions about "What's the best OS in the
world" are just tiring and Python has shown that it is possible to
abstract a lot from the underlying OS.

> 
> Regards,
> Bengt Richter

Stephan



More information about the Python-list mailing list