正如您在下面看到的,我在 Linux (RHEL) 上运行 Python 2.6,但由于某种原因它没有 os.O_EXLOCK。有什么原因吗?有没有办法解决这个问题?
Python 2.6.5 (r265:79063, Apr 9 2010, 11:16:46)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.O_EXLOCK
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'O_EXLOCK'
>>> os.O_DSYNC
4096
>>>