
Python 2.6.5 (r265:79063,Apr 9 2010,11:16:46) [GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2Type "help","copyright","credits" or "license" for more information.>>> import os>>> os.O_EXLOCKTraceback (most recent call last): file "<stdin>",line 1,in <module>AttributeError: 'module' object has no attribute 'O_EXLOCK'>>> os.O_DSYNC4096>>>解决方法 如 the Python Standard Library documentation所述,
The following constants are options for the flags parameter to the
open() function. They can be combined using the bitwise OR operator |.
Some of them are not available on all platforms. For descriptions of
their availability and use,consult the open(2) manual page on Unix or
the MSDN on windows.
O_EXLOCK originated in the BSD world;它通常不适用于linux.您也许可以使用Python fcntl module.
以上是内存溢出为你收集整理的Linux上的Python中不存在os.O_EXLOCK(独占锁)全部内容,希望文章能够帮你解决Linux上的Python中不存在os.O_EXLOCK(独占锁)所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)