import ctypes
import posix
libxxx = ctypes.CDLL('./libxxx.so')
libxxx.foo.argtypes = [ctypes.POINTER(ctypes.c_float), ctypes.c_size_t]
libxxx.foo.restype = None
data = ctypes.ARRAY(ctypes.c_float, 100)()
import random
for i in range(100):
    data[i] = random.random()
print(data[:3], '...', data[-3:])
libxxx.foo(data, len(data))
print(data[:3], '...', data[-3:])
C++ vector to Python 3.3