stat, chmod and RDONLY file (win32)?

T. C. Mits 71351.356 at compuserve.com
Tue Aug 17 06:46:58 CEST 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 compuserve.com> wrote in message
news:7pambk$3m8$1 at ssauraaa-i-1.production.compuserve.com...
>
> Hitting a lot of stumbling blocks.   Latest is trying to delete a
directory
> tree that may have files with a read-only attrib (in NT and win98).
The
> 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