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

Steve Lamb grey at despair.rpglink.com
Fri Jan 19 14:27:57 EST 2001


On Fri, 19 Jan 2001 06:54:22 GMT, Fredrik Lundh <fredrik at effbot.org> wrote:
>Another possibility is that "isexec" isn't a portable concept...

>How would you implement it on Windows, for example?

    Since when was portability a problem?  

    *Steve flips open his Beazley book, page 156*

    Last three words in the explination of samefile(), sameopenfile(),
samestat().  "Macintosh and Unix"

    It seems like Python has quite a few methods in its classes which are not
portable across all platforms.  That seems ok.

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

    That would be up to the person who would want to design such a thing for
Windows.  Given that one appears to be able to have methods for one OS and not
another based on the individual OS capabilities I'm not to concerned on what a
windows version would do in this case (or, for that matter, why one would need
it).

-- 
         Steve C. Lamb         | I'm your priest, I'm your shrink, I'm your
         ICQ: 5107343          | main connection to the switchboard of souls.
-------------------------------+---------------------------------------------



More information about the Python-list mailing list