pylsl/pylsl.py
def resolve_bypred(predicate, minimum=1, timeout=FOREVER):
    """Resolve all streams that match a given predicate.

    Advanced query that allows to impose more conditions on the retrieved 
    streams; the given string is an XPath 1.0 predicate for the <description>
    node (omitting the surrounding []'s), see also
    http://en.wikipedia.org/w/index.php?title=XPath_1.0&oldid=474981951.
    
    Keyword arguments:
    predicate -- The predicate string, e.g. "name='BioSemi'" or 
                "type='EEG' and starts-with(name,'BioSemi') and 
                 count(description/desc/channels/channel)=32"
    minimum -- Return at least this many streams. (default 1)
    timeout -- Optionally a timeout of the operation, in seconds. If the 
               timeout expires, less than the desired number of streams 
               (possibly none) will be returned. (default FOREVER)
               
    Returns a list of matching StreamInfo objects (with empty desc field), any 
    of which can subsequently be used to open an inlet.

    """
    # noinspection PyCallingNonCallable
    buffer = (c_void_p*1024)()
    num_found = lib.lsl_resolve_bypred(byref(buffer), 1024,
                                       c_char_p(str.encode(predicate)),
                                       minimum,
                                       c_double(timeout))
    return [StreamInfo(handle=buffer[k]) for k in range(num_found)]
def resolve_bypred(predicate, minimum=1, timeout=FOREVER):
    # noinspection PyCallingNonCallable
    buffer = (c_void_p*1024)()
    num_found = lib.lsl_resolve_bypred(byref(buffer), 1024,
                                       c_char_p(str.encode(predicate)),
                                       minimum,
                                       c_double(timeout))
    return [StreamInfo(handle=buffer[k]) for k in range(num_found)]
def resolve_bypred ( predicate , minimum = 1 , timeout = FOREVER ) : # noinspection PyCallingNonCallable buffer = ( c_void_p * 1024 ) ( ) num_found = lib . lsl_resolve_bypred ( byref ( buffer ) , 1024 , c_char_p ( str . encode ( predicate ) ) , minimum , c_double ( timeout ) ) return [ StreamInfo ( handle = buffer [ k ] ) for k in range ( num_found ) ]
Resolve all streams that match a given predicate.

    Advanced query that allows to impose more conditions on the retrieved 
    streams; the given string is an XPath 1.0 predicate for the <description>
    node (omitting the surrounding []'s), see also
    http://en.wikipedia.org/w/index.php?title=XPath_1.0&oldid=474981951.
    
    Keyword arguments:
    predicate -- The predicate string, e.g. "name='BioSemi'" or 
                "type='EEG' and starts-with(name,'BioSemi') and 
                 count(description/desc/channels/channel)=32"
    minimum -- Return at least this many streams. (default 1)
    timeout -- Optionally a timeout of the operation, in seconds. If the 
               timeout expires, less than the desired number of streams 
               (possibly none) will be returned. (default FOREVER)
               
    Returns a list of matching StreamInfo objects (with empty desc field), any 
    of which can subsequently be used to open an inlet.
Resolve all streams that match a given predicate .