diff options
author | Ben Reynwar <ben@reynwar.net> | 2013-06-04 10:59:29 -0700 |
---|---|---|
committer | Ben Reynwar <ben@reynwar.net> | 2013-06-04 11:55:00 -0700 |
commit | 48f3452530b29627ce57089b65363776dbe9a179 (patch) | |
tree | a2005c23b427415b9d86bcf256c49b3480f61427 | |
parent | ba0a9afedcd5451f2032004e9d583ed78d74ece2 (diff) |
uninstalled import: Updatings blocks, fec, uhd, and filter so that uninstalled import works with recent changes.
-rw-r--r-- | gnuradio-runtime/python/gnuradio/__init__.py | 3 | ||||
-rw-r--r-- | gnuradio-runtime/python/gnuradio/gr/CMakeLists.txt | 1 | ||||
-rw-r--r-- | gnuradio-runtime/python/gnuradio/gr/__init__.py | 31 | ||||
-rwxr-xr-x | gnuradio-runtime/python/gnuradio/gr/qa_tag_utils.py | 3 | ||||
-rw-r--r-- | gnuradio-runtime/python/gnuradio/gr/tag_utils.py | 31 | ||||
-rw-r--r-- | gr-blocks/python/blocks/parse_file_metadata.py | 7 | ||||
-rw-r--r-- | gr-blocks/python/blocks/qa_affinity.py (renamed from gr-blocks/python/qa_affinity.py) | 3 | ||||
-rw-r--r-- | gr-blocks/python/blocks/qa_block_gateway.py (renamed from gr-blocks/python/qa_block_gateway.py) | 7 | ||||
-rwxr-xr-x | gr-blocks/python/blocks/qa_copy.py (renamed from gr-blocks/python/qa_copy.py) | 3 | ||||
-rwxr-xr-x | gr-blocks/python/blocks/qa_cpp_py_binding.py (renamed from gr-blocks/python/qa_cpp_py_binding.py) | 4 | ||||
-rwxr-xr-x | gr-blocks/python/blocks/qa_cpp_py_binding_set.py (renamed from gr-blocks/python/qa_cpp_py_binding_set.py) | 4 | ||||
-rw-r--r-- | gr-blocks/python/blocks/qa_endian_swap.py (renamed from gr-blocks/python/qa_endian_swap.py) | 3 | ||||
-rw-r--r-- | gr-blocks/python/blocks/qa_file_source_sink.py (renamed from gr-blocks/python/qa_file_source_sink.py) | 3 | ||||
-rwxr-xr-x | gr-blocks/python/blocks/qa_head.py (renamed from gr-blocks/python/qa_head.py) | 3 | ||||
-rwxr-xr-x | gr-blocks/python/blocks/qa_hier_block2.py (renamed from gr-blocks/python/qa_hier_block2.py) | 3 | ||||
-rw-r--r-- | gr-blocks/python/blocks/qa_message_tags.py (renamed from gr-blocks/python/qa_message_tags.py) | 3 | ||||
-rw-r--r-- | gr-blocks/python/blocks/qa_null_sink_source.py (renamed from gr-blocks/python/qa_null_sink_source.py) | 3 | ||||
-rwxr-xr-x | gr-blocks/python/blocks/qa_plateau_detector_fb.py (renamed from gr-blocks/python/qa_plateau_detector_fb.py) | 3 | ||||
-rw-r--r-- | gr-blocks/python/blocks/qa_python_message_passing.py (renamed from gr-blocks/python/qa_python_message_passing.py) | 3 | ||||
-rwxr-xr-x | gr-blocks/python/blocks/qa_repack_bits_bb.py (renamed from gr-blocks/python/qa_repack_bits_bb.py) | 3 | ||||
-rwxr-xr-x | gr-blocks/python/blocks/qa_skiphead.py (renamed from gr-blocks/python/qa_skiphead.py) | 3 | ||||
-rw-r--r-- | gr-blocks/python/blocks/qa_tag_file_sink.py (renamed from gr-blocks/python/qa_tag_file_sink.py) | 3 | ||||
-rwxr-xr-x | gr-blocks/python/blocks/qa_tag_gate.py (renamed from gr-blocks/python/qa_tag_gate.py) | 3 | ||||
-rwxr-xr-x | gr-blocks/python/blocks/qa_tagged_stream_mux.py (renamed from gr-blocks/python/qa_tagged_stream_mux.py) | 3 | ||||
-rw-r--r-- | gr-blocks/python/blocks/qa_udp_source_sink.py (renamed from gr-blocks/python/qa_udp_source_sink.py) | 3 | ||||
-rw-r--r-- | gr-blocks/python/blocks/qa_vco.py (renamed from gr-blocks/python/qa_vco.py) | 3 | ||||
-rwxr-xr-x | gr-blocks/python/blocks/qa_vector_insert.py (renamed from gr-blocks/python/qa_vector_insert.py) | 3 | ||||
-rw-r--r-- | gr-blocks/python/blocks/qa_vector_map.py (renamed from gr-blocks/python/qa_vector_map.py) | 3 | ||||
-rwxr-xr-x | gr-blocks/python/blocks/qa_vector_sink_source.py (renamed from gr-blocks/python/qa_vector_sink_source.py) | 3 | ||||
-rwxr-xr-x | gr-blocks/python/blocks/qa_wavfile.py (renamed from gr-blocks/python/qa_wavfile.py) | 3 | ||||
-rw-r--r-- | gr-blocks/python/blocks/stream_to_vector_decimator.py | 6 | ||||
-rw-r--r-- | gr-blocks/python/blocks/test_16bit_1chunk.wav (renamed from gr-blocks/python/test_16bit_1chunk.wav) | bin | 52 -> 52 bytes | |||
-rw-r--r-- | gr-fec/CMakeLists.txt | 2 | ||||
-rw-r--r-- | gr-fec/python/fec/CMakeLists.txt (renamed from gr-fec/python/CMakeLists.txt) | 0 | ||||
-rw-r--r-- | gr-fec/python/fec/__init__.py (renamed from gr-fec/python/__init__.py) | 0 | ||||
-rwxr-xr-x | gr-fec/python/fec/qa_ecc_ccsds_27.py (renamed from gr-fec/python/qa_ecc_ccsds_27.py) | 0 | ||||
-rw-r--r-- | gr-filter/python/filter/qa_fractional_resampler.py (renamed from gr-filter/python/qa_fractional_resampler.py) | 5 | ||||
-rw-r--r-- | gr-uhd/CMakeLists.txt | 2 | ||||
-rw-r--r-- | gr-uhd/python/uhd/CMakeLists.txt (renamed from gr-uhd/python/CMakeLists.txt) | 0 | ||||
-rw-r--r-- | gr-uhd/python/uhd/__init__.py (renamed from gr-uhd/python/__init__.py) | 0 | ||||
-rw-r--r-- | gr-uhd/python/uhd/qa_uhd.py (renamed from gr-uhd/python/qa_uhd.py) | 5 | ||||
-rw-r--r-- | gr-utils/CMakeLists.txt | 3 | ||||
-rw-r--r-- | gr-utils/python/utils/CMakeLists.txt (renamed from gr-utils/python/CMakeLists.txt) | 2 | ||||
-rw-r--r-- | gr-utils/python/utils/README.plot (renamed from gr-utils/python/README.plot) | 0 | ||||
-rwxr-xr-x | gr-utils/python/utils/gr_modtool (renamed from gr-utils/python/gr_modtool) | 0 | ||||
-rwxr-xr-x | gr-utils/python/utils/gr_plot_char (renamed from gr-utils/python/gr_plot_char) | 0 | ||||
-rwxr-xr-x | gr-utils/python/utils/gr_plot_const (renamed from gr-utils/python/gr_plot_const) | 0 | ||||
-rw-r--r-- | gr-utils/python/utils/gr_plot_fft (renamed from gr-utils/python/gr_plot_fft) | 0 | ||||
-rwxr-xr-x | gr-utils/python/utils/gr_plot_fft_c (renamed from gr-utils/python/gr_plot_fft_c) | 0 | ||||
-rwxr-xr-x | gr-utils/python/utils/gr_plot_fft_f (renamed from gr-utils/python/gr_plot_fft_f) | 0 | ||||
-rwxr-xr-x | gr-utils/python/utils/gr_plot_float (renamed from gr-utils/python/gr_plot_float) | 0 | ||||
-rwxr-xr-x | gr-utils/python/utils/gr_plot_int (renamed from gr-utils/python/gr_plot_int) | 0 | ||||
-rwxr-xr-x | gr-utils/python/utils/gr_plot_iq (renamed from gr-utils/python/gr_plot_iq) | 0 | ||||
-rw-r--r-- | gr-utils/python/utils/gr_plot_psd (renamed from gr-utils/python/gr_plot_psd) | 0 | ||||
-rwxr-xr-x | gr-utils/python/utils/gr_plot_psd_c (renamed from gr-utils/python/gr_plot_psd_c) | 0 | ||||
-rwxr-xr-x | gr-utils/python/utils/gr_plot_psd_f (renamed from gr-utils/python/gr_plot_psd_f) | 0 | ||||
-rwxr-xr-x | gr-utils/python/utils/gr_plot_qt (renamed from gr-utils/python/gr_plot_qt) | 0 | ||||
-rwxr-xr-x | gr-utils/python/utils/gr_plot_short (renamed from gr-utils/python/gr_plot_short) | 0 | ||||
-rw-r--r-- | gr-utils/python/utils/gr_read_file_metadata (renamed from gr-utils/python/gr_read_file_metadata) | 0 | ||||
-rwxr-xr-x | gr-utils/python/utils/grcc (renamed from gr-utils/python/grcc) | 0 | ||||
-rw-r--r-- | gr-utils/python/utils/plot_data.py (renamed from gr-utils/python/plot_data.py) | 0 | ||||
-rwxr-xr-x | gr-utils/python/utils/plot_fft_base.py (renamed from gr-utils/python/plot_fft_base.py) | 0 | ||||
-rwxr-xr-x | gr-utils/python/utils/plot_psd_base.py (renamed from gr-utils/python/plot_psd_base.py) | 0 | ||||
-rw-r--r-- | gr-utils/python/utils/pyqt_filter.py (renamed from gr-utils/python/pyqt_filter.py) | 0 | ||||
-rw-r--r-- | gr-utils/python/utils/pyqt_filter.ui (renamed from gr-utils/python/pyqt_filter.ui) | 0 | ||||
-rw-r--r-- | gr-utils/python/utils/pyqt_plot.py (renamed from gr-utils/python/pyqt_plot.py) | 0 | ||||
-rw-r--r-- | gr-utils/python/utils/pyqt_plot.ui (renamed from gr-utils/python/pyqt_plot.ui) | 0 |
67 files changed, 74 insertions, 105 deletions
diff --git a/gnuradio-runtime/python/gnuradio/__init__.py b/gnuradio-runtime/python/gnuradio/__init__.py index 433a65ded2..1e2966bd08 100644 --- a/gnuradio-runtime/python/gnuradio/__init__.py +++ b/gnuradio-runtime/python/gnuradio/__init__.py @@ -45,3 +45,6 @@ if path.endswith(path_ending): __path__.append(os.path.join(build_path, 'gr-fcd', 'python')) __path__.append(os.path.join(build_path, 'gr-comedi', 'python')) __path__.append(os.path.join(build_path, 'gr-channels', 'python')) + __path__.append(os.path.join(build_path, 'gr-fec', 'python')) + __path__.append(os.path.join(build_path, 'gr-utils', 'python')) + __path__.append(os.path.join(build_path, 'gr-uhd', 'python')) diff --git a/gnuradio-runtime/python/gnuradio/gr/CMakeLists.txt b/gnuradio-runtime/python/gnuradio/gr/CMakeLists.txt index b4cf1c5fdf..053925bb3a 100644 --- a/gnuradio-runtime/python/gnuradio/gr/CMakeLists.txt +++ b/gnuradio-runtime/python/gnuradio/gr/CMakeLists.txt @@ -22,6 +22,7 @@ include(GrPython) GR_PYTHON_INSTALL(FILES __init__.py + tag_utils.py gateway.py gr_threading.py gr_threading_23.py diff --git a/gnuradio-runtime/python/gnuradio/gr/__init__.py b/gnuradio-runtime/python/gnuradio/gr/__init__.py index 7ceefb27a5..94a5c9ec2b 100644 --- a/gnuradio-runtime/python/gnuradio/gr/__init__.py +++ b/gnuradio-runtime/python/gnuradio/gr/__init__.py @@ -43,37 +43,8 @@ except ImportError: from exceptions import * from top_block import * from hier_block2 import * -#from tag_utils import * +from tag_utils import * from gateway import basic_block, sync_block, decim_block, interp_block # Force the preference database to be initialized prefs = prefs.singleton - - -class PythonTag(object): - " Python container for tags " - def __init__(self): - self.offset = None - self.key = None - self.value = None - self.srcid = None - -def tag_to_python(tag): - """ Convert a stream tag to a Python-readable object """ - newtag = PythonTag() - newtag.offset = tag.offset - newtag.key = pmt.to_python(tag.key) - newtag.value = pmt.to_python(tag.value) - newtag.srcid = pmt.to_python(tag.srcid) - return newtag - -def tag_to_pmt(tag): - """ Convert a Python-readable object to a stream tag """ - newtag = gr.tag_t() - newtag.offset = tag.offset - newtag.key = pmt.to_python(tag.key) - newtag.value = pmt.from_python(tag.value) - newtag.srcid = pmt.from_python(tag.srcid) - return newtag - - diff --git a/gnuradio-runtime/python/gnuradio/gr/qa_tag_utils.py b/gnuradio-runtime/python/gnuradio/gr/qa_tag_utils.py index 3a0e7889f9..56797a46dd 100755 --- a/gnuradio-runtime/python/gnuradio/gr/qa_tag_utils.py +++ b/gnuradio-runtime/python/gnuradio/gr/qa_tag_utils.py @@ -21,7 +21,6 @@ # from gnuradio import gr, gr_unittest -import tag_utils try: import pmt_swig as pmt @@ -43,7 +42,7 @@ class test_tag_utils (gr_unittest.TestCase): t.key = pmt.string_to_symbol('key') t.value = pmt.from_long(23) t.srcid = pmt.from_bool(False) - pt = tag_utils.tag_to_python(t) + pt = gr.tag_to_python(t) self.assertEqual(pt.key, 'key') self.assertEqual(pt.value, 23) self.assertEqual(pt.offset, 10) diff --git a/gnuradio-runtime/python/gnuradio/gr/tag_utils.py b/gnuradio-runtime/python/gnuradio/gr/tag_utils.py new file mode 100644 index 0000000000..ad80bff23a --- /dev/null +++ b/gnuradio-runtime/python/gnuradio/gr/tag_utils.py @@ -0,0 +1,31 @@ +import pmt + +import runtime_swig as gr + +class PythonTag(object): + " Python container for tags " + def __init__(self): + self.offset = None + self.key = None + self.value = None + self.srcid = None + +def tag_to_python(tag): + """ Convert a stream tag to a Python-readable object """ + newtag = PythonTag() + newtag.offset = tag.offset + newtag.key = pmt.to_python(tag.key) + newtag.value = pmt.to_python(tag.value) + newtag.srcid = pmt.to_python(tag.srcid) + return newtag + +def tag_to_pmt(tag): + """ Convert a Python-readable object to a stream tag """ + newtag = gr.tag_t() + newtag.offset = tag.offset + newtag.key = pmt.to_python(tag.key) + newtag.value = pmt.from_python(tag.value) + newtag.srcid = pmt.from_python(tag.srcid) + return newtag + + diff --git a/gr-blocks/python/blocks/parse_file_metadata.py b/gr-blocks/python/blocks/parse_file_metadata.py index a876f49b07..7d8d41d166 100644 --- a/gr-blocks/python/blocks/parse_file_metadata.py +++ b/gr-blocks/python/blocks/parse_file_metadata.py @@ -21,14 +21,9 @@ # import sys -from gnuradio import gr +from gnuradio import gr, blocks import pmt -try: - import blocks_swig as blocks -except ImportError: - from gnuradio import blocks - ''' sr Sample rate (samples/second) time Time as uint64(secs), double(fractional secs) diff --git a/gr-blocks/python/qa_affinity.py b/gr-blocks/python/blocks/qa_affinity.py index f06b2804fe..98b5c44862 100644 --- a/gr-blocks/python/qa_affinity.py +++ b/gr-blocks/python/blocks/qa_affinity.py @@ -20,8 +20,7 @@ # Boston, MA 02110-1301, USA. # -from gnuradio import gr, gr_unittest -import blocks_swig as blocks +from gnuradio import gr, gr_unittest, blocks class test_affinity(gr_unittest.TestCase): diff --git a/gr-blocks/python/qa_block_gateway.py b/gr-blocks/python/blocks/qa_block_gateway.py index 20a2660cba..f62726adf3 100644 --- a/gr-blocks/python/qa_block_gateway.py +++ b/gr-blocks/python/blocks/qa_block_gateway.py @@ -19,10 +19,11 @@ # Boston, MA 02110-1301, USA. # -from gnuradio import gr, gr_unittest -import pmt import numpy -import blocks_swig as blocks + +import pmt + +from gnuradio import gr, gr_unittest, blocks class add_2_f32_1_f32(gr.sync_block): def __init__(self): diff --git a/gr-blocks/python/qa_copy.py b/gr-blocks/python/blocks/qa_copy.py index 04f6454231..20914b51e3 100755 --- a/gr-blocks/python/qa_copy.py +++ b/gr-blocks/python/blocks/qa_copy.py @@ -20,8 +20,7 @@ # Boston, MA 02110-1301, USA. # -from gnuradio import gr, gr_unittest -import blocks_swig as blocks +from gnuradio import gr, gr_unittest, blocks class test_copy(gr_unittest.TestCase): diff --git a/gr-blocks/python/qa_cpp_py_binding.py b/gr-blocks/python/blocks/qa_cpp_py_binding.py index c3d6a3f3bc..c15633df82 100755 --- a/gr-blocks/python/qa_cpp_py_binding.py +++ b/gr-blocks/python/blocks/qa_cpp_py_binding.py @@ -26,14 +26,12 @@ import Ice import sys, time, random, numpy -from gnuradio import gr, gr_unittest +from gnuradio import gr, gr_unittest, blocks from gnuradio.ctrlport import GNURadio from gnuradio import ctrlport import os -import blocks_swig as blocks - def get1(): return "success" diff --git a/gr-blocks/python/qa_cpp_py_binding_set.py b/gr-blocks/python/blocks/qa_cpp_py_binding_set.py index 28ddc48b2f..2e4198c04d 100755 --- a/gr-blocks/python/qa_cpp_py_binding_set.py +++ b/gr-blocks/python/blocks/qa_cpp_py_binding_set.py @@ -26,14 +26,12 @@ import Ice import sys, time, random, numpy -from gnuradio import gr, gr_unittest +from gnuradio import gr, gr_unittest, blocks from gnuradio.ctrlport import GNURadio from gnuradio import ctrlport import os -import blocks_swig as blocks - class inc_class: def __init__(self,val): self.val = val; diff --git a/gr-blocks/python/qa_endian_swap.py b/gr-blocks/python/blocks/qa_endian_swap.py index 5180293052..ea6e10fb8f 100644 --- a/gr-blocks/python/qa_endian_swap.py +++ b/gr-blocks/python/blocks/qa_endian_swap.py @@ -20,8 +20,7 @@ # Boston, MA 02110-1301, USA. # -from gnuradio import gr, gr_unittest -import blocks_swig as blocks +from gnuradio import gr, gr_unittest, blocks import ctypes class test_endian_swap(gr_unittest.TestCase): diff --git a/gr-blocks/python/qa_file_source_sink.py b/gr-blocks/python/blocks/qa_file_source_sink.py index cf3b512db0..f35912b229 100644 --- a/gr-blocks/python/qa_file_source_sink.py +++ b/gr-blocks/python/blocks/qa_file_source_sink.py @@ -20,8 +20,7 @@ # Boston, MA 02110-1301, USA. # -from gnuradio import gr, gr_unittest -import blocks_swig as blocks +from gnuradio import gr, gr_unittest, blocks import os class test_file_source_sink(gr_unittest.TestCase): diff --git a/gr-blocks/python/qa_head.py b/gr-blocks/python/blocks/qa_head.py index 39b1255978..9b5bca221b 100755 --- a/gr-blocks/python/qa_head.py +++ b/gr-blocks/python/blocks/qa_head.py @@ -20,8 +20,7 @@ # Boston, MA 02110-1301, USA. # -from gnuradio import gr, gr_unittest -import blocks_swig as blocks +from gnuradio import gr, gr_unittest, blocks class test_head(gr_unittest.TestCase): diff --git a/gr-blocks/python/qa_hier_block2.py b/gr-blocks/python/blocks/qa_hier_block2.py index f482fda8cf..51f420e8eb 100755 --- a/gr-blocks/python/qa_hier_block2.py +++ b/gr-blocks/python/blocks/qa_hier_block2.py @@ -1,7 +1,6 @@ #!/usr/bin/env python -from gnuradio import gr, gr_unittest -import blocks_swig as blocks +from gnuradio import gr, gr_unittest, blocks import numpy class add_ff(gr.sync_block): diff --git a/gr-blocks/python/qa_message_tags.py b/gr-blocks/python/blocks/qa_message_tags.py index ad4d2104e6..0d4f77bf9f 100644 --- a/gr-blocks/python/qa_message_tags.py +++ b/gr-blocks/python/blocks/qa_message_tags.py @@ -1,7 +1,6 @@ import time -from gnuradio import gr, gr_unittest -import blocks_swig as blocks +from gnuradio import gr, gr_unittest, blocks class test_message_tags (gr_unittest.TestCase): diff --git a/gr-blocks/python/qa_null_sink_source.py b/gr-blocks/python/blocks/qa_null_sink_source.py index 60552cb207..03d6ab14c1 100644 --- a/gr-blocks/python/qa_null_sink_source.py +++ b/gr-blocks/python/blocks/qa_null_sink_source.py @@ -20,8 +20,7 @@ # Boston, MA 02110-1301, USA. # -from gnuradio import gr, gr_unittest -import blocks_swig as blocks +from gnuradio import gr, gr_unittest, blocks import math class test_null_sink_source(gr_unittest.TestCase): diff --git a/gr-blocks/python/qa_plateau_detector_fb.py b/gr-blocks/python/blocks/qa_plateau_detector_fb.py index 2f4b643fe0..003c4ea74d 100755 --- a/gr-blocks/python/qa_plateau_detector_fb.py +++ b/gr-blocks/python/blocks/qa_plateau_detector_fb.py @@ -20,8 +20,7 @@ # Boston, MA 02110-1301, USA. # -from gnuradio import gr, gr_unittest -import blocks_swig as blocks +from gnuradio import gr, gr_unittest, blocks class qa_plateau_detector_fb (gr_unittest.TestCase): diff --git a/gr-blocks/python/qa_python_message_passing.py b/gr-blocks/python/blocks/qa_python_message_passing.py index 58bf9e59bd..6eade7556b 100644 --- a/gr-blocks/python/qa_python_message_passing.py +++ b/gr-blocks/python/blocks/qa_python_message_passing.py @@ -20,11 +20,10 @@ # Boston, MA 02110-1301, USA. # -from gnuradio import gr, gr_unittest +from gnuradio import gr, gr_unittest, blocks import pmt import numpy import time -import blocks_swig as blocks # Simple block to generate messages class message_generator(gr.sync_block): diff --git a/gr-blocks/python/qa_repack_bits_bb.py b/gr-blocks/python/blocks/qa_repack_bits_bb.py index 209b6e1324..d9bbfe4fac 100755 --- a/gr-blocks/python/qa_repack_bits_bb.py +++ b/gr-blocks/python/blocks/qa_repack_bits_bb.py @@ -21,9 +21,8 @@ # import random -from gnuradio import gr, gr_unittest +from gnuradio import gr, gr_unittest, blocks import pmt -import blocks_swig as blocks class qa_repack_bits_bb (gr_unittest.TestCase): diff --git a/gr-blocks/python/qa_skiphead.py b/gr-blocks/python/blocks/qa_skiphead.py index 50a9bbc639..a9b6df40cf 100755 --- a/gr-blocks/python/qa_skiphead.py +++ b/gr-blocks/python/blocks/qa_skiphead.py @@ -20,8 +20,7 @@ # Boston, MA 02110-1301, USA. # -from gnuradio import gr, gr_unittest -import blocks_swig as blocks +from gnuradio import gr, gr_unittest, blocks class test_skiphead(gr_unittest.TestCase): diff --git a/gr-blocks/python/qa_tag_file_sink.py b/gr-blocks/python/blocks/qa_tag_file_sink.py index e41e6544fd..250ad1addf 100644 --- a/gr-blocks/python/qa_tag_file_sink.py +++ b/gr-blocks/python/blocks/qa_tag_file_sink.py @@ -20,8 +20,7 @@ # Boston, MA 02110-1301, USA. # -from gnuradio import gr, gr_unittest -import blocks_swig as blocks +from gnuradio import gr, gr_unittest, blocks import os, struct class test_tag_file_sink(gr_unittest.TestCase): diff --git a/gr-blocks/python/qa_tag_gate.py b/gr-blocks/python/blocks/qa_tag_gate.py index 1999f7a35d..74fe5a7bcd 100755 --- a/gr-blocks/python/qa_tag_gate.py +++ b/gr-blocks/python/blocks/qa_tag_gate.py @@ -18,9 +18,8 @@ # Boston, MA 02110-1301, USA. # -from gnuradio import gr, gr_unittest +from gnuradio import gr, gr_unittest, blocks import pmt -import blocks_swig as blocks class qa_tag_gate (gr_unittest.TestCase): diff --git a/gr-blocks/python/qa_tagged_stream_mux.py b/gr-blocks/python/blocks/qa_tagged_stream_mux.py index e9c3343000..675d685aaa 100755 --- a/gr-blocks/python/qa_tagged_stream_mux.py +++ b/gr-blocks/python/blocks/qa_tagged_stream_mux.py @@ -20,9 +20,8 @@ # Boston, MA 02110-1301, USA. # -from gnuradio import gr, gr_unittest +from gnuradio import gr, gr_unittest, blocks import pmt -import blocks_swig as blocks import numpy def make_len_tags(tupl, key): diff --git a/gr-blocks/python/qa_udp_source_sink.py b/gr-blocks/python/blocks/qa_udp_source_sink.py index ac8a9d0eb1..b96d393a50 100644 --- a/gr-blocks/python/qa_udp_source_sink.py +++ b/gr-blocks/python/blocks/qa_udp_source_sink.py @@ -20,8 +20,7 @@ # Boston, MA 02110-1301, USA. # -from gnuradio import gr, gr_unittest -import blocks_swig as blocks +from gnuradio import gr, gr_unittest, blocks import os from threading import Timer diff --git a/gr-blocks/python/qa_vco.py b/gr-blocks/python/blocks/qa_vco.py index 23ff636d86..4ed2a71c04 100644 --- a/gr-blocks/python/qa_vco.py +++ b/gr-blocks/python/blocks/qa_vco.py @@ -20,8 +20,7 @@ # Boston, MA 02110-1301, USA. # -from gnuradio import gr, gr_unittest -import blocks_swig as blocks +from gnuradio import gr, gr_unittest, blocks import math def sig_source_f(samp_rate, freq, amp, N): diff --git a/gr-blocks/python/qa_vector_insert.py b/gr-blocks/python/blocks/qa_vector_insert.py index e3c0d3102f..5f6e84665c 100755 --- a/gr-blocks/python/qa_vector_insert.py +++ b/gr-blocks/python/blocks/qa_vector_insert.py @@ -20,8 +20,7 @@ # Boston, MA 02110-1301, USA. # -from gnuradio import gr, gr_unittest -import blocks_swig as blocks +from gnuradio import gr, gr_unittest, blocks import math class test_vector_insert(gr_unittest.TestCase): diff --git a/gr-blocks/python/qa_vector_map.py b/gr-blocks/python/blocks/qa_vector_map.py index 54565fe443..94bdb1989b 100644 --- a/gr-blocks/python/qa_vector_map.py +++ b/gr-blocks/python/blocks/qa_vector_map.py @@ -20,8 +20,7 @@ # Boston, MA 02110-1301, USA. # -from gnuradio import gr, gr_unittest -import blocks_swig as blocks +from gnuradio import gr, gr_unittest, blocks import math class test_vector_map(gr_unittest.TestCase): diff --git a/gr-blocks/python/qa_vector_sink_source.py b/gr-blocks/python/blocks/qa_vector_sink_source.py index 169e6a4450..6c9f933668 100755 --- a/gr-blocks/python/qa_vector_sink_source.py +++ b/gr-blocks/python/blocks/qa_vector_sink_source.py @@ -20,8 +20,7 @@ # Boston, MA 02110-1301, USA. # -from gnuradio import gr, gr_unittest -import blocks_swig as blocks +from gnuradio import gr, gr_unittest, blocks import math class test_vector_sink_source(gr_unittest.TestCase): diff --git a/gr-blocks/python/qa_wavfile.py b/gr-blocks/python/blocks/qa_wavfile.py index b40b9b7ec3..ce1806c5ef 100755 --- a/gr-blocks/python/qa_wavfile.py +++ b/gr-blocks/python/blocks/qa_wavfile.py @@ -20,8 +20,7 @@ # Boston, MA 02110-1301, USA. # -from gnuradio import gr, gr_unittest -import blocks_swig as blocks +from gnuradio import gr, gr_unittest, blocks import os from os.path import getsize diff --git a/gr-blocks/python/blocks/stream_to_vector_decimator.py b/gr-blocks/python/blocks/stream_to_vector_decimator.py index c32ae6fce2..984d84b4bb 100644 --- a/gr-blocks/python/blocks/stream_to_vector_decimator.py +++ b/gr-blocks/python/blocks/stream_to_vector_decimator.py @@ -19,13 +19,9 @@ # Boston, MA 02110-1301, USA. # +import blocks_swig as blocks from gnuradio import gr -try: - from gnuradio import blocks -except ImportError: - import blocks_swig as blocks - class stream_to_vector_decimator(gr.hier_block2): """ Convert the stream to a vector, decimate the vector stream to achieve the vector rate. diff --git a/gr-blocks/python/test_16bit_1chunk.wav b/gr-blocks/python/blocks/test_16bit_1chunk.wav Binary files differindex 0fe12a7a13..0fe12a7a13 100644 --- a/gr-blocks/python/test_16bit_1chunk.wav +++ b/gr-blocks/python/blocks/test_16bit_1chunk.wav diff --git a/gr-fec/CMakeLists.txt b/gr-fec/CMakeLists.txt index 9a3e22748e..b40023766b 100644 --- a/gr-fec/CMakeLists.txt +++ b/gr-fec/CMakeLists.txt @@ -86,7 +86,7 @@ add_subdirectory(include/gnuradio/fec) add_subdirectory(lib) if(ENABLE_PYTHON) add_subdirectory(swig) - add_subdirectory(python) + add_subdirectory(python/fec) add_subdirectory(grc) endif(ENABLE_PYTHON) #add_subdirectory(examples) diff --git a/gr-fec/python/CMakeLists.txt b/gr-fec/python/fec/CMakeLists.txt index a05981c8e6..a05981c8e6 100644 --- a/gr-fec/python/CMakeLists.txt +++ b/gr-fec/python/fec/CMakeLists.txt diff --git a/gr-fec/python/__init__.py b/gr-fec/python/fec/__init__.py index 05e75ea39a..05e75ea39a 100644 --- a/gr-fec/python/__init__.py +++ b/gr-fec/python/fec/__init__.py diff --git a/gr-fec/python/qa_ecc_ccsds_27.py b/gr-fec/python/fec/qa_ecc_ccsds_27.py index 895e683345..895e683345 100755 --- a/gr-fec/python/qa_ecc_ccsds_27.py +++ b/gr-fec/python/fec/qa_ecc_ccsds_27.py diff --git a/gr-filter/python/qa_fractional_resampler.py b/gr-filter/python/filter/qa_fractional_resampler.py index 28178a310f..220ebd9e30 100644 --- a/gr-filter/python/qa_fractional_resampler.py +++ b/gr-filter/python/filter/qa_fractional_resampler.py @@ -20,11 +20,10 @@ # Boston, MA 02110-1301, USA. # -from gnuradio import gr, gr_unittest -import filter_swig as filter -import blocks_swig as blocks import math +from gnuradio import gr, gr_unittest, filter, blocks + def sig_source_f(samp_rate, freq, amp, N): t = map(lambda x: float(x)/samp_rate, xrange(N)) y = map(lambda x: math.sin(2.*math.pi*freq*x), t) diff --git a/gr-uhd/CMakeLists.txt b/gr-uhd/CMakeLists.txt index a83bcce600..d306dc6952 100644 --- a/gr-uhd/CMakeLists.txt +++ b/gr-uhd/CMakeLists.txt @@ -98,7 +98,7 @@ add_subdirectory(doc) add_subdirectory(examples/c++) if(ENABLE_PYTHON) add_subdirectory(swig) - add_subdirectory(python) + add_subdirectory(python/uhd) add_subdirectory(grc) add_subdirectory(apps) add_subdirectory(examples/python) diff --git a/gr-uhd/python/CMakeLists.txt b/gr-uhd/python/uhd/CMakeLists.txt index ac113fe2d2..ac113fe2d2 100644 --- a/gr-uhd/python/CMakeLists.txt +++ b/gr-uhd/python/uhd/CMakeLists.txt diff --git a/gr-uhd/python/__init__.py b/gr-uhd/python/uhd/__init__.py index 53c0f9ac14..53c0f9ac14 100644 --- a/gr-uhd/python/__init__.py +++ b/gr-uhd/python/uhd/__init__.py diff --git a/gr-uhd/python/qa_uhd.py b/gr-uhd/python/uhd/qa_uhd.py index dafae926c5..511c098753 100644 --- a/gr-uhd/python/qa_uhd.py +++ b/gr-uhd/python/uhd/qa_uhd.py @@ -20,8 +20,7 @@ # Boston, MA 02110-1301, USA. # -from gnuradio import gr, gr_unittest -import uhd_swig +from gnuradio import gr, gr_unittest, uhd class test_uhd(gr_unittest.TestCase): @@ -40,7 +39,7 @@ class test_uhd(gr_unittest.TestCase): """ Try to manipulate the stream args channels for proper swig'ing checks. """ - sa = uhd_swig.stream_args_t() + sa = uhd.stream_args_t() sa.channels.append(1) sa.channels.append(0) print sa.channels diff --git a/gr-utils/CMakeLists.txt b/gr-utils/CMakeLists.txt index decd973485..7985535aa8 100644 --- a/gr-utils/CMakeLists.txt +++ b/gr-utils/CMakeLists.txt @@ -48,7 +48,8 @@ CPACK_COMPONENT("utils" ######################################################################## # Add subdirectories ######################################################################## -add_subdirectory(python) +add_subdirectory(python/utils) +add_subdirectory(python/modtool) endif(ENABLE_GR_UTILS) diff --git a/gr-utils/python/CMakeLists.txt b/gr-utils/python/utils/CMakeLists.txt index fc21dc654d..54eba51170 100644 --- a/gr-utils/python/CMakeLists.txt +++ b/gr-utils/python/utils/CMakeLists.txt @@ -54,5 +54,3 @@ GR_PYTHON_INSTALL( DESTINATION ${GR_RUNTIME_DIR} COMPONENT "utils" ) - -add_subdirectory(modtool) diff --git a/gr-utils/python/README.plot b/gr-utils/python/utils/README.plot index 60f14c669c..60f14c669c 100644 --- a/gr-utils/python/README.plot +++ b/gr-utils/python/utils/README.plot diff --git a/gr-utils/python/gr_modtool b/gr-utils/python/utils/gr_modtool index 8c5c710aff..8c5c710aff 100755 --- a/gr-utils/python/gr_modtool +++ b/gr-utils/python/utils/gr_modtool diff --git a/gr-utils/python/gr_plot_char b/gr-utils/python/utils/gr_plot_char index a2b93a63c6..a2b93a63c6 100755 --- a/gr-utils/python/gr_plot_char +++ b/gr-utils/python/utils/gr_plot_char diff --git a/gr-utils/python/gr_plot_const b/gr-utils/python/utils/gr_plot_const index 749ad035b5..749ad035b5 100755 --- a/gr-utils/python/gr_plot_const +++ b/gr-utils/python/utils/gr_plot_const diff --git a/gr-utils/python/gr_plot_fft b/gr-utils/python/utils/gr_plot_fft index 4343481645..4343481645 100644 --- a/gr-utils/python/gr_plot_fft +++ b/gr-utils/python/utils/gr_plot_fft diff --git a/gr-utils/python/gr_plot_fft_c b/gr-utils/python/utils/gr_plot_fft_c index 43e808d95a..43e808d95a 100755 --- a/gr-utils/python/gr_plot_fft_c +++ b/gr-utils/python/utils/gr_plot_fft_c diff --git a/gr-utils/python/gr_plot_fft_f b/gr-utils/python/utils/gr_plot_fft_f index dee9b17dea..dee9b17dea 100755 --- a/gr-utils/python/gr_plot_fft_f +++ b/gr-utils/python/utils/gr_plot_fft_f diff --git a/gr-utils/python/gr_plot_float b/gr-utils/python/utils/gr_plot_float index 22806e48ae..22806e48ae 100755 --- a/gr-utils/python/gr_plot_float +++ b/gr-utils/python/utils/gr_plot_float diff --git a/gr-utils/python/gr_plot_int b/gr-utils/python/utils/gr_plot_int index 355ddf0189..355ddf0189 100755 --- a/gr-utils/python/gr_plot_int +++ b/gr-utils/python/utils/gr_plot_int diff --git a/gr-utils/python/gr_plot_iq b/gr-utils/python/utils/gr_plot_iq index bf8077b6b4..bf8077b6b4 100755 --- a/gr-utils/python/gr_plot_iq +++ b/gr-utils/python/utils/gr_plot_iq diff --git a/gr-utils/python/gr_plot_psd b/gr-utils/python/utils/gr_plot_psd index 059ca6b645..059ca6b645 100644 --- a/gr-utils/python/gr_plot_psd +++ b/gr-utils/python/utils/gr_plot_psd diff --git a/gr-utils/python/gr_plot_psd_c b/gr-utils/python/utils/gr_plot_psd_c index fff2bff0f2..fff2bff0f2 100755 --- a/gr-utils/python/gr_plot_psd_c +++ b/gr-utils/python/utils/gr_plot_psd_c diff --git a/gr-utils/python/gr_plot_psd_f b/gr-utils/python/utils/gr_plot_psd_f index ec67994797..ec67994797 100755 --- a/gr-utils/python/gr_plot_psd_f +++ b/gr-utils/python/utils/gr_plot_psd_f diff --git a/gr-utils/python/gr_plot_qt b/gr-utils/python/utils/gr_plot_qt index 153359f0c6..153359f0c6 100755 --- a/gr-utils/python/gr_plot_qt +++ b/gr-utils/python/utils/gr_plot_qt diff --git a/gr-utils/python/gr_plot_short b/gr-utils/python/utils/gr_plot_short index 702a2a94a6..702a2a94a6 100755 --- a/gr-utils/python/gr_plot_short +++ b/gr-utils/python/utils/gr_plot_short diff --git a/gr-utils/python/gr_read_file_metadata b/gr-utils/python/utils/gr_read_file_metadata index 4373cd054b..4373cd054b 100644 --- a/gr-utils/python/gr_read_file_metadata +++ b/gr-utils/python/utils/gr_read_file_metadata diff --git a/gr-utils/python/grcc b/gr-utils/python/utils/grcc index 7e5665dc05..7e5665dc05 100755 --- a/gr-utils/python/grcc +++ b/gr-utils/python/utils/grcc diff --git a/gr-utils/python/plot_data.py b/gr-utils/python/utils/plot_data.py index 2ae3b1d5b3..2ae3b1d5b3 100644 --- a/gr-utils/python/plot_data.py +++ b/gr-utils/python/utils/plot_data.py diff --git a/gr-utils/python/plot_fft_base.py b/gr-utils/python/utils/plot_fft_base.py index 4afdc3a360..4afdc3a360 100755 --- a/gr-utils/python/plot_fft_base.py +++ b/gr-utils/python/utils/plot_fft_base.py diff --git a/gr-utils/python/plot_psd_base.py b/gr-utils/python/utils/plot_psd_base.py index fe3c9e12b7..fe3c9e12b7 100755 --- a/gr-utils/python/plot_psd_base.py +++ b/gr-utils/python/utils/plot_psd_base.py diff --git a/gr-utils/python/pyqt_filter.py b/gr-utils/python/utils/pyqt_filter.py index 0c781f2347..0c781f2347 100644 --- a/gr-utils/python/pyqt_filter.py +++ b/gr-utils/python/utils/pyqt_filter.py diff --git a/gr-utils/python/pyqt_filter.ui b/gr-utils/python/utils/pyqt_filter.ui index 9853352e2e..9853352e2e 100644 --- a/gr-utils/python/pyqt_filter.ui +++ b/gr-utils/python/utils/pyqt_filter.ui diff --git a/gr-utils/python/pyqt_plot.py b/gr-utils/python/utils/pyqt_plot.py index 5650135abf..5650135abf 100644 --- a/gr-utils/python/pyqt_plot.py +++ b/gr-utils/python/utils/pyqt_plot.py diff --git a/gr-utils/python/pyqt_plot.ui b/gr-utils/python/utils/pyqt_plot.ui index 55c72fda26..55c72fda26 100644 --- a/gr-utils/python/pyqt_plot.ui +++ b/gr-utils/python/utils/pyqt_plot.ui |