Adding ftputil to the Python distribution?

Jacob Smullyan smulloni at bracknell.smullyan.org
Thu Nov 7 14:03:46 EST 2002


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



More information about the Python-list mailing list