def gid_to_group(gid):
 try:
  gid = int(gid)
 except ValueError:
  gid = group_to_gid(gid)
 if (gid == ''):
  return ''
 try:
  return grp.getgrgid(gid).gr_name
 except (KeyError, NameError):
  return gid

def gid_to_group ( gid ) : try : gid = int ( gid ) except ValueError : gid = group_to_gid ( gid ) if ( gid == '' ) : return '' try : return grp . getgrgid ( gid ) . gr_name except ( KeyError , NameError ) : return gid
convert the group id to the group name on this system under windows .