stat, chmod and RDONLY file (win32)?

T. C. Mits 71351.356 at
Tue Aug 17 00:46:58 EDT 1999

Reply to myself.
I know that I can run a dos command such as ATTRIB /S -R *.* to accomplish
this.  But, that just delays having to know how the chmod works and is not
too portable.   I tried os.chmod( filename, os.O_RDWR), but it does nothing.

T. C. Mits <71351.356 at> wrote in message
news:7pambk$3m8$1 at
> Hitting a lot of stumbling blocks.   Latest is trying to delete a
> tree that may have files with a read-only attrib (in NT and win98).
> exception occurs in shutil.rmtree(), so I guess I'll have to cobble
> something to find such files and chg the attributes.   I found os.stat(),
> chmod() and stat module, but the docs are a little shallow.

More information about the Python-list mailing list