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)

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 .