The first, for being a little more precise, os.open
, os.read
and os.write
are not methods, they are functions in the package os
(see comment of @ChemaCortes more below).
The open
function allows you to work further away from the operating system you are working on (higher level) while os.open
is working directly with the operating system and using its functions so you must write code a little more specific of the platform you are on (it is of lower level). The first allows you to abstract from that kind of thing, the second allows you to have more control (as long as you know what you are doing).
open
returns an object that has methods that allow you to manipulate the object. These methods will be one or the other depending on the way you have used to open the file (reading, writing, ...).
os.open
returns you a file descriptor and you will be in charge of knowing what what you have opened, how you have opened it and how to manipulate it (what functions you can use on it).
In general, you should always use open
.