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_block_gateway.py | |
parent | e5aabcc6a4a9335f3ef8abf5f89104b626e9364d (diff) |
python3: update non-GRC components to use python2 or python3
Diffstat (limited to 'gr-blocks/python/blocks/qa_block_gateway.py')
-rw-r--r-- | gr-blocks/python/blocks/qa_block_gateway.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gr-blocks/python/blocks/qa_block_gateway.py b/gr-blocks/python/blocks/qa_block_gateway.py index 1e848cff04..d4794179bd 100644 --- a/gr-blocks/python/blocks/qa_block_gateway.py +++ b/gr-blocks/python/blocks/qa_block_gateway.py @@ -1,3 +1,5 @@ +from __future__ import division + # # Copyright 2011-2013 Free Software Foundation, Inc. # @@ -113,7 +115,7 @@ class tag_source(gr.sync_block): #put code here to fill the output items... #make a new tag on the middle element every time work is called - count = self.nitems_written(0) + num_output_items/2 + count = self.nitems_written(0) + num_output_items // 2 key = pmt.string_to_symbol("example_key") value = pmt.string_to_symbol("example_value") self.add_item_tag(0, count, key, value) @@ -187,8 +189,8 @@ class vector_to_stream(gr.interp_block): def work(self, input_items, output_items): n = 0 - for i in xrange(len(input_items[0])): - for j in xrange(self.block_size): + for i in range(len(input_items[0])): + for j in range(self.block_size): output_items[0][n] = input_items[0][i][j] n += 1 |