How to control permission of file?

K.S.Sreeram sreeram at
Fri Jun 30 22:01:04 CEST 2006

Grant Edwards wrote:
> When one open()s a file (that doesn't exist) for writing , how
> does one control that file's permissions (it's "mode" in Unix
> terms).

Check out ''
It returns a file descriptor, and if you need a file object you can use
'os.fdopen' on the file descriptor


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the Python-list mailing list