changing a file's permissions

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Sun Oct 8 23:52:03 EDT 2006


In message <mailman.1090.1159796564.10491.python-list at python.org>, Max
Erickson wrote:

> James <oscartheduck at gmail.com> wrote:
>
>> So my question is: how does one change a file's permissions
>> inside of python?
> 
> Assuming you want to operate on the output file:
> 
> import os
> os.chmod(path, 755)

Shouldn't that be

    os.chmod(path, 0755)

? Only 755 decimal is unlikely to be a meaningful mode...



More information about the Python-list mailing list