On this page
  1. grp.struct_group
  2. Import
  3. Signature & Overview
  4. Methods & Attributes
  5. Usage
  6. Gotchas
  7. REPL Inspect

grp.struct_group

Prev: grp.getgrnam | Up: grp
Rel: grp.getgrall, grp.getgrgid, grp.getgrnam
Ref: docs.python.org โ€” grp.struct_group
Tags: #public #python3 #stdlib #grp


Import

import grp
from grp import struct_group

Signature & Overview

grp.struct_group(iterable=(), /)

grp.struct_group: Results from getgr*() routines.

Methods & Attributes

Usage

import grp
import os

entry = grp.getgrgid(os.getgid())
assert isinstance(entry, grp.struct_group) and isinstance(entry.gr_mem, list)

Gotchas

REPL Inspect

from grp import struct_group
help(struct_group)

Linked from

Related notes