what do you mean by "contor file's mode"?
Are you asking what a file's mode is?
Under Unix, it's a bitmapped value that determines what the
access permissions are for the file. There are individual bits
that enable permissions for user-read, user-write,
user-execute, group-read, group-write, group-execute,
other-read, other-write, other-execute, etc.
If you look at os.open() there's a "mode" parameter (the same
as the mode parameter in Unix's libc open()). I wanted to know
how to control a file's mode when it was created by the builtin
open().
I'm afraid I don't know how else to say it.
usually you try to open and if you are not allowed you will
get the exception
... f = file("/etc/shadow")
... print f.read()
... except IOError, e:
... print e
...
[Errno 13] Permission denied: '/etc/shadow'
True, but I don't see what it has to do with my question.
if you want to know more about file attributes
Um, thanks. I know all about file attributes.