[Tutor] pwd lib probs

dave selby dave6502 at googlemail.com
Mon Aug 18 22:25:14 CEST 2008


Hi all,

I am using the pwd lib where I am codeing things like ...

gid = pwd.getpwnam(apache2_user)[3]

where as I would like to code it as ...

gid = pwd.getpwnam(apache2_user)[pwd.pw_gid]

but I get

gid = pwd.getpwnam(apache2_user)[pwd.pw_gid]
AttributeError: 'module' object has no attribute 'pw_gid'
dave at dev-system:~/kmotion2$ sudo ./install.py

What am I missing ?

Dave





-- 

Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html


More information about the Tutor mailing list