code: def prt_txt(prt, data_nts, prtfmt=None, nt_fields=None, **kws):
      
      lines = get_lines(data_nts, prtfmt, nt_fields, **kws)
      if lines:
          for line in lines:
              prt.write(line)
      else:
          sys.stdout.write("      0 items. NOT WRITING\n")
docs: Print list of namedtuples into a table using prtfmt.