开发者

How to enable the libattr frature(abbreviated xattr) in linux?

I want to use xattr in python, but found the xattr's keys() is empty, does that indicate the libattr feature wasn't enabled? I've learned the libattr feature is disabled in ext3/ext4 by default, but how to enable it? Expect your help! Thank you~

>>> import xattr
>>> x = xattr.xattr('tiger_8a428_userdvd.dmg开发者_开发知识库')
>>> x
<xattr file='tiger_8a428_userdvd.dmg'>
>>> x.keys()
[]


Maybe you can use the following:

>>> x = xattr.get_all('tiger_8a428_userdvd.dmg')

Should be better.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜