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

Fred L. Drake, Jr. Fred L. Drake, Jr." <fdrake@acm.org
Wed, 25 Aug 1999 12:22:52 -0400 (EDT)


Tim Peters writes:
 > 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,

Tim,
  I think we can simply declare that isreadonly() checks that the file 
doesn't allow the user to read it, 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.


  -Fred

--
Fred L. Drake, Jr.	     <fdrake@acm.org>
Corporation for National Research Initiatives