diff --git a/scripts/bench.py b/scripts/bench.py index 2d3cd113..a4010052 100755 --- a/scripts/bench.py +++ b/scripts/bench.py @@ -44,8 +44,8 @@ VALGRIND_PATH = ['valgrind'] PERF_SCRIPT = ['./scripts/perf.py'] +# open with '-' for stdin/stdout def openio(path, mode='r', buffering=-1): - # allow '-' for stdin/stdout import os if path == '-': if 'r' in mode: diff --git a/scripts/changeprefix.py b/scripts/changeprefix.py index 869306ae..92a17c36 100755 --- a/scripts/changeprefix.py +++ b/scripts/changeprefix.py @@ -30,8 +30,8 @@ import tempfile GIT_PATH = ['git'] +# open with '-' for stdin/stdout def openio(path, mode='r', buffering=-1): - # allow '-' for stdin/stdout import os if path == '-': if 'r' in mode: diff --git a/scripts/code.py b/scripts/code.py index d31ba8ec..6415015e 100755 --- a/scripts/code.py +++ b/scripts/code.py @@ -155,8 +155,8 @@ class CodeResult(co.namedtuple('CodeResult', [ self.size + other.size) +# open with '-' for stdin/stdout def openio(path, mode='r', buffering=-1): - # allow '-' for stdin/stdout import os if path == '-': if 'r' in mode: diff --git a/scripts/codemap.py b/scripts/codemap.py index 02ff1aab..52d0c376 100755 --- a/scripts/codemap.py +++ b/scripts/codemap.py @@ -50,8 +50,8 @@ STACK_PATH = ['./scripts/stack.py'] CTX_PATH = ['./scripts/ctx.py'] +# open with '-' for stdin/stdout def openio(path, mode='r', buffering=-1): - # allow '-' for stdin/stdout import os if path == '-': if 'r' in mode: diff --git a/scripts/codemapd3.py b/scripts/codemapd3.py index 39a61e77..ed45e5a0 100755 --- a/scripts/codemapd3.py +++ b/scripts/codemapd3.py @@ -59,8 +59,8 @@ STACK_PATH = ['./scripts/stack.py'] CTX_PATH = ['./scripts/ctx.py'] +# open with '-' for stdin/stdout def openio(path, mode='r', buffering=-1): - # allow '-' for stdin/stdout import os if path == '-': if 'r' in mode: diff --git a/scripts/cov.py b/scripts/cov.py index 08322629..56a39541 100755 --- a/scripts/cov.py +++ b/scripts/cov.py @@ -267,8 +267,8 @@ class CovResult(co.namedtuple('CovResult', [ self.branches + other.branches) +# open with '-' for stdin/stdout def openio(path, mode='r', buffering=-1): - # allow '-' for stdin/stdout import os if path == '-': if 'r' in mode: diff --git a/scripts/crc32c.py b/scripts/crc32c.py index 56d8cb1e..2dac14ab 100755 --- a/scripts/crc32c.py +++ b/scripts/crc32c.py @@ -15,8 +15,8 @@ except ModuleNotFoundError: crc32c_lib = None +# open with '-' for stdin/stdout def openio(path, mode='r', buffering=-1): - # allow '-' for stdin/stdout import os if path == '-': if 'r' in mode: diff --git a/scripts/csv.py b/scripts/csv.py index 59d3f16d..ece5e8b5 100755 --- a/scripts/csv.py +++ b/scripts/csv.py @@ -1336,8 +1336,8 @@ def punescape_help(): '%(field)[fFeEgG]', 'An existing field formatted as a float')) +# open with '-' for stdin/stdout def openio(path, mode='r', buffering=-1): - # allow '-' for stdin/stdout import os if path == '-': if 'r' in mode: diff --git a/scripts/ctx.py b/scripts/ctx.py index a8352aeb..48a76797 100755 --- a/scripts/ctx.py +++ b/scripts/ctx.py @@ -160,8 +160,8 @@ class CtxResult(co.namedtuple('CtxResult', [ self.notes | other.notes) +# open with '-' for stdin/stdout def openio(path, mode='r', buffering=-1): - # allow '-' for stdin/stdout import os if path == '-': if 'r' in mode: diff --git a/scripts/data.py b/scripts/data.py index eaaa584b..f3471071 100755 --- a/scripts/data.py +++ b/scripts/data.py @@ -155,8 +155,8 @@ class DataResult(co.namedtuple('DataResult', [ self.size + other.size) +# open with '-' for stdin/stdout def openio(path, mode='r', buffering=-1): - # allow '-' for stdin/stdout import os if path == '-': if 'r' in mode: diff --git a/scripts/dbgbmapd3.py b/scripts/dbgbmapd3.py index 0460a969..63e89acb 100755 --- a/scripts/dbgbmapd3.py +++ b/scripts/dbgbmapd3.py @@ -124,8 +124,8 @@ FONT = ['sans-serif'] FONT_SIZE = 10 +# open with '-' for stdin/stdout def openio(path, mode='r', buffering=-1): - # allow '-' for stdin/stdout import os if path == '-': if 'r' in mode: diff --git a/scripts/dbgtrace.py b/scripts/dbgtrace.py index c8edfcf9..064529eb 100755 --- a/scripts/dbgtrace.py +++ b/scripts/dbgtrace.py @@ -65,8 +65,8 @@ CHARS_BRAILLE = ( '⠋⢋⡋⣋⠫⢫⡫⣫⠏⢏⡏⣏⠯⢯⡯⣯' '⠛⢛⡛⣛⠻⢻⡻⣻⠟⢟⡟⣟⠿⢿⡿⣿') +# open with '-' for stdin/stdout def openio(path, mode='r', buffering=-1): - # allow '-' for stdin/stdout import os if path == '-': if 'r' in mode: diff --git a/scripts/parity.py b/scripts/parity.py index 55a0e948..c9b4fea2 100755 --- a/scripts/parity.py +++ b/scripts/parity.py @@ -17,8 +17,8 @@ except ModuleNotFoundError: crc32c_lib = None +# open with '-' for stdin/stdout def openio(path, mode='r', buffering=-1): - # allow '-' for stdin/stdout import os if path == '-': if 'r' in mode: diff --git a/scripts/perf.py b/scripts/perf.py index 52d0b06c..c0f2c888 100755 --- a/scripts/perf.py +++ b/scripts/perf.py @@ -180,8 +180,8 @@ class PerfResult(co.namedtuple('PerfResult', [ self.children + other.children) +# open with '-' for stdin/stdout def openio(path, mode='r', buffering=-1): - # allow '-' for stdin/stdout import os if path == '-': if 'r' in mode: diff --git a/scripts/perfbd.py b/scripts/perfbd.py index d3043007..f6ee35d4 100755 --- a/scripts/perfbd.py +++ b/scripts/perfbd.py @@ -164,8 +164,8 @@ class PerfBdResult(co.namedtuple('PerfBdResult', [ self.children + other.children) +# open with '-' for stdin/stdout def openio(path, mode='r', buffering=-1): - # allow '-' for stdin/stdout import os if path == '-': if 'r' in mode: diff --git a/scripts/plot.py b/scripts/plot.py index 3539cc65..2aef5850 100755 --- a/scripts/plot.py +++ b/scripts/plot.py @@ -132,8 +132,8 @@ def si2(x, w=5): s = s.rstrip('.') return '%s%s%s' % ('-' if x < 0 else '', s, SI2_PREFIXES[p]) +# open with '-' for stdin/stdout def openio(path, mode='r', buffering=-1): - # allow '-' for stdin/stdout import os if path == '-': if 'r' in mode: diff --git a/scripts/plotmpl.py b/scripts/plotmpl.py index 44372e21..10ac0a37 100755 --- a/scripts/plotmpl.py +++ b/scripts/plotmpl.py @@ -158,8 +158,8 @@ class AutoMultipleLocator(mpl.ticker.MultipleLocator): return super().__call__() +# open with '-' for stdin/stdout def openio(path, mode='r', buffering=-1): - # allow '-' for stdin/stdout import os if path == '-': if 'r' in mode: diff --git a/scripts/prettyasserts.py b/scripts/prettyasserts.py index 00c8ee37..b49b7fa1 100755 --- a/scripts/prettyasserts.py +++ b/scripts/prettyasserts.py @@ -78,8 +78,8 @@ L.lex('STUFF', '[^;{}?:,()"\'=!<>\-&|/#]+', '/(?!/)', '/(?!\*)') +# open with '-' for stdin/stdout def openio(path, mode='r', buffering=-1): - # allow '-' for stdin/stdout import os if path == '-': if 'r' in mode: diff --git a/scripts/stack.py b/scripts/stack.py index 322068b5..b7e03c36 100755 --- a/scripts/stack.py +++ b/scripts/stack.py @@ -160,8 +160,8 @@ class StackResult(co.namedtuple('StackResult', [ self.notes | other.notes) +# open with '-' for stdin/stdout def openio(path, mode='r', buffering=-1): - # allow '-' for stdin/stdout import os if path == '-': if 'r' in mode: diff --git a/scripts/structs.py b/scripts/structs.py index dc63306a..3ceec243 100755 --- a/scripts/structs.py +++ b/scripts/structs.py @@ -158,8 +158,8 @@ class StructResult(co.namedtuple('StructResult', [ self.children + other.children) +# open with '-' for stdin/stdout def openio(path, mode='r', buffering=-1): - # allow '-' for stdin/stdout import os if path == '-': if 'r' in mode: diff --git a/scripts/tailpipe.py b/scripts/tailpipe.py index d218961c..3a0c6eed 100755 --- a/scripts/tailpipe.py +++ b/scripts/tailpipe.py @@ -23,8 +23,8 @@ import threading as th import time +# open with '-' for stdin/stdout def openio(path, mode='r', buffering=-1): - # allow '-' for stdin/stdout import os if path == '-': if 'r' in mode: diff --git a/scripts/teepipe.py b/scripts/teepipe.py index 77be41e9..b6136a04 100755 --- a/scripts/teepipe.py +++ b/scripts/teepipe.py @@ -19,8 +19,8 @@ import time import sys +# open with '-' for stdin/stdout def openio(path, mode='r', buffering=-1): - # allow '-' for stdin/stdout import os if path == '-': if 'r' in mode: diff --git a/scripts/test.py b/scripts/test.py index bd471aaa..abf2ba92 100755 --- a/scripts/test.py +++ b/scripts/test.py @@ -45,8 +45,8 @@ VALGRIND_PATH = ['valgrind'] PERF_SCRIPT = ['./scripts/perf.py'] +# open with '-' for stdin/stdout def openio(path, mode='r', buffering=-1): - # allow '-' for stdin/stdout import os if path == '-': if 'r' in mode: diff --git a/scripts/treemap.py b/scripts/treemap.py index b3405bf0..031724fb 100755 --- a/scripts/treemap.py +++ b/scripts/treemap.py @@ -42,8 +42,8 @@ CHARS_BRAILLE = ( '⠋⢋⡋⣋⠫⢫⡫⣫⠏⢏⡏⣏⠯⢯⡯⣯' '⠛⢛⡛⣛⠻⢻⡻⣻⠟⢟⡟⣟⠿⢿⡿⣿') +# open with '-' for stdin/stdout def openio(path, mode='r', buffering=-1): - # allow '-' for stdin/stdout import os if path == '-': if 'r' in mode: diff --git a/scripts/treemapd3.py b/scripts/treemapd3.py index abfd475d..f884a090 100755 --- a/scripts/treemapd3.py +++ b/scripts/treemapd3.py @@ -51,8 +51,8 @@ FONT = ['sans-serif'] FONT_SIZE = 10 +# open with '-' for stdin/stdout def openio(path, mode='r', buffering=-1): - # allow '-' for stdin/stdout import os if path == '-': if 'r' in mode: diff --git a/scripts/watch.py b/scripts/watch.py index ef12b34c..26239c88 100755 --- a/scripts/watch.py +++ b/scripts/watch.py @@ -34,8 +34,8 @@ except ModuleNotFoundError: inotify_simple = None +# open with '-' for stdin/stdout def openio(path, mode='r', buffering=-1): - # allow '-' for stdin/stdout import os if path == '-': if 'r' in mode: