3.1.9.5. Logging

PyDvi.Tools.Logging.format_card(text, centered=False, width=80, rule_char='#', newline=False, border=False, bottom_rule=True)[source]

Format the string text as a card:

***************************************************
*
*                      Title
*
* xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx
* xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx
* xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx
* xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx
*
***************************************************
centered
center the text in the card
width
width of the card
rule_char
character used to draw the rule
newline
insert a new line before the card
border
draw a left vertical rule
bottom_rule
draw a bottom horizontal rule
PyDvi.Tools.Logging.print_card(text, **kwargs)[source]

Print the string text formated by format_card(). The remaining keyword arguments kwargs are passed to format_card().

PyDvi.Tools.Logging.remove_enclosing_new_line(text)[source]

Return a copy of the string text with leading and trailing newline removed.

Previous topic

3.1.9.4. Interval

Next topic

3.1.9.6. Path

This Page