summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/examples/volk_benchmark/volk_math.py
diff options
context:
space:
mode:
Diffstat (limited to 'gnuradio-runtime/examples/volk_benchmark/volk_math.py')
-rw-r--r--[-rwxr-xr-x]gnuradio-runtime/examples/volk_benchmark/volk_math.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/gnuradio-runtime/examples/volk_benchmark/volk_math.py b/gnuradio-runtime/examples/volk_benchmark/volk_math.py
index 753257c237..6fc6cfa78d 100755..100644
--- a/gnuradio-runtime/examples/volk_benchmark/volk_math.py
+++ b/gnuradio-runtime/examples/volk_benchmark/volk_math.py
@@ -1,5 +1,7 @@
#!/usr/bin/env python
+from __future__ import print_function
+from __future__ import unicode_literals
from gnuradio import gr
from gnuradio import blocks
import argparse
@@ -87,7 +89,7 @@ def run_tests(func, N, iters):
res = format_results(func.__name__, t)
return res
except AttributeError:
- print "\tCould not run test. Skipping."
+ print("\tCould not run test. Skipping.")
return None
def main():
@@ -119,7 +121,7 @@ def main():
default=20,
help='Number of iterations [default: %(default)s]')
parser.add_argument('--tests', type=int, nargs='*',
- choices=xrange(len(avail_tests)),
+ choices=list(range(len(avail_tests))),
help='A list of tests to run; can be a single test or a \
space-separated list.')
parser.add_argument('--list', action='store_true',
@@ -129,8 +131,8 @@ def main():
args = parser.parse_args()
if(args.list):
- print "Available Tests to Run:"
- print "\n".join(["\t{0}: {1}".format(i,f.__name__) for i,f in enumerate(avail_tests)])
+ print("Available Tests to Run:")
+ print("\n".join(["\t{0}: {1}".format(i,f.__name__) for i,f in enumerate(avail_tests)]))
sys.exit(0)
N = int(args.nitems)
@@ -141,7 +143,7 @@ def main():
new_table(conn, label)
if args.all:
- tests = xrange(len(avail_tests))
+ tests = list(range(len(avail_tests)))
else:
tests = args.tests