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

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


[Fred L. Drake, Jr.]
>   I think we can simply declare that isreadonly() checks that the
> file doesn't allow the user to read it,

Had more in mind that the file doesn't allow the user to write it <wink>.

> but setreadonly() sounds to me like it wouldn't be portable to Unix.
> There's more than one (reasonable) way to make a file unreadable to
> a user just by manipulating permission bits, and which is best will
> vary according to both the user and the file's existing permissions.

"Portable" implies least common denominator, and the plain meaning of read-only
is that nobody (whether owner, group or world in Unix) has write permission.
People wanting something beyond that are going beyond what's portable, and
that's fine -- I'm not suggesting getting rid of chmod for Unix dweebs.  But by
the same token, Windows dweebs should get some other (as non-portable as chmod)
way to fiddle the bits important on *their* OS (only one of which chmod can
affect).

Billions of newbies will delightedly stick to the portable interface with the
name that makes sense.

the-percentage-of-programmers-doing-systems-programming-shrinks-by-
    the-millisecond-ly y'rs  - tim