[Python-ideas] IntFlags

random832 at fastmail.us random832 at fastmail.us
Wed Mar 4 23:31:55 CET 2015


On Wed, Mar 4, 2015, at 14:47, Skip Montanaro wrote:
> On Wed, Mar 4, 2015 at 1:45 PM, <random832 at fastmail.us> wrote:
> 
> > Any reason StatFlags shouldn't have a representation like "rwxr-x---" for 0750?
> 
> I've never considered this before, but is this sort of thing portable
> to/meaningful on Windows?

No, but neither are 90% of the flags themselves, especially as actually
implemented by the C runtime library (they're basically all hardcoded,
except the write flags are turned off if a file is readonly, the exec
flags are set based on a hardcoded list of filename extensions, and a
handful of the file type bit states are implemented)

If someone wants to do something meaningful on windows, they'll need a
richer API than the one currently implemented in the os module.


More information about the Python-ideas mailing list