(self, index)
Indexes a subset of virtual channels on this channel collection.

        Args:
            index: The value of the index. The following index types are
                supported:
                - str: Name of the virtual channel. You also can specify a
                    string that contains a list or range of names to this
                    input. If you have a list of names, use the DAQmx
                    Flatten Channel String function to convert the list to a
                    string.
                - int: Index/position of the virtual channel in the collection.
                - slice: Range of the indexes/positions of virtual channels in
                    the collection.
        Returns:
            nidaqmx._task_modules.channels.channel.Channel: 
            
            Indicates a channel object representing the subset of virtual
            channels indexed.
Indexes a subset of virtual channels on this channel collection.
Indexes a subset of virtual channels on this channel collection .
def __getitem__(self, index):
        """
        Indexes a subset of virtual channels on this channel collection.

        Args:
            index: The value of the index. The following index types are
                supported:
                - str: Name of the virtual channel. You also can specify a
                    string that contains a list or range of names to this
                    input. If you have a list of names, use the DAQmx
                    Flatten Channel String function to convert the list to a
                    string.
                - int: Index/position of the virtual channel in the collection.
                - slice: Range of the indexes/positions of virtual channels in
                    the collection.
        Returns:
            nidaqmx._task_modules.channels.channel.Channel: 
            
            Indicates a channel object representing the subset of virtual
            channels indexed.
        """
        if isinstance(index, six.integer_types):
            channel_names = self.channel_names[index]
        elif isinstance(index, slice):
            channel_names = flatten_channel_string(self.channel_names[index])
        elif isinstance(index, six.string_types):
            channel_names = index
        else:
            raise DaqError(
                'Invalid index type "{0}" used to access channels.'
                .format(type(index)), DAQmxErrors.UNKNOWN.value)

        if channel_names:
            return Channel._factory(self._handle, channel_names)
        else:
            raise DaqError(
                'You cannot specify an empty index when indexing channels.\n'
                'Index used: {0}'.format(index), DAQmxErrors.UNKNOWN.value)
def __getitem__ ( self , index ) : if isinstance ( index , six . integer_types ) : channel_names = self . channel_names [ index ] elif isinstance ( index , slice ) : channel_names = flatten_channel_string ( self . channel_names [ index ] ) elif isinstance ( index , six . string_types ) : channel_names = index else : raise DaqError ( 'Invalid index type "{0}" used to access channels.' . format ( type ( index ) ) , DAQmxErrors . UNKNOWN . value ) if channel_names : return Channel . _factory ( self . _handle , channel_names ) else : raise DaqError ( 'You cannot specify an empty index when indexing channels.\n' 'Index used: {0}' . format ( index ) , DAQmxErrors . UNKNOWN . value )