W
W
weranda2018-06-28 19:11:45
Python
weranda, 2018-06-28 19:11:45

How are the arguments of the open() function decoded?

Greetings
In Python there is an open() function and the function has opening methods:
r - read (read)
w - write (write)
a - add (append)
x - create and write (?)
+ others
I don't understand why "x". How is it deciphered or not?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DevMan, 2018-06-28
@weranda

x is a synonym for the O_EXCL attribute of the open system call.
man open.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question