[Zope] missing FCNTL.py after building Zope 2.3 on Python 1.5.2

Brian Lloyd brian@digicool.com
Mon, 29 Jan 2001 11:02:27 -0500


> Are there any comments regarding the missing of a module named FCNTL.py
> ?
> 
> It happens that I just built Zope 2.3 from source on a Python 1.5.2
> installation and after compiling and building successfully just after
> the "./start" command, Zope crases with a "no module named FCNTL" .

This is odd - it actually crashes? The only part of the code 
that tries to use FCNTL is in the __init__.py of ZServer:


try:
    import fcntl, FCNTL
    FCNTL.F_SETFD; FCNTL.FD_CLOEXEC
    def requestCloseOnExec(sock):
        try:    fcntl.fcntl(sock.fileno(), FCNTL.F_SETFD, FCNTL.FD_CLOEXEC)
        except: pass

except (ImportError, AttributeError):

    def requestCloseOnExec(sock):
        pass


...and it is specifically designed to fail gracefully if FCNTL 
support is not available. The fact that you are getting an 
error message of "no module named FCNTL" makes it _sound_ like 
an ImportError, which should be caught. Can you send me a copy 
of the whole traceback (maybe we are somehow getting something 
other than ImportError)?



> Just by the way, recommended  trustworthy ways to find out if the Python
> installation has been compiled with threads enabled -besides knowing
> that it is a plain vanilla RPM install and what that may or may not
> imply - ...?

Start python from the command line and try:

import thread

if you get an ImportError, threading is probably not compiled
in...


Brian Lloyd        brian@digicool.com
Software Engineer  540.371.6909              
Digital Creations  http://www.digicool.com