def OSCBlob(next):
    """Convert a string into an OSC Blob,
    returning a (typetag, data) tuple."""

    if type(next) == type(""):
        length = len(next)
        padded = math.ceil((len(next)) / 4.0) * 4
        binary = struct.pack(">i%ds" % (padded), length, next)
        tag    = 'b'
    else:
        tag    = ''
        binary = ''

    return (tag, binary)
def OSCBlob(next):
    """Convert a string into an OSC Blob,
    returning a (typetag, data) tuple."""

    if type(next) == type(""):
        length = len(next)
        padded = math.ceil((len(next)) / 4.0) * 4
        binary = struct.pack(">i%ds" % (padded), length, next)
        tag    = 'b'
    else:
        tag    = ''
        binary = ''

    return (tag, binary)
def OSCBlob ( next ) : if type ( next ) == type ( "" ) : length = len ( next ) padded = math . ceil ( ( len ( next ) ) / 4.0 ) * 4 binary = struct . pack ( ">i%ds" % ( padded ) , length , next ) tag = 'b' else : tag = '' binary = '' return ( tag , binary )
Convert a string into an OSC Blob,
    returning a (typetag, data) tuple.
Convert a string into an OSC Blob returning a ( typetag data ) tuple .