you need to pass in the ``sep`` as well to the cython routine; then I would form the format string and write all at once. (though what you are doing may be faster not sure).