def get_group_dict(user=None, include_default=True):
 if ((HAS_GRP is False) or (HAS_PWD is False)):
  return {}
 group_dict = {}
 group_names = get_group_list(user, include_default=include_default)
 for group in group_names:
  group_dict.update({group: grp.getgrnam(group).gr_gid})
 return group_dict

def get_group_dict ( user = None , include_default = True ) : if ( ( HAS_GRP is False ) or ( HAS_PWD is False ) ) : return { } group_dict = { } group_names = get_group_list ( user , include_default = include_default ) for group in group_names : group_dict . update ( { group : grp . getgrnam ( group ) . gr_gid } ) return group_dict
returns a dict of all of the system groups as keys .