stat, chmod and RDONLY file (win32)?

T. C. Mits 71351.356 at
Wed Aug 18 03:05:04 CEST 1999

Thanks thats the info.   I tried a quicky:   os.chmod( name, 0777) and it
works.    Funny I associated the four octal flags with Unix, not win98 or
NT.    Oh well, newbieness....

Greg Ewing <greg.ewing at> wrote in message
news:37B9D5F6.2AC782E1 at
> "T. C. Mits" wrote:
> >
> > mean that one must supply the c-run-time bit flags,
> > documented elsewhere (where?), as mentioned in the open() API blurb,
such as
> No, O_RDONLY and friends are a completely different set
> of modes (confusing, I know!)
> The sort of mode you want here consists of 3 octal
> digits, for owner, group and other. Each digit
> contains read, write and execute permission bits
> in that order.
> So, to add write permission for the owner, for
> instance, "or" the existing permissions with
> octal 0200.
> There's also a fourth octal digit to the
> left which contains the setuid, setgid and
> sticky bits, but these aren't relevant for what
> you're doing here.
> Hope that helps,
> Greg

More information about the Python-list mailing list