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

Tim Peters tim_one@email.msn.com
Thu, 26 Aug 1999 01:06:57 -0400


[Fred L. Drake, Jr.]
> ...
>   We left off chmod(), which would make Tim happy, but that was only
> because it wasn't meaningful in context.

I'd be appalled to see chmod go away; for many people it's comfortable and
useful.  I want *another* way, to do what little bit is portable in a way that
doesn't require first mastering a badly designed interface from a dying OS
<wink>.

> 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()).

I don't care about general here; making up a general new way to spell
everything that everyone may want to do under every OS would create an
interface even worse than chmod's.  My sister doesn't want to create files that
are read-only to the world but writable to her group -- she just wants to mark
certain precious files as read-only to minimize the chance of accidental
destruction.  What she wants is easy to do under Windows or Unix, and I expect
she's the norm rather than the exception.

>   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!

An OO filesystem object with a .makereadonly method suits me fine <wink>.