Is there a standard module library function to access /etc/passwd or /etc/group

Andrew Dalke adalke at mindspring.com
Wed Jul 30 22:19:48 EDT 2003


Robin Cull:
> I assure you I did, in fact it baffles me that I missed "pwd" in the
> global module index when I was scanning for "passwd".  Then I went off
> on a complete tangent and started looking through "os" and "posix" for
> some reason.  A case of "can't see the wood for the trees" I think!

When you're stuck because you don't know which module something
might be in (eg, I was just looking for XMLRPC server code in
xmlrpclib - wrong place!), try the full index at
  http://python.org/doc/current/lib/genindex.html

Even then, the obvious searches for "passwd" and "password" don't
find anything.  If you know the C-level functions are 'getpw*' then it
becomes much easier.

Easier for your search is to start with
   http://python.org/doc/current/lib/lib.html

> 8.2 pwd -- The password database

                    Andrew
                    dalke at dalkescientific.com






More information about the Python-list mailing list