2024-10-01 02:27:53 发布
网友
Python documentation表示os.chflags存在。你知道吗
os.chflags
但是,在*nix平台上执行以下代码会导致AttributeError:
AttributeError
>>> import os >>> os.chflags AttributeError: module 'os' has no attribute 'chflags'
同样distutils.dir_utildocumented here也会导致AttributeError。你知道吗
distutils.dir_util
可能只是因为您的系统没有为chflags提供系统调用。 这也是我运行mint18.1的情况,我得到的结果和你一样,对于python2和python3。你知道吗
chflags
BSD系统提供此功能,而其他系统不一定提供此功能。你知道吗
我的python3.6.7也遇到了同样的问题。在我的ubuntu18.04盒子里。 它在https://bugs.python.org/issue31313中提到。 简而言之,Linux不支持chflags。 Linux使用chattr,遗憾的是Python操作系统模块没有
可能只是因为您的系统没有为
chflags
提供系统调用。这也是我运行mint18.1的情况,我得到的结果和你一样,对于python2和python3。你知道吗
BSD系统提供此功能,而其他系统不一定提供此功能。你知道吗
我的python3.6.7也遇到了同样的问题。在我的ubuntu18.04盒子里。 它在https://bugs.python.org/issue31313中提到。 简而言之,Linux不支持chflags。
Linux使用chattr,遗憾的是Python操作系统模块没有
相关问题 更多 >
编程相关推荐