简体   繁体   中英

Python gives NotImplementedError for posix grp functions on AIX

I found this problem while using python to extract a tar file, using tarfile.extractall . The function works on other OS, but on AIX I get an error originating from getgrnam .

Here is a very simple test invoking getgrnam only:

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

Any idea why this is happening and what a solution might be?

对于Jython,AIX不会显示为POSIX。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM