Changing File Permissions

Justin Johnson justinjohnson at fastmail.fm
Fri Jun 13 20:11:39 CEST 2003


Never mind, I figured it out.
os.chmod(file,os.W_OK)

On Fri, 13 Jun 2003 11:48:56 -0600, "Justin Johnson"
<justinjohnson at fastmail.fm> said:
> Hi,
> 
> I'm trying to remove a file on a win2k box, but the readonly bit is set,
> so I get an exception trying to os.remove it.  I'd prefer if I didn't
> have to run an attrib -r command, and write something a little more
> platform independent.  Is there some sort of chmod method that would
> handle this?
> 
> Any help is appreciated.
> Thanks.
> -Justin
> 
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 





More information about the Python-list mailing list