Powered by Tachyonic Project Luxon Framework v0.0.0

Luxon Framework for rapid application development. (luxon)

Version

Split

Split By n

luxon.utils.split.split_by_n(seq, n)[source]

A generator to divide a sequence into chunks of n units.

Parameters:
  • seq (any object) – Sequence of objects to be split
  • n (int) – number of objects per chunk
Returns:

Chunks of the sequence n units long, one at a time.

List of Lines

luxon.utils.split.list_of_lines(text)[source]

Parse Text newlines into list.

Safely parses strings into list. Filters Binary. If the text is in bytes it is decoded via UTF-8

Parameters:text (str/bytes) – Text
Returns:list of lines separated by new lines