Added scripts/crc32c.py

This seems like a useful script to have.
This commit is contained in:
Christopher Haster
2023-09-15 18:42:48 -05:00
parent dd6a4e6496
commit e7bf5ad82f
19 changed files with 146 additions and 18 deletions

View File

@@ -157,7 +157,7 @@ class AutoMultipleLocator(mpl.ticker.MultipleLocator):
def openio(path, mode='r', buffering=-1):
# allow '-' for stdin/stdout
if path == '-':
if mode == 'r':
if 'r' in mode:
return os.fdopen(os.dup(sys.stdin.fileno()), mode, buffering)
else:
return os.fdopen(os.dup(sys.stdout.fileno()), mode, buffering)