def getInput(cls, dev):
        """
        Get an input with devive number 'dev' - dev may also be string matching
        the target device. If the input was previously loaded this will return
        the cached device.
        """
        no = dev
        if isinstance(dev, basestring):
            no = cls.deviceMap[dev]['input']
        key = ('input', no)
        if key not in cls._channels:
            cls._channels[key] = pypm.Input(no)
        return cls._channels[key]