def uidFromString(uidString):
 try:
  return int(uidString)
 except ValueError:
  if (pwd is None):
   raise
  return pwd.getpwnam(uidString)[2]

def uidFromString ( uidString ) : try : return int ( uidString ) except ValueError : if ( pwd is None ) : raise return pwd . getpwnam ( uidString ) [ 2 ]
convert a user identifier .