def pull_chunk(self, timeout=<NUM_LIT:0.0>, max_samples=<NUM_LIT>, dest_obj=None):
<EOL>num_channels = self.channel_count<EOL>max_values = max_samples*num_channels<EOL>if max_samples not in self.buffers:<EOL><INDENT>self.buffers[max_samples] = ((self.value_type*max_values)(),<EOL>(c_double*max_samples)())<EOL><DEDENT>if dest_obj is not None:<EOL><INDENT>data_buff = (self.value_type * max_values).from_buffer(dest_obj)<EOL><DEDENT>else:<EOL><INDENT>data_buff = self.buffers[max_samples][<NUM_LIT:0>]<EOL><DEDENT>ts_buff = self.buffers[max_samples][<NUM_LIT:1>]<EOL>errcode = c_int()<EOL>num_elements = self.do_pull_chunk(self.obj, byref(data_buff),<EOL>byref(ts_buff), max_values,<EOL>max_samples, c_double(timeout),<EOL>byref(errcode))<EOL>handle_error(errcode)<EOL>num_samples = num_elements/num_channels<EOL>if dest_obj is None:<EOL><INDENT>samples = [[data_buff[s*num_channels+c] for c in range(num_channels)]<EOL>for s in range(int(num_samples))]<EOL>if self.channel_format == cf_string:<EOL><INDENT>samples = [[v.decode('<STR_LIT:utf-8>') for v in s] for s in samples]<EOL>free_char_p_array_memory(data_buff, max_values)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>samples = None<EOL><DEDENT>timestamps = [ts_buff[s] for s in range(int(num_samples))]<EOL>return samples, timestamps<EOL>
Pull a chunk of samples from the inlet.

        Keyword arguments:
        timeout -- The timeout of the operation; if passed as 0.0, then only 
                   samples available for immediate pickup will be returned. 
                   (default 0.0)
        max_samples -- Maximum number of samples to return. (default 
                       1024)
        dest_obj -- A Python object that supports the buffer interface.
                    If this is provided then the dest_obj will be updated in place
                    and the samples list returned by this method will be empty.
                    It is up to the caller to trim the buffer to the appropriate
                    number of samples.
                    A numpy buffer must be order='C'
                    (default None)

        Returns a tuple (samples,timestamps) where samples is a list of samples 
        (each itself a list of values), and timestamps is a list of time-stamps.

        Throws a LostError if the stream source has been lost.