Functions | |
def | help () |
def | importDF (path) |
def | indent (rows, hasHeader=False, headerChar='-', delim='|', justify='left', separateRows=False, prefix='', postfix='', wrapfunc=lambda x:x) |
def | search (query) |
def | wrap_always (text, width) |
def | wrap_onspace (text, width) |
def | wrap_onspace_strict (text, width) |
Variables | |
imported_modules | |
def dataformats.help | ( | ) |
Definition at line 123 of file dataformats.py.
References importDF(), print(), and search().
def dataformats.importDF | ( | path | ) |
Definition at line 85 of file dataformats.py.
References print(), and submitPVValidationJobs.split().
Referenced by help().
def dataformats.indent | ( | rows, | |
hasHeader = False , |
|||
headerChar = '-' , |
|||
delim = ' | ' , |
|||
justify = 'left' , |
|||
separateRows = False , |
|||
prefix = '' , |
|||
postfix = '' , |
|||
wrapfunc = lambda x:x |
|||
) |
Indents a table by column. - rows: A sequence of sequences of items, one sequence per row. - hasHeader: True if the first row consists of the columns' names. - headerChar: Character to be used for the row separator line (if hasHeader==True or separateRows==True). - delim: The column delimiter. - justify: Determines how are data justified in their column. Valid values are 'left','right' and 'center'. - separateRows: True if rows are to be separated by a line of 'headerChar's. - prefix: A string prepended to each printed row. - postfix: A string appended to each printed row. - wrapfunc: A function f(text) for wrapping text; each element in the table is first wrapped by this function.
Definition at line 7 of file dataformats.py.
References genParticles_cff.map, SiStripPI.max, print(), conifer.reduce(), submitPVValidationJobs.split(), str, and ComparisonHelper.zip().
Referenced by search().
def dataformats.search | ( | query | ) |
Definition at line 105 of file dataformats.py.
References indent(), join(), print(), submitPVValidationJobs.split(), and wrap_always().
Referenced by help().
def dataformats.wrap_always | ( | text, | |
width | |||
) |
A simple word-wrap function that wraps text on exactly width characters. It doesn't split the text in words.
Definition at line 71 of file dataformats.py.
References createfilelist.int, and join().
Referenced by search(), and wrap_onspace_strict().
def dataformats.wrap_onspace | ( | text, | |
width | |||
) |
A word-wrap function that preserves existing line breaks and most spaces in the text. Expects that existing line breaks are posix newlines (\n).
Definition at line 48 of file dataformats.py.
References conifer.reduce().
Referenced by wrap_onspace_strict().
def dataformats.wrap_onspace_strict | ( | text, | |
width | |||
) |
Similar to wrap_onspace, but enforces the width constraint: words longer than width are split.
Definition at line 64 of file dataformats.py.
References str, wrap_always(), and wrap_onspace().
dataformats.imported_modules |
Definition at line 83 of file dataformats.py.