# AUTOGENERATED FILE! PLEASE DON'T EDIT HERE. EDIT THE SOURCE NOTEBOOKS INSTEAD
__all__ = ["str_split"]
import k1lib
def str_split(s, delim):                                                         # str_split
    answer = []                                                                  # str_split
    beginI = 0; inBlock = False; quoteChar = ''                                  # str_split
    for i, c in enumerate(s):                                                    # str_split
        if c == delim and not inBlock:                                           # str_split
            answer.append(s[beginI:i])                                           # str_split
            beginI = i+1                                                         # str_split
        elif not inBlock and (c == '"' or c == "'"):                             # str_split
            inBlock = True                                                       # str_split
            quoteChar = c                                                        # str_split
        elif inBlock and c == quoteChar:                                         # str_split
            inBlock = False                                                      # str_split
    answer.append(s[beginI:])                                                    # str_split
    return answer                                                                # str_split
def str_has_number(s):                                                           # str_has_number
    return any([c.isdigit() for c in s])                                         # str_has_number
_g = globals();                                                                  # str_has_number
"""py stuff"""                                                                   # str_has_number
py = k1lib.Object()                                                              # str_has_number
for e in __all__:                                                                # str_has_number
    py[e] = _g[e]                                                                # str_has_number
__all__.append("py")                                                             # str_has_number
try:                                                                             # str_has_number
    import k1a                                                                   # str_has_number
    str_split = k1a.str_split                                                    # str_has_number
    str_alpha_numeric = k1a.str_alpha_numeric                                    # str_has_number
    str_kmers = k1a.str_kmers                                                    # str_has_number
    str_has_number = k1a.str_has_number                                          # str_has_number
    k1lib._settings.packages.k1a = True                                          # str_has_number
except:                                                                          # str_has_number
    k1lib._settings.packages.k1a = False                                         # str_has_number
