Stéphane Wirtel <[email protected]> added the comment:
This error is specific to the C-API and not to Python,
here is an example.
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
int main(int argc, char **argv, char **environ) {
int fd;
fd = open("/tmp/toto/", O_CREAT);
printf("file descriptor: %d\n", fd);
printf(strerror(errno));
close(fd);
return 0;
}
./a.out
file descriptor: -1
Is a directory
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue35216>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com