sluyspy.text module
Text functions for the sluyspy package
- sluyspy.text.wrap_line(line, wlen, indent=2)[source]
Wrap a line at the last space before a specified length.
NOTE: this goes WRONG for if words longer than wlen are present.
- Parameters:
line (str) – Line to wrap.
wlen (int) – Maximum line length to wrap at.
indent (int) – Indentation of the continuation line
- Returns:
The line with extra newline characters.
- Return type:
(str)