Why no isexec, isread, iswrite, etc (was: I must be missing something obvious: os.path.isexecutable?)

Fredrik Lundh fredrik at effbot.org
Fri Jan 19 01:54:22 EST 2001


David Bolen wrote:
> One possibility is that there's more than one answer to the question
> of "isexec" - it's not a single bit, but one that can exist for all of
> owner, group and world.

Another possibility is that "isexec" isn't a portable concept...

How would you implement it on Windows, for example?

Anything having the right magic?  Any file having an extension
listed in PATHEXT?  Any file you can use with "start" (which in-
cludes virtually everything these days...)

Cheers /F





More information about the Python-list mailing list