I have this:
drwxr-xr-x 8 abc root 4096 Dec 21 19:56 javaprac
This works:
>>> fd = os.open(os.getcwd() , os.O_RDONLY)
But why do these two fail:
>>> fd = os.open(os.getcwd() , os.O_RDWR)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 21] Is a directory: '/home/abc/javaprac'
>>> fd = os.open(os.getcwd() , os.O_WRONLY)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 21] Is a directory: '/home/abc/javaprac'