Example #1
0
def write_csv_file(file_handle):
    _write(file_handle, 'Col1,Col2\n')
    _write(file_handle, '0E-12,10\n')
    _write(file_handle, '1E-12,0\n')
    _write(file_handle, '2E-12,20\n')
    _write(file_handle, '3E-12,-10\n')
    _write(file_handle, '4E-12,30\n')
Example #2
0
 def write_data(file_handle):
     _write(file_handle, 'Hello world!')
Example #3
0
def write_array(file_handle, lines):
    lines = lines if isinstance(lines, list) else [lines]
    for line in lines:
        _write(file_handle, line+('\n' if line else ''))
Example #4
0
def write_csv_file(file_handle):
    _write(file_handle, "Col1,Col2,Col3,Col4,Col5,Col6,Col7,Col8\n")
    _write(file_handle, "0,1,2,3,,5,1,7\n")
    _write(file_handle, "0,2,4,5,,4,2,6\n")
    _write(file_handle, "0,3,1,8,,3,3,5\n")
    _write(file_handle, "1,1,5,7,8,0,4,4\n")
    _write(file_handle, "1,2,3,7,9,7,5,3\n")