Trivial split for strings with multiple character delimiters, quotes and escaped characters
Installation
pip install tssplit
Usage
Syntax
deftssplit(s, quote='"\'', quote_keep=False, delimiter=':;,', escape='/^', trim='', remark='#'):
"""Split a string by delimiters with quotes and escaped characters, optionally trimming results :param s: A string to split into chunks :param quote: Quote chars to protect a part of s from parsing :param quote_keep: Preserve quote characters in the output or not :param delimiter: A chunk separator character :param escape: An escape character :param trim: Trim characters from chunks :param remark: Ignore all characters after remark sign :return: A list of chunks """