Writing to files¶
Writing to files
EXAMPLES:
sage: from slabbe.write_to_file import write_str_to_file
sage: filename = tmp_filename(ext='.tex')
sage: write_str_to_file('aaa', filename)
Creation of ...tex
AUTHOR:
Sébastien Labbé, March 13, 2018
-
slabbe.write_to_file.
print_set_to_file
(s, filename, ncolumns=4, start='\\\\{', end='\\\\}', sep=',', eol=',\\\\\\\\&\\\\hspace{10mm}')¶ INPUT:
s
– stringfilename
– string, filename
EXAMPLES:
sage: from slabbe.write_to_file import print_set_to_file sage: filename = tmp_filename(ext='.tex') sage: M = [random_matrix(ZZ, 3, 3) for _ in range(20)] sage: print_set_to_file(M, filename, ncolumns=8, ....: start=r'\left\{\begin{array}{cccccccc}', ....: end=r'\end{array}\right\}', ....: sep=r',&', eol=r',\\[4mm]') Creation of ...tex
-
slabbe.write_to_file.
write_str_to_file
(s, filename)¶ INPUT:
s
– stringfilename
– string, filename
EXAMPLES:
sage: from slabbe.write_to_file import write_str_to_file sage: filename = tmp_filename(ext='.tex') sage: write_str_to_file('aaa', filename) Creation of ...tex