How to remove read-only from a file

Robert Dailey rcdailey at gmail.com
Fri Jun 6 12:40:59 EDT 2008


On Fri, Jun 6, 2008 at 11:05 AM, Tim Golden <mail at timgolden.me.uk> wrote:

> Robert Dailey wrote:
>
>> Hi,
>>
>> Using Python 3.0, how can I remove a read-only property from a file in
>> Windows XP? Thanks.
>>
>
> import os
> import stat
>
> os.chmod ("c:/temp/temp.txt", stat.S_IWRITE)
>
> (Haven't actually checked that on Python 3.0 but I don't believe
> it's changed...)


Works great, thank you!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080606/94cceea9/attachment-0001.html>


More information about the Python-list mailing list