List actuators, programs or sensors (what is string)

def ls(self, what):
        """List actuators, programs or sensors (what is string)"""
        for i in getattr(self.system, what):
            self.logger.info('%s: %s: %s', i.__class__.__name__, i, i.status)
        return True