def gidFromString(gidString):
 try:
  return int(gidString)
 except ValueError:
  if (grp is None):
   raise
  return grp.getgrnam(gidString)[2]

def gidFromString ( gidString ) : try : return int ( gidString ) except ValueError : if ( grp is None ) : raise return grp . getgrnam ( gidString ) [ 2 ]
convert a group identifier .