pylsl/pylsl.py
def resolve_byprop(prop, value, minimum=1, timeout=FOREVER):
    """Resolve all streams with a specific value for a given property.

    If the goal is to resolve a specific stream, this method is preferred over 
    resolving all streams and then selecting the desired one.
    
    Keyword arguments:
    prop -- The StreamInfo property that should have a specific value (e.g.,   
            "name", "type", "source_id", or "desc/manufaturer").
    value -- The string value that the property should have (e.g., "EEG" as 
             the type property).
    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.
    
    Example: results = resolve_Stream_byprop("type","EEG")

    """
    # noinspection PyCallingNonCallable
    buffer = (c_void_p*1024)()
    num_found = lib.lsl_resolve_byprop(byref(buffer), 1024,
                                       c_char_p(str.encode(prop)),
                                       c_char_p(str.encode(value)),
                                       minimum,
                                       c_double(timeout))
    return [StreamInfo(handle=buffer[k]) for k in range(num_found)]
def resolve_byprop(prop, value, minimum=1, timeout=FOREVER):
    # noinspection PyCallingNonCallable
    buffer = (c_void_p*1024)()
    num_found = lib.lsl_resolve_byprop(byref(buffer), 1024,
                                       c_char_p(str.encode(prop)),
                                       c_char_p(str.encode(value)),
                                       minimum,
                                       c_double(timeout))
    return [StreamInfo(handle=buffer[k]) for k in range(num_found)]
def resolve_byprop ( prop , value , minimum = 1 , timeout = FOREVER ) : # noinspection PyCallingNonCallable buffer = ( c_void_p * 1024 ) ( ) num_found = lib . lsl_resolve_byprop ( byref ( buffer ) , 1024 , c_char_p ( str . encode ( prop ) ) , c_char_p ( str . encode ( value ) ) , minimum , c_double ( timeout ) ) return [ StreamInfo ( handle = buffer [ k ] ) for k in range ( num_found ) ]
Resolve all streams with a specific value for a given property.

    If the goal is to resolve a specific stream, this method is preferred over 
    resolving all streams and then selecting the desired one.
    
    Keyword arguments:
    prop -- The StreamInfo property that should have a specific value (e.g.,   
            "name", "type", "source_id", or "desc/manufaturer").
    value -- The string value that the property should have (e.g., "EEG" as 
             the type property).
    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.
    
    Example: results = resolve_Stream_byprop("type","EEG")
Resolve all streams with a specific value for a given property .