fcntl module on Linux and nonblocking I/O

Scott Koranda skoranda at uwm.edu
Thu Sep 26 13:32:39 EDT 2002


Hello,

I just installed python 2.2.1 on my RH 7.3 Linux box and noticed
that the fcntl module does not appear to have O_NDELAY, FNDELAY,
or anything that appears similar.

Python 2.2.1 (#1, Sep 26 2002, 11:55:24) 
[GCC 2.96 20000731 (Red Hat Linux 7.3 2.96-110)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import fcntl
>>> dir(fcntl)
['DN_ACCESS', 'DN_ATTRIB', 'DN_CREATE', 'DN_DELETE', 'DN_MODIFY',
'DN_MULTISHOT', 'DN_RENAME', 'FD_CLOEXEC', 'F_DUPFD', 'F_EXLCK',
'F_GETFD', 'F_GETFL', 'F_GETLEASE', 'F_GETLK', 'F_GETLK64',
'F_GETOWN', 'F_GETSIG', 'F_NOTIFY', 'F_RDLCK', 'F_SETFD', 'F_SETFL',
'F_SETLEASE', 'F_SETLK', 'F_SETLK64', 'F_SETLKW', 'F_SETLKW64',
'F_SETOWN', 'F_SETSIG', 'F_SHLCK', 'F_UNLCK', 'F_WRLCK', 'LOCK_EX',
'LOCK_MAND', 'LOCK_NB', 'LOCK_READ', 'LOCK_RW', 'LOCK_SH', 'LOCK_UN',
'LOCK_WRITE', '__doc__', '__file__', '__name__', 'fcntl', 'flock',
'ioctl', 'lockf']

Without such a constant defined in the fcntl module how can I make a
pipe
non-blocking?

Sincerely,

Scott



More information about the Python-list mailing list