diff options
author | Douglas Anderson <danderson@ntia.doc.gov> | 2017-02-12 15:52:19 -0800 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2017-02-26 18:21:22 -0800 |
commit | 9e625c4821f4c63421b3d3747c0c4f358fef6c5f (patch) | |
tree | 41dedbe053417be7314cdce15d64fbbb89db4d8d /gr-blocks/python/blocks/qa_ctrlport_probes.py | |
parent | e5aabcc6a4a9335f3ef8abf5f89104b626e9364d (diff) |
python3: update non-GRC components to use python2 or python3
Diffstat (limited to 'gr-blocks/python/blocks/qa_ctrlport_probes.py')
-rw-r--r-- | gr-blocks/python/blocks/qa_ctrlport_probes.py | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/gr-blocks/python/blocks/qa_ctrlport_probes.py b/gr-blocks/python/blocks/qa_ctrlport_probes.py index c678846df0..d373bb9fff 100644 --- a/gr-blocks/python/blocks/qa_ctrlport_probes.py +++ b/gr-blocks/python/blocks/qa_ctrlport_probes.py @@ -20,6 +20,7 @@ # Boston, MA 02110-1301, USA. # + import sys, time, random, numpy from gnuradio import gr, gr_unittest, blocks import os, struct, re @@ -36,7 +37,7 @@ class test_ctrlport_probes(gr_unittest.TestCase): self.tb = None def test_001(self): - data = range(1,9) + data = list(range(1,9)) self.src = blocks.vector_source_c(data, True) self.probe = blocks.ctrlport_probe2_c("samples","Complex", @@ -68,7 +69,7 @@ class test_ctrlport_probes(gr_unittest.TestCase): # Get all exported knobs ret = radio.getKnobs([probe_name + "::samples"]) - for name in ret.keys(): + for name in list(ret.keys()): # Get data in probe, which might be offset; find the # beginning and unwrap. result = ret[name].value @@ -81,7 +82,7 @@ class test_ctrlport_probes(gr_unittest.TestCase): def test_002(self): - data = range(1,9) + data = list(range(1,9)) self.src = blocks.vector_source_f(data, True) self.probe = blocks.ctrlport_probe2_f("samples","Floats", @@ -109,7 +110,7 @@ class test_ctrlport_probes(gr_unittest.TestCase): # Get all exported knobs ret = radio.getKnobs([probe_name + "::samples"]) - for name in ret.keys(): + for name in list(ret.keys()): # Get data in probe, which might be offset; find the # beginning and unwrap. result = ret[name].value @@ -121,7 +122,7 @@ class test_ctrlport_probes(gr_unittest.TestCase): self.tb.wait() def test_003(self): - data = range(1,9) + data = list(range(1,9)) self.src = blocks.vector_source_i(data, True) self.probe = blocks.ctrlport_probe2_i("samples","Integers", @@ -149,7 +150,7 @@ class test_ctrlport_probes(gr_unittest.TestCase): # Get all exported knobs ret = radio.getKnobs([probe_name + "::samples"]) - for name in ret.keys(): + for name in list(ret.keys()): # Get data in probe, which might be offset; find the # beginning and unwrap. result = ret[name].value @@ -162,7 +163,7 @@ class test_ctrlport_probes(gr_unittest.TestCase): def test_004(self): - data = range(1,9) + data = list(range(1,9)) self.src = blocks.vector_source_s(data, True) self.probe = blocks.ctrlport_probe2_s("samples","Shorts", @@ -190,7 +191,7 @@ class test_ctrlport_probes(gr_unittest.TestCase): # Get all exported knobs ret = radio.getKnobs([probe_name + "::samples"]) - for name in ret.keys(): + for name in list(ret.keys()): # Get data in probe, which might be offset; find the # beginning and unwrap. result = ret[name].value @@ -202,7 +203,7 @@ class test_ctrlport_probes(gr_unittest.TestCase): self.tb.wait() def test_005(self): - data = range(1,9) + data = list(range(1,9)) self.src = blocks.vector_source_b(data, True) self.probe = blocks.ctrlport_probe2_b("samples","Bytes", @@ -230,7 +231,7 @@ class test_ctrlport_probes(gr_unittest.TestCase): # Get all exported knobs ret = radio.getKnobs([probe_name + "::samples"]) - for name in ret.keys(): + for name in list(ret.keys()): # Get data in probe, which might be offset; find the # beginning and unwrap. result = ret[name].value |