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

Stephan Diehl stephan.diehl at gmx.net
Fri Nov 8 04:20:16 EST 2002


Jacob Smullyan <smulloni at bracknell.smullyan.org> wrote in message news:<slrnasle8i.v6v.smulloni at bracknell.smullyan.org>...
> In article <f199e60.0211070207.5ed58c25 at posting.google.com>, Stephan Diehl wrote:
> > Talking about a future VFS: is there already somethings planned? It
> > would be very nice to access a local filesystem, remote filesystem
> > (over ssh/scp), ftp server, webdav server,...  with the same set of
> > commands.
> 
> SkunkWeb has a vfs package (which can be used independently) that you
> might be interested in:
> 
> 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
> "multifs" in which it is possible to mount other fses with
> considerable flexibility (for instance, it is possible for a mount to
> change its mount point dynamically, which is useful in the context of
> web server document roots, where you may want a document root to shift
> for a particular request while other mounts remain in the same place
> relative to that shift). 
> 
> 2. Writing a new fs is fairly trivial.  The interface is adequate for
> many needs, and supports read-only as well as read-write fses. 
> 
> 3. an import hook (using Gordon MacMillan's superb iu.py) which
> enables you to import python modules from any fs implementation. This
> is actually a big gain, from my point of view, as struggling with
> import hooks is something I'd rather do once and then forget about.
> Apparently Python Labs feels the same way, which is why we're still
> stuck with having to write them! 
> 
> There is some code, namely, PathPropertyStore and its illegitimate
> offspring, that you might as well ignore.  I was fiddling at one time
> with the notion of providing a general way of storing properties
> associated with vfs files, but came to the conclusion that this level
> of abstraction is not such a hot place, data-integrity-wise, to
> implement that.
> 
> Cheers,
> 
> Jacob Smullyan

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.

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)

Cheers

Stephan



More information about the Python-list mailing list