def get_user_name_id(user):
 if re.match('\\d+', str(user)):
  pass_info = pwd.getpwuid(user)
 else:
  pass_info = pwd.getpwnam(user)
 return (pass_info[0], pass_info[2])

def get_user_name_id ( user ) : if re . match ( '\\d+' , str ( user ) ) : pass_info = pwd . getpwuid ( user ) else : pass_info = pwd . getpwnam ( user ) return ( pass_info [ 0 ] , pass_info [ 2 ] )
get the user id # and name .