[Python-Dev] Portable and OS-dependent module idea/proposal/brain fart

Fred L. Drake, Jr. Fred L. Drake, Jr." <fdrake@acm.org
Wed, 25 Aug 1999 14:46:30 -0400 (EDT)


Skip Montanaro writes:
 > Since this is the dev group, how about showing us the Knowbot's logical
 > filesystem API, and let's do some dev-ing...

  Well, I took a look at it, and I must confess it's just not really
different from the set of interfaces in the os module; the important
point is that they are methods instead of functions (other than a few
data items: sep, pardir, curdir).  The path attribute provided the
same interface as os.path.  Its only user-visible state is the
current-directory setting, which may or may not be that useful.
  We left off chmod(), which would make Tim happy, but that was only
because it wasn't meaningful in context.  We'd have to add it (or
something equivalent) for a general purpose filesystem object.  So
Tim's only happy if he can come up with a general interface that is
actually portable (consider my earlier comments on setreadonly()).
  On the other hand, you don't need chmod() or anything like it for
most situations where a filesystem object would be useful.  An
FTPFilesystem class would not be hard to write!


  -Fred

--
Fred L. Drake, Jr.	     <fdrake@acm.org>
Corporation for National Research Initiatives