grp - pydoc - phpman

Look up a command

 

Markdown Format | JSON API | MCP Server Tool


grp
NAME DESCRIPTION CLASSES FUNCTIONS FILE
Help on built-in module grp:

NAME
    grp - Access to the Unix group database.

DESCRIPTION
    Group entries are reported as 4-tuples containing the following fields
    from the group database, in order:

      gr_name   - name of the group
      gr_passwd - group password (encrypted); often empty
      gr_gid    - numeric ID of the group
      gr_mem    - list of members

    The gid is an integer, name and password are strings.  (Note that most
    users are not explicitly listed as members of the groups they are in
    according to the password database.  Check both databases to get
    complete membership information.)

CLASSES
    builtins.tuple(builtins.object)
        struct_group

    class struct_group(builtins.tuple)
     |  struct_group(iterable=(), /)
     |
     |  grp.struct_group: Results from getgr*() routines.
     |
     |  This object may be accessed either as a tuple of
     |    (gr_name,gr_passwd,gr_gid,gr_mem)
     |  or via the object attributes as named in the above tuple.
     |
     |  Method resolution order:
     |      struct_group
     |      builtins.tuple
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  __reduce__(...)
     |      Helper for pickle.
     |
     |  __repr__(self, /)
     |      Return repr(self).
     |
     |  ----------------------------------------------------------------------
     |  Static methods defined here:
     |
     |  __new__(*args, **kwargs) from builtins.type
     |      Create and return a new object.  See help(type) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |
     |  gr_gid
     |      group id
     |
     |  gr_mem
     |      group members
     |
     |  gr_name
     |      group name
     |
     |  gr_passwd
     |      password
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |
     |  __match_args__ = ('gr_name', 'gr_passwd', 'gr_gid', 'gr_mem')
     |
     |  n_fields = 4
     |
     |  n_sequence_fields = 4
     |
     |  n_unnamed_fields = 0
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from builtins.tuple:
     |
     |  __add__(self, value, /)
     |      Return self+value.
     |
     |  __contains__(self, key, /)
     |      Return key in self.
     |
     |  __eq__(self, value, /)
     |      Return self==value.
     |
     |  __ge__(self, value, /)
     |      Return self>=value.
     |
     |  __getattribute__(self, name, /)
     |      Return getattr(self, name).
     |
     |  __getitem__(self, key, /)
     |      Return self[key].
     |
     |  __getnewargs__(self, /)
     |
     |  __gt__(self, value, /)
     |      Return self>value.
     |
     |  __hash__(self, /)
     |      Return hash(self).
     |
     |  __iter__(self, /)
     |      Implement iter(self).
     |
     |  __le__(self, value, /)
     |      Return self<=value.
     |
     |  __len__(self, /)
     |      Return len(self).
     |
     |  __lt__(self, value, /)
     |      Return self<value.
     |
     |  __mul__(self, value, /)
     |      Return self*value.
     |
     |  __ne__(self, value, /)
     |      Return self!=value.
     |
     |  __rmul__(self, value, /)
     |      Return value*self.
     |
     |  count(self, value, /)
     |      Return number of occurrences of value.
     |
     |  index(self, value, start=0, stop=9223372036854775807, /)
     |      Return first index of value.
     |
     |      Raises ValueError if the value is not present.
     |
     |  ----------------------------------------------------------------------
     |  Class methods inherited from builtins.tuple:
     |
     |  __class_getitem__(...) from builtins.type
     |      See PEP 585

FUNCTIONS
    getgrall()
        Return a list of all available group entries, in arbitrary order.

        An entry whose name starts with '+' or '-' represents an instruction
        to use YP/NIS and may not be accessible via getgrnam or getgrgid.

    getgrgid(id)
        Return the group database entry for the given numeric group ID.

        If id is not valid, raise KeyError.

    getgrnam(name)
        Return the group database entry for the given group name.

        If name is not valid, raise KeyError.

FILE
    (built-in)



Generated by phpMan Author: Che Dong Under GNU General Public License
2026-06-02 05:14 @216.73.216.198 CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 TransitionalValid CSS!

^_back to top