【发布时间】:2012-02-27 23:01:07
【问题描述】:
我在使用 python 提取 tar 文件时发现了这个问题,使用 tarfile.extractall。该函数适用于其他操作系统,但在 AIX 上我收到来自 getgrnam 的错误。
这是一个非常简单的测试,只调用getgrnam:
Jython 2.5.2 (Release_2_5_2:7206, Mar 2 2011, 23:12:06)
[IBM J9 VM (IBM Corporation)] on java1.5.0
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import grp
>>>
>>> file = "test.txt"
>>>
>>> grp.getgrnam(file)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/tmp/jython.jar/Lib/grp.py", line 67, in getgrnam
NotImplementedError: getgrnam unimplemented
知道为什么会发生这种情况以及可能的解决方案吗?
【问题讨论】: