aboutsummaryrefslogtreecommitdiff
path: root/test/Scripts/prcontext.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/Scripts/prcontext.py')
-rwxr-xr-xtest/Scripts/prcontext.py29
1 files changed, 0 insertions, 29 deletions
diff --git a/test/Scripts/prcontext.py b/test/Scripts/prcontext.py
deleted file mode 100755
index b91f618c57..0000000000
--- a/test/Scripts/prcontext.py
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# Usage:
-# prcontext <pattern> <# lines of context>
-#
-
-import sys
-
-#
-# Get the arguments
-#
-pattern=sys.argv[1]
-num=int(sys.argv[2])
-
-#
-# Get all of the lines in the file.
-#
-lines=sys.stdin.readlines()
-
-index=0
-for line in lines:
- if ((line.find(pattern)) != -1):
- if (index-num < 0):
- bottom=0
- else:
- bottom=index-num
- for output in lines[bottom:index+num+1]:
- print output[:-1]
- index=index+1
-