Oops, run() is still needed
import argparse
import os, sys, glob, time
+import subprocess
import json
import re
import struct
@@ -85,6 +86,9 @@ def fatal(msg):
print(f"{ansi.FAIL}Fatal:{ansi.ENDC} {msg}")
sys.exit(1)
+def run(cmd):
+ return subprocess.check_output(cmd, shell=True)
+
def filename(p):
_, fn = os.path.split(p)
return fn
