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

Tim Peters tim_one@email.msn.com
Wed, 25 Aug 1999 03:02:21 -0400


[Skip Montanaro]
> Well, we could confuse everyone and rename "chmod" to "chfat" ...

I don't want to rename anything, nor do I want to use MS-specific names.  chmod
is both the wrong spelling & the wrong functionality for all non-Unix systems.
os.path did a Good Thing by, e.g., introducing getmtime(), despite that
everyone knows <wink> it's just os.stat()[8].  New isreadonly(path) and
setreadonly(path) are more what I'm after; nothing beyond that is portable, &
never will be.

> Windows probably has an equivalent function whose name is 17
> characters long

Indeed, SetFileAttributes is exactly 17 characters long (you moonlighting on
NT, Skip?!).  But while Windows geeks would like to use that, it's both the
wrong spelling & the wrong functionality for all non-Windows systems.

> ...
> Hasn't Guido's position been that the interface modules like os,
> posix, etc are just a thin layer over the underlying API (Guido:
> note how I cleverly attributed this position to you but also placed
> the responsibility for correctness on your head!)?  If that's the
> case, perhaps we should provide a slightly higher level module that
> abstracts the file system as objects, and adopts a more user-friendly
> approach to the secret octal codes.

Like that, yes.

> Those of us worried about job security could continue to use the
> lower level module and leave the higher level interface for former
> Visual Basic programmers.

You're just *begging* Guido to make the Python2 os module take all of its names
from the Win32 API <wink>.

it's-no-lamer-to-be-ignorant-of-unix-names-than-it-is-
    to-be-ignorant-of-chinese-ly y'rs  - tim