pyexlatex.tools package

pyexlatex.tools.csv_to_raw_latex(infile, csvstring=False, missing_rep=' - ', formatstr='{:.3f}', skipfix=None)[source]

Takes a CSV text file and converts it to a LaTeX formatted list, with each line of the LaTeX file as an item in the list.

Required options:

infile: Full file path of CSV (include r before quotes)

Optional options:

csvstring: True to pass a CSV string to infile rather than load from file missing_rep: Representation for missing numbers, default ” - ” formatstr: Python string for number formatting, for example ‘{:.3f}’ with quotes skipfix: String or list of strings of fixes to skip, options are [’&’,’%’,’_’]

pyexlatex.tools.date_time_move_latex(tablename, filepath, folder_name='Tables')[source]

Takes a LaTeX tex and PDF after the PDF’s been created by pdflatex and moves it into a table folder with the date, checking if the table was just previously created. If it’s the same as before, it just deletes the file.

Required arguments:

tablename: operating system name of the table, without extensions filepath: full filepath of table, without table name. put r before quotes as follows: r’C:UsersFolder’

pyexlatex.tools.replace_missing_csv(csv_list, missing_rep)[source]

Replaces missing items in a CSV with a given missing representation string.

Submodules

pyexlatex.tools.fileops module

pyexlatex.tools.fileops.move_all_if_exists(inpaths, outfolder)[source]
Return type

None

pyexlatex.tools.fileops.move_if_exists(inpath, outpath, retries=3, sleep_time=0.1)[source]
Return type

None

pyexlatex.tools.fileops.remove_all_if_exist(filepaths)[source]
pyexlatex.tools.fileops.remove_if_exists(filepath, retries=3, sleep_time=0.1)[source]