WriteSamples now takes a python list