scripts: Renamed summary.py -> csv.py

This seems like a more fitting name now that this script has evolved
into more of a general purpose high-level CSV tool.

Unfortunately this does conflict with the standard csv module in Python,
breaking every script that imports csv (which is most of them).
Fortunately, Python is flexible enough to let us remove the current
directory before imports with a bit of an ugly hack:

  # prevent local imports
  __import__('sys').path.pop(0)

These scripts are intended to be standalone anyways, so this is probably
a good pattern to adopt.
This commit is contained in:
Christopher Haster
2024-11-09 12:31:16 -06:00
parent a0ab7bda26
commit 7cfcc1af1d
33 changed files with 128 additions and 32 deletions

View File

@@ -12,6 +12,9 @@
# SPDX-License-Identifier: BSD-3-Clause
#
# prevent local imports
__import__('sys').path.pop(0)
import collections as co
import csv
import difflib