celery.utils.text

celery.utils.text

Text formatting utilities

celery.utils.text.dedent_initial(s, n=4)[源代码]

celery.utils.text.dedent(s, n=4, sep=’\n’)[源代码]

celery.utils.text.fill_paragraphs(s, width, sep=’\n’)[源代码]

celery.utils.text.join(l, sep=’\n’)[源代码]

celery.utils.text.ensure_2lines(s, sep=’\n’)[源代码]

celery.utils.text.abbr(S, max, ellipsis=’…’)[源代码]

celery.utils.text.abbrtask(S, max)[源代码]

celery.utils.text.indent(t, indent=0, sep=’\n’)[源代码]

Indent text.

celery.utils.text.truncate(text, maxlen=128, suffix=’…’)[源代码]

Truncates text to a maximum number of characters.

celery.utils.text.pluralize(n, text, suffix=’s’)[源代码]

celery.utils.text.pretty(value, width=80, nl_width=80, sep=’\n’, \*kw*)[源代码]