pylsl/pylsl.py
def push_sample(self, x, timestamp=0.0, pushthrough=True):
        """Push a sample into the outlet.

        Each entry in the list corresponds to one channel.

        Keyword arguments:
        x -- A list of values to push (one per channel).
        timestamp -- Optionally the capture time of the sample, in agreement 
                     with local_clock(); if omitted, the current 
                     time is used. (default 0.0)
        pushthrough -- Whether to push the sample through to the receivers  
                       instead of buffering it with subsequent samples. 
                       Note that the chunk_size, if specified at outlet 
                       construction, takes precedence over the pushthrough flag.
                       (default True)

        """
        if len(x) == self.channel_count:
            if self.channel_format == cf_string:
                x = [v.encode('utf-8') for v in x]
            handle_error(self.do_push_sample(self.obj, self.sample_type(*x),
                                             c_double(timestamp),
                                             c_int(pushthrough)))
        else:
            raise ValueError("length of the data must correspond to the "
                             "stream's channel count.")
def push_sample(self, x, timestamp=0.0, pushthrough=True):
        if len(x) == self.channel_count:
            if self.channel_format == cf_string:
                x = [v.encode('utf-8') for v in x]
            handle_error(self.do_push_sample(self.obj, self.sample_type(*x),
                                             c_double(timestamp),
                                             c_int(pushthrough)))
        else:
            raise ValueError("length of the data must correspond to the "
                             "stream's channel count.")
def push_sample ( self , x , timestamp = 0.0 , pushthrough = True ) : if len ( x ) == self . channel_count : if self . channel_format == cf_string : x = [ v . encode ( 'utf-8' ) for v in x ] handle_error ( self . do_push_sample ( self . obj , self . sample_type ( * x ) , c_double ( timestamp ) , c_int ( pushthrough ) ) ) else : raise ValueError ( "length of the data must correspond to the " "stream's channel count." )
Push a sample into the outlet.

        Each entry in the list corresponds to one channel.

        Keyword arguments:
        x -- A list of values to push (one per channel).
        timestamp -- Optionally the capture time of the sample, in agreement 
                     with local_clock(); if omitted, the current 
                     time is used. (default 0.0)
        pushthrough -- Whether to push the sample through to the receivers  
                       instead of buffering it with subsequent samples. 
                       Note that the chunk_size, if specified at outlet 
                       construction, takes precedence over the pushthrough flag.
                       (default True)
Push a sample into the outlet .