docs: def zlines(f = None, sep = "\0", osep = None, size = 8192):     # {{{1
    """File iterator that uses alternative line terminators."""
    if f is None: f = sys.stdin
    if osep is None: osep = sep
    buf = ""
    while True:
      chars = f.read(size)
      if not chars: break
      buf += chars; lines = buf.split(sep); buf = lines.pop()
      for line in lines: yield line + osep
    if buf: yield buf