create_CTL(fname_control_file, tbl_name, src_file, cols, 'TRUNCATE')

def create_CTL(fname, tbl_name, col_list, TRUNC_OR_APPEND, delim=','): 
    """
    create_CTL(fname_control_file, tbl_name, src_file, cols, 'TRUNCATE')
    """
    with open(fname, 'w') as ct:
        ct.write('LOAD DATA\n')
        ct.write(TRUNC_OR_APPEND + '\n')
        ct.write('into table ' + tbl_name  + '\n')
        ct.write("fields terminated by '" + delim + "'\n")
        ct.write('optionally Enclosed  by \'"\'\n')
        ct.write('TRAILING NULLCOLS\n')
        ct.write('(\n')
        ct.write(',\n'.join(c for c in col_list ))    
        ct.write(')\n')