code: def getuname(self, uid):
          
          uid = int(uid)
          try:
              return self.uidsmap[uid]
          except KeyError:
              pass
  
          try:
              name = pwd.getpwuid(uid)[0]
          except (KeyError, AttributeError):
              name = "uid=%d" % uid
  
          self.uidsmap[uid] = name
          return name
docs: Get the username of a given uid.