From a709488d95cb71b0767e24e67a0cb70f46d30337 Mon Sep 17 00:00:00 2001
From: Johnathan Corgan <johnathan@corganlabs.com>
Date: Sun, 22 Mar 2015 10:19:19 -0700
Subject: Removed top-level component gr-atsc.

This functionality has been migrated to the new gr-dtv top-level
component.
---
 docs/doxygen/Doxyfile.in          | 8 --------
 docs/doxygen/other/group_defs.dox | 5 -----
 2 files changed, 13 deletions(-)

(limited to 'docs/doxygen')

diff --git a/docs/doxygen/Doxyfile.in b/docs/doxygen/Doxyfile.in
index 3f558526e7..9a2ce07958 100644
--- a/docs/doxygen/Doxyfile.in
+++ b/docs/doxygen/Doxyfile.in
@@ -145,8 +145,6 @@ STRIP_FROM_INC_PATH    = @CMAKE_SOURCE_DIR@/gnuradio-runtime/include \
                          @CMAKE_BINARY_DIR@/gnuradio-runtime/include \
                          @CMAKE_SOURCE_DIR@/gr-analog/include \
                          @CMAKE_BINARY_DIR@/gr-analog/include \
-                         @CMAKE_SOURCE_DIR@/gr-atsc/include \
-                         @CMAKE_BINARY_DIR@/gr-atsc/include \
                          @CMAKE_SOURCE_DIR@/gr-audio/include \
                          @CMAKE_BINARY_DIR@/gr-audio/include \
                          @CMAKE_SOURCE_DIR@/gr-blocks/include \
@@ -744,9 +742,6 @@ EXCLUDE                = @abs_top_builddir@/docs/doxygen/html \
                          @abs_top_builddir@/gnuradio-runtime/python/gnuradio/gr/gr_threading.py \
                          @abs_top_builddir@/gnuradio-runtime/python/gnuradio/gr/gr_threading_23.py \
                          @abs_top_builddir@/gnuradio-runtime/python/gnuradio/gr/gr_threading_24.py \
-                         @abs_top_builddir@/gr-atsc/swig/atsc_swig.py \
-                         @abs_top_builddir@/gr-atsc/lib/gen_encoder.py \
-                         @abs_top_builddir@/gr-atsc/python \
                          @abs_top_builddir@/gr-pager/swig/pager_swig.py \
                          @abs_top_builddir@/gr-trellis/doc \
                          @abs_top_builddir@/gr-trellis/swig/trellis_swig.py \
@@ -762,8 +757,6 @@ EXCLUDE                = @abs_top_builddir@/docs/doxygen/html \
                          @abs_top_builddir@/gnuradio-runtime/lib \
                          @abs_top_srcdir@/gr-analog/lib \
                          @abs_top_builddir@/gr-analog/lib \
-                         @abs_top_srcdir@/gr-atsc/lib \
-                         @abs_top_builddir@/gr-atsc/lib \
                          @abs_top_srcdir@/gr-audio/lib \
                          @abs_top_builddir@/gr-audio/lib \
                          @abs_top_srcdir@/gr-blocks/lib \
@@ -818,7 +811,6 @@ EXCLUDE_PATTERNS       = */.deps/* \
                          */.svn/* \
                          */CVS/* \
                          */__init__.py \
-                         */gr-atsc/src/lib/Gr* \
                          */moc_*.cc \
                          */qa_*.cc \
                          */qa_*.h \
diff --git a/docs/doxygen/other/group_defs.dox b/docs/doxygen/other/group_defs.dox
index 428ac9a8f3..1cb3ff9f97 100644
--- a/docs/doxygen/other/group_defs.dox
+++ b/docs/doxygen/other/group_defs.dox
@@ -68,11 +68,6 @@
  * @{
  */
 
-/*!
- * \defgroup atsc ATSC
- * ATSC Applications...
- */
-
 /*!
  * \defgroup pager Pager
  * Pager Applications
-- 
cgit v1.2.3


From 9bfa5e35d27da1f2ee3935542e98f73c183bcb0d Mon Sep 17 00:00:00 2001
From: Martin Braun <martin.braun@ettus.com>
Date: Mon, 28 Dec 2015 11:51:11 -0800
Subject: cmake: Add mako as dependency for gr-utils

---
 cmake/Packaging/Fedora-15.cmake    |  3 ++-
 cmake/Packaging/Fedora-16.cmake    |  3 ++-
 cmake/Packaging/Fedora-17.cmake    |  1 +
 cmake/Packaging/Fedora-18.cmake    |  1 +
 cmake/Packaging/Ubuntu-10.04.cmake |  1 +
 cmake/Packaging/Ubuntu-10.10.cmake |  1 +
 cmake/Packaging/Ubuntu-11.04.cmake |  1 +
 cmake/Packaging/Ubuntu-11.10.cmake |  1 +
 cmake/Packaging/Ubuntu-12.04.cmake |  1 +
 cmake/Packaging/Ubuntu-12.10.cmake |  1 +
 cmake/Packaging/Ubuntu-13.04.cmake |  1 +
 docs/doxygen/other/build_guide.dox |  1 +
 gr-utils/CMakeLists.txt            | 10 ++++++++++
 13 files changed, 24 insertions(+), 2 deletions(-)

(limited to 'docs/doxygen')

diff --git a/cmake/Packaging/Fedora-15.cmake b/cmake/Packaging/Fedora-15.cmake
index c86dbedbd8..4e648486e1 100644
--- a/cmake/Packaging/Fedora-15.cmake
+++ b/cmake/Packaging/Fedora-15.cmake
@@ -1,7 +1,8 @@
 SET(PACKAGE_DEPENDS_CORE_RUNTIME "fftw-libs")
+SET(PACKAGE_DEPENDS_UTILS "python-mako")
 SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "qt" "qwt")
 SET(PACKAGE_DEPENDS_QTGUI_PYTHON "PyQt4")
-SET(PACKAGE_DEPENDS_GRC "python" "numpy" "gtk2" "python-lxml" "python-cheetah")
+SET(PACKAGE_DEPENDS_GRC "python" "numpy" "gtk2" "python-lxml" "python-cheetah" "python-mako")
 SET(PACKAGE_DEPENDS_WXGUI "wxGTK" "python" "numpy")
 SET(PACKAGE_DEPENDS_VIDEO_SDL_RUNTIME "SDL")
 SET(PACKAGE_DEPENDS_UHD_RUNTIME "uhd")
diff --git a/cmake/Packaging/Fedora-16.cmake b/cmake/Packaging/Fedora-16.cmake
index c86dbedbd8..4e648486e1 100644
--- a/cmake/Packaging/Fedora-16.cmake
+++ b/cmake/Packaging/Fedora-16.cmake
@@ -1,7 +1,8 @@
 SET(PACKAGE_DEPENDS_CORE_RUNTIME "fftw-libs")
+SET(PACKAGE_DEPENDS_UTILS "python-mako")
 SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "qt" "qwt")
 SET(PACKAGE_DEPENDS_QTGUI_PYTHON "PyQt4")
-SET(PACKAGE_DEPENDS_GRC "python" "numpy" "gtk2" "python-lxml" "python-cheetah")
+SET(PACKAGE_DEPENDS_GRC "python" "numpy" "gtk2" "python-lxml" "python-cheetah" "python-mako")
 SET(PACKAGE_DEPENDS_WXGUI "wxGTK" "python" "numpy")
 SET(PACKAGE_DEPENDS_VIDEO_SDL_RUNTIME "SDL")
 SET(PACKAGE_DEPENDS_UHD_RUNTIME "uhd")
diff --git a/cmake/Packaging/Fedora-17.cmake b/cmake/Packaging/Fedora-17.cmake
index ee5460702c..4e7ff51f9f 100644
--- a/cmake/Packaging/Fedora-17.cmake
+++ b/cmake/Packaging/Fedora-17.cmake
@@ -1,4 +1,5 @@
 SET(PACKAGE_DEPENDS_CORE_RUNTIME "fftw-libs")
+SET(PACKAGE_DEPENDS_UTILS "python-mako")
 SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "qt" "qwt")
 SET(PACKAGE_DEPENDS_QTGUI_PYTHON "PyQt4")
 SET(PACKAGE_DEPENDS_GRC "python" "numpy" "gtk2" "python-lxml" "python-cheetah")
diff --git a/cmake/Packaging/Fedora-18.cmake b/cmake/Packaging/Fedora-18.cmake
index ee5460702c..4e7ff51f9f 100644
--- a/cmake/Packaging/Fedora-18.cmake
+++ b/cmake/Packaging/Fedora-18.cmake
@@ -1,4 +1,5 @@
 SET(PACKAGE_DEPENDS_CORE_RUNTIME "fftw-libs")
+SET(PACKAGE_DEPENDS_UTILS "python-mako")
 SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "qt" "qwt")
 SET(PACKAGE_DEPENDS_QTGUI_PYTHON "PyQt4")
 SET(PACKAGE_DEPENDS_GRC "python" "numpy" "gtk2" "python-lxml" "python-cheetah")
diff --git a/cmake/Packaging/Ubuntu-10.04.cmake b/cmake/Packaging/Ubuntu-10.04.cmake
index c297a50a4c..7f0fe82211 100644
--- a/cmake/Packaging/Ubuntu-10.04.cmake
+++ b/cmake/Packaging/Ubuntu-10.04.cmake
@@ -1,4 +1,5 @@
 SET(PACKAGE_DEPENDS_CORE_RUNTIME "libfftw3-3")
+SET(PACKAGE_DEPENDS_UTILS "python-mako")
 SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "libqtcore4" "libqwt5-qt4")
 SET(PACKAGE_DEPENDS_QTGUI_PYTHON "python-qt4" "python-qwt5-qt4")
 SET(PACKAGE_DEPENDS_GRC "python" "python-numpy" "python-gtk2" "python-lxml" "python-cheetah")
diff --git a/cmake/Packaging/Ubuntu-10.10.cmake b/cmake/Packaging/Ubuntu-10.10.cmake
index c297a50a4c..7f0fe82211 100644
--- a/cmake/Packaging/Ubuntu-10.10.cmake
+++ b/cmake/Packaging/Ubuntu-10.10.cmake
@@ -1,4 +1,5 @@
 SET(PACKAGE_DEPENDS_CORE_RUNTIME "libfftw3-3")
+SET(PACKAGE_DEPENDS_UTILS "python-mako")
 SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "libqtcore4" "libqwt5-qt4")
 SET(PACKAGE_DEPENDS_QTGUI_PYTHON "python-qt4" "python-qwt5-qt4")
 SET(PACKAGE_DEPENDS_GRC "python" "python-numpy" "python-gtk2" "python-lxml" "python-cheetah")
diff --git a/cmake/Packaging/Ubuntu-11.04.cmake b/cmake/Packaging/Ubuntu-11.04.cmake
index d08ae1d2c5..b72ff46e70 100644
--- a/cmake/Packaging/Ubuntu-11.04.cmake
+++ b/cmake/Packaging/Ubuntu-11.04.cmake
@@ -1,5 +1,6 @@
 #set the debian package dependencies (parsed by our deb component maker)
 SET(PACKAGE_DEPENDS_CORE_RUNTIME "libfftw3-3")
+SET(PACKAGE_DEPENDS_UTILS "python-mako")
 SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "libqtcore4" "libqwt5-qt4")
 SET(PACKAGE_DEPENDS_QTGUI_PYTHON "python-qt4" "python-qwt5-qt4")
 SET(PACKAGE_DEPENDS_GRC "python" "python-numpy" "python-gtk2" "python-lxml" "python-cheetah")
diff --git a/cmake/Packaging/Ubuntu-11.10.cmake b/cmake/Packaging/Ubuntu-11.10.cmake
index d27cdae532..952eeb6026 100644
--- a/cmake/Packaging/Ubuntu-11.10.cmake
+++ b/cmake/Packaging/Ubuntu-11.10.cmake
@@ -1,4 +1,5 @@
 SET(PACKAGE_DEPENDS_CORE_RUNTIME "libfftw3-3")
+SET(PACKAGE_DEPENDS_UTILS "python-mako")
 SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "libqtcore4" "libqwt6")
 SET(PACKAGE_DEPENDS_QTGUI_PYTHON "python-qt4" "python-qwt5-qt4")
 SET(PACKAGE_DEPENDS_GRC "python" "python-numpy" "python-gtk2" "python-lxml" "python-cheetah")
diff --git a/cmake/Packaging/Ubuntu-12.04.cmake b/cmake/Packaging/Ubuntu-12.04.cmake
index f5ead83182..8d4b8d18d1 100644
--- a/cmake/Packaging/Ubuntu-12.04.cmake
+++ b/cmake/Packaging/Ubuntu-12.04.cmake
@@ -1,4 +1,5 @@
 SET(PACKAGE_DEPENDS_CORE_RUNTIME "libfftw3-3")
+SET(PACKAGE_DEPENDS_UTILS "python-mako")
 SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "libqtcore4" "libqwt6")
 SET(PACKAGE_DEPENDS_QTGUI_PYTHON "python-qt4" "python-qwt5-qt4")
 SET(PACKAGE_DEPENDS_GRC "python" "python-numpy" "python-gtk2" "python-lxml" "python-cheetah")
diff --git a/cmake/Packaging/Ubuntu-12.10.cmake b/cmake/Packaging/Ubuntu-12.10.cmake
index f5ead83182..8d4b8d18d1 100644
--- a/cmake/Packaging/Ubuntu-12.10.cmake
+++ b/cmake/Packaging/Ubuntu-12.10.cmake
@@ -1,4 +1,5 @@
 SET(PACKAGE_DEPENDS_CORE_RUNTIME "libfftw3-3")
+SET(PACKAGE_DEPENDS_UTILS "python-mako")
 SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "libqtcore4" "libqwt6")
 SET(PACKAGE_DEPENDS_QTGUI_PYTHON "python-qt4" "python-qwt5-qt4")
 SET(PACKAGE_DEPENDS_GRC "python" "python-numpy" "python-gtk2" "python-lxml" "python-cheetah")
diff --git a/cmake/Packaging/Ubuntu-13.04.cmake b/cmake/Packaging/Ubuntu-13.04.cmake
index 40f748fdff..ed14b1ab22 100644
--- a/cmake/Packaging/Ubuntu-13.04.cmake
+++ b/cmake/Packaging/Ubuntu-13.04.cmake
@@ -1,4 +1,5 @@
 SET(PACKAGE_DEPENDS_GRUEL_RUNTIME "libboost-all-dev" "libc6")
+SET(PACKAGE_DEPENDS_UTILS "python-mako")
 SET(PACKAGE_DEPENDS_GRUEL_PYTHON "python" "python-numpy")
 SET(PACKAGE_DEPENDS_CORE_RUNTIME "libfftw3-3")
 SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "libqtcore4" "libqwt6")
diff --git a/docs/doxygen/other/build_guide.dox b/docs/doxygen/other/build_guide.dox
index 8fc3f911fb..87e5a456f3 100644
--- a/docs/doxygen/other/build_guide.dox
+++ b/docs/doxygen/other/build_guide.dox
@@ -29,6 +29,7 @@ first. Most recent systems have these packages available.
 \li boost       (>= 1.35)    http://www.boost.org/users/download/
 \li cppunit     (>= 1.9.14)  http://freedesktop.org/wiki/Software/cppunit/
 \li fftw3f      (>= 3.0.1)   http://www.fftw.org/download.html
+\li mako        (>= 0.4.2)   http://www.makotemplates.org/download.html
 
 \subsection dep_python Python Wrappers
 \li python      (>= 2.5)     http://www.python.org/download/
diff --git a/gr-utils/CMakeLists.txt b/gr-utils/CMakeLists.txt
index 7985535aa8..b9d3763e48 100644
--- a/gr-utils/CMakeLists.txt
+++ b/gr-utils/CMakeLists.txt
@@ -20,14 +20,24 @@
 ########################################################################
 # Setup dependencies
 ########################################################################
+include(GrPython)
+
+GR_PYTHON_CHECK_MODULE("Mako >= 0.4.2" mako "mako.__version__ >= '0.4.2'" MAKO_FOUND)
 
 ########################################################################
 # Register component
 ########################################################################
 include(GrComponent)
+if(NOT CMAKE_CROSSCOMPILING)
+    set(utils_python_deps
+        MAKO_FOUND
+    )
+endif(NOT CMAKE_CROSSCOMPILING)
+
 GR_REGISTER_COMPONENT("gr-utils" ENABLE_GR_UTILS
     ENABLE_GNURADIO_RUNTIME
     ENABLE_PYTHON
+    ${utils_python_deps}
 )
 
 ########################################################################
-- 
cgit v1.2.3


From c7692c32cd91c0e98672ce0e997d35f9d3461dd3 Mon Sep 17 00:00:00 2001
From: Johnathan Corgan <johnathan@corganlabs.com>
Date: Wed, 3 Aug 2016 13:47:27 -0700
Subject: cmake: nuke cpack from existence

CPack is not used, unmaintaned, and broken.

This does not eliminate any MSVC build functionality.
---
 CMakeLists.txt                                     |  46 -
 cmake/Modules/GrMiscUtils.cmake                    |  13 +-
 cmake/Modules/GrPackage.cmake                      | 182 ----
 cmake/Modules/GrPython.cmake                       |   4 +-
 cmake/Modules/GrSwig.cmake                         |   5 +-
 cmake/Modules/NSIS.InstallOptions.ini.in           |  37 -
 cmake/Modules/NSIS.template.in                     | 951 ---------------------
 cmake/Packaging/Fedora-15.cmake                    |  11 -
 cmake/Packaging/Fedora-16.cmake                    |  11 -
 cmake/Packaging/Fedora-17.cmake                    |  11 -
 cmake/Packaging/Fedora-18.cmake                    |  11 -
 cmake/Packaging/Ubuntu-10.04.cmake                 |  11 -
 cmake/Packaging/Ubuntu-10.10.cmake                 |  11 -
 cmake/Packaging/Ubuntu-11.04.cmake                 |  12 -
 cmake/Packaging/Ubuntu-11.10.cmake                 |  11 -
 cmake/Packaging/Ubuntu-12.04.cmake                 |  11 -
 cmake/Packaging/Ubuntu-12.10.cmake                 |  11 -
 cmake/Packaging/Ubuntu-13.04.cmake                 |  13 -
 cmake/Packaging/Ubuntu-15.10.cmake                 |  13 -
 cmake/Packaging/post_install.in                    |   4 -
 cmake/Packaging/post_uninstall.in                  |   3 -
 cmake/Packaging/postinst.in                        |   6 -
 cmake/Packaging/postrm.in                          |   5 -
 cmake/Packaging/pre_install.in                     |   1 -
 cmake/Packaging/pre_uninstall.in                   |   3 -
 cmake/Packaging/preinst.in                         |   5 -
 cmake/Packaging/prerm.in                           |   5 -
 docs/CMakeLists.txt                                |  17 -
 docs/doxygen/CMakeLists.txt                        |   2 +-
 docs/exploring-gnuradio/CMakeLists.txt             |   1 -
 gnuradio-runtime/CMakeLists.txt                    |  36 -
 gnuradio-runtime/apps/CMakeLists.txt               |   1 -
 gnuradio-runtime/examples/mp-sched/CMakeLists.txt  |   2 -
 gnuradio-runtime/examples/network/CMakeLists.txt   |   2 -
 .../examples/volk_benchmark/CMakeLists.txt         |   2 -
 gnuradio-runtime/include/gnuradio/CMakeLists.txt   |   2 -
 .../include/gnuradio/messages/CMakeLists.txt       |   1 -
 .../include/gnuradio/thread/CMakeLists.txt         |   1 -
 gnuradio-runtime/include/pmt/CMakeLists.txt        |   2 +-
 gnuradio-runtime/lib/CMakeLists.txt                |   4 +-
 gnuradio-runtime/lib/controlport/CMakeLists.txt    |   1 -
 gnuradio-runtime/lib/pmt/CMakeLists.txt            |   5 +-
 gnuradio-runtime/python/gnuradio/CMakeLists.txt    |   1 -
 .../python/gnuradio/ctrlport/CMakeLists.txt        |   5 -
 gnuradio-runtime/python/gnuradio/gr/CMakeLists.txt |   1 -
 .../python/gnuradio/gru/CMakeLists.txt             |   1 -
 gnuradio-runtime/python/pmt/CMakeLists.txt         |   1 -
 gnuradio-runtime/swig/CMakeLists.txt               |   3 -
 gr-analog/CMakeLists.txt                           |  35 -
 gr-analog/examples/CMakeLists.txt                  |   2 -
 gr-analog/examples/tags/CMakeLists.txt             |   1 -
 gr-analog/grc/CMakeLists.txt                       |   3 +-
 gr-analog/include/gnuradio/analog/CMakeLists.txt   |   1 -
 gr-analog/lib/CMakeLists.txt                       |   4 +-
 gr-analog/python/analog/CMakeLists.txt             |   1 -
 gr-analog/swig/CMakeLists.txt                      |   2 -
 gr-audio/CMakeLists.txt                            |  42 -
 gr-audio/examples/c++/CMakeLists.txt               |   1 -
 gr-audio/examples/grc/CMakeLists.txt               |   1 -
 gr-audio/examples/python/CMakeLists.txt            |   1 -
 gr-audio/grc/CMakeLists.txt                        |   2 +-
 gr-audio/include/gnuradio/audio/CMakeLists.txt     |   1 -
 gr-audio/lib/CMakeLists.txt                        |   6 +-
 gr-audio/python/audio/CMakeLists.txt               |   1 -
 gr-audio/swig/CMakeLists.txt                       |   2 -
 gr-blocks/CMakeLists.txt                           |  35 -
 gr-blocks/examples/CMakeLists.txt                  |   3 +-
 gr-blocks/examples/ctrlport/CMakeLists.txt         |   2 -
 gr-blocks/examples/metadata/CMakeLists.txt         |   1 -
 gr-blocks/examples/msg_passing/CMakeLists.txt      |   1 -
 gr-blocks/examples/tags/CMakeLists.txt             |   2 -
 gr-blocks/grc/CMakeLists.txt                       |   2 +-
 gr-blocks/include/gnuradio/blocks/CMakeLists.txt   |   2 -
 gr-blocks/lib/CMakeLists.txt                       |   4 +-
 gr-blocks/python/blocks/CMakeLists.txt             |   1 -
 gr-blocks/python/grc_gnuradio/CMakeLists.txt       |   2 -
 gr-blocks/swig/CMakeLists.txt                      |   5 +-
 gr-channels/CMakeLists.txt                         |  35 -
 gr-channels/examples/CMakeLists.txt                |   1 -
 gr-channels/grc/CMakeLists.txt                     |   2 +-
 .../include/gnuradio/channels/CMakeLists.txt       |   1 -
 gr-channels/lib/CMakeLists.txt                     |   4 +-
 gr-channels/python/channels/CMakeLists.txt         |   1 -
 gr-channels/swig/CMakeLists.txt                    |   2 -
 gr-comedi/CMakeLists.txt                           |  35 -
 gr-comedi/include/gnuradio/comedi/CMakeLists.txt   |   1 -
 gr-comedi/lib/CMakeLists.txt                       |   4 +-
 gr-comedi/python/comedi/CMakeLists.txt             |   1 -
 gr-comedi/swig/CMakeLists.txt                      |   2 -
 gr-digital/CMakeLists.txt                          |  35 -
 gr-digital/examples/CMakeLists.txt                 |   7 -
 gr-digital/grc/CMakeLists.txt                      |   2 +-
 gr-digital/include/gnuradio/digital/CMakeLists.txt |   1 -
 gr-digital/lib/CMakeLists.txt                      |   4 +-
 gr-digital/python/digital/CMakeLists.txt           |   2 -
 gr-digital/python/grc_gnuradio/CMakeLists.txt      |   1 -
 gr-digital/swig/CMakeLists.txt                     |   2 -
 gr-dtv/CMakeLists.txt                              |  35 -
 gr-dtv/apps/CMakeLists.txt                         |   1 -
 gr-dtv/examples/CMakeLists.txt                     |   2 -
 gr-dtv/grc/CMakeLists.txt                          |   1 -
 gr-dtv/include/gnuradio/dtv/CMakeLists.txt         |   1 -
 gr-dtv/lib/CMakeLists.txt                          |   4 +-
 gr-dtv/python/dtv/CMakeLists.txt                   |   1 -
 gr-dtv/swig/CMakeLists.txt                         |   2 -
 gr-fec/CMakeLists.txt                              |  35 -
 gr-fec/apps/CMakeLists.txt                         |   2 -
 gr-fec/examples/CMakeLists.txt                     |   1 -
 gr-fec/grc/CMakeLists.txt                          |   6 +-
 gr-fec/include/gnuradio/fec/CMakeLists.txt         |   5 +-
 gr-fec/lib/CMakeLists.txt                          |   4 +-
 gr-fec/lib/reed-solomon/CMakeLists.txt             |   1 -
 gr-fec/lib/viterbi/CMakeLists.txt                  |   1 -
 gr-fec/python/fec/CMakeLists.txt                   |   1 -
 gr-fec/python/fec/LDPC/CMakeLists.txt              |   3 +-
 gr-fec/python/fec/polar/CMakeLists.txt             |   4 -
 gr-fec/swig/CMakeLists.txt                         |   2 -
 gr-fft/CMakeLists.txt                              |  35 -
 gr-fft/grc/CMakeLists.txt                          |   1 -
 gr-fft/include/gnuradio/fft/CMakeLists.txt         |   3 -
 gr-fft/lib/CMakeLists.txt                          |   4 +-
 gr-fft/python/fft/CMakeLists.txt                   |   1 -
 gr-fft/swig/CMakeLists.txt                         |   2 -
 gr-filter/CMakeLists.txt                           |  35 -
 gr-filter/apps/CMakeLists.txt                      |   1 -
 gr-filter/examples/CMakeLists.txt                  |   2 -
 gr-filter/grc/CMakeLists.txt                       |   1 -
 gr-filter/include/gnuradio/filter/CMakeLists.txt   |   1 -
 gr-filter/lib/CMakeLists.txt                       |   4 +-
 gr-filter/python/filter/CMakeLists.txt             |   1 -
 gr-filter/python/filter/design/CMakeLists.txt      |   1 -
 gr-filter/python/filter/gui/CMakeLists.txt         |   1 -
 gr-filter/swig/CMakeLists.txt                      |   2 -
 gr-qtgui/CMakeLists.txt                            |  37 -
 gr-qtgui/apps/CMakeLists.txt                       |   2 -
 gr-qtgui/examples/CMakeLists.txt                   |   2 -
 gr-qtgui/examples/c++/CMakeLists.txt               |   1 -
 gr-qtgui/grc/CMakeLists.txt                        |   2 +-
 gr-qtgui/include/gnuradio/qtgui/CMakeLists.txt     |   1 -
 gr-qtgui/lib/CMakeLists.txt                        |   4 +-
 gr-qtgui/python/qtgui/CMakeLists.txt               |   1 -
 gr-qtgui/swig/CMakeLists.txt                       |   2 -
 gr-trellis/CMakeLists.txt                          |  48 --
 gr-trellis/doc/CMakeLists.txt                      |   2 -
 gr-trellis/examples/grc/CMakeLists.txt             |   1 -
 gr-trellis/examples/python/CMakeLists.txt          |   3 -
 gr-trellis/grc/CMakeLists.txt                      |   1 -
 gr-trellis/include/gnuradio/trellis/CMakeLists.txt |   1 -
 gr-trellis/lib/CMakeLists.txt                      |   4 +-
 gr-trellis/python/trellis/CMakeLists.txt           |   1 -
 gr-trellis/swig/CMakeLists.txt                     |   2 -
 gr-uhd/CMakeLists.txt                              |  42 -
 gr-uhd/apps/CMakeLists.txt                         |   7 -
 gr-uhd/examples/c++/CMakeLists.txt                 |   1 -
 gr-uhd/examples/grc/CMakeLists.txt                 |   1 -
 gr-uhd/examples/python/CMakeLists.txt              |   1 -
 gr-uhd/grc/CMakeLists.txt                          |   1 -
 gr-uhd/include/gnuradio/uhd/CMakeLists.txt         |   1 -
 gr-uhd/lib/CMakeLists.txt                          |   4 +-
 gr-uhd/python/uhd/CMakeLists.txt                   |   1 -
 gr-uhd/swig/CMakeLists.txt                         |   2 -
 gr-utils/CMakeLists.txt                            |  10 -
 gr-utils/python/modtool/CMakeLists.txt             |   3 -
 .../gr-newmod/cmake/Modules/GrMiscUtils.cmake      |  12 +-
 .../modtool/gr-newmod/cmake/Modules/GrPython.cmake |   4 +-
 .../modtool/gr-newmod/cmake/Modules/GrSwig.cmake   |   5 +-
 .../python/modtool/gr-newmod/lib/CMakeLists.txt    |   3 +-
 gr-utils/python/utils/CMakeLists.txt               |   2 -
 gr-video-sdl/CMakeLists.txt                        |  35 -
 gr-video-sdl/grc/CMakeLists.txt                    |   2 -
 .../include/gnuradio/video_sdl/CMakeLists.txt      |   1 -
 gr-video-sdl/lib/CMakeLists.txt                    |   4 +-
 gr-video-sdl/python/video_sdl/CMakeLists.txt       |   1 -
 gr-video-sdl/swig/CMakeLists.txt                   |   2 -
 gr-vocoder/CMakeLists.txt                          |  42 -
 gr-vocoder/examples/CMakeLists.txt                 |   1 -
 gr-vocoder/grc/CMakeLists.txt                      |   1 -
 gr-vocoder/include/gnuradio/vocoder/CMakeLists.txt |   1 -
 gr-vocoder/lib/CMakeLists.txt                      |   4 +-
 gr-vocoder/python/vocoder/CMakeLists.txt           |   1 -
 gr-vocoder/swig/CMakeLists.txt                     |   2 -
 gr-wavelet/CMakeLists.txt                          |  35 -
 gr-wavelet/include/gnuradio/wavelet/CMakeLists.txt |   1 -
 gr-wavelet/lib/CMakeLists.txt                      |   4 +-
 gr-wavelet/python/wavelet/CMakeLists.txt           |   1 -
 gr-wavelet/swig/CMakeLists.txt                     |   2 -
 gr-wxgui/CMakeLists.txt                            |  33 -
 gr-wxgui/grc/CMakeLists.txt                        |   3 +-
 gr-wxgui/include/gnuradio/wxgui/CMakeLists.txt     |   1 -
 gr-wxgui/lib/CMakeLists.txt                        |   6 +-
 gr-wxgui/python/wxgui/CMakeLists.txt               |   3 -
 gr-wxgui/swig/CMakeLists.txt                       |   2 -
 gr-zeromq/CMakeLists.txt                           |  36 -
 gr-zeromq/examples/CMakeLists.txt                  |   1 -
 gr-zeromq/include/gnuradio/zeromq/CMakeLists.txt   |   1 -
 gr-zeromq/lib/CMakeLists.txt                       |   4 +-
 gr-zeromq/swig/CMakeLists.txt                      |   2 -
 grc/CMakeLists.txt                                 |  24 -
 grc/blocks/CMakeLists.txt                          |   1 -
 grc/core/CMakeLists.txt                            |   2 -
 grc/core/generator/CMakeLists.txt                  |   2 -
 grc/core/utils/CMakeLists.txt                      |   1 -
 grc/gui/CMakeLists.txt                             |   1 -
 grc/scripts/CMakeLists.txt                         |   1 -
 grc/scripts/freedesktop/CMakeLists.txt             |   3 +-
 205 files changed, 74 insertions(+), 2422 deletions(-)
 delete mode 100644 cmake/Modules/GrPackage.cmake
 delete mode 100644 cmake/Modules/NSIS.InstallOptions.ini.in
 delete mode 100644 cmake/Modules/NSIS.template.in
 delete mode 100644 cmake/Packaging/Fedora-15.cmake
 delete mode 100644 cmake/Packaging/Fedora-16.cmake
 delete mode 100644 cmake/Packaging/Fedora-17.cmake
 delete mode 100644 cmake/Packaging/Fedora-18.cmake
 delete mode 100644 cmake/Packaging/Ubuntu-10.04.cmake
 delete mode 100644 cmake/Packaging/Ubuntu-10.10.cmake
 delete mode 100644 cmake/Packaging/Ubuntu-11.04.cmake
 delete mode 100644 cmake/Packaging/Ubuntu-11.10.cmake
 delete mode 100644 cmake/Packaging/Ubuntu-12.04.cmake
 delete mode 100644 cmake/Packaging/Ubuntu-12.10.cmake
 delete mode 100644 cmake/Packaging/Ubuntu-13.04.cmake
 delete mode 100644 cmake/Packaging/Ubuntu-15.10.cmake
 delete mode 100755 cmake/Packaging/post_install.in
 delete mode 100755 cmake/Packaging/post_uninstall.in
 delete mode 100755 cmake/Packaging/postinst.in
 delete mode 100755 cmake/Packaging/postrm.in
 delete mode 100755 cmake/Packaging/pre_install.in
 delete mode 100755 cmake/Packaging/pre_uninstall.in
 delete mode 100755 cmake/Packaging/preinst.in
 delete mode 100755 cmake/Packaging/prerm.in

(limited to 'docs/doxygen')

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4bcd58ff48..cb912ee4ae 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -301,27 +301,6 @@ GR_REGISTER_COMPONENT("testing-support" ENABLE_TESTING
     CPPUNIT_FOUND
 )
 
-########################################################################
-# Add optional dlls specified in DLL_PATHS
-########################################################################
-foreach(path ${DLL_PATHS})
-    file(GLOB _dlls "${path}/*.dll")
-    list(APPEND ALL_DLL_FILES ${_dlls})
-endforeach(path)
-if(DEFINED ALL_DLL_FILES)
-    include(GrPackage)
-    CPACK_COMPONENT("extra_dlls"
-        DISPLAY_NAME "Extra DLLs"
-        DESCRIPTION  "Extra DLLs for runtime dependency requirements"
-    )
-    message(STATUS "")
-    message(STATUS "Including the following dlls into the install:")
-    foreach(_dll ${ALL_DLL_FILES})
-        message(STATUS "  ${_dll}")
-    endforeach(_dll)
-    install(FILES ${ALL_DLL_FILES} DESTINATION ${GR_RUNTIME_DIR} COMPONENT "extra_dlls")
-endif()
-
 ########################################################################
 # Setup volk as a subproject
 ########################################################################
@@ -372,25 +351,6 @@ if(NOT VOLK_FOUND)
 
     set(VOLK_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_PREFIX}/lib)
     set(VOLK_INSTALL_INCLUDE_DIR ${CMAKE_INSTALL_PREFIX}/include)
-
-    if(ENABLE_VOLK)
-
-        include(GrPackage)
-        CPACK_SET(CPACK_COMPONENT_GROUP_VOLK_DESCRIPTION "Vector optimized library of kernels")
-
-        CPACK_COMPONENT("volk_runtime"
-            GROUP        "Volk"
-            DISPLAY_NAME "Runtime"
-            DESCRIPTION  "Dynamic link libraries"
-        )
-
-        CPACK_COMPONENT("volk_devel"
-            GROUP        "Volk"
-            DISPLAY_NAME "Development"
-            DESCRIPTION  "C++ headers, package config, import libraries"
-        )
-
-    endif(ENABLE_VOLK)
 else()
     message(STATUS "  An external VOLK has been found and will be used for build.")
     set(ENABLE_VOLK TRUE)
@@ -410,7 +370,6 @@ GR_LOGGING()
 install(
     FILES README README.hacking
     DESTINATION ${GR_PKG_DOC_DIR}
-    COMPONENT "docs"
 )
 
 ########################################################################
@@ -501,12 +460,8 @@ list(REMOVE_ITEM cmake_others
 install(
   FILES ${cmake_configs} ${cmake_others}
   DESTINATION ${CMAKE_MODULES_DIR}/gnuradio
-  COMPONENT "runtime_devel"
 )
 
-#finalize cpack after subdirs processed
-include(GrPackage)
-CPACK_FINALIZE()
 
 ########################################################################
 # Print summary
@@ -533,5 +488,4 @@ install(
     FILES
     ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-runtime/include/gnuradio/config.h
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio
-    COMPONENT "runtime_devel"
 )
diff --git a/cmake/Modules/GrMiscUtils.cmake b/cmake/Modules/GrMiscUtils.cmake
index 188c40480b..f005e35bab 100644
--- a/cmake/Modules/GrMiscUtils.cmake
+++ b/cmake/Modules/GrMiscUtils.cmake
@@ -108,7 +108,6 @@ endmacro(GR_ADD_CXX_COMPILER_FLAG_IF_AVAILABLE)
 # Generates the .la libtool file
 # This appears to generate libtool files that cannot be used by auto*.
 # Usage GR_LIBTOOL(TARGET [target] DESTINATION [dest])
-# Notice: there is not COMPONENT option, these will not get distributed.
 ########################################################################
 function(GR_LIBTOOL)
     if(NOT DEFINED GENERATE_LIBTOOL)
@@ -135,18 +134,14 @@ endfunction(GR_LIBTOOL)
 # Also handle gnuradio custom naming conventions w/ extras mode.
 ########################################################################
 function(GR_LIBRARY_FOO target)
-    #parse the arguments for component names
-    include(CMakeParseArgumentsCopy)
-    CMAKE_PARSE_ARGUMENTS(GR_LIBRARY "" "RUNTIME_COMPONENT;DEVEL_COMPONENT" "" ${ARGN})
-
     #set additional target properties
     set_target_properties(${target} PROPERTIES SOVERSION ${LIBVER})
 
     #install the generated files like so...
     install(TARGETS ${target}
-        LIBRARY DESTINATION ${GR_LIBRARY_DIR} COMPONENT ${GR_LIBRARY_RUNTIME_COMPONENT} # .so/.dylib file
-        ARCHIVE DESTINATION ${GR_LIBRARY_DIR} COMPONENT ${GR_LIBRARY_DEVEL_COMPONENT}   # .lib file
-        RUNTIME DESTINATION ${GR_RUNTIME_DIR} COMPONENT ${GR_LIBRARY_RUNTIME_COMPONENT} # .dll file
+        LIBRARY DESTINATION ${GR_LIBRARY_DIR} # .so/.dylib file
+        ARCHIVE DESTINATION ${GR_LIBRARY_DIR} # .lib file
+        RUNTIME DESTINATION ${GR_RUNTIME_DIR} # .dll file
     )
 
     #extras mode enabled automatically on linux
@@ -178,7 +173,7 @@ function(GR_LIBRARY_FOO target)
             FILES
             ${CMAKE_CURRENT_BINARY_DIR}/lib${target}.so
             ${CMAKE_CURRENT_BINARY_DIR}/lib${target}-${LIBVER}.so.0
-            DESTINATION ${GR_LIBRARY_DIR} COMPONENT ${GR_LIBRARY_RUNTIME_COMPONENT}
+            DESTINATION ${GR_LIBRARY_DIR}
         )
 
     endif(LIBRARY_EXTRAS)
diff --git a/cmake/Modules/GrPackage.cmake b/cmake/Modules/GrPackage.cmake
deleted file mode 100644
index 54a752661d..0000000000
--- a/cmake/Modules/GrPackage.cmake
+++ /dev/null
@@ -1,182 +0,0 @@
-# Copyright 2011 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-
-if(DEFINED __INCLUDED_GR_PACKAGE_CMAKE)
-    return()
-endif()
-set(__INCLUDED_GR_PACKAGE_CMAKE TRUE)
-
-include(GrVersion) #sets version information
-include(GrPlatform) #sets platform information
-
-#set the cpack generator based on the platform type
-if(CPACK_GENERATOR)
-    #already set by user
-elseif(APPLE)
-    set(CPACK_GENERATOR PackageMaker)
-elseif(WIN32)
-    set(CPACK_GENERATOR NSIS)
-elseif(DEBIAN)
-    set(CPACK_GENERATOR DEB)
-elseif(REDHAT)
-    set(CPACK_GENERATOR RPM)
-else()
-    set(CPACK_GENERATOR TGZ)
-endif()
-
-########################################################################
-# CPACK_SET - set a global variable and record the variable name
-########################################################################
-function(CPACK_SET var)
-    set(${var} ${ARGN} CACHE INTERNAL "")
-    list(APPEND _cpack_vars ${var})
-    list(REMOVE_DUPLICATES _cpack_vars)
-    set(_cpack_vars ${_cpack_vars} CACHE INTERNAL "")
-endfunction(CPACK_SET)
-
-########################################################################
-# CPACK_FINALIZE - include cpack and the unset all the cpack variables
-########################################################################
-function(CPACK_FINALIZE)
-
-    #set the package depends for monolithic package
-    foreach(comp ${CPACK_COMPONENTS_ALL})
-        string(TOUPPER "PACKAGE_DEPENDS_${comp}" package_depends_var)
-        list(APPEND PACKAGE_DEPENDS_ALL ${${package_depends_var}})
-    endforeach(comp)
-    string(REPLACE ";" ", " CPACK_DEBIAN_PACKAGE_DEPENDS "${PACKAGE_DEPENDS_ALL}")
-    string(REPLACE ";" ", " CPACK_RPM_PACKAGE_REQUIRES "${PACKAGE_DEPENDS_ALL}")
-
-    include(CPack) #finalize the cpack settings configured throughout the build system
-    foreach(var ${_cpack_vars})
-        unset(${var} CACHE)
-    endforeach(var)
-    unset(_cpack_vars CACHE)
-endfunction(CPACK_FINALIZE)
-
-########################################################################
-# CPACK_COMPONENT - convenience function to create a cpack component
-#
-# Usage: CPACK_COMPONENT(
-#   name
-#   [GROUP group]
-#   [DISPLAY_NAME display_name]
-#   [DESCRIPTION description]
-#   [DEPENDS depends]
-# )
-########################################################################
-function(CPACK_COMPONENT name)
-    include(CMakeParseArgumentsCopy)
-    set(_options GROUP DISPLAY_NAME DESCRIPTION DEPENDS)
-    CMAKE_PARSE_ARGUMENTS(CPACK_COMPONENT "" "${_options}" "" ${ARGN})
-
-    string(TOUPPER "${name}" name_upper)
-    foreach(_option ${_options})
-        if(CPACK_COMPONENT_${_option})
-            CPACK_SET(CPACK_COMPONENT_${name_upper}_${_option} "${CPACK_COMPONENT_${_option}}")
-        endif()
-    endforeach(_option)
-
-    CPACK_SET(CPACK_COMPONENTS_ALL "${CPACK_COMPONENTS_ALL};${name}")
-
-endfunction(CPACK_COMPONENT)
-
-########################################################################
-# Setup CPack
-########################################################################
-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "GNU Radio - The GNU Software Radio")
-set(CPACK_PACKAGE_VENDOR              "Free Software Foundation, Inc.")
-set(CPACK_PACKAGE_CONTACT             "Discuss GNURadio <discuss-gnuradio@gnu.org>")
-string(REPLACE "v" "" CPACK_PACKAGE_VERSION ${VERSION})
-set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/README)
-set(CPACK_RESOURCE_FILE_README ${CMAKE_SOURCE_DIR}/README)
-set(CPACK_RESOURCE_FILE_WELCOME ${CMAKE_SOURCE_DIR}/README)
-
-find_program(LSB_RELEASE_EXECUTABLE lsb_release)
-
-if((DEBIAN OR REDHAT) AND LSB_RELEASE_EXECUTABLE)
-
-    #extract system information by executing the commands
-    execute_process(
-        COMMAND ${LSB_RELEASE_EXECUTABLE} --short --id
-        OUTPUT_VARIABLE LSB_ID OUTPUT_STRIP_TRAILING_WHITESPACE
-    )
-    execute_process(
-        COMMAND ${LSB_RELEASE_EXECUTABLE} --short --release
-        OUTPUT_VARIABLE LSB_RELEASE OUTPUT_STRIP_TRAILING_WHITESPACE
-    )
-
-    #set a more sensible package name for this system
-    SET(CPACK_PACKAGE_FILE_NAME "gnuradio_${CPACK_PACKAGE_VERSION}_${LSB_ID}-${LSB_RELEASE}-${CMAKE_SYSTEM_PROCESSOR}")
-
-    #now try to include the component based dependencies
-    set(package_deps_file "${CMAKE_SOURCE_DIR}/cmake/Packaging/${LSB_ID}-${LSB_RELEASE}.cmake")
-    if (EXISTS ${package_deps_file})
-        include(${package_deps_file})
-    endif()
-
-endif()
-
-if(${CPACK_GENERATOR} STREQUAL NSIS)
-
-    ENABLE_LANGUAGE(C)
-
-    include(CheckTypeSize)
-    check_type_size("void*[8]" BIT_WIDTH BUILTIN_TYPES_ONLY)
-    SET(CPACK_PACKAGE_FILE_NAME "gnuradio_${CPACK_PACKAGE_VERSION}_Win${BIT_WIDTH}")
-
-    set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CMAKE_PROJECT_NAME}")
-endif()
-
-########################################################################
-# DEB package specific
-########################################################################
-foreach(filename preinst postinst prerm postrm)
-    list(APPEND CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA ${CMAKE_BINARY_DIR}/Packaging/${filename})
-    file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/Packaging)
-    configure_file(
-        ${CMAKE_SOURCE_DIR}/cmake/Packaging/${filename}.in
-        ${CMAKE_BINARY_DIR}/Packaging/${filename}
-    @ONLY)
-endforeach(filename)
-
-########################################################################
-# RPM package specific
-########################################################################
-foreach(filename post_install post_uninstall pre_install pre_uninstall)
-    string(TOUPPER ${filename} filename_upper)
-    list(APPEND CPACK_RPM_${filename_upper}_SCRIPT_FILE ${CMAKE_BINARY_DIR}/Packaging/${filename})
-    file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/Packaging)
-    configure_file(
-        ${CMAKE_SOURCE_DIR}/cmake/Packaging/${filename}.in
-        ${CMAKE_BINARY_DIR}/Packaging/${filename}
-    @ONLY)
-endforeach(filename)
-
-########################################################################
-# NSIS package specific
-########################################################################
-set(CPACK_NSIS_MODIFY_PATH ON)
-
-set(HLKM_ENV "\\\"SYSTEM\\\\CurrentControlSet\\\\Control\\\\Session Manager\\\\Environment\\\"")
-
-IF(WIN32)
-    #Install necessary runtime DLL's
-    INCLUDE(InstallRequiredSystemLibraries)
-ENDIF(WIN32)
diff --git a/cmake/Modules/GrPython.cmake b/cmake/Modules/GrPython.cmake
index 06e061e212..0bfa92db8d 100644
--- a/cmake/Modules/GrPython.cmake
+++ b/cmake/Modules/GrPython.cmake
@@ -130,7 +130,7 @@ endfunction(GR_UNIQUE_TARGET)
 ########################################################################
 function(GR_PYTHON_INSTALL)
     include(CMakeParseArgumentsCopy)
-    CMAKE_PARSE_ARGUMENTS(GR_PYTHON_INSTALL "" "DESTINATION;COMPONENT" "FILES;PROGRAMS" ${ARGN})
+    CMAKE_PARSE_ARGUMENTS(GR_PYTHON_INSTALL "" "DESTINATION" "FILES;PROGRAMS" ${ARGN})
 
     ####################################################################
     if(GR_PYTHON_INSTALL_FILES)
@@ -182,7 +182,6 @@ function(GR_PYTHON_INSTALL)
         set(python_install_gen_targets ${pycfiles} ${pyofiles})
         install(FILES ${python_install_gen_targets}
             DESTINATION ${GR_PYTHON_INSTALL_DESTINATION}
-            COMPONENT ${GR_PYTHON_INSTALL_COMPONENT}
         )
 
     ####################################################################
@@ -219,7 +218,6 @@ function(GR_PYTHON_INSTALL)
 
             install(PROGRAMS ${pyexefile} RENAME ${pyfile_name}
                 DESTINATION ${GR_PYTHON_INSTALL_DESTINATION}
-                COMPONENT ${GR_PYTHON_INSTALL_COMPONENT}
             )
         endforeach(pyfile)
 
diff --git a/cmake/Modules/GrSwig.cmake b/cmake/Modules/GrSwig.cmake
index ef3a76eb4c..400cde295d 100644
--- a/cmake/Modules/GrSwig.cmake
+++ b/cmake/Modules/GrSwig.cmake
@@ -202,24 +202,21 @@ endmacro(GR_SWIG_MAKE)
 # GR_SWIG_INSTALL(
 #   TARGETS target target target...
 #   [DESTINATION destination]
-#   [COMPONENT component]
 # )
 ########################################################################
 macro(GR_SWIG_INSTALL)
 
     include(CMakeParseArgumentsCopy)
-    CMAKE_PARSE_ARGUMENTS(GR_SWIG_INSTALL "" "DESTINATION;COMPONENT" "TARGETS" ${ARGN})
+    CMAKE_PARSE_ARGUMENTS(GR_SWIG_INSTALL "" "DESTINATION" "TARGETS" ${ARGN})
 
     foreach(name ${GR_SWIG_INSTALL_TARGETS})
         install(TARGETS ${SWIG_MODULE_${name}_REAL_NAME}
             DESTINATION ${GR_SWIG_INSTALL_DESTINATION}
-            COMPONENT ${GR_SWIG_INSTALL_COMPONENT}
         )
 
         include(GrPython)
         GR_PYTHON_INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${name}.py
             DESTINATION ${GR_SWIG_INSTALL_DESTINATION}
-            COMPONENT ${GR_SWIG_INSTALL_COMPONENT}
         )
 
         GR_LIBTOOL(
diff --git a/cmake/Modules/NSIS.InstallOptions.ini.in b/cmake/Modules/NSIS.InstallOptions.ini.in
deleted file mode 100644
index 46b6c1605b..0000000000
--- a/cmake/Modules/NSIS.InstallOptions.ini.in
+++ /dev/null
@@ -1,37 +0,0 @@
-[Settings]
-NumFields=4
-
-[Field 1]
-Type=label
-Text=By default GNU Radio does not add its directory to the system PATH.
-Left=0
-Right=-1
-Top=0
-Bottom=20
-
-[Field 2]
-Type=radiobutton
-Text=Do not add GNU Radio to the system PATH
-Left=0
-Right=-1
-Top=30
-Bottom=40
-State=1
-
-[Field 3]
-Type=radiobutton
-Text=Add GNU Radio to the system PATH for all users
-Left=0
-Right=-1
-Top=40
-Bottom=50
-State=0
-
-[Field 4]
-Type=radiobutton
-Text=Add GNU Radio to the system PATH for current user
-Left=0
-Right=-1
-Top=50
-Bottom=60
-State=0
diff --git a/cmake/Modules/NSIS.template.in b/cmake/Modules/NSIS.template.in
deleted file mode 100644
index 910fafdedd..0000000000
--- a/cmake/Modules/NSIS.template.in
+++ /dev/null
@@ -1,951 +0,0 @@
-; CPack install script designed for a nmake build
-
-;--------------------------------
-; You must define these values
-
-  !define VERSION "@CPACK_PACKAGE_VERSION@"
-  !define PATCH  "@CPACK_PACKAGE_VERSION_PATCH@"
-  !define INST_DIR "@CPACK_TEMPORARY_DIRECTORY@"
-
-;--------------------------------
-;Variables
-
-  Var MUI_TEMP
-  Var STARTMENU_FOLDER
-  Var SV_ALLUSERS
-  Var START_MENU
-  Var DO_NOT_ADD_TO_PATH
-  Var ADD_TO_PATH_ALL_USERS
-  Var ADD_TO_PATH_CURRENT_USER
-  Var INSTALL_DESKTOP
-  Var IS_DEFAULT_INSTALLDIR
-;--------------------------------
-;Include Modern UI
-
-  !include "MUI.nsh"
-
-  ;Default installation folder
-  InstallDir "@CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
-
-;--------------------------------
-;General
-
-  ;Name and file
-  Name "GNU Radio"
-  OutFile "@CPACK_TOPLEVEL_DIRECTORY@/@CPACK_OUTPUT_FILE_NAME@"
-
-  ;Set compression
-  SetCompressor @CPACK_NSIS_COMPRESSOR@
-
-@CPACK_NSIS_DEFINES@
-
-  !include Sections.nsh
-
-;--- Component support macros: ---
-; The code for the add/remove functionality is from:
-;   http://nsis.sourceforge.net/Add/Remove_Functionality
-; It has been modified slightly and extended to provide
-; inter-component dependencies.
-Var AR_SecFlags
-Var AR_RegFlags
-@CPACK_NSIS_SECTION_SELECTED_VARS@
-
-; Loads the "selected" flag for the section named SecName into the
-; variable VarName.
-!macro LoadSectionSelectedIntoVar SecName VarName
- SectionGetFlags ${${SecName}} $${VarName}
- IntOp $${VarName} $${VarName} & ${SF_SELECTED}  ;Turn off all other bits
-!macroend
-
-; Loads the value of a variable... can we get around this?
-!macro LoadVar VarName
-  IntOp $R0 0 + $${VarName}
-!macroend
-
-; Sets the value of a variable
-!macro StoreVar VarName IntValue
-  IntOp $${VarName} 0 + ${IntValue}
-!macroend
-
-!macro InitSection SecName
-  ;  This macro reads component installed flag from the registry and
-  ;changes checked state of the section on the components page.
-  ;Input: section index constant name specified in Section command.
-
-  ClearErrors
-  ;Reading component status from registry
-  ReadRegDWORD $AR_RegFlags HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@\Components\${SecName}" "Installed"
-  IfErrors "default_${SecName}"
-    ;Status will stay default if registry value not found
-    ;(component was never installed)
-  IntOp $AR_RegFlags $AR_RegFlags & ${SF_SELECTED} ;Turn off all other bits
-  SectionGetFlags ${${SecName}} $AR_SecFlags  ;Reading default section flags
-  IntOp $AR_SecFlags $AR_SecFlags & 0xFFFE  ;Turn lowest (enabled) bit off
-  IntOp $AR_SecFlags $AR_RegFlags | $AR_SecFlags      ;Change lowest bit
-
-  ; Note whether this component was installed before
-  !insertmacro StoreVar ${SecName}_was_installed $AR_RegFlags
-  IntOp $R0 $AR_RegFlags & $AR_RegFlags
-
-  ;Writing modified flags
-  SectionSetFlags ${${SecName}} $AR_SecFlags
-
- "default_${SecName}:"
- !insertmacro LoadSectionSelectedIntoVar ${SecName} ${SecName}_selected
-!macroend
-
-!macro FinishSection SecName
-  ;  This macro reads section flag set by user and removes the section
-  ;if it is not selected.
-  ;Then it writes component installed flag to registry
-  ;Input: section index constant name specified in Section command.
-
-  SectionGetFlags ${${SecName}} $AR_SecFlags  ;Reading section flags
-  ;Checking lowest bit:
-  IntOp $AR_SecFlags $AR_SecFlags & ${SF_SELECTED}
-  IntCmp $AR_SecFlags 1 "leave_${SecName}"
-    ;Section is not selected:
-    ;Calling Section uninstall macro and writing zero installed flag
-    !insertmacro "Remove_${${SecName}}"
-    WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@\Components\${SecName}" \
-  "Installed" 0
-    Goto "exit_${SecName}"
-
- "leave_${SecName}:"
-    ;Section is selected:
-    WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@\Components\${SecName}" \
-  "Installed" 1
-
- "exit_${SecName}:"
-!macroend
-
-!macro RemoveSection SecName
-  ;  This macro is used to call section's Remove_... macro
-  ;from the uninstaller.
-  ;Input: section index constant name specified in Section command.
-
-  !insertmacro "Remove_${${SecName}}"
-!macroend
-
-; Determine whether the selection of SecName changed
-!macro MaybeSelectionChanged SecName
-  !insertmacro LoadVar ${SecName}_selected
-  SectionGetFlags ${${SecName}} $R1
-  IntOp $R1 $R1 & ${SF_SELECTED} ;Turn off all other bits
-
-  ; See if the status has changed:
-  IntCmp $R0 $R1 "${SecName}_unchanged"
-  !insertmacro LoadSectionSelectedIntoVar ${SecName} ${SecName}_selected
-
-  IntCmp $R1 ${SF_SELECTED} "${SecName}_was_selected"
-  !insertmacro "Deselect_required_by_${SecName}"
-  goto "${SecName}_unchanged"
-
-  "${SecName}_was_selected:"
-  !insertmacro "Select_${SecName}_depends"
-
-  "${SecName}_unchanged:"
-!macroend
-;--- End of Add/Remove macros ---
-
-;--------------------------------
-;Interface Settings
-
-  !define MUI_HEADERIMAGE
-  !define MUI_ABORTWARNING
-
-;--------------------------------
-; path functions
-
-!verbose 3
-!include "WinMessages.NSH"
-!verbose 4
-
-;----------------------------------------
-; based upon a script of "Written by KiCHiK 2003-01-18 05:57:02"
-;----------------------------------------
-!verbose 3
-!include "WinMessages.NSH"
-!verbose 4
-;====================================================
-; get_NT_environment
-;     Returns: the selected environment
-;     Output : head of the stack
-;====================================================
-!macro select_NT_profile UN
-Function ${UN}select_NT_profile
-   StrCmp $ADD_TO_PATH_ALL_USERS "1" 0 environment_single
-      DetailPrint "Selected environment for all users"
-      Push "all"
-      Return
-   environment_single:
-      DetailPrint "Selected environment for current user only."
-      Push "current"
-      Return
-FunctionEnd
-!macroend
-!insertmacro select_NT_profile ""
-!insertmacro select_NT_profile "un."
-;----------------------------------------------------
-!define NT_current_env 'HKCU "Environment"'
-!define NT_all_env     'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"'
-
-!ifndef WriteEnvStr_RegKey
-  !ifdef ALL_USERS
-    !define WriteEnvStr_RegKey \
-       'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"'
-  !else
-    !define WriteEnvStr_RegKey 'HKCU "Environment"'
-  !endif
-!endif
-
-; AddToPath - Adds the given dir to the search path.
-;        Input - head of the stack
-;        Note - Win9x systems requires reboot
-
-Function AddToPath
-  Exch $0
-  Push $1
-  Push $2
-  Push $3
-
-  # don't add if the path doesn't exist
-  IfFileExists "$0\*.*" "" AddToPath_done
-
-  ReadEnvStr $1 PATH
-  ; if the path is too long for a NSIS variable NSIS will return a 0
-  ; length string.  If we find that, then warn and skip any path
-  ; modification as it will trash the existing path.
-  StrLen $2 $1
-  IntCmp $2 0 CheckPathLength_ShowPathWarning CheckPathLength_Done CheckPathLength_Done
-    CheckPathLength_ShowPathWarning:
-    Messagebox MB_OK|MB_ICONEXCLAMATION "Warning! PATH too long installer unable to modify PATH!"
-    Goto AddToPath_done
-  CheckPathLength_Done:
-  Push "$1;"
-  Push "$0;"
-  Call StrStr
-  Pop $2
-  StrCmp $2 "" "" AddToPath_done
-  Push "$1;"
-  Push "$0\;"
-  Call StrStr
-  Pop $2
-  StrCmp $2 "" "" AddToPath_done
-  GetFullPathName /SHORT $3 $0
-  Push "$1;"
-  Push "$3;"
-  Call StrStr
-  Pop $2
-  StrCmp $2 "" "" AddToPath_done
-  Push "$1;"
-  Push "$3\;"
-  Call StrStr
-  Pop $2
-  StrCmp $2 "" "" AddToPath_done
-
-  Call IsNT
-  Pop $1
-  StrCmp $1 1 AddToPath_NT
-    ; Not on NT
-    StrCpy $1 $WINDIR 2
-    FileOpen $1 "$1\autoexec.bat" a
-    FileSeek $1 -1 END
-    FileReadByte $1 $2
-    IntCmp $2 26 0 +2 +2 # DOS EOF
-      FileSeek $1 -1 END # write over EOF
-    FileWrite $1 "$\r$\nSET PATH=%PATH%;$3$\r$\n"
-    FileClose $1
-    SetRebootFlag true
-    Goto AddToPath_done
-
-  AddToPath_NT:
-    StrCmp $ADD_TO_PATH_ALL_USERS "1" ReadAllKey
-      ReadRegStr $1 ${NT_current_env} "PATH"
-      Goto DoTrim
-    ReadAllKey:
-      ReadRegStr $1 ${NT_all_env} "PATH"
-    DoTrim:
-    StrCmp $1 "" AddToPath_NTdoIt
-      Push $1
-      Call Trim
-      Pop $1
-      StrCpy $0 "$1;$0"
-    AddToPath_NTdoIt:
-      StrCmp $ADD_TO_PATH_ALL_USERS "1" WriteAllKey
-        WriteRegExpandStr ${NT_current_env} "PATH" $0
-        Goto DoSend
-      WriteAllKey:
-        WriteRegExpandStr ${NT_all_env} "PATH" $0
-      DoSend:
-      SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
-
-  AddToPath_done:
-    Pop $3
-    Pop $2
-    Pop $1
-    Pop $0
-FunctionEnd
-
-
-; RemoveFromPath - Remove a given dir from the path
-;     Input: head of the stack
-
-Function un.RemoveFromPath
-  Exch $0
-  Push $1
-  Push $2
-  Push $3
-  Push $4
-  Push $5
-  Push $6
-
-  IntFmt $6 "%c" 26 # DOS EOF
-
-  Call un.IsNT
-  Pop $1
-  StrCmp $1 1 unRemoveFromPath_NT
-    ; Not on NT
-    StrCpy $1 $WINDIR 2
-    FileOpen $1 "$1\autoexec.bat" r
-    GetTempFileName $4
-    FileOpen $2 $4 w
-    GetFullPathName /SHORT $0 $0
-    StrCpy $0 "SET PATH=%PATH%;$0"
-    Goto unRemoveFromPath_dosLoop
-
-    unRemoveFromPath_dosLoop:
-      FileRead $1 $3
-      StrCpy $5 $3 1 -1 # read last char
-      StrCmp $5 $6 0 +2 # if DOS EOF
-        StrCpy $3 $3 -1 # remove DOS EOF so we can compare
-      StrCmp $3 "$0$\r$\n" unRemoveFromPath_dosLoopRemoveLine
-      StrCmp $3 "$0$\n" unRemoveFromPath_dosLoopRemoveLine
-      StrCmp $3 "$0" unRemoveFromPath_dosLoopRemoveLine
-      StrCmp $3 "" unRemoveFromPath_dosLoopEnd
-      FileWrite $2 $3
-      Goto unRemoveFromPath_dosLoop
-      unRemoveFromPath_dosLoopRemoveLine:
-        SetRebootFlag true
-        Goto unRemoveFromPath_dosLoop
-
-    unRemoveFromPath_dosLoopEnd:
-      FileClose $2
-      FileClose $1
-      StrCpy $1 $WINDIR 2
-      Delete "$1\autoexec.bat"
-      CopyFiles /SILENT $4 "$1\autoexec.bat"
-      Delete $4
-      Goto unRemoveFromPath_done
-
-  unRemoveFromPath_NT:
-    StrCmp $ADD_TO_PATH_ALL_USERS "1" unReadAllKey
-      ReadRegStr $1 ${NT_current_env} "PATH"
-      Goto unDoTrim
-    unReadAllKey:
-      ReadRegStr $1 ${NT_all_env} "PATH"
-    unDoTrim:
-    StrCpy $5 $1 1 -1 # copy last char
-    StrCmp $5 ";" +2 # if last char != ;
-      StrCpy $1 "$1;" # append ;
-    Push $1
-    Push "$0;"
-    Call un.StrStr ; Find `$0;` in $1
-    Pop $2 ; pos of our dir
-    StrCmp $2 "" unRemoveFromPath_done
-      ; else, it is in path
-      # $0 - path to add
-      # $1 - path var
-      StrLen $3 "$0;"
-      StrLen $4 $2
-      StrCpy $5 $1 -$4 # $5 is now the part before the path to remove
-      StrCpy $6 $2 "" $3 # $6 is now the part after the path to remove
-      StrCpy $3 $5$6
-
-      StrCpy $5 $3 1 -1 # copy last char
-      StrCmp $5 ";" 0 +2 # if last char == ;
-        StrCpy $3 $3 -1 # remove last char
-
-      StrCmp $ADD_TO_PATH_ALL_USERS "1" unWriteAllKey
-        WriteRegExpandStr ${NT_current_env} "PATH" $3
-        Goto unDoSend
-      unWriteAllKey:
-        WriteRegExpandStr ${NT_all_env} "PATH" $3
-      unDoSend:
-      SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
-
-  unRemoveFromPath_done:
-    Pop $6
-    Pop $5
-    Pop $4
-    Pop $3
-    Pop $2
-    Pop $1
-    Pop $0
-FunctionEnd
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Uninstall sutff
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-###########################################
-#            Utility Functions            #
-###########################################
-
-;====================================================
-; IsNT - Returns 1 if the current system is NT, 0
-;        otherwise.
-;     Output: head of the stack
-;====================================================
-; IsNT
-; no input
-; output, top of the stack = 1 if NT or 0 if not
-;
-; Usage:
-;   Call IsNT
-;   Pop $R0
-;  ($R0 at this point is 1 or 0)
-
-!macro IsNT un
-Function ${un}IsNT
-  Push $0
-  ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
-  StrCmp $0 "" 0 IsNT_yes
-  ; we are not NT.
-  Pop $0
-  Push 0
-  Return
-
-  IsNT_yes:
-    ; NT!!!
-    Pop $0
-    Push 1
-FunctionEnd
-!macroend
-!insertmacro IsNT ""
-!insertmacro IsNT "un."
-
-; StrStr
-; input, top of stack = string to search for
-;        top of stack-1 = string to search in
-; output, top of stack (replaces with the portion of the string remaining)
-; modifies no other variables.
-;
-; Usage:
-;   Push "this is a long ass string"
-;   Push "ass"
-;   Call StrStr
-;   Pop $R0
-;  ($R0 at this point is "ass string")
-
-!macro StrStr un
-Function ${un}StrStr
-Exch $R1 ; st=haystack,old$R1, $R1=needle
-  Exch    ; st=old$R1,haystack
-  Exch $R2 ; st=old$R1,old$R2, $R2=haystack
-  Push $R3
-  Push $R4
-  Push $R5
-  StrLen $R3 $R1
-  StrCpy $R4 0
-  ; $R1=needle
-  ; $R2=haystack
-  ; $R3=len(needle)
-  ; $R4=cnt
-  ; $R5=tmp
-  loop:
-    StrCpy $R5 $R2 $R3 $R4
-    StrCmp $R5 $R1 done
-    StrCmp $R5 "" done
-    IntOp $R4 $R4 + 1
-    Goto loop
-done:
-  StrCpy $R1 $R2 "" $R4
-  Pop $R5
-  Pop $R4
-  Pop $R3
-  Pop $R2
-  Exch $R1
-FunctionEnd
-!macroend
-!insertmacro StrStr ""
-!insertmacro StrStr "un."
-
-Function Trim ; Added by Pelaca
-	Exch $R1
-	Push $R2
-Loop:
-	StrCpy $R2 "$R1" 1 -1
-	StrCmp "$R2" " " RTrim
-	StrCmp "$R2" "$\n" RTrim
-	StrCmp "$R2" "$\r" RTrim
-	StrCmp "$R2" ";" RTrim
-	GoTo Done
-RTrim:
-	StrCpy $R1 "$R1" -1
-	Goto Loop
-Done:
-	Pop $R2
-	Exch $R1
-FunctionEnd
-
-Function ConditionalAddToRegisty
-  Pop $0
-  Pop $1
-  StrCmp "$0" "" ConditionalAddToRegisty_EmptyString
-    WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" \
-    "$1" "$0"
-    ;MessageBox MB_OK "Set Registry: '$1' to '$0'"
-    DetailPrint "Set install registry entry: '$1' to '$0'"
-  ConditionalAddToRegisty_EmptyString:
-FunctionEnd
-
-;--------------------------------
-
-!ifdef CPACK_USES_DOWNLOAD
-Function DownloadFile
-    IfFileExists $INSTDIR\* +2
-    CreateDirectory $INSTDIR
-    Pop $0
-
-    ; Skip if already downloaded
-    IfFileExists $INSTDIR\$0 0 +2
-    Return
-
-    StrCpy $1 "@CPACK_DOWNLOAD_SITE@"
-
-  try_again:
-    NSISdl::download "$1/$0" "$INSTDIR\$0"
-
-    Pop $1
-    StrCmp $1 "success" success
-    StrCmp $1 "Cancelled" cancel
-    MessageBox MB_OK "Download failed: $1"
-  cancel:
-    Return
-  success:
-FunctionEnd
-!endif
-
-;--------------------------------
-; Installation types
-@CPACK_NSIS_INSTALLATION_TYPES@
-
-;--------------------------------
-; Component sections
-@CPACK_NSIS_COMPONENT_SECTIONS@
-
-;--------------------------------
-; Define some macro setting for the gui
-@CPACK_NSIS_INSTALLER_MUI_ICON_CODE@
-@CPACK_NSIS_INSTALLER_ICON_CODE@
-@CPACK_NSIS_INSTALLER_MUI_COMPONENTS_DESC@
-@CPACK_NSIS_INSTALLER_MUI_FINISHPAGE_RUN_CODE@
-
-;--------------------------------
-;Pages
-  !insertmacro MUI_PAGE_WELCOME
-
-  !insertmacro MUI_PAGE_LICENSE "@CPACK_RESOURCE_FILE_LICENSE@"
-  Page custom InstallOptionsPage
-  !insertmacro MUI_PAGE_DIRECTORY
-
-  ;Start Menu Folder Page Configuration
-  !define MUI_STARTMENUPAGE_REGISTRY_ROOT "SHCTX"
-  !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
-  !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
-  !insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER
-
-  @CPACK_NSIS_PAGE_COMPONENTS@
-
-  !insertmacro MUI_PAGE_INSTFILES
-  !insertmacro MUI_PAGE_FINISH
-
-  !insertmacro MUI_UNPAGE_CONFIRM
-  !insertmacro MUI_UNPAGE_INSTFILES
-
-;--------------------------------
-;Languages
-
-  !insertmacro MUI_LANGUAGE "English" ;first language is the default language
-  !insertmacro MUI_LANGUAGE "Albanian"
-  !insertmacro MUI_LANGUAGE "Arabic"
-  !insertmacro MUI_LANGUAGE "Basque"
-  !insertmacro MUI_LANGUAGE "Belarusian"
-  !insertmacro MUI_LANGUAGE "Bosnian"
-  !insertmacro MUI_LANGUAGE "Breton"
-  !insertmacro MUI_LANGUAGE "Bulgarian"
-  !insertmacro MUI_LANGUAGE "Croatian"
-  !insertmacro MUI_LANGUAGE "Czech"
-  !insertmacro MUI_LANGUAGE "Danish"
-  !insertmacro MUI_LANGUAGE "Dutch"
-  !insertmacro MUI_LANGUAGE "Estonian"
-  !insertmacro MUI_LANGUAGE "Farsi"
-  !insertmacro MUI_LANGUAGE "Finnish"
-  !insertmacro MUI_LANGUAGE "French"
-  !insertmacro MUI_LANGUAGE "German"
-  !insertmacro MUI_LANGUAGE "Greek"
-  !insertmacro MUI_LANGUAGE "Hebrew"
-  !insertmacro MUI_LANGUAGE "Hungarian"
-  !insertmacro MUI_LANGUAGE "Icelandic"
-  !insertmacro MUI_LANGUAGE "Indonesian"
-  !insertmacro MUI_LANGUAGE "Irish"
-  !insertmacro MUI_LANGUAGE "Italian"
-  !insertmacro MUI_LANGUAGE "Japanese"
-  !insertmacro MUI_LANGUAGE "Korean"
-  !insertmacro MUI_LANGUAGE "Kurdish"
-  !insertmacro MUI_LANGUAGE "Latvian"
-  !insertmacro MUI_LANGUAGE "Lithuanian"
-  !insertmacro MUI_LANGUAGE "Luxembourgish"
-  !insertmacro MUI_LANGUAGE "Macedonian"
-  !insertmacro MUI_LANGUAGE "Malay"
-  !insertmacro MUI_LANGUAGE "Mongolian"
-  !insertmacro MUI_LANGUAGE "Norwegian"
-  !insertmacro MUI_LANGUAGE "Polish"
-  !insertmacro MUI_LANGUAGE "Portuguese"
-  !insertmacro MUI_LANGUAGE "PortugueseBR"
-  !insertmacro MUI_LANGUAGE "Romanian"
-  !insertmacro MUI_LANGUAGE "Russian"
-  !insertmacro MUI_LANGUAGE "Serbian"
-  !insertmacro MUI_LANGUAGE "SerbianLatin"
-  !insertmacro MUI_LANGUAGE "SimpChinese"
-  !insertmacro MUI_LANGUAGE "Slovak"
-  !insertmacro MUI_LANGUAGE "Slovenian"
-  !insertmacro MUI_LANGUAGE "Spanish"
-  !insertmacro MUI_LANGUAGE "Swedish"
-  !insertmacro MUI_LANGUAGE "Thai"
-  !insertmacro MUI_LANGUAGE "TradChinese"
-  !insertmacro MUI_LANGUAGE "Turkish"
-  !insertmacro MUI_LANGUAGE "Ukrainian"
-  !insertmacro MUI_LANGUAGE "Welsh"
-
-
-;--------------------------------
-;Reserve Files
-
-  ;These files should be inserted before other files in the data block
-  ;Keep these lines before any File command
-  ;Only for solid compression (by default, solid compression is enabled for BZIP2 and LZMA)
-
-  ReserveFile "NSIS.InstallOptions.ini"
-  !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
-
-;--------------------------------
-;Installer Sections
-
-Section "-Core installation"
-  ;Use the entire tree produced by the INSTALL target.  Keep the
-  ;list of directories here in sync with the RMDir commands below.
-  SetOutPath "$INSTDIR"
-  @CPACK_NSIS_FULL_INSTALL@
-
-  ;Store installation folder
-  WriteRegStr SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "" $INSTDIR
-
-  ;Create uninstaller
-  WriteUninstaller "$INSTDIR\Uninstall.exe"
-  Push "DisplayName"
-  Push "@CPACK_NSIS_DISPLAY_NAME@"
-  Call ConditionalAddToRegisty
-  Push "DisplayVersion"
-  Push "@CPACK_PACKAGE_VERSION@"
-  Call ConditionalAddToRegisty
-  Push "Publisher"
-  Push "@CPACK_PACKAGE_VENDOR@"
-  Call ConditionalAddToRegisty
-  Push "UninstallString"
-  Push "$INSTDIR\Uninstall.exe"
-  Call ConditionalAddToRegisty
-  Push "NoRepair"
-  Push "1"
-  Call ConditionalAddToRegisty
-
-  !ifdef CPACK_NSIS_ADD_REMOVE
-  ;Create add/remove functionality
-  Push "ModifyPath"
-  Push "$INSTDIR\AddRemove.exe"
-  Call ConditionalAddToRegisty
-  !else
-  Push "NoModify"
-  Push "1"
-  Call ConditionalAddToRegisty
-  !endif
-
-  ; Optional registration
-  Push "DisplayIcon"
-  Push "$INSTDIR\@CPACK_NSIS_INSTALLED_ICON_NAME@"
-  Call ConditionalAddToRegisty
-  Push "HelpLink"
-  Push "@CPACK_NSIS_HELP_LINK@"
-  Call ConditionalAddToRegisty
-  Push "URLInfoAbout"
-  Push "@CPACK_NSIS_URL_INFO_ABOUT@"
-  Call ConditionalAddToRegisty
-  Push "Contact"
-  Push "@CPACK_NSIS_CONTACT@"
-  Call ConditionalAddToRegisty
-  !insertmacro MUI_INSTALLOPTIONS_READ $INSTALL_DESKTOP "NSIS.InstallOptions.ini" "Field 5" "State"
-  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
-
-  ;Create shortcuts
-  CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
-@CPACK_NSIS_CREATE_ICONS@
-@CPACK_NSIS_CREATE_ICONS_EXTRA@
-  CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
-  CreateShortcut "$SMPROGRAMS\$STARTMENU_FOLDER\GNU Radio Companion.lnk" "$INSTDIR\bin\gnuradio-companion.py" "" "" "" SW_SHOWMINIMIZED
-
-  ;Read a value from an InstallOptions INI file
-  !insertmacro MUI_INSTALLOPTIONS_READ $DO_NOT_ADD_TO_PATH "NSIS.InstallOptions.ini" "Field 2" "State"
-  !insertmacro MUI_INSTALLOPTIONS_READ $ADD_TO_PATH_ALL_USERS "NSIS.InstallOptions.ini" "Field 3" "State"
-  !insertmacro MUI_INSTALLOPTIONS_READ $ADD_TO_PATH_CURRENT_USER "NSIS.InstallOptions.ini" "Field 4" "State"
-
-  ; Write special uninstall registry entries
-  Push "StartMenu"
-  Push "$STARTMENU_FOLDER"
-  Call ConditionalAddToRegisty
-  Push "DoNotAddToPath"
-  Push "$DO_NOT_ADD_TO_PATH"
-  Call ConditionalAddToRegisty
-  Push "AddToPathAllUsers"
-  Push "$ADD_TO_PATH_ALL_USERS"
-  Call ConditionalAddToRegisty
-  Push "AddToPathCurrentUser"
-  Push "$ADD_TO_PATH_CURRENT_USER"
-  Call ConditionalAddToRegisty
-  Push "InstallToDesktop"
-  Push "$INSTALL_DESKTOP"
-  Call ConditionalAddToRegisty
-
-  !insertmacro MUI_STARTMENU_WRITE_END
-
-@CPACK_NSIS_EXTRA_INSTALL_COMMANDS@
-
-SectionEnd
-
-Section "-Add to path"
-  Push $INSTDIR\bin
-  StrCmp "@CPACK_NSIS_MODIFY_PATH@" "ON" 0 doNotAddToPath
-  StrCmp $DO_NOT_ADD_TO_PATH "1" doNotAddToPath 0
-    Call AddToPath
-  doNotAddToPath:
-SectionEnd
-
-;--------------------------------
-; Create custom pages
-Function InstallOptionsPage
-  !insertmacro MUI_HEADER_TEXT "Install Options" "Choose options for installing GNU Radio"
-  !insertmacro MUI_INSTALLOPTIONS_DISPLAY "NSIS.InstallOptions.ini"
-
-FunctionEnd
-
-;--------------------------------
-; determine admin versus local install
-Function un.onInit
-
-  ClearErrors
-  UserInfo::GetName
-  IfErrors noLM
-  Pop $0
-  UserInfo::GetAccountType
-  Pop $1
-  StrCmp $1 "Admin" 0 +3
-    SetShellVarContext all
-    ;MessageBox MB_OK 'User "$0" is in the Admin group'
-    Goto done
-  StrCmp $1 "Power" 0 +3
-    SetShellVarContext all
-    ;MessageBox MB_OK 'User "$0" is in the Power Users group'
-    Goto done
-
-  noLM:
-    ;Get installation folder from registry if available
-
-  done:
-
-FunctionEnd
-
-;--- Add/Remove callback functions: ---
-!macro SectionList MacroName
-  ;This macro used to perform operation on multiple sections.
-  ;List all of your components in following manner here.
-@CPACK_NSIS_COMPONENT_SECTION_LIST@
-!macroend
-
-Section -FinishComponents
-  ;Removes unselected components and writes component status to registry
-  !insertmacro SectionList "FinishSection"
-
-!ifdef CPACK_NSIS_ADD_REMOVE
-  ; Get the name of the installer executable
-  System::Call 'kernel32::GetModuleFileNameA(i 0, t .R0, i 1024) i r1'
-  StrCpy $R3 $R0
-
-  ; Strip off the last 13 characters, to see if we have AddRemove.exe
-  StrLen $R1 $R0
-  IntOp $R1 $R0 - 13
-  StrCpy $R2 $R0 13 $R1
-  StrCmp $R2 "AddRemove.exe" addremove_installed
-
-  ; We're not running AddRemove.exe, so install it
-  CopyFiles $R3 $INSTDIR\AddRemove.exe
-
-  addremove_installed:
-!endif
-SectionEnd
-;--- End of Add/Remove callback functions ---
-
-;--------------------------------
-; Component dependencies
-Function .onSelChange
-  !insertmacro SectionList MaybeSelectionChanged
-FunctionEnd
-
-;--------------------------------
-;Uninstaller Section
-
-Section "Uninstall"
-  ReadRegStr $START_MENU SHCTX \
-   "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "StartMenu"
-  ;MessageBox MB_OK "Start menu is in: $START_MENU"
-  ReadRegStr $DO_NOT_ADD_TO_PATH SHCTX \
-    "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "DoNotAddToPath"
-  ReadRegStr $ADD_TO_PATH_ALL_USERS SHCTX \
-    "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "AddToPathAllUsers"
-  ReadRegStr $ADD_TO_PATH_CURRENT_USER SHCTX \
-    "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "AddToPathCurrentUser"
-  ;MessageBox MB_OK "Add to path: $DO_NOT_ADD_TO_PATH all users: $ADD_TO_PATH_ALL_USERS"
-  ReadRegStr $INSTALL_DESKTOP SHCTX \
-    "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "InstallToDesktop"
-  ;MessageBox MB_OK "Install to desktop: $INSTALL_DESKTOP "
-
-@CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS@
-
-  ;Remove files we installed.
-  ;Keep the list of directories here in sync with the File commands above.
-@CPACK_NSIS_DELETE_FILES@
-@CPACK_NSIS_DELETE_DIRECTORIES@
-
-!ifdef CPACK_NSIS_ADD_REMOVE
-  ;Remove the add/remove program
-  Delete "$INSTDIR\AddRemove.exe"
-!endif
-
-  ;Remove the uninstaller itself.
-  Delete "$INSTDIR\Uninstall.exe"
-  DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
-
-  ;Remove the installation directory if it is empty.
-  RMDir "$INSTDIR"
-
-  ; Remove the registry entries.
-  DeleteRegKey SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
-
-  ; Removes all optional components
-  !insertmacro SectionList "RemoveSection"
-
-  !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
-
-  Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
-@CPACK_NSIS_DELETE_ICONS@
-@CPACK_NSIS_DELETE_ICONS_EXTRA@
-
-  ;Delete empty start menu parent diretories
-  StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
-
-  startMenuDeleteLoop:
-    ClearErrors
-    RMDir $MUI_TEMP
-    GetFullPathName $MUI_TEMP "$MUI_TEMP\.."
-
-    IfErrors startMenuDeleteLoopDone
-
-    StrCmp "$MUI_TEMP" "$SMPROGRAMS" startMenuDeleteLoopDone startMenuDeleteLoop
-  startMenuDeleteLoopDone:
-
-  ; If the user changed the shortcut, then untinstall may not work. This should
-  ; try to fix it.
-  StrCpy $MUI_TEMP "$START_MENU"
-  Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
-  Delete "$SMPROGRAMS\$MUI_TEMP\GNU Radio Companion.lnk"
-@CPACK_NSIS_DELETE_ICONS_EXTRA@
-
-  ;Delete empty start menu parent diretories
-  StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
-
-  secondStartMenuDeleteLoop:
-    ClearErrors
-    RMDir $MUI_TEMP
-    GetFullPathName $MUI_TEMP "$MUI_TEMP\.."
-
-    IfErrors secondStartMenuDeleteLoopDone
-
-    StrCmp "$MUI_TEMP" "$SMPROGRAMS" secondStartMenuDeleteLoopDone secondStartMenuDeleteLoop
-  secondStartMenuDeleteLoopDone:
-
-  DeleteRegKey /ifempty SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
-
-  Push $INSTDIR\bin
-  StrCmp $DO_NOT_ADD_TO_PATH_ "1" doNotRemoveFromPath 0
-    Call un.RemoveFromPath
-  doNotRemoveFromPath:
-SectionEnd
-
-;--------------------------------
-; determine admin versus local install
-; Is install for "AllUsers" or "JustMe"?
-; Default to "JustMe" - set to "AllUsers" if admin or on Win9x
-; This function is used for the very first "custom page" of the installer.
-; This custom page does not show up visibly, but it executes prior to the
-; first visible page and sets up $INSTDIR properly...
-; Choose different default installation folder based on SV_ALLUSERS...
-; "Program Files" for AllUsers, "My Documents" for JustMe...
-
-Function .onInit
-  ; Reads components status for registry
-  !insertmacro SectionList "InitSection"
-
-  ; check to see if /D has been used to change
-  ; the install directory by comparing it to the
-  ; install directory that is expected to be the
-  ; default
-  StrCpy $IS_DEFAULT_INSTALLDIR 0
-  StrCmp "$INSTDIR" "@CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@" 0 +2
-    StrCpy $IS_DEFAULT_INSTALLDIR 1
-
-  StrCpy $SV_ALLUSERS "JustMe"
-  ; if default install dir then change the default
-  ; if it is installed for JustMe
-  StrCmp "$IS_DEFAULT_INSTALLDIR" "1" 0 +2
-    StrCpy $INSTDIR "$DOCUMENTS\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
-
-  ClearErrors
-  UserInfo::GetName
-  IfErrors noLM
-  Pop $0
-  UserInfo::GetAccountType
-  Pop $1
-  StrCmp $1 "Admin" 0 +3
-    SetShellVarContext all
-    ;MessageBox MB_OK 'User "$0" is in the Admin group'
-    StrCpy $SV_ALLUSERS "AllUsers"
-    Goto done
-  StrCmp $1 "Power" 0 +3
-    SetShellVarContext all
-    ;MessageBox MB_OK 'User "$0" is in the Power Users group'
-    StrCpy $SV_ALLUSERS "AllUsers"
-    Goto done
-
-  noLM:
-    StrCpy $SV_ALLUSERS "AllUsers"
-    ;Get installation folder from registry if available
-
-  done:
-  StrCmp $SV_ALLUSERS "AllUsers" 0 +3
-    StrCmp "$IS_DEFAULT_INSTALLDIR" "1" 0 +2
-      StrCpy $INSTDIR "@CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
-
-  StrCmp "@CPACK_NSIS_MODIFY_PATH@" "ON" 0 noOptionsPage
-    !insertmacro MUI_INSTALLOPTIONS_EXTRACT "NSIS.InstallOptions.ini"
-
-  noOptionsPage:
-FunctionEnd
diff --git a/cmake/Packaging/Fedora-15.cmake b/cmake/Packaging/Fedora-15.cmake
deleted file mode 100644
index 4e648486e1..0000000000
--- a/cmake/Packaging/Fedora-15.cmake
+++ /dev/null
@@ -1,11 +0,0 @@
-SET(PACKAGE_DEPENDS_CORE_RUNTIME "fftw-libs")
-SET(PACKAGE_DEPENDS_UTILS "python-mako")
-SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "qt" "qwt")
-SET(PACKAGE_DEPENDS_QTGUI_PYTHON "PyQt4")
-SET(PACKAGE_DEPENDS_GRC "python" "numpy" "gtk2" "python-lxml" "python-cheetah" "python-mako")
-SET(PACKAGE_DEPENDS_WXGUI "wxGTK" "python" "numpy")
-SET(PACKAGE_DEPENDS_VIDEO_SDL_RUNTIME "SDL")
-SET(PACKAGE_DEPENDS_UHD_RUNTIME "uhd")
-SET(PACKAGE_DEPENDS_AUDIO_RUNTIME "pulseaudio" "alsa-lib" "jack-audio-connection-kit")
-SET(PACKAGE_DEPENDS_WAVELET_RUNTIME "gsl")
-SET(PACKAGE_DEPENDS_WAVELET_PYTHON "python" "numpy")
diff --git a/cmake/Packaging/Fedora-16.cmake b/cmake/Packaging/Fedora-16.cmake
deleted file mode 100644
index 4e648486e1..0000000000
--- a/cmake/Packaging/Fedora-16.cmake
+++ /dev/null
@@ -1,11 +0,0 @@
-SET(PACKAGE_DEPENDS_CORE_RUNTIME "fftw-libs")
-SET(PACKAGE_DEPENDS_UTILS "python-mako")
-SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "qt" "qwt")
-SET(PACKAGE_DEPENDS_QTGUI_PYTHON "PyQt4")
-SET(PACKAGE_DEPENDS_GRC "python" "numpy" "gtk2" "python-lxml" "python-cheetah" "python-mako")
-SET(PACKAGE_DEPENDS_WXGUI "wxGTK" "python" "numpy")
-SET(PACKAGE_DEPENDS_VIDEO_SDL_RUNTIME "SDL")
-SET(PACKAGE_DEPENDS_UHD_RUNTIME "uhd")
-SET(PACKAGE_DEPENDS_AUDIO_RUNTIME "pulseaudio" "alsa-lib" "jack-audio-connection-kit")
-SET(PACKAGE_DEPENDS_WAVELET_RUNTIME "gsl")
-SET(PACKAGE_DEPENDS_WAVELET_PYTHON "python" "numpy")
diff --git a/cmake/Packaging/Fedora-17.cmake b/cmake/Packaging/Fedora-17.cmake
deleted file mode 100644
index 4e7ff51f9f..0000000000
--- a/cmake/Packaging/Fedora-17.cmake
+++ /dev/null
@@ -1,11 +0,0 @@
-SET(PACKAGE_DEPENDS_CORE_RUNTIME "fftw-libs")
-SET(PACKAGE_DEPENDS_UTILS "python-mako")
-SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "qt" "qwt")
-SET(PACKAGE_DEPENDS_QTGUI_PYTHON "PyQt4")
-SET(PACKAGE_DEPENDS_GRC "python" "numpy" "gtk2" "python-lxml" "python-cheetah")
-SET(PACKAGE_DEPENDS_WXGUI "wxGTK" "python" "numpy" "PyOpenGL")
-SET(PACKAGE_DEPENDS_VIDEO_SDL_RUNTIME "SDL")
-SET(PACKAGE_DEPENDS_UHD_RUNTIME "uhd")
-SET(PACKAGE_DEPENDS_AUDIO_RUNTIME "pulseaudio" "alsa-lib" "jack-audio-connection-kit")
-SET(PACKAGE_DEPENDS_WAVELET_RUNTIME "gsl")
-SET(PACKAGE_DEPENDS_WAVELET_PYTHON "python" "numpy")
diff --git a/cmake/Packaging/Fedora-18.cmake b/cmake/Packaging/Fedora-18.cmake
deleted file mode 100644
index 4e7ff51f9f..0000000000
--- a/cmake/Packaging/Fedora-18.cmake
+++ /dev/null
@@ -1,11 +0,0 @@
-SET(PACKAGE_DEPENDS_CORE_RUNTIME "fftw-libs")
-SET(PACKAGE_DEPENDS_UTILS "python-mako")
-SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "qt" "qwt")
-SET(PACKAGE_DEPENDS_QTGUI_PYTHON "PyQt4")
-SET(PACKAGE_DEPENDS_GRC "python" "numpy" "gtk2" "python-lxml" "python-cheetah")
-SET(PACKAGE_DEPENDS_WXGUI "wxGTK" "python" "numpy" "PyOpenGL")
-SET(PACKAGE_DEPENDS_VIDEO_SDL_RUNTIME "SDL")
-SET(PACKAGE_DEPENDS_UHD_RUNTIME "uhd")
-SET(PACKAGE_DEPENDS_AUDIO_RUNTIME "pulseaudio" "alsa-lib" "jack-audio-connection-kit")
-SET(PACKAGE_DEPENDS_WAVELET_RUNTIME "gsl")
-SET(PACKAGE_DEPENDS_WAVELET_PYTHON "python" "numpy")
diff --git a/cmake/Packaging/Ubuntu-10.04.cmake b/cmake/Packaging/Ubuntu-10.04.cmake
deleted file mode 100644
index 7f0fe82211..0000000000
--- a/cmake/Packaging/Ubuntu-10.04.cmake
+++ /dev/null
@@ -1,11 +0,0 @@
-SET(PACKAGE_DEPENDS_CORE_RUNTIME "libfftw3-3")
-SET(PACKAGE_DEPENDS_UTILS "python-mako")
-SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "libqtcore4" "libqwt5-qt4")
-SET(PACKAGE_DEPENDS_QTGUI_PYTHON "python-qt4" "python-qwt5-qt4")
-SET(PACKAGE_DEPENDS_GRC "python" "python-numpy" "python-gtk2" "python-lxml" "python-cheetah")
-SET(PACKAGE_DEPENDS_WXGUI "python-wxgtk2.8" "python" "python-numpy")
-SET(PACKAGE_DEPENDS_VIDEO_SDL_RUNTIME "libsdl1.2debian")
-SET(PACKAGE_DEPENDS_UHD_RUNTIME "uhd")
-SET(PACKAGE_DEPENDS_AUDIO_RUNTIME "libpulse0" "alsa-base" "libjack0")
-SET(PACKAGE_DEPENDS_WAVELET_RUNTIME "libgsl0ldbl")
-SET(PACKAGE_DEPENDS_WAVELET_PYTHON "python" "python-numpy")
diff --git a/cmake/Packaging/Ubuntu-10.10.cmake b/cmake/Packaging/Ubuntu-10.10.cmake
deleted file mode 100644
index 7f0fe82211..0000000000
--- a/cmake/Packaging/Ubuntu-10.10.cmake
+++ /dev/null
@@ -1,11 +0,0 @@
-SET(PACKAGE_DEPENDS_CORE_RUNTIME "libfftw3-3")
-SET(PACKAGE_DEPENDS_UTILS "python-mako")
-SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "libqtcore4" "libqwt5-qt4")
-SET(PACKAGE_DEPENDS_QTGUI_PYTHON "python-qt4" "python-qwt5-qt4")
-SET(PACKAGE_DEPENDS_GRC "python" "python-numpy" "python-gtk2" "python-lxml" "python-cheetah")
-SET(PACKAGE_DEPENDS_WXGUI "python-wxgtk2.8" "python" "python-numpy")
-SET(PACKAGE_DEPENDS_VIDEO_SDL_RUNTIME "libsdl1.2debian")
-SET(PACKAGE_DEPENDS_UHD_RUNTIME "uhd")
-SET(PACKAGE_DEPENDS_AUDIO_RUNTIME "libpulse0" "alsa-base" "libjack0")
-SET(PACKAGE_DEPENDS_WAVELET_RUNTIME "libgsl0ldbl")
-SET(PACKAGE_DEPENDS_WAVELET_PYTHON "python" "python-numpy")
diff --git a/cmake/Packaging/Ubuntu-11.04.cmake b/cmake/Packaging/Ubuntu-11.04.cmake
deleted file mode 100644
index b72ff46e70..0000000000
--- a/cmake/Packaging/Ubuntu-11.04.cmake
+++ /dev/null
@@ -1,12 +0,0 @@
-#set the debian package dependencies (parsed by our deb component maker)
-SET(PACKAGE_DEPENDS_CORE_RUNTIME "libfftw3-3")
-SET(PACKAGE_DEPENDS_UTILS "python-mako")
-SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "libqtcore4" "libqwt5-qt4")
-SET(PACKAGE_DEPENDS_QTGUI_PYTHON "python-qt4" "python-qwt5-qt4")
-SET(PACKAGE_DEPENDS_GRC "python" "python-numpy" "python-gtk2" "python-lxml" "python-cheetah")
-SET(PACKAGE_DEPENDS_WXGUI "python-wxgtk2.8")
-SET(PACKAGE_DEPENDS_VIDEO_SDL_RUNTIME "libsdl1.2debian")
-SET(PACKAGE_DEPENDS_UHD_RUNTIME "uhd")
-SET(PACKAGE_DEPENDS_AUDIO_RUNTIME "libpulse0" "alsa-base" "libjack0")
-SET(PACKAGE_DEPENDS_WAVELET_RUNTIME "libgsl0ldbl")
-SET(PACKAGE_DEPENDS_WAVELET_PYTHON "python" "python-numpy")
diff --git a/cmake/Packaging/Ubuntu-11.10.cmake b/cmake/Packaging/Ubuntu-11.10.cmake
deleted file mode 100644
index 952eeb6026..0000000000
--- a/cmake/Packaging/Ubuntu-11.10.cmake
+++ /dev/null
@@ -1,11 +0,0 @@
-SET(PACKAGE_DEPENDS_CORE_RUNTIME "libfftw3-3")
-SET(PACKAGE_DEPENDS_UTILS "python-mako")
-SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "libqtcore4" "libqwt6")
-SET(PACKAGE_DEPENDS_QTGUI_PYTHON "python-qt4" "python-qwt5-qt4")
-SET(PACKAGE_DEPENDS_GRC "python" "python-numpy" "python-gtk2" "python-lxml" "python-cheetah")
-SET(PACKAGE_DEPENDS_WXGUI "python-wxgtk2.8")
-SET(PACKAGE_DEPENDS_VIDEO_SDL_RUNTIME "libsdl1.2debian")
-SET(PACKAGE_DEPENDS_UHD_RUNTIME "uhd")
-SET(PACKAGE_DEPENDS_AUDIO_RUNTIME "libpulse0" "alsa-base" "libjack0")
-SET(PACKAGE_DEPENDS_WAVELET_RUNTIME "libgsl0ldbl")
-SET(PACKAGE_DEPENDS_WAVELET_PYTHON "python" "python-numpy")
diff --git a/cmake/Packaging/Ubuntu-12.04.cmake b/cmake/Packaging/Ubuntu-12.04.cmake
deleted file mode 100644
index 8d4b8d18d1..0000000000
--- a/cmake/Packaging/Ubuntu-12.04.cmake
+++ /dev/null
@@ -1,11 +0,0 @@
-SET(PACKAGE_DEPENDS_CORE_RUNTIME "libfftw3-3")
-SET(PACKAGE_DEPENDS_UTILS "python-mako")
-SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "libqtcore4" "libqwt6")
-SET(PACKAGE_DEPENDS_QTGUI_PYTHON "python-qt4" "python-qwt5-qt4")
-SET(PACKAGE_DEPENDS_GRC "python" "python-numpy" "python-gtk2" "python-lxml" "python-cheetah")
-SET(PACKAGE_DEPENDS_WXGUI "python-wxgtk2.8" "python-opengl")
-SET(PACKAGE_DEPENDS_VIDEO_SDL_RUNTIME "libsdl1.2debian")
-SET(PACKAGE_DEPENDS_UHD_RUNTIME "uhd")
-SET(PACKAGE_DEPENDS_AUDIO_RUNTIME "libpulse0" "alsa-base" "libjack0")
-SET(PACKAGE_DEPENDS_WAVELET_RUNTIME "libgsl0ldbl")
-SET(PACKAGE_DEPENDS_WAVELET_PYTHON "python" "python-numpy")
diff --git a/cmake/Packaging/Ubuntu-12.10.cmake b/cmake/Packaging/Ubuntu-12.10.cmake
deleted file mode 100644
index 8d4b8d18d1..0000000000
--- a/cmake/Packaging/Ubuntu-12.10.cmake
+++ /dev/null
@@ -1,11 +0,0 @@
-SET(PACKAGE_DEPENDS_CORE_RUNTIME "libfftw3-3")
-SET(PACKAGE_DEPENDS_UTILS "python-mako")
-SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "libqtcore4" "libqwt6")
-SET(PACKAGE_DEPENDS_QTGUI_PYTHON "python-qt4" "python-qwt5-qt4")
-SET(PACKAGE_DEPENDS_GRC "python" "python-numpy" "python-gtk2" "python-lxml" "python-cheetah")
-SET(PACKAGE_DEPENDS_WXGUI "python-wxgtk2.8" "python-opengl")
-SET(PACKAGE_DEPENDS_VIDEO_SDL_RUNTIME "libsdl1.2debian")
-SET(PACKAGE_DEPENDS_UHD_RUNTIME "uhd")
-SET(PACKAGE_DEPENDS_AUDIO_RUNTIME "libpulse0" "alsa-base" "libjack0")
-SET(PACKAGE_DEPENDS_WAVELET_RUNTIME "libgsl0ldbl")
-SET(PACKAGE_DEPENDS_WAVELET_PYTHON "python" "python-numpy")
diff --git a/cmake/Packaging/Ubuntu-13.04.cmake b/cmake/Packaging/Ubuntu-13.04.cmake
deleted file mode 100644
index ed14b1ab22..0000000000
--- a/cmake/Packaging/Ubuntu-13.04.cmake
+++ /dev/null
@@ -1,13 +0,0 @@
-SET(PACKAGE_DEPENDS_GRUEL_RUNTIME "libboost-all-dev" "libc6")
-SET(PACKAGE_DEPENDS_UTILS "python-mako")
-SET(PACKAGE_DEPENDS_GRUEL_PYTHON "python" "python-numpy")
-SET(PACKAGE_DEPENDS_CORE_RUNTIME "libfftw3-3")
-SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "libqtcore4" "libqwt6")
-SET(PACKAGE_DEPENDS_QTGUI_PYTHON "python-qt4" "python-qwt5-qt4")
-SET(PACKAGE_DEPENDS_GRC "python" "python-numpy" "python-gtk2" "python-lxml" "python-cheetah")
-SET(PACKAGE_DEPENDS_WXGUI "python-wxgtk2.8" "python-opengl")
-SET(PACKAGE_DEPENDS_VIDEO_SDL_RUNTIME "libsdl1.2debian")
-SET(PACKAGE_DEPENDS_UHD_RUNTIME "uhd")
-SET(PACKAGE_DEPENDS_AUDIO_RUNTIME "libpulse0" "alsa-base" "libjack0")
-SET(PACKAGE_DEPENDS_WAVELET_RUNTIME "libgsl0ldbl")
-SET(PACKAGE_DEPENDS_WAVELET_PYTHON "python" "python-numpy")
diff --git a/cmake/Packaging/Ubuntu-15.10.cmake b/cmake/Packaging/Ubuntu-15.10.cmake
deleted file mode 100644
index ed14b1ab22..0000000000
--- a/cmake/Packaging/Ubuntu-15.10.cmake
+++ /dev/null
@@ -1,13 +0,0 @@
-SET(PACKAGE_DEPENDS_GRUEL_RUNTIME "libboost-all-dev" "libc6")
-SET(PACKAGE_DEPENDS_UTILS "python-mako")
-SET(PACKAGE_DEPENDS_GRUEL_PYTHON "python" "python-numpy")
-SET(PACKAGE_DEPENDS_CORE_RUNTIME "libfftw3-3")
-SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "libqtcore4" "libqwt6")
-SET(PACKAGE_DEPENDS_QTGUI_PYTHON "python-qt4" "python-qwt5-qt4")
-SET(PACKAGE_DEPENDS_GRC "python" "python-numpy" "python-gtk2" "python-lxml" "python-cheetah")
-SET(PACKAGE_DEPENDS_WXGUI "python-wxgtk2.8" "python-opengl")
-SET(PACKAGE_DEPENDS_VIDEO_SDL_RUNTIME "libsdl1.2debian")
-SET(PACKAGE_DEPENDS_UHD_RUNTIME "uhd")
-SET(PACKAGE_DEPENDS_AUDIO_RUNTIME "libpulse0" "alsa-base" "libjack0")
-SET(PACKAGE_DEPENDS_WAVELET_RUNTIME "libgsl0ldbl")
-SET(PACKAGE_DEPENDS_WAVELET_PYTHON "python" "python-numpy")
diff --git a/cmake/Packaging/post_install.in b/cmake/Packaging/post_install.in
deleted file mode 100755
index e7245f0320..0000000000
--- a/cmake/Packaging/post_install.in
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-@CMAKE_INSTALL_PREFIX@/libexec/gnuradio/grc_setup_freedesktop install
-ldconfig
diff --git a/cmake/Packaging/post_uninstall.in b/cmake/Packaging/post_uninstall.in
deleted file mode 100755
index 2d1871b1df..0000000000
--- a/cmake/Packaging/post_uninstall.in
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-ldconfig
diff --git a/cmake/Packaging/postinst.in b/cmake/Packaging/postinst.in
deleted file mode 100755
index 7fef2accf4..0000000000
--- a/cmake/Packaging/postinst.in
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-if [ "$1" = "configure" ]; then
-    @CMAKE_INSTALL_PREFIX@/libexec/gnuradio/grc_setup_freedesktop install
-    ldconfig
-fi
diff --git a/cmake/Packaging/postrm.in b/cmake/Packaging/postrm.in
deleted file mode 100755
index b780602a7b..0000000000
--- a/cmake/Packaging/postrm.in
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-if [ "$1" = "remove" ]; then
-    ldconfig
-fi
diff --git a/cmake/Packaging/pre_install.in b/cmake/Packaging/pre_install.in
deleted file mode 100755
index 1a2485251c..0000000000
--- a/cmake/Packaging/pre_install.in
+++ /dev/null
@@ -1 +0,0 @@
-#!/bin/sh
diff --git a/cmake/Packaging/pre_uninstall.in b/cmake/Packaging/pre_uninstall.in
deleted file mode 100755
index c5e085e895..0000000000
--- a/cmake/Packaging/pre_uninstall.in
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-@CMAKE_INSTALL_PREFIX@/libexec/gnuradio/grc_setup_freedesktop uninstall
diff --git a/cmake/Packaging/preinst.in b/cmake/Packaging/preinst.in
deleted file mode 100755
index cb7ee1bc40..0000000000
--- a/cmake/Packaging/preinst.in
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-if [ "$1" = "install" ]; then
-    echo
-fi
diff --git a/cmake/Packaging/prerm.in b/cmake/Packaging/prerm.in
deleted file mode 100755
index d098878503..0000000000
--- a/cmake/Packaging/prerm.in
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-if [ "$1" = "remove" ]; then
-    @CMAKE_INSTALL_PREFIX@/libexec/gnuradio/grc_setup_freedesktop uninstall
-fi
diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt
index 98d7d1c419..b9eb977a3a 100644
--- a/docs/CMakeLists.txt
+++ b/docs/CMakeLists.txt
@@ -35,15 +35,6 @@ GR_REGISTER_COMPONENT("sphinx"  ENABLE_SPHINX  SPHINX_FOUND)
 ########################################################################
 if(ENABLE_DOXYGEN)
 
-########################################################################
-# Setup CPack components
-########################################################################
-include(GrPackage)
-CPACK_COMPONENT("docs"
-    DISPLAY_NAME "Documentation"
-    DESCRIPTION  "Doxygen generated documentation"
-)
-
 ########################################################################
 # Add subdirectories
 ########################################################################
@@ -58,14 +49,6 @@ endif(ENABLE_DOXYGEN)
 ########################################################################
 if(ENABLE_SPHINX)
 
-########################################################################
-# Setup CPack components
-########################################################################
-include(GrPackage)
-CPACK_COMPONENT("docs"
-    DISPLAY_NAME "Documentation"
-    DESCRIPTION  "Sphinx generated documentation"
-)
 
 ########################################################################
 # Add subdirectories
diff --git a/docs/doxygen/CMakeLists.txt b/docs/doxygen/CMakeLists.txt
index a837bd8e11..d22f9d9f62 100644
--- a/docs/doxygen/CMakeLists.txt
+++ b/docs/doxygen/CMakeLists.txt
@@ -74,4 +74,4 @@ add_custom_command(
 
 add_custom_target(doxygen_target ALL DEPENDS ${BUILT_DIRS})
 
-install(DIRECTORY ${BUILT_DIRS} DESTINATION ${GR_PKG_DOC_DIR} COMPONENT "docs")
+install(DIRECTORY ${BUILT_DIRS} DESTINATION ${GR_PKG_DOC_DIR})
diff --git a/docs/exploring-gnuradio/CMakeLists.txt b/docs/exploring-gnuradio/CMakeLists.txt
index 5f5e2113cd..422b1ce85c 100644
--- a/docs/exploring-gnuradio/CMakeLists.txt
+++ b/docs/exploring-gnuradio/CMakeLists.txt
@@ -26,5 +26,4 @@ install(
     fm_rx.grc
     fm_demod.py
     DESTINATION ${GR_PKG_DOC_DIR}
-    COMPONENT "docs"
 )
diff --git a/gnuradio-runtime/CMakeLists.txt b/gnuradio-runtime/CMakeLists.txt
index 7660642509..67efafe2ae 100644
--- a/gnuradio-runtime/CMakeLists.txt
+++ b/gnuradio-runtime/CMakeLists.txt
@@ -89,39 +89,6 @@ get_filename_component(GR_RUNTIME_PYTHONPATH
 )
 GR_SET_GLOBAL(GR_RUNTIME_PYTHONPATH ${GR_RUNTIME_PYTHONPATH})
 
-########################################################################
-# Setup CPack components
-########################################################################
-include(GrPackage)
-CPACK_SET(CPACK_COMPONENT_GROUP_RUNTIME_DESCRIPTION "GNU Radio Runtime")
-
-CPACK_COMPONENT("runtime_runtime"
-    GROUP        "Runtime"
-    DISPLAY_NAME "Runtime"
-    DESCRIPTION  "Dynamic link libraries"
-    DEPENDS      "runtime_runtime"
-)
-
-CPACK_COMPONENT("runtime_devel"
-    GROUP        "Runtime"
-    DISPLAY_NAME "Development"
-    DESCRIPTION  "C++ headers, package config, import libraries"
-    DEPENDS      "runtime_devel"
-)
-
-CPACK_COMPONENT("runtime_python"
-    GROUP        "Runtime"
-    DISPLAY_NAME "Python"
-    DESCRIPTION  "Python modules for runtime"
-    DEPENDS      "runtime_python;runtime_runtime"
-)
-
-CPACK_COMPONENT("runtime_swig"
-    GROUP        "Runtime"
-    DISPLAY_NAME "SWIG"
-    DESCRIPTION  "SWIG development .i files"
-    DEPENDS      "runtime_swig;runtime_python;runtime_devel"
-)
 configure_file(
     ${CMAKE_CURRENT_SOURCE_DIR}/gnuradio-runtime.conf.in
     ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-runtime.conf
@@ -130,14 +97,12 @@ configure_file(
 install(
     FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-runtime.conf
     DESTINATION ${GR_PREFSDIR}
-    COMPONENT "runtime_runtime"
 )
 
 if(ENABLE_GR_LOG AND HAVE_LOG4CPP)
 install(FILES
     ${CMAKE_CURRENT_SOURCE_DIR}/gr_log_default.conf
     DESTINATION ${GR_PREFSDIR}
-    COMPONENT "runtime_runtime"
 )
 endif(ENABLE_GR_LOG AND HAVE_LOG4CPP)
 
@@ -166,7 +131,6 @@ configure_file(
 install(
     FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-runtime.pc
     DESTINATION ${GR_LIBRARY_DIR}/pkgconfig
-    COMPONENT "runtime_devel"
 )
 
 endif(ENABLE_GNURADIO_RUNTIME)
diff --git a/gnuradio-runtime/apps/CMakeLists.txt b/gnuradio-runtime/apps/CMakeLists.txt
index 3dea7268ff..4a73f3c18f 100644
--- a/gnuradio-runtime/apps/CMakeLists.txt
+++ b/gnuradio-runtime/apps/CMakeLists.txt
@@ -37,5 +37,4 @@ target_link_libraries(gnuradio-config-info gnuradio-runtime ${Boost_LIBRARIES})
 install(
     TARGETS gnuradio-config-info
     DESTINATION ${GR_RUNTIME_DIR}
-    COMPONENT "runtime_runtime"
 )
diff --git a/gnuradio-runtime/examples/mp-sched/CMakeLists.txt b/gnuradio-runtime/examples/mp-sched/CMakeLists.txt
index 863cfa733a..4e07366d4f 100644
--- a/gnuradio-runtime/examples/mp-sched/CMakeLists.txt
+++ b/gnuradio-runtime/examples/mp-sched/CMakeLists.txt
@@ -26,11 +26,9 @@ GR_PYTHON_INSTALL(PROGRAMS
   synthetic.py
   wfm_rcv_pll_to_wav.py
   DESTINATION ${GR_PKG_DATA_DIR}/examples/mp-sched
-  COMPONENT "runtime_python"
 )
 
 install(
     FILES README
     DESTINATION ${GR_PKG_DATA_DIR}/examples/mp-sched
-    COMPONENT "runtime_python"
 )
diff --git a/gnuradio-runtime/examples/network/CMakeLists.txt b/gnuradio-runtime/examples/network/CMakeLists.txt
index 92eb734768..08f498b469 100644
--- a/gnuradio-runtime/examples/network/CMakeLists.txt
+++ b/gnuradio-runtime/examples/network/CMakeLists.txt
@@ -25,6 +25,4 @@ GR_PYTHON_INSTALL(PROGRAMS
   vector_sink.py
   vector_source.py
   DESTINATION ${GR_PKG_DATA_DIR}/examples/network
-  COMPONENT "runtime_python"
 )
-
diff --git a/gnuradio-runtime/examples/volk_benchmark/CMakeLists.txt b/gnuradio-runtime/examples/volk_benchmark/CMakeLists.txt
index f56675e556..076ef359e8 100644
--- a/gnuradio-runtime/examples/volk_benchmark/CMakeLists.txt
+++ b/gnuradio-runtime/examples/volk_benchmark/CMakeLists.txt
@@ -25,11 +25,9 @@ GR_PYTHON_INSTALL(PROGRAMS
   volk_test_funcs.py
   volk_types.py
   DESTINATION ${GR_PKG_DATA_DIR}/examples/volk_benchmark
-  COMPONENT "runtime_python"
 )
 
 install(
     FILES README
     DESTINATION ${GR_PKG_DATA_DIR}/examples/volk_benchmark
-    COMPONENT "runtime_python"
 )
diff --git a/gnuradio-runtime/include/gnuradio/CMakeLists.txt b/gnuradio-runtime/include/gnuradio/CMakeLists.txt
index 472f91847b..ac2e59bca9 100644
--- a/gnuradio-runtime/include/gnuradio/CMakeLists.txt
+++ b/gnuradio-runtime/include/gnuradio/CMakeLists.txt
@@ -83,7 +83,6 @@ install(FILES
   rpcserver_selector.h
   ${CMAKE_CURRENT_BINARY_DIR}/logger.h
   DESTINATION ${GR_INCLUDE_DIR}/gnuradio
-  COMPONENT "runtime_devel"
 )
 
 if(THRIFT_FOUND)
@@ -92,7 +91,6 @@ install(FILES
   thrift_application_base.h
   thrift_server_template.h
   DESTINATION ${GR_INCLUDE_DIR}/gnuradio
-  COMPONENT "runtime_devel"
 )
 endif(THRIFT_FOUND)
 
diff --git a/gnuradio-runtime/include/gnuradio/messages/CMakeLists.txt b/gnuradio-runtime/include/gnuradio/messages/CMakeLists.txt
index f79f2bd24f..7504cfeeb1 100644
--- a/gnuradio-runtime/include/gnuradio/messages/CMakeLists.txt
+++ b/gnuradio-runtime/include/gnuradio/messages/CMakeLists.txt
@@ -27,5 +27,4 @@ install(FILES
   msg_producer.h
   msg_queue.h
   DESTINATION ${GR_INCLUDE_DIR}/gnuradio/messages
-  COMPONENT "runtime_devel"
 )
diff --git a/gnuradio-runtime/include/gnuradio/thread/CMakeLists.txt b/gnuradio-runtime/include/gnuradio/thread/CMakeLists.txt
index 8ea4bfc66e..b9a4a98c13 100644
--- a/gnuradio-runtime/include/gnuradio/thread/CMakeLists.txt
+++ b/gnuradio-runtime/include/gnuradio/thread/CMakeLists.txt
@@ -25,5 +25,4 @@ install(FILES
   thread_body_wrapper.h
   thread_group.h
   DESTINATION ${GR_INCLUDE_DIR}/gnuradio/thread
-  COMPONENT "runtime_devel"
 )
diff --git a/gnuradio-runtime/include/pmt/CMakeLists.txt b/gnuradio-runtime/include/pmt/CMakeLists.txt
index 4ae0e22431..f4a541e0dd 100644
--- a/gnuradio-runtime/include/pmt/CMakeLists.txt
+++ b/gnuradio-runtime/include/pmt/CMakeLists.txt
@@ -26,4 +26,4 @@ install(FILES
   pmt_pool.h
   pmt_sugar.h
   DESTINATION ${GR_INCLUDE_DIR}/pmt
-  COMPONENT "runtime_devel")
+)
diff --git a/gnuradio-runtime/lib/CMakeLists.txt b/gnuradio-runtime/lib/CMakeLists.txt
index 3da550d37b..e0196b669a 100644
--- a/gnuradio-runtime/lib/CMakeLists.txt
+++ b/gnuradio-runtime/lib/CMakeLists.txt
@@ -203,7 +203,7 @@ endif(TRY_SHM_VMCIRCBUF)
 #######################################################
 add_library(gnuradio-runtime SHARED ${gnuradio_runtime_sources})
 target_link_libraries(gnuradio-runtime ${gnuradio_runtime_libs})
-GR_LIBRARY_FOO(gnuradio-runtime RUNTIME_COMPONENT "runtime_runtime" DEVEL_COMPONENT "runtime_devel")
+GR_LIBRARY_FOO(gnuradio-runtime)
 
 add_dependencies(gnuradio-runtime
   pmt_generated runtime_generated_includes
@@ -241,7 +241,7 @@ if(ENABLE_STATIC_LIBS)
   endif(NOT WIN32)
 
   install(TARGETS gnuradio-runtime_static
-    ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "runtime_devel"   # .lib file
+    ARCHIVE DESTINATION lib${LIB_SUFFIX} # .lib file
     )
 endif(ENABLE_STATIC_LIBS)
 
diff --git a/gnuradio-runtime/lib/controlport/CMakeLists.txt b/gnuradio-runtime/lib/controlport/CMakeLists.txt
index c9bdeb949e..80d31fc721 100644
--- a/gnuradio-runtime/lib/controlport/CMakeLists.txt
+++ b/gnuradio-runtime/lib/controlport/CMakeLists.txt
@@ -84,7 +84,6 @@ list(APPEND gnuradio_runtime_libs
 install(
   FILES ${CMAKE_CURRENT_SOURCE_DIR}/thrift/thrift.conf.example
   DESTINATION ${SYSCONFDIR}/${CMAKE_PROJECT_NAME}
-  COMPONENT "runtime_runtime"
 )
 
 endif(THRIFT_FOUND)
diff --git a/gnuradio-runtime/lib/pmt/CMakeLists.txt b/gnuradio-runtime/lib/pmt/CMakeLists.txt
index 32c0e57a6a..e5c8f2f47e 100644
--- a/gnuradio-runtime/lib/pmt/CMakeLists.txt
+++ b/gnuradio-runtime/lib/pmt/CMakeLists.txt
@@ -44,7 +44,6 @@ add_custom_command(
 install(
     FILES ${PMT_SERIAL_TAGS_H}
     DESTINATION ${GR_INCLUDE_DIR}/pmt
-    COMPONENT "runtime_devel"
 )
 
 include(AddFileDependencies)
@@ -108,7 +107,7 @@ endif(MSVC)
 add_library(gnuradio-pmt SHARED ${pmt_sources})
 target_link_libraries(gnuradio-pmt ${gnuradio_pmt_libs})
 
-GR_LIBRARY_FOO(gnuradio-pmt RUNTIME_COMPONENT "runtime_runtime" DEVEL_COMPONENT "runtime_devel")
+GR_LIBRARY_FOO(gnuradio-pmt)
 
 add_dependencies(gnuradio-pmt
   pmt_generated
@@ -125,7 +124,7 @@ if(ENABLE_STATIC_LIBS)
   endif(NOT WIN32)
 
   install(TARGETS gnuradio-pmt_static
-    ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "runtime_devel"   # .lib file
+    ARCHIVE DESTINATION lib${LIB_SUFFIX} # .lib file
     )
 endif(ENABLE_STATIC_LIBS)
 
diff --git a/gnuradio-runtime/python/gnuradio/CMakeLists.txt b/gnuradio-runtime/python/gnuradio/CMakeLists.txt
index d29e6aa9d2..736db499dc 100644
--- a/gnuradio-runtime/python/gnuradio/CMakeLists.txt
+++ b/gnuradio-runtime/python/gnuradio/CMakeLists.txt
@@ -35,5 +35,4 @@ GR_PYTHON_INSTALL(FILES
     gr_unittest.py
     gr_xmlrunner.py
     DESTINATION ${GR_PYTHON_DIR}/gnuradio
-    COMPONENT "runtime_python"
 )
diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/CMakeLists.txt b/gnuradio-runtime/python/gnuradio/ctrlport/CMakeLists.txt
index f40f253a72..ecf24178f9 100644
--- a/gnuradio-runtime/python/gnuradio/ctrlport/CMakeLists.txt
+++ b/gnuradio-runtime/python/gnuradio/ctrlport/CMakeLists.txt
@@ -24,7 +24,6 @@ install(
     FILES
     ${CMAKE_CURRENT_SOURCE_DIR}/icon.png
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/ctrlport
-    COMPONENT "runtime_python"
 )
 
 
@@ -36,7 +35,6 @@ GR_PYTHON_INSTALL(
     ${CMAKE_CURRENT_SOURCE_DIR}/GNURadioControlPortClient.py
     ${CMAKE_CURRENT_SOURCE_DIR}/RPCConnection.py
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/ctrlport/
-    COMPONENT "runtime_python"
 )
 
 GR_PYTHON_INSTALL(
@@ -45,7 +43,6 @@ GR_PYTHON_INSTALL(
     ${CMAKE_CURRENT_SOURCE_DIR}/gr-ctrlport-monitor
     DESTINATION ${GR_RUNTIME_DIR}
     PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
-    COMPONENT "runtime_python"
 )
 
 if(THRIFT_FOUND)
@@ -60,7 +57,6 @@ GR_PYTHON_INSTALL(
     FILES
     ${CMAKE_CURRENT_SOURCE_DIR}/RPCConnectionThrift.py
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/ctrlport/
-    COMPONENT "runtime_python"
 )
 
 GR_PYTHON_INSTALL(
@@ -73,7 +69,6 @@ GR_PYTHON_INSTALL(
     ${CMAKE_CURRENT_BINARY_DIR}/GNURadio/StreamReceiver-remote
     ${CMAKE_CURRENT_BINARY_DIR}/GNURadio/ttypes.py
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/ctrlport/GNURadio
-    COMPONENT "runtime_python"
 )
 
 endif(THRIFT_FOUND)
diff --git a/gnuradio-runtime/python/gnuradio/gr/CMakeLists.txt b/gnuradio-runtime/python/gnuradio/gr/CMakeLists.txt
index ddad2c448a..fc966b8ece 100644
--- a/gnuradio-runtime/python/gnuradio/gr/CMakeLists.txt
+++ b/gnuradio-runtime/python/gnuradio/gr/CMakeLists.txt
@@ -32,7 +32,6 @@ GR_PYTHON_INSTALL(FILES
     top_block.py
     pubsub.py
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/gr
-    COMPONENT "runtime_python"
 )
 
 ########################################################################
diff --git a/gnuradio-runtime/python/gnuradio/gru/CMakeLists.txt b/gnuradio-runtime/python/gnuradio/gru/CMakeLists.txt
index f0276a8d53..c1d7b701a9 100644
--- a/gnuradio-runtime/python/gnuradio/gru/CMakeLists.txt
+++ b/gnuradio-runtime/python/gnuradio/gru/CMakeLists.txt
@@ -32,5 +32,4 @@ GR_PYTHON_INSTALL(FILES
     socket_stuff.py
     daemon.py
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/gru
-    COMPONENT "runtime_python"
 )
diff --git a/gnuradio-runtime/python/pmt/CMakeLists.txt b/gnuradio-runtime/python/pmt/CMakeLists.txt
index f4cba41d34..1ddfc2a46f 100644
--- a/gnuradio-runtime/python/pmt/CMakeLists.txt
+++ b/gnuradio-runtime/python/pmt/CMakeLists.txt
@@ -26,7 +26,6 @@ GR_PYTHON_INSTALL(FILES
     __init__.py
     pmt_to_python.py
     DESTINATION ${GR_PYTHON_DIR}/pmt
-    COMPONENT "runtime_python"
 )
 
 ########################################################################
diff --git a/gnuradio-runtime/swig/CMakeLists.txt b/gnuradio-runtime/swig/CMakeLists.txt
index ca9ddd4039..51e9e33356 100644
--- a/gnuradio-runtime/swig/CMakeLists.txt
+++ b/gnuradio-runtime/swig/CMakeLists.txt
@@ -52,7 +52,6 @@ GR_SWIG_MAKE(pmt_swig pmt_swig.i)
 GR_SWIG_INSTALL(
     TARGETS pmt_swig
     DESTINATION ${GR_PYTHON_DIR}/pmt
-    COMPONENT "runtime_python"
 )
 
 add_custom_target(pmt_swig DEPENDS ${SWIG_MODULE_pmt_swig_REAL_NAME})
@@ -82,7 +81,6 @@ GR_SWIG_MAKE(runtime_swig runtime_swig.i)
 GR_SWIG_INSTALL(
     TARGETS runtime_swig
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/gr
-    COMPONENT "runtime_python"
 )
 
 install(
@@ -124,5 +122,4 @@ install(
     ${CMAKE_CURRENT_BINARY_DIR}/runtime_swig_doc.i
     ${CMAKE_CURRENT_BINARY_DIR}/pmt_swig_doc.i
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
-    COMPONENT "runtime_swig"
 )
diff --git a/gr-analog/CMakeLists.txt b/gr-analog/CMakeLists.txt
index e0be42a0a5..3be716d7ab 100644
--- a/gr-analog/CMakeLists.txt
+++ b/gr-analog/CMakeLists.txt
@@ -50,40 +50,6 @@ SET(GR_PKG_ANALOG_EXAMPLES_DIR ${GR_PKG_DATA_DIR}/examples/analog)
 ########################################################################
 if(ENABLE_GR_ANALOG)
 
-########################################################################
-# Setup CPack components
-########################################################################
-include(GrPackage)
-CPACK_SET(CPACK_COMPONENT_GROUP_ANALOG_DESCRIPTION "GNU Radio Analog Blocks")
-
-CPACK_COMPONENT("analog_runtime"
-    GROUP        "Analog"
-    DISPLAY_NAME "Runtime"
-    DESCRIPTION  "Dynamic link libraries"
-    DEPENDS      "runtime_runtime"
-)
-
-CPACK_COMPONENT("analog_devel"
-    GROUP        "Analog"
-    DISPLAY_NAME "Development"
-    DESCRIPTION  "C++ headers, package config, import libraries"
-    DEPENDS      "runtime_devel"
-)
-
-CPACK_COMPONENT("analog_python"
-    GROUP        "Analog"
-    DISPLAY_NAME "Python"
-    DESCRIPTION  "Python modules for runtime"
-    DEPENDS      "runtime_python;analog_runtime"
-)
-
-CPACK_COMPONENT("analog_swig"
-    GROUP        "Analog"
-    DISPLAY_NAME "SWIG"
-    DESCRIPTION  "SWIG development .i files"
-    DEPENDS      "runtime_swig;analog_python;analog_devel"
-)
-
 ########################################################################
 # Add subdirectories
 ########################################################################
@@ -109,7 +75,6 @@ configure_file(
 install(
     FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-analog.pc
     DESTINATION ${GR_LIBRARY_DIR}/pkgconfig
-    COMPONENT "analog_devel"
 )
 
 endif(ENABLE_GR_ANALOG)
diff --git a/gr-analog/examples/CMakeLists.txt b/gr-analog/examples/CMakeLists.txt
index acb0656b7f..fb23bdf4a0 100644
--- a/gr-analog/examples/CMakeLists.txt
+++ b/gr-analog/examples/CMakeLists.txt
@@ -23,12 +23,10 @@ include(GrPython)
 GR_PYTHON_INSTALL(PROGRAMS
     fmtest.py
     DESTINATION ${GR_PKG_ANALOG_EXAMPLES_DIR}
-    COMPONENT "analog_python"
 )
 
 install(
     FILES
     noise_power.grc
     DESTINATION ${GR_PKG_ANALOG_EXAMPLES_DIR}
-    COMPONENT "analog_python"
 )
diff --git a/gr-analog/examples/tags/CMakeLists.txt b/gr-analog/examples/tags/CMakeLists.txt
index ba95100665..9e51cee16a 100644
--- a/gr-analog/examples/tags/CMakeLists.txt
+++ b/gr-analog/examples/tags/CMakeLists.txt
@@ -22,5 +22,4 @@ include(GrPython)
 GR_PYTHON_INSTALL(PROGRAMS
   uhd_burst_detector.py
   DESTINATION ${GR_PKG_DATA_DIR}/examples/tags
-  COMPONENT "runtime_python"
 )
diff --git a/gr-analog/grc/CMakeLists.txt b/gr-analog/grc/CMakeLists.txt
index a699d7c2fa..1251af5b83 100644
--- a/gr-analog/grc/CMakeLists.txt
+++ b/gr-analog/grc/CMakeLists.txt
@@ -18,5 +18,4 @@
 # Boston, MA 02110-1301, USA.
 
 file(GLOB xml_files "*.xml")
-install(FILES ${xml_files} DESTINATION ${GRC_BLOCKS_DIR} COMPONENT "analog_python")
-
+install(FILES ${xml_files} DESTINATION ${GRC_BLOCKS_DIR})
diff --git a/gr-analog/include/gnuradio/analog/CMakeLists.txt b/gr-analog/include/gnuradio/analog/CMakeLists.txt
index b5333639d6..24b9ad95d1 100644
--- a/gr-analog/include/gnuradio/analog/CMakeLists.txt
+++ b/gr-analog/include/gnuradio/analog/CMakeLists.txt
@@ -68,6 +68,5 @@ install(FILES
     sig_source_waveform.h
     simple_squelch_cc.h
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio/analog
-    COMPONENT "analog_devel"
 )
 
diff --git a/gr-analog/lib/CMakeLists.txt b/gr-analog/lib/CMakeLists.txt
index a75d70337b..a3b279f900 100644
--- a/gr-analog/lib/CMakeLists.txt
+++ b/gr-analog/lib/CMakeLists.txt
@@ -106,7 +106,7 @@ list(APPEND analog_libs
 
 add_library(gnuradio-analog SHARED ${analog_sources})
 target_link_libraries(gnuradio-analog ${analog_libs})
-GR_LIBRARY_FOO(gnuradio-analog RUNTIME_COMPONENT "analog_runtime" DEVEL_COMPONENT "analog_devel")
+GR_LIBRARY_FOO(gnuradio-analog)
 add_dependencies(gnuradio-analog analog_generated_includes analog_generated_swigs gnuradio-filter)
 
 if(ENABLE_STATIC_LIBS)
@@ -122,7 +122,7 @@ if(ENABLE_STATIC_LIBS)
   endif(NOT WIN32)
 
   install(TARGETS gnuradio-analog_static
-    ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "analog_devel"   # .lib file
+    ARCHIVE DESTINATION lib${LIB_SUFFIX} # .lib file
     )
 endif(ENABLE_STATIC_LIBS)
 
diff --git a/gr-analog/python/analog/CMakeLists.txt b/gr-analog/python/analog/CMakeLists.txt
index 2da8273c6c..1fed9d1890 100644
--- a/gr-analog/python/analog/CMakeLists.txt
+++ b/gr-analog/python/analog/CMakeLists.txt
@@ -36,7 +36,6 @@ GR_PYTHON_INSTALL(
     wfm_rcv_pll.py
     wfm_tx.py
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/analog
-    COMPONENT "analog_python"
 )
 
 ########################################################################
diff --git a/gr-analog/swig/CMakeLists.txt b/gr-analog/swig/CMakeLists.txt
index 38fef3a236..3636cce16d 100644
--- a/gr-analog/swig/CMakeLists.txt
+++ b/gr-analog/swig/CMakeLists.txt
@@ -50,7 +50,6 @@ GR_SWIG_MAKE(analog_swig analog_swig.i)
 GR_SWIG_INSTALL(
     TARGETS analog_swig
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/analog
-    COMPONENT "analog_python"
 )
 
 install(
@@ -58,5 +57,4 @@ install(
     analog_swig.i
     ${CMAKE_CURRENT_BINARY_DIR}/analog_swig_doc.i
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
-    COMPONENT "analog_swig"
 )
diff --git a/gr-audio/CMakeLists.txt b/gr-audio/CMakeLists.txt
index 99e0bc174b..2185fd3690 100644
--- a/gr-audio/CMakeLists.txt
+++ b/gr-audio/CMakeLists.txt
@@ -42,47 +42,6 @@ SET(GR_PKG_AUDIO_EXAMPLES_DIR ${GR_PKG_DATA_DIR}/examples/audio)
 ########################################################################
 if(ENABLE_GR_AUDIO)
 
-########################################################################
-# Setup CPack components
-########################################################################
-include(GrPackage)
-CPACK_SET(CPACK_COMPONENT_GROUP_AUDIO_DESCRIPTION "GNU Radio Audio Blocks")
-
-CPACK_COMPONENT("audio_runtime"
-    GROUP        "Audio"
-    DISPLAY_NAME "Runtime"
-    DESCRIPTION  "Runtime"
-    DEPENDS      "runtime_runtime"
-)
-
-CPACK_COMPONENT("audio_devel"
-    GROUP        "Audio"
-    DISPLAY_NAME "Development"
-    DESCRIPTION  "C++ headers, package config, import libraries"
-    DEPENDS      "runtime_devel"
-)
-
-CPACK_COMPONENT("audio_python"
-    GROUP        "Audio"
-    DISPLAY_NAME "Python"
-    DESCRIPTION  "Python modules for runtime; GRC xml files"
-    DEPENDS      "runtime_python;audio_runtime"
-)
-
-CPACK_COMPONENT("audio_examples"
-    GROUP        "Audio"
-    DISPLAY_NAME "Examples"
-    DESCRIPTION  "Example programs"
-    DEPENDS      "audio_runtime"
-)
-
-CPACK_COMPONENT("audio_swig"
-    GROUP        "Audio"
-    DISPLAY_NAME "SWIG"
-    DESCRIPTION  "SWIG development .i files"
-    DEPENDS      "runtime_swig;audio_python;audio_devel"
-)
-
 ########################################################################
 # Add subdirectories
 ########################################################################
@@ -112,7 +71,6 @@ configure_file(
 install(
     FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-audio.pc
     DESTINATION ${GR_LIBRARY_DIR}/pkgconfig
-    COMPONENT "audio_devel"
 )
 
 endif(ENABLE_GR_AUDIO)
diff --git a/gr-audio/examples/c++/CMakeLists.txt b/gr-audio/examples/c++/CMakeLists.txt
index 205bdeb287..202a79afe7 100644
--- a/gr-audio/examples/c++/CMakeLists.txt
+++ b/gr-audio/examples/c++/CMakeLists.txt
@@ -31,5 +31,4 @@ target_link_libraries(dial_tone
 INSTALL(TARGETS
     dial_tone
     DESTINATION ${GR_PKG_AUDIO_EXAMPLES_DIR}
-    COMPONENT "audio_examples"
 )
diff --git a/gr-audio/examples/grc/CMakeLists.txt b/gr-audio/examples/grc/CMakeLists.txt
index 179b42fcc7..d0d0d568c7 100644
--- a/gr-audio/examples/grc/CMakeLists.txt
+++ b/gr-audio/examples/grc/CMakeLists.txt
@@ -22,6 +22,5 @@ install(
     cvsd_sweep.grc
     dial_tone.grc
     DESTINATION ${GR_PKG_AUDIO_EXAMPLES_DIR}
-    COMPONENT "audio_python"
 )
 
diff --git a/gr-audio/examples/python/CMakeLists.txt b/gr-audio/examples/python/CMakeLists.txt
index 24e29e2348..01a03fefcd 100644
--- a/gr-audio/examples/python/CMakeLists.txt
+++ b/gr-audio/examples/python/CMakeLists.txt
@@ -33,5 +33,4 @@ GR_PYTHON_INSTALL(PROGRAMS
     spectrum_inversion.py
     test_resampler.py
     DESTINATION ${GR_PKG_AUDIO_EXAMPLES_DIR}
-    COMPONENT "audio_python"
 )
diff --git a/gr-audio/grc/CMakeLists.txt b/gr-audio/grc/CMakeLists.txt
index 35c540ad3c..7da5fbc352 100644
--- a/gr-audio/grc/CMakeLists.txt
+++ b/gr-audio/grc/CMakeLists.txt
@@ -19,4 +19,4 @@
 
 ########################################################################
 file(GLOB xml_files "*.xml")
-install(FILES ${xml_files} DESTINATION ${GRC_BLOCKS_DIR} COMPONENT "audio_python")
+install(FILES ${xml_files} DESTINATION ${GRC_BLOCKS_DIR})
diff --git a/gr-audio/include/gnuradio/audio/CMakeLists.txt b/gr-audio/include/gnuradio/audio/CMakeLists.txt
index 7e068e3f32..754da454f7 100644
--- a/gr-audio/include/gnuradio/audio/CMakeLists.txt
+++ b/gr-audio/include/gnuradio/audio/CMakeLists.txt
@@ -29,5 +29,4 @@ endif(OSX_AUDIO_VALID)
 
 install(FILES ${gr_audio_install_files}
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio/audio
-    COMPONENT "audio_devel"
 )
diff --git a/gr-audio/lib/CMakeLists.txt b/gr-audio/lib/CMakeLists.txt
index 944b1599b1..0534ddd86d 100644
--- a/gr-audio/lib/CMakeLists.txt
+++ b/gr-audio/lib/CMakeLists.txt
@@ -201,9 +201,9 @@ endif(WIN32)
 ########################################################################
 add_library(gnuradio-audio SHARED ${gr_audio_sources})
 target_link_libraries(gnuradio-audio ${gr_audio_libs})
-GR_LIBRARY_FOO(gnuradio-audio RUNTIME_COMPONENT "audio_runtime" DEVEL_COMPONENT "audio_devel")
+GR_LIBRARY_FOO(gnuradio-audio)
 
-install(FILES ${gr_audio_confs} DESTINATION ${GR_PREFSDIR} COMPONENT "audio_runtime")
+install(FILES ${gr_audio_confs} DESTINATION ${GR_PREFSDIR})
 
 if(ENABLE_STATIC_LIBS)
   if(ENABLE_GR_CTRLPORT)
@@ -225,6 +225,6 @@ if(ENABLE_STATIC_LIBS)
   endif(NOT WIN32)
 
   install(TARGETS gnuradio-audio_static
-    ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "audio_devel"   # .lib file
+    ARCHIVE DESTINATION lib${LIB_SUFFIX} # .lib file
     )
 endif(ENABLE_STATIC_LIBS)
diff --git a/gr-audio/python/audio/CMakeLists.txt b/gr-audio/python/audio/CMakeLists.txt
index 11409e4323..2edbf21cf4 100644
--- a/gr-audio/python/audio/CMakeLists.txt
+++ b/gr-audio/python/audio/CMakeLists.txt
@@ -24,7 +24,6 @@ GR_PYTHON_INSTALL(
     FILES
     __init__.py
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/audio
-    COMPONENT "audio_python"
 )
 
 ########################################################################
diff --git a/gr-audio/swig/CMakeLists.txt b/gr-audio/swig/CMakeLists.txt
index f9dabfd8c4..4c67f5bd58 100644
--- a/gr-audio/swig/CMakeLists.txt
+++ b/gr-audio/swig/CMakeLists.txt
@@ -44,12 +44,10 @@ GR_SWIG_MAKE(audio_swig audio_swig.i)
 GR_SWIG_INSTALL(
     TARGETS audio_swig
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/audio
-    COMPONENT "audio_python"
 )
 
 install(
     FILES audio_swig.i
     ${CMAKE_CURRENT_BINARY_DIR}/audio_swig_doc.i
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
-    COMPONENT "audio_swig"
 )
diff --git a/gr-blocks/CMakeLists.txt b/gr-blocks/CMakeLists.txt
index 685f5736fb..6f573a09b1 100644
--- a/gr-blocks/CMakeLists.txt
+++ b/gr-blocks/CMakeLists.txt
@@ -43,40 +43,6 @@ GR_SET_GLOBAL(GR_BLOCKS_INCLUDE_DIRS
 ########################################################################
 if(ENABLE_GR_BLOCKS)
 
-########################################################################
-# Setup CPack components
-########################################################################
-include(GrPackage)
-CPACK_SET(CPACK_COMPONENT_GROUP_BLOCKS_DESCRIPTION "GNU Radio Basic Blocks")
-
-CPACK_COMPONENT("blocks_runtime"
-    GROUP        "Blocks"
-    DISPLAY_NAME "Runtime"
-    DESCRIPTION  "Runtime"
-    DEPENDS      "runtime_runtime"
-)
-
-CPACK_COMPONENT("blocks_devel"
-    GROUP        "Blocks"
-    DISPLAY_NAME "Development"
-    DESCRIPTION  "C++ headers, package config, import libraries"
-    DEPENDS      "runtime_devel"
-)
-
-CPACK_COMPONENT("blocks_python"
-    GROUP        "Blocks"
-    DISPLAY_NAME "Python"
-    DESCRIPTION  "Python modules for runtime; GRC xml files"
-    DEPENDS      "runtime_python;blocks_runtime"
-)
-
-CPACK_COMPONENT("blocks_swig"
-    GROUP        "Blocks"
-    DISPLAY_NAME "SWIG"
-    DESCRIPTION  "SWIG development .i files"
-    DEPENDS      "runtime_swig;blocks_python;blocks_devel"
-)
-
 ########################################################################
 # Add subdirectories
 ########################################################################
@@ -105,7 +71,6 @@ configure_file(
 install(
     FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-blocks.pc
     DESTINATION ${GR_LIBRARY_DIR}/pkgconfig
-    COMPONENT "blocks_devel"
 )
 
 endif(ENABLE_GR_BLOCKS)
diff --git a/gr-blocks/examples/CMakeLists.txt b/gr-blocks/examples/CMakeLists.txt
index 8be56d0b9d..850672e404 100644
--- a/gr-blocks/examples/CMakeLists.txt
+++ b/gr-blocks/examples/CMakeLists.txt
@@ -22,9 +22,8 @@ install(
   matrix_multiplexer.grc
   peak_detector2.grc
   vector_source_with_tags.grc
-  test_stream_mux_tags.grc 
+  test_stream_mux_tags.grc
   DESTINATION ${GR_PKG_DATA_DIR}/examples/blocks
-  COMPONENT "runtime_python"
 )
 
 add_subdirectory(metadata)
diff --git a/gr-blocks/examples/ctrlport/CMakeLists.txt b/gr-blocks/examples/ctrlport/CMakeLists.txt
index 23d2db129f..c9b39bcaaa 100644
--- a/gr-blocks/examples/ctrlport/CMakeLists.txt
+++ b/gr-blocks/examples/ctrlport/CMakeLists.txt
@@ -26,12 +26,10 @@ install(
   simple_copy.grc
   usrp_source_control.grc
   DESTINATION ${GR_PKG_DATA_DIR}/examples/ctrlport
-  COMPONENT "runtime_python"
 )
 
 GR_PYTHON_INSTALL(PROGRAMS
   simple_copy_controller.py
   usrp_source_controller.py
   DESTINATION ${GR_PKG_DATA_DIR}/examples/ctrlport
-  COMPONENT "runtime_python"
 )
diff --git a/gr-blocks/examples/metadata/CMakeLists.txt b/gr-blocks/examples/metadata/CMakeLists.txt
index 8d7bbe79e0..418b2d2594 100644
--- a/gr-blocks/examples/metadata/CMakeLists.txt
+++ b/gr-blocks/examples/metadata/CMakeLists.txt
@@ -26,5 +26,4 @@ install(
   file_metadata_vector_sink.grc
   file_metadata_vector_source.grc
   DESTINATION ${GR_PKG_DATA_DIR}/examples/metadata
-  COMPONENT "runtime_python"
 )
diff --git a/gr-blocks/examples/msg_passing/CMakeLists.txt b/gr-blocks/examples/msg_passing/CMakeLists.txt
index 9c24355f7f..9965ce878a 100644
--- a/gr-blocks/examples/msg_passing/CMakeLists.txt
+++ b/gr-blocks/examples/msg_passing/CMakeLists.txt
@@ -23,5 +23,4 @@ install(
   FILES
   strobe.grc
   DESTINATION ${GR_PKG_DATA_DIR}/examples/msg_passing
-  COMPONENT "runtime_python"
 )
diff --git a/gr-blocks/examples/tags/CMakeLists.txt b/gr-blocks/examples/tags/CMakeLists.txt
index 142b5cde6c..52cf4662bb 100644
--- a/gr-blocks/examples/tags/CMakeLists.txt
+++ b/gr-blocks/examples/tags/CMakeLists.txt
@@ -22,6 +22,4 @@ include(GrPython)
 GR_PYTHON_INSTALL(PROGRAMS
   test_file_tags.py
   DESTINATION ${GR_PKG_DATA_DIR}/examples/tags
-  COMPONENT "blocks_python"
 )
-
diff --git a/gr-blocks/grc/CMakeLists.txt b/gr-blocks/grc/CMakeLists.txt
index 96a715a7e4..2dd1481a47 100644
--- a/gr-blocks/grc/CMakeLists.txt
+++ b/gr-blocks/grc/CMakeLists.txt
@@ -28,4 +28,4 @@ if(NOT ENABLE_GR_CTRLPORT)
     )
 endif(NOT ENABLE_GR_CTRLPORT)
 
-install(FILES ${xml_files} DESTINATION ${GRC_BLOCKS_DIR} COMPONENT "blocks_python")
+install(FILES ${xml_files} DESTINATION ${GRC_BLOCKS_DIR})
diff --git a/gr-blocks/include/gnuradio/blocks/CMakeLists.txt b/gr-blocks/include/gnuradio/blocks/CMakeLists.txt
index 6b3eca69d3..5a748acc19 100644
--- a/gr-blocks/include/gnuradio/blocks/CMakeLists.txt
+++ b/gr-blocks/include/gnuradio/blocks/CMakeLists.txt
@@ -192,7 +192,6 @@ install(FILES
     wavfile_sink.h
     wavfile_source.h
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio/blocks
-    COMPONENT "blocks_devel"
 )
 
 if(ENABLE_GR_CTRLPORT)
@@ -204,6 +203,5 @@ install(FILES
   ctrlport_probe2_i.h
   ctrlport_probe2_b.h
   DESTINATION ${GR_INCLUDE_DIR}/gnuradio/blocks
-  COMPONENT "blocks_devel"
 )
 endif(ENABLE_GR_CTRLPORT)
diff --git a/gr-blocks/lib/CMakeLists.txt b/gr-blocks/lib/CMakeLists.txt
index 1d69f27a1d..da6bc9bf89 100644
--- a/gr-blocks/lib/CMakeLists.txt
+++ b/gr-blocks/lib/CMakeLists.txt
@@ -259,7 +259,7 @@ add_library(gnuradio-blocks SHARED ${gr_blocks_sources})
 add_dependencies(gnuradio-blocks blocks_generated_includes)
 
 target_link_libraries(gnuradio-blocks ${blocks_libs})
-GR_LIBRARY_FOO(gnuradio-blocks RUNTIME_COMPONENT "blocks_runtime" DEVEL_COMPONENT "blocks_devel")
+GR_LIBRARY_FOO(gnuradio-blocks)
 
 if(ENABLE_STATIC_LIBS)
   # Remove controlport-specific source files from staticlibs build
@@ -290,7 +290,7 @@ if(ENABLE_STATIC_LIBS)
   endif(NOT WIN32)
 
   install(TARGETS gnuradio-blocks_static
-    ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "blocks_devel"   # .lib file
+    ARCHIVE DESTINATION lib${LIB_SUFFIX} # .lib file
     )
 endif(ENABLE_STATIC_LIBS)
 
diff --git a/gr-blocks/python/blocks/CMakeLists.txt b/gr-blocks/python/blocks/CMakeLists.txt
index 19d808b1dd..afb860a075 100644
--- a/gr-blocks/python/blocks/CMakeLists.txt
+++ b/gr-blocks/python/blocks/CMakeLists.txt
@@ -26,7 +26,6 @@ GR_PYTHON_INSTALL(
     parse_file_metadata.py
     stream_to_vector_decimator.py
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/blocks
-    COMPONENT "blocks_python"
 )
 
 ########################################################################
diff --git a/gr-blocks/python/grc_gnuradio/CMakeLists.txt b/gr-blocks/python/grc_gnuradio/CMakeLists.txt
index 9ff1240997..33c7560ea6 100644
--- a/gr-blocks/python/grc_gnuradio/CMakeLists.txt
+++ b/gr-blocks/python/grc_gnuradio/CMakeLists.txt
@@ -24,7 +24,6 @@ include(GrPython)
 GR_PYTHON_INSTALL(
     FILES __init__.py
     DESTINATION ${GR_PYTHON_DIR}/grc_gnuradio
-    COMPONENT "blocks_python"
 )
 
 GR_PYTHON_INSTALL(FILES
@@ -33,5 +32,4 @@ GR_PYTHON_INSTALL(FILES
     blks2/selector.py
     blks2/tcp.py
     DESTINATION ${GR_PYTHON_DIR}/grc_gnuradio/blks2
-    COMPONENT "blocks_python"
 )
diff --git a/gr-blocks/swig/CMakeLists.txt b/gr-blocks/swig/CMakeLists.txt
index c128a9b26c..5aec00ae92 100644
--- a/gr-blocks/swig/CMakeLists.txt
+++ b/gr-blocks/swig/CMakeLists.txt
@@ -68,8 +68,7 @@ foreach(swigfile ${GR_SWIG_BLOCK_IFILES})
   GR_SWIG_INSTALL(
     TARGETS ${swigfile}
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/blocks
-    COMPONENT "blocks_python")
-
+  )
   list(APPEND SWIGFILES ${swigfile}.i)
   list(APPEND SWIGDOCFILES ${CMAKE_CURRENT_BINARY_DIR}/${swigfile}_doc.i)
 endforeach(swigfile)
@@ -79,12 +78,10 @@ install(
     ${SWIGFILES}
     ${SWIGDOCFILES}
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
-    COMPONENT "blocks_swig"
 )
 
 # Install the Python file that pulls in the swig built files.
 GR_PYTHON_INSTALL(
     FILES ${CMAKE_CURRENT_BINARY_DIR}/blocks_swig.py
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/blocks
-    COMPONENT "blocks_python"
 )
diff --git a/gr-channels/CMakeLists.txt b/gr-channels/CMakeLists.txt
index 2b5b4cd7d5..9e5deeedcf 100644
--- a/gr-channels/CMakeLists.txt
+++ b/gr-channels/CMakeLists.txt
@@ -49,40 +49,6 @@ SET(GR_PKG_CHANNELS_EXAMPLES_DIR ${GR_PKG_DATA_DIR}/examples/channels)
 ########################################################################
 if(ENABLE_GR_CHANNELS)
 
-########################################################################
-# Setup CPack components
-########################################################################
-include(GrPackage)
-CPACK_SET(CPACK_COMPONENT_GROUP_CHANNELS_DESCRIPTION "GNU Radio Channel Model Blocks")
-
-CPACK_COMPONENT("channels_runtime"
-    GROUP        "Channel Models"
-    DISPLAY_NAME "Runtime"
-    DESCRIPTION  "Runtime"
-    DEPENDS      "runtime_runtime"
-)
-
-CPACK_COMPONENT("channels_devel"
-    GROUP        "Channel Models"
-    DISPLAY_NAME "Development"
-    DESCRIPTION  "C++ headers, package config, import libraries"
-    DEPENDS      "runtime_devel"
-)
-
-CPACK_COMPONENT("channels_python"
-    GROUP        "Channel Models"
-    DISPLAY_NAME "Python"
-    DESCRIPTION  "Python modules for runtime; GRC xml files"
-    DEPENDS      "runtime_python;channels_runtime"
-)
-
-CPACK_COMPONENT("channels_swig"
-    GROUP        "Channel Models"
-    DISPLAY_NAME "SWIG"
-    DESCRIPTION  "SWIG development .i files"
-    DEPENDS      "runtime_swig;channels_python;channels_devel"
-)
-
 ########################################################################
 # Add subdirectories
 ########################################################################
@@ -107,7 +73,6 @@ configure_file(
 install(
     FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-channels.pc
     DESTINATION ${GR_LIBRARY_DIR}/pkgconfig
-    COMPONENT "channels_devel"
 )
 
 endif(ENABLE_GR_CHANNELS)
diff --git a/gr-channels/examples/CMakeLists.txt b/gr-channels/examples/CMakeLists.txt
index af33a8f66f..caf7677830 100644
--- a/gr-channels/examples/CMakeLists.txt
+++ b/gr-channels/examples/CMakeLists.txt
@@ -29,5 +29,4 @@ install(
   demo_qam.grc
   demo_ofdm.grc
   DESTINATION ${GR_PKG_CHANNELS_EXAMPLES_DIR}
-  COMPONENT "channels_python"
 )
diff --git a/gr-channels/grc/CMakeLists.txt b/gr-channels/grc/CMakeLists.txt
index 75e2bc0ddd..c85170b4ea 100644
--- a/gr-channels/grc/CMakeLists.txt
+++ b/gr-channels/grc/CMakeLists.txt
@@ -19,5 +19,5 @@
 
 file(GLOB xml_files "*.xml")
 install(FILES ${xml_files}
-    DESTINATION ${GRC_BLOCKS_DIR} COMPONENT "channels_python"
+    DESTINATION ${GRC_BLOCKS_DIR}
 )
diff --git a/gr-channels/include/gnuradio/channels/CMakeLists.txt b/gr-channels/include/gnuradio/channels/CMakeLists.txt
index 6fac10e306..e41c7cc927 100644
--- a/gr-channels/include/gnuradio/channels/CMakeLists.txt
+++ b/gr-channels/include/gnuradio/channels/CMakeLists.txt
@@ -28,6 +28,5 @@ install(FILES
     selective_fading_model.h
     selective_fading_model2.h
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio/channels
-    COMPONENT "channels_devel"
 )
 
diff --git a/gr-channels/lib/CMakeLists.txt b/gr-channels/lib/CMakeLists.txt
index 34726c1715..d025889edb 100644
--- a/gr-channels/lib/CMakeLists.txt
+++ b/gr-channels/lib/CMakeLists.txt
@@ -77,7 +77,7 @@ list(APPEND channels_libs
 
 add_library(gnuradio-channels SHARED ${channels_sources})
 target_link_libraries(gnuradio-channels ${channels_libs})
-GR_LIBRARY_FOO(gnuradio-channels RUNTIME_COMPONENT "channels_runtime" DEVEL_COMPONENT "channels_devel")
+GR_LIBRARY_FOO(gnuradio-channels)
 add_dependencies(gnuradio-channels
   channels_generated_includes channels_generated_swigs
   gnuradio-runtime gnuradio-filter gnuradio-analog gnuradio-blocks)
@@ -109,6 +109,6 @@ if(ENABLE_STATIC_LIBS)
   endif(NOT WIN32)
 
   install(TARGETS gnuradio-channels_static
-    ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "channels_devel"   # .lib file
+    ARCHIVE DESTINATION lib${LIB_SUFFIX} # .lib file
     )
 endif(ENABLE_STATIC_LIBS)
diff --git a/gr-channels/python/channels/CMakeLists.txt b/gr-channels/python/channels/CMakeLists.txt
index 0e36b94a90..a91033df75 100644
--- a/gr-channels/python/channels/CMakeLists.txt
+++ b/gr-channels/python/channels/CMakeLists.txt
@@ -33,7 +33,6 @@ GR_PYTHON_INSTALL(
     phase_noise_gen.py
     quantizer.py
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/channels
-    COMPONENT "channels_python"
 )
 
 ########################################################################
diff --git a/gr-channels/swig/CMakeLists.txt b/gr-channels/swig/CMakeLists.txt
index 3a85626e98..55b7ea7a47 100644
--- a/gr-channels/swig/CMakeLists.txt
+++ b/gr-channels/swig/CMakeLists.txt
@@ -44,7 +44,6 @@ GR_SWIG_MAKE(channels_swig channels_swig.i)
 GR_SWIG_INSTALL(
     TARGETS channels_swig
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/channels
-    COMPONENT "channels_python"
 )
 
 install(
@@ -52,5 +51,4 @@ install(
     channels_swig.i
     ${CMAKE_CURRENT_BINARY_DIR}/channels_swig_doc.i
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
-    COMPONENT "channels_swig"
 )
diff --git a/gr-comedi/CMakeLists.txt b/gr-comedi/CMakeLists.txt
index caf46ee5e8..b457971264 100644
--- a/gr-comedi/CMakeLists.txt
+++ b/gr-comedi/CMakeLists.txt
@@ -50,40 +50,6 @@ SET(GR_PKG_COMEDI_EXAMPLES_DIR ${GR_PKG_DATA_DIR}/examples/comedi)
 ########################################################################
 if(ENABLE_GR_COMEDI)
 
-########################################################################
-# Setup CPack components
-########################################################################
-include(GrPackage)
-CPACK_SET(CPACK_COMPONENT_GROUP_COMEDI_DESCRIPTION "GNU Radio Comedi Blocks")
-
-CPACK_COMPONENT("comedi_runtime"
-    GROUP        "Comedi"
-    DISPLAY_NAME "Runtime"
-    DESCRIPTION  "Dynamic link libraries"
-    DEPENDS      "runtime_runtime"
-)
-
-CPACK_COMPONENT("comedi_devel"
-    GROUP        "Comedi"
-    DISPLAY_NAME "Development"
-    DESCRIPTION  "C++ headers, package config, import libraries"
-    DEPENDS      "runtime_devel"
-)
-
-CPACK_COMPONENT("comedi_python"
-    GROUP        "Comedi"
-    DISPLAY_NAME "Python"
-    DESCRIPTION  "Python modules for runtime"
-    DEPENDS      "runtime_python;comedi_runtime"
-)
-
-CPACK_COMPONENT("comedi_swig"
-    GROUP        "Comedi"
-    DISPLAY_NAME "SWIG"
-    DESCRIPTION  "SWIG development .i files"
-    DEPENDS      "runtime_swig;comedi_python;comedi_devel"
-)
-
 ########################################################################
 # Add subdirectories
 ########################################################################
@@ -105,7 +71,6 @@ configure_file(
 install(
     FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-comedi.pc
     DESTINATION ${GR_LIBRARY_DIR}/pkgconfig
-    COMPONENT "comedi_devel"
 )
 
 endif(ENABLE_GR_COMEDI)
diff --git a/gr-comedi/include/gnuradio/comedi/CMakeLists.txt b/gr-comedi/include/gnuradio/comedi/CMakeLists.txt
index 51a609e421..601c1fb91d 100644
--- a/gr-comedi/include/gnuradio/comedi/CMakeLists.txt
+++ b/gr-comedi/include/gnuradio/comedi/CMakeLists.txt
@@ -25,6 +25,5 @@ install(FILES
     sink_s.h
     source_s.h
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio/comedi
-    COMPONENT "comedi_devel"
 )
 
diff --git a/gr-comedi/lib/CMakeLists.txt b/gr-comedi/lib/CMakeLists.txt
index e6e58dc8c4..38f51fcd1b 100644
--- a/gr-comedi/lib/CMakeLists.txt
+++ b/gr-comedi/lib/CMakeLists.txt
@@ -54,7 +54,7 @@ list(APPEND comedi_libs
 
 add_library(gnuradio-comedi SHARED ${comedi_sources})
 target_link_libraries(gnuradio-comedi ${comedi_libs})
-GR_LIBRARY_FOO(gnuradio-comedi RUNTIME_COMPONENT "comedi_runtime" DEVEL_COMPONENT "comedi_devel")
+GR_LIBRARY_FOO(gnuradio-comedi)
 
 if(ENABLE_STATIC_LIBS)
   if(ENABLE_GR_CTRLPORT)
@@ -76,6 +76,6 @@ if(ENABLE_STATIC_LIBS)
   endif(NOT WIN32)
 
   install(TARGETS gnuradio-comedi_static
-    ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "comedi_devel"   # .lib file
+    ARCHIVE DESTINATION lib${LIB_SUFFIX} # .lib file
     )
 endif(ENABLE_STATIC_LIBS)
diff --git a/gr-comedi/python/comedi/CMakeLists.txt b/gr-comedi/python/comedi/CMakeLists.txt
index 5ac692f995..e3f7031a23 100644
--- a/gr-comedi/python/comedi/CMakeLists.txt
+++ b/gr-comedi/python/comedi/CMakeLists.txt
@@ -26,7 +26,6 @@ GR_PYTHON_INSTALL(
     FILES
     __init__.py
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/comedi
-    COMPONENT "comedi_python"
 )
 
 ########################################################################
diff --git a/gr-comedi/swig/CMakeLists.txt b/gr-comedi/swig/CMakeLists.txt
index b31e4e87eb..d406a3002e 100644
--- a/gr-comedi/swig/CMakeLists.txt
+++ b/gr-comedi/swig/CMakeLists.txt
@@ -46,7 +46,6 @@ GR_SWIG_MAKE(comedi_swig comedi_swig.i)
 GR_SWIG_INSTALL(
     TARGETS comedi_swig
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/comedi
-    COMPONENT "comedi_python"
 )
 
 install(
@@ -54,5 +53,4 @@ install(
     comedi_swig.i
     ${CMAKE_CURRENT_BINARY_DIR}/comedi_swig_doc.i
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
-    COMPONENT "comedi_swig"
 )
diff --git a/gr-digital/CMakeLists.txt b/gr-digital/CMakeLists.txt
index c6fa0798d1..cafadf68d1 100644
--- a/gr-digital/CMakeLists.txt
+++ b/gr-digital/CMakeLists.txt
@@ -54,40 +54,6 @@ SET(GR_PKG_DIGITAL_EXAMPLES_DIR ${GR_PKG_DATA_DIR}/examples/digital)
 ########################################################################
 if(ENABLE_GR_DIGITAL)
 
-########################################################################
-# Setup CPack components
-########################################################################
-include(GrPackage)
-CPACK_SET(CPACK_COMPONENT_GROUP_DIGITAL_DESCRIPTION "GNU Radio Digital Blocks")
-
-CPACK_COMPONENT("digital_runtime"
-    GROUP        "Digital"
-    DISPLAY_NAME "Runtime"
-    DESCRIPTION  "Dynamic link libraries"
-    DEPENDS      "runtime_runtime"
-)
-
-CPACK_COMPONENT("digital_devel"
-    GROUP        "Digital"
-    DISPLAY_NAME "Development"
-    DESCRIPTION  "C++ headers, package config, import libraries"
-    DEPENDS      "runtime_devel"
-)
-
-CPACK_COMPONENT("digital_python"
-    GROUP        "Digital"
-    DISPLAY_NAME "Python"
-    DESCRIPTION  "Python modules for runtime"
-    DEPENDS      "runtime_python;digital_runtime"
-)
-
-CPACK_COMPONENT("digital_swig"
-    GROUP        "Digital"
-    DISPLAY_NAME "SWIG"
-    DESCRIPTION  "SWIG development .i files"
-    DEPENDS      "runtime_swig;digital_python;digital_devel"
-)
-
 ########################################################################
 # Add subdirectories
 ########################################################################
@@ -113,7 +79,6 @@ configure_file(
 install(
     FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-digital.pc
     DESTINATION ${GR_LIBRARY_DIR}/pkgconfig
-    COMPONENT "digital_devel"
 )
 
 endif(ENABLE_GR_DIGITAL)
diff --git a/gr-digital/examples/CMakeLists.txt b/gr-digital/examples/CMakeLists.txt
index 5f1adf08ab..7f388fceda 100644
--- a/gr-digital/examples/CMakeLists.txt
+++ b/gr-digital/examples/CMakeLists.txt
@@ -28,14 +28,12 @@ GR_PYTHON_INSTALL(PROGRAMS
     gen_whitener.py
     snr_estimators.py
     DESTINATION ${GR_PKG_DIGITAL_EXAMPLES_DIR}
-    COMPONENT "digital_python"
 )
 
 install(
     FILES
     burst_shaper.grc
     DESTINATION ${GR_PKG_DIGITAL_EXAMPLES_DIR}
-    COMPONENT "digital_python"
 )
 
 # Narrowband
@@ -51,7 +49,6 @@ GR_PYTHON_INSTALL(PROGRAMS
     narrowband/digital_bert_tx.py
     narrowband/tunnel.py
     DESTINATION ${GR_PKG_DIGITAL_EXAMPLES_DIR}/narrowband
-    COMPONENT "digital_python"
 )
 
 # OFDM
@@ -65,7 +62,6 @@ GR_PYTHON_INSTALL(PROGRAMS
     ofdm/tunnel.py
     ofdm/uhd_interface.py
     DESTINATION ${GR_PKG_DIGITAL_EXAMPLES_DIR}/ofdm
-    COMPONENT "digital_python"
 )
 
 install(
@@ -74,7 +70,6 @@ install(
     ofdm/rx_ofdm.grc
     ofdm/ofdm_loopback.grc
     DESTINATION ${GR_PKG_DIGITAL_EXAMPLES_DIR}/ofdm
-    COMPONENT "digital_python"
 )
 
 # DEMOD
@@ -93,7 +88,6 @@ install(
     demod/uhd_corr_and_sync_tx.grc
     demod/uhd_corr_and_sync_rx.grc
     DESTINATION ${GR_PKG_DIGITAL_EXAMPLES_DIR}/demod
-    COMPONENT "digital_python"
 )
 
 
@@ -124,5 +118,4 @@ install(
     packet/uhd_packet_tx.grc
     packet/uhd_packet_tx_tun.grc
     DESTINATION ${GR_PKG_DIGITAL_EXAMPLES_DIR}/packet
-    COMPONENT "digital_python"
 )
diff --git a/gr-digital/grc/CMakeLists.txt b/gr-digital/grc/CMakeLists.txt
index 9888247ca2..a3d0223290 100644
--- a/gr-digital/grc/CMakeLists.txt
+++ b/gr-digital/grc/CMakeLists.txt
@@ -19,5 +19,5 @@
 
 file(GLOB xml_files "*.xml")
 install(FILES ${xml_files}
-    DESTINATION ${GRC_BLOCKS_DIR} COMPONENT "digital_python"
+    DESTINATION ${GRC_BLOCKS_DIR}
 )
diff --git a/gr-digital/include/gnuradio/digital/CMakeLists.txt b/gr-digital/include/gnuradio/digital/CMakeLists.txt
index 1b22265853..4756d281f4 100644
--- a/gr-digital/include/gnuradio/digital/CMakeLists.txt
+++ b/gr-digital/include/gnuradio/digital/CMakeLists.txt
@@ -115,5 +115,4 @@ install(FILES
     simple_framer_sync.h
     header_payload_demux.h
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio/digital
-    COMPONENT "digital_devel"
 )
diff --git a/gr-digital/lib/CMakeLists.txt b/gr-digital/lib/CMakeLists.txt
index 84f53ec4f3..05160be9a5 100644
--- a/gr-digital/lib/CMakeLists.txt
+++ b/gr-digital/lib/CMakeLists.txt
@@ -156,7 +156,7 @@ list(APPEND digital_libs
 
 add_library(gnuradio-digital SHARED ${digital_sources})
 target_link_libraries(gnuradio-digital ${digital_libs})
-GR_LIBRARY_FOO(gnuradio-digital RUNTIME_COMPONENT "digital_runtime" DEVEL_COMPONENT "digital_devel")
+GR_LIBRARY_FOO(gnuradio-digital)
 
 add_dependencies(
     gnuradio-digital
@@ -195,7 +195,7 @@ if(ENABLE_STATIC_LIBS)
   endif(NOT WIN32)
 
   install(TARGETS gnuradio-digital_static
-    ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "digital_devel"   # .lib file
+    ARCHIVE DESTINATION lib${LIB_SUFFIX} # .lib file
     )
 endif(ENABLE_STATIC_LIBS)
 
diff --git a/gr-digital/python/digital/CMakeLists.txt b/gr-digital/python/digital/CMakeLists.txt
index 091bd883b3..8f88948a2e 100644
--- a/gr-digital/python/digital/CMakeLists.txt
+++ b/gr-digital/python/digital/CMakeLists.txt
@@ -51,7 +51,6 @@ GR_PYTHON_INSTALL(
     qpsk.py
     soft_dec_lut_gen.py
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/digital
-    COMPONENT "digital_python"
 )
 
 GR_PYTHON_INSTALL(
@@ -62,7 +61,6 @@ GR_PYTHON_INSTALL(
     utils/alignment.py
     utils/tagged_streams.py
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/digital/utils
-    COMPONENT "digital_python"
 )
 
 ########################################################################
diff --git a/gr-digital/python/grc_gnuradio/CMakeLists.txt b/gr-digital/python/grc_gnuradio/CMakeLists.txt
index f021299f1a..7284573775 100644
--- a/gr-digital/python/grc_gnuradio/CMakeLists.txt
+++ b/gr-digital/python/grc_gnuradio/CMakeLists.txt
@@ -26,5 +26,4 @@ include(GrPython)
 GR_PYTHON_INSTALL(FILES
     blks2/packet.py
     DESTINATION ${GR_PYTHON_DIR}/grc_gnuradio/blks2
-    COMPONENT "digital_python"
 )
diff --git a/gr-digital/swig/CMakeLists.txt b/gr-digital/swig/CMakeLists.txt
index 2f00dc14a3..0f1138ff30 100644
--- a/gr-digital/swig/CMakeLists.txt
+++ b/gr-digital/swig/CMakeLists.txt
@@ -55,7 +55,6 @@ GR_SWIG_MAKE(digital_swig digital_swig.i)
 GR_SWIG_INSTALL(
     TARGETS digital_swig
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/digital
-    COMPONENT "digital_python"
 )
 
 install(
@@ -66,5 +65,4 @@ install(
     packet_header.i
     ${CMAKE_CURRENT_BINARY_DIR}/digital_swig_doc.i
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
-    COMPONENT "digital_swig"
 )
diff --git a/gr-dtv/CMakeLists.txt b/gr-dtv/CMakeLists.txt
index 5a23482b26..f045af5ef8 100644
--- a/gr-dtv/CMakeLists.txt
+++ b/gr-dtv/CMakeLists.txt
@@ -48,40 +48,6 @@ SET(GR_PKG_DTV_EXAMPLES_DIR ${GR_PKG_DATA_DIR}/examples/dtv)
 ########################################################################
 if(ENABLE_GR_DTV)
 
-########################################################################
-# Setup CPack components
-########################################################################
-include(GrPackage)
-CPACK_SET(CPACK_COMPONENT_GROUP_DTV_DESCRIPTION "GNU Radio DTV Blocks")
-
-CPACK_COMPONENT("dtv_runtime"
-    GROUP        "DTV"
-    DISPLAY_NAME "Runtime"
-    DESCRIPTION  "Runtime"
-    DEPENDS      "runtime_runtime"
-)
-
-CPACK_COMPONENT("dtv_devel"
-    GROUP        "DTV"
-    DISPLAY_NAME "Development"
-    DESCRIPTION  "C++ headers, package config, import libraries"
-    DEPENDS      "runtime_devel"
-)
-
-CPACK_COMPONENT("dtv_python"
-    GROUP        "DTV"
-    DISPLAY_NAME "Python"
-    DESCRIPTION  "Python modules for runtime; GRC xml files"
-    DEPENDS      "runtime_python;dtv_runtime"
-)
-
-CPACK_COMPONENT("dtv_swig"
-    GROUP        "DTV"
-    DISPLAY_NAME "SWIG"
-    DESCRIPTION  "SWIG development .i files"
-    DEPENDS      "runtime_swig;dtv_python;dtv_devel"
-)
-
 ########################################################################
 # Add subdirectories
 ########################################################################
@@ -107,7 +73,6 @@ configure_file(
 install(
     FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-dtv.pc
     DESTINATION ${GR_LIBRARY_DIR}/pkgconfig
-    COMPONENT "dtv_devel"
 )
 
 endif(ENABLE_GR_DTV)
diff --git a/gr-dtv/apps/CMakeLists.txt b/gr-dtv/apps/CMakeLists.txt
index f328234e3d..6de0ccec74 100644
--- a/gr-dtv/apps/CMakeLists.txt
+++ b/gr-dtv/apps/CMakeLists.txt
@@ -25,5 +25,4 @@ include(GrPython)
 GR_PYTHON_INSTALL(
     PROGRAMS
     DESTINATION ${GR_RUNTIME_DIR}
-    COMPONENT "dtv_python"
 )
diff --git a/gr-dtv/examples/CMakeLists.txt b/gr-dtv/examples/CMakeLists.txt
index 8f209bce4f..884d1daafa 100644
--- a/gr-dtv/examples/CMakeLists.txt
+++ b/gr-dtv/examples/CMakeLists.txt
@@ -23,7 +23,6 @@ GR_PYTHON_INSTALL(
     PROGRAMS
     atsc_ctrlport_monitor.py
     DESTINATION ${GR_PKG_DTV_EXAMPLES_DIR}
-    COMPONENT "dtv_python"
 )
 
 install(
@@ -47,5 +46,4 @@ install(
     vv018-miso.grc
     catv_tx_64qam.grc
     DESTINATION ${GR_PKG_DTV_EXAMPLES_DIR}
-    COMPONENT "dtv_python"
 )
diff --git a/gr-dtv/grc/CMakeLists.txt b/gr-dtv/grc/CMakeLists.txt
index a1386c5adf..e226d09976 100644
--- a/gr-dtv/grc/CMakeLists.txt
+++ b/gr-dtv/grc/CMakeLists.txt
@@ -74,5 +74,4 @@ install(FILES
     dtv_catv_frame_sync_enc_bb.xml
     dtv_catv_trellis_enc_bb.xml
     DESTINATION ${GRC_BLOCKS_DIR}
-    COMPONENT "dtv_python"
 )
diff --git a/gr-dtv/include/gnuradio/dtv/CMakeLists.txt b/gr-dtv/include/gnuradio/dtv/CMakeLists.txt
index 620dd55879..ce15d99a3f 100644
--- a/gr-dtv/include/gnuradio/dtv/CMakeLists.txt
+++ b/gr-dtv/include/gnuradio/dtv/CMakeLists.txt
@@ -81,5 +81,4 @@ install(FILES
     catv_trellis_enc_bb.h
 
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio/dtv
-    COMPONENT "dtv_devel"
 )
diff --git a/gr-dtv/lib/CMakeLists.txt b/gr-dtv/lib/CMakeLists.txt
index 67b8a0ea48..7ffcc435de 100644
--- a/gr-dtv/lib/CMakeLists.txt
+++ b/gr-dtv/lib/CMakeLists.txt
@@ -116,7 +116,7 @@ list(APPEND dtv_libs
 
 include (CheckCCompilerFlag)
 if (MSVC)
-	# 64-bit MSVC always supports SSE2 
+	# 64-bit MSVC always supports SSE2
 	if (CMAKE_SIZEOF_VOID_P EQUAL 8)
 		set(SSE2_SUPPORTED true)
 	else ()
@@ -153,4 +153,4 @@ endif(MSVC)
 
 add_library(gnuradio-dtv SHARED ${dtv_sources})
 target_link_libraries(gnuradio-dtv ${dtv_libs})
-GR_LIBRARY_FOO(gnuradio-dtv RUNTIME_COMPONENT "dtv_runtime" DEVEL_COMPONENT "dtv_devel")
+GR_LIBRARY_FOO(gnuradio-dtv)
diff --git a/gr-dtv/python/dtv/CMakeLists.txt b/gr-dtv/python/dtv/CMakeLists.txt
index 543c2c14cf..e39b21cbb9 100644
--- a/gr-dtv/python/dtv/CMakeLists.txt
+++ b/gr-dtv/python/dtv/CMakeLists.txt
@@ -28,7 +28,6 @@ GR_PYTHON_INSTALL(
     atsc_rx.py
     atsc_rx_filter.py
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/dtv
-    COMPONENT "dtv_python"
 )
 
 ########################################################################
diff --git a/gr-dtv/swig/CMakeLists.txt b/gr-dtv/swig/CMakeLists.txt
index 04b8b09ec7..7e98fa3b45 100644
--- a/gr-dtv/swig/CMakeLists.txt
+++ b/gr-dtv/swig/CMakeLists.txt
@@ -43,7 +43,6 @@ GR_SWIG_MAKE(dtv_swig dtv_swig.i)
 GR_SWIG_INSTALL(
     TARGETS dtv_swig
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/dtv
-    COMPONENT "dtv_python"
 )
 
 install(
@@ -51,5 +50,4 @@ install(
     dtv_swig.i
     ${CMAKE_CURRENT_BINARY_DIR}/dtv_swig_doc.i
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
-    COMPONENT "dtv_swig"
 )
diff --git a/gr-fec/CMakeLists.txt b/gr-fec/CMakeLists.txt
index 338fe71864..c828fd92e7 100644
--- a/gr-fec/CMakeLists.txt
+++ b/gr-fec/CMakeLists.txt
@@ -51,40 +51,6 @@ SET(GR_PKG_FEC_EXAMPLES_DIR ${GR_PKG_DATA_DIR}/examples/fec)
 ########################################################################
 if(ENABLE_GR_FEC)
 
-########################################################################
-# Setup CPack components
-########################################################################
-include(GrPackage)
-CPACK_SET(CPACK_COMPONENT_GROUP_FEC_DESCRIPTION "GNU Radio FEC Blocks")
-
-CPACK_COMPONENT("fec_runtime"
-    GROUP        "FEC"
-    DISPLAY_NAME "Runtime"
-    DESCRIPTION  "Runtime"
-    DEPENDS      "runtime_runtime"
-)
-
-CPACK_COMPONENT("fec_devel"
-    GROUP        "FEC"
-    DISPLAY_NAME "Development"
-    DESCRIPTION  "C++ headers, package config, import libraries"
-    DEPENDS      "runtime_devel"
-)
-
-CPACK_COMPONENT("fec_python"
-    GROUP        "FEC"
-    DISPLAY_NAME "Python"
-    DESCRIPTION  "Python modules for runtime; GRC xml files"
-    DEPENDS      "runtime_python;fec_runtime"
-)
-
-CPACK_COMPONENT("fec_swig"
-    GROUP        "FEC"
-    DISPLAY_NAME "SWIG"
-    DESCRIPTION  "SWIG development .i files"
-    DEPENDS      "runtime_swig;fec_python;fec_devel"
-)
-
 ########################################################################
 # Add subdirectories
 ########################################################################
@@ -112,7 +78,6 @@ configure_file(
 install(
     FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-fec.pc
     DESTINATION ${GR_LIBRARY_DIR}/pkgconfig
-    COMPONENT "fec_devel"
 )
 
 endif(ENABLE_GR_FEC)
diff --git a/gr-fec/apps/CMakeLists.txt b/gr-fec/apps/CMakeLists.txt
index 62fc6d26d4..41c6e4e2fc 100644
--- a/gr-fec/apps/CMakeLists.txt
+++ b/gr-fec/apps/CMakeLists.txt
@@ -32,11 +32,9 @@
 #
 #INSTALL(TARGETS
 #  DESTINATION ${GR_RUNTIME_DIR}
-#  COMPONENT "fec_devel"
 #)
 #
 #GR_PYTHON_INSTALL(
 #    PROGRAMS
 #    DESTINATION ${GR_RUNTIME_DIR}
-#    COMPONENT "fec_devel"
 #)
diff --git a/gr-fec/examples/CMakeLists.txt b/gr-fec/examples/CMakeLists.txt
index e1dfc4ebaf..a66df61ad0 100644
--- a/gr-fec/examples/CMakeLists.txt
+++ b/gr-fec/examples/CMakeLists.txt
@@ -40,5 +40,4 @@ install(
     polar_code_example.grc
     tpc_ber_curve_gen.grc
     DESTINATION ${GR_PKG_FEC_EXAMPLES_DIR}
-    COMPONENT "fec_python"
 )
diff --git a/gr-fec/grc/CMakeLists.txt b/gr-fec/grc/CMakeLists.txt
index 27cb5af854..f61603df22 100644
--- a/gr-fec/grc/CMakeLists.txt
+++ b/gr-fec/grc/CMakeLists.txt
@@ -19,4 +19,8 @@
 
 ########################################################################
 file(GLOB xml_files "*.xml")
-install(FILES ${xml_files} DESTINATION ${GRC_BLOCKS_DIR} COMPONENT "fec_python")
+
+install(FILES
+        ${xml_files}
+        DESTINATION ${GRC_BLOCKS_DIR}
+)
diff --git a/gr-fec/include/gnuradio/fec/CMakeLists.txt b/gr-fec/include/gnuradio/fec/CMakeLists.txt
index 57594b47d8..5894b1d14a 100644
--- a/gr-fec/include/gnuradio/fec/CMakeLists.txt
+++ b/gr-fec/include/gnuradio/fec/CMakeLists.txt
@@ -60,8 +60,8 @@ install(FILES
     polar_decoder_sc_list.h
     polar_decoder_common.h
     polar_encoder_systematic.h
-    polar_decoder_sc_systematic.h DESTINATION ${GR_INCLUDE_DIR}/gnuradio/fec
-    COMPONENT "fec_devel"
+    polar_decoder_sc_systematic.h
+    DESTINATION ${GR_INCLUDE_DIR}/gnuradio/fec
 )
 
 if(GSL_FOUND)
@@ -73,6 +73,5 @@ if(GSL_FOUND)
     ldpc_par_mtrx_encoder.h
     ldpc_gen_mtrx_encoder.h
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio/fec
-    COMPONENT "fec_devel"
   )
 endif(GSL_FOUND)
diff --git a/gr-fec/lib/CMakeLists.txt b/gr-fec/lib/CMakeLists.txt
index bda98016b0..7ed38404f3 100644
--- a/gr-fec/lib/CMakeLists.txt
+++ b/gr-fec/lib/CMakeLists.txt
@@ -131,7 +131,7 @@ endif(GSL_FOUND)
 
 add_library(gnuradio-fec SHARED ${gnuradio_fec_sources})
 target_link_libraries(gnuradio-fec ${gnuradio_fec_libs})
-GR_LIBRARY_FOO(gnuradio-fec RUNTIME_COMPONENT "fec_runtime" DEVEL_COMPONENT "fec_devel")
+GR_LIBRARY_FOO(gnuradio-fec)
 
 if(ENABLE_STATIC_LIBS)
   if(ENABLE_GR_CTRLPORT)
@@ -153,6 +153,6 @@ if(ENABLE_STATIC_LIBS)
   endif(NOT WIN32)
 
   install(TARGETS gnuradio-fec_static
-    ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "fec_devel"   # .lib file
+    ARCHIVE DESTINATION lib${LIB_SUFFIX} # .lib file
     )
 endif(ENABLE_STATIC_LIBS)
diff --git a/gr-fec/lib/reed-solomon/CMakeLists.txt b/gr-fec/lib/reed-solomon/CMakeLists.txt
index 0858a670c5..3d35c9025d 100644
--- a/gr-fec/lib/reed-solomon/CMakeLists.txt
+++ b/gr-fec/lib/reed-solomon/CMakeLists.txt
@@ -46,7 +46,6 @@ list(APPEND gnuradio_fec_sources ${gr_fec_rs_sources})
 #install(
 #    FILES ${CMAKE_CURRENT_SOURCE_DIR}/rs.h
 #    DESTINATION ${GR_INCLUDE_DIR}/gnuradio/fec
-#    COMPONENT "fec_devel"
 #)
 
 ########################################################################
diff --git a/gr-fec/lib/viterbi/CMakeLists.txt b/gr-fec/lib/viterbi/CMakeLists.txt
index 3697787bcc..10c5940246 100644
--- a/gr-fec/lib/viterbi/CMakeLists.txt
+++ b/gr-fec/lib/viterbi/CMakeLists.txt
@@ -51,7 +51,6 @@ list(APPEND gnuradio_fec_sources ${viterbi_sources})
 #install(
 #    FILES ${CMAKE_CURRENT_SOURCE_DIR}/viterbi.h
 #    DESTINATION ${GR_INCLUDE_DIR}/gnuradio/fec
-#    COMPONENT "fec_devel"
 #)
 
 ########################################################################
diff --git a/gr-fec/python/fec/CMakeLists.txt b/gr-fec/python/fec/CMakeLists.txt
index 1b20004e6e..9d170b0423 100644
--- a/gr-fec/python/fec/CMakeLists.txt
+++ b/gr-fec/python/fec/CMakeLists.txt
@@ -36,7 +36,6 @@ GR_PYTHON_INSTALL(
     fec_test.py
     bercurve_generator.py
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/fec
-    COMPONENT "fec_python"
 )
 
 add_subdirectory(polar)
diff --git a/gr-fec/python/fec/LDPC/CMakeLists.txt b/gr-fec/python/fec/LDPC/CMakeLists.txt
index 3e56ef3975..d2022412b3 100644
--- a/gr-fec/python/fec/LDPC/CMakeLists.txt
+++ b/gr-fec/python/fec/LDPC/CMakeLists.txt
@@ -26,5 +26,4 @@ GR_PYTHON_INSTALL(
     Generate_LDPC_matrix_functions.py
     Generate_LDPC_matrix.py
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/fec/LDPC
-    COMPONENT "fec_python"
-)
\ No newline at end of file
+)
diff --git a/gr-fec/python/fec/polar/CMakeLists.txt b/gr-fec/python/fec/polar/CMakeLists.txt
index a863995aff..1efed062ff 100644
--- a/gr-fec/python/fec/polar/CMakeLists.txt
+++ b/gr-fec/python/fec/polar/CMakeLists.txt
@@ -28,14 +28,10 @@ GR_PYTHON_INSTALL(
     channel_construction_bec.py
     helper_functions.py
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/fec/polar
-    COMPONENT "fec_python"
 )
 
 GR_PYTHON_INSTALL(
     PROGRAMS
     polar_channel_construction
     DESTINATION ${GR_RUNTIME_DIR}
-    COMPONENT "fec_python"
 )
-
-
diff --git a/gr-fec/swig/CMakeLists.txt b/gr-fec/swig/CMakeLists.txt
index 443d365c98..5eaa5de748 100644
--- a/gr-fec/swig/CMakeLists.txt
+++ b/gr-fec/swig/CMakeLists.txt
@@ -48,7 +48,6 @@ GR_SWIG_MAKE(fec_swig fec_swig.i)
 GR_SWIG_INSTALL(
     TARGETS fec_swig
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/fec
-    COMPONENT "fec_python"
 )
 
 install(
@@ -56,5 +55,4 @@ install(
     fec_swig.i
     ${CMAKE_CURRENT_BINARY_DIR}/fec_swig_doc.i
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
-    COMPONENT "fec_swig"
 )
diff --git a/gr-fft/CMakeLists.txt b/gr-fft/CMakeLists.txt
index 586abe56af..9ac6962c85 100644
--- a/gr-fft/CMakeLists.txt
+++ b/gr-fft/CMakeLists.txt
@@ -47,40 +47,6 @@ GR_SET_GLOBAL(GR_FFT_INCLUDE_DIRS
 ########################################################################
 if(ENABLE_GR_FFT)
 
-########################################################################
-# Setup CPack components
-########################################################################
-include(GrPackage)
-CPACK_SET(CPACK_COMPONENT_GROUP_FFT_DESCRIPTION "GNU Radio FFT Blocks")
-
-CPACK_COMPONENT("fft_runtime"
-    GROUP        "FFT"
-    DISPLAY_NAME "Runtime"
-    DESCRIPTION  "Runtime"
-    DEPENDS      "runtime_runtime"
-)
-
-CPACK_COMPONENT("fft_devel"
-    GROUP        "FFT"
-    DISPLAY_NAME "Development"
-    DESCRIPTION  "C++ headers, package config, import libraries"
-    DEPENDS      "runtime_devel"
-)
-
-CPACK_COMPONENT("fft_python"
-    GROUP        "FFT"
-    DISPLAY_NAME "Python"
-    DESCRIPTION  "Python modules for runtime; GRC xml files"
-    DEPENDS      "runtime_python;fft_runtime"
-)
-
-CPACK_COMPONENT("fft_swig"
-    GROUP        "FFT"
-    DISPLAY_NAME "SWIG"
-    DESCRIPTION  "SWIG development .i files"
-    DEPENDS      "runtime_swig;fft_python;fft_devel"
-)
-
 ########################################################################
 # Add subdirectories
 ########################################################################
@@ -105,7 +71,6 @@ configure_file(
 install(
     FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-fft.pc
     DESTINATION ${GR_LIBRARY_DIR}/pkgconfig
-    COMPONENT "fft_devel"
 )
 
 endif(ENABLE_GR_FFT)
diff --git a/gr-fft/grc/CMakeLists.txt b/gr-fft/grc/CMakeLists.txt
index cc972dfa7e..8eeb431c3e 100644
--- a/gr-fft/grc/CMakeLists.txt
+++ b/gr-fft/grc/CMakeLists.txt
@@ -24,5 +24,4 @@ install(FILES
     fft_logpwrfft_x.xml
     fft_ctrlport_probe_psd.xml
     DESTINATION ${GRC_BLOCKS_DIR}
-    COMPONENT "fft_python"
 )
diff --git a/gr-fft/include/gnuradio/fft/CMakeLists.txt b/gr-fft/include/gnuradio/fft/CMakeLists.txt
index 55705ee660..0f52b0aa96 100644
--- a/gr-fft/include/gnuradio/fft/CMakeLists.txt
+++ b/gr-fft/include/gnuradio/fft/CMakeLists.txt
@@ -29,14 +29,11 @@ install(FILES
     goertzel_fc.h
     window.h
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio/fft
-    COMPONENT "fft_devel"
 )
 
 if(ENABLE_GR_CTRLPORT)
 install(FILES
   ctrlport_probe_psd.h
   DESTINATION ${GR_INCLUDE_DIR}/gnuradio/fft
-  COMPONENT "fft_devel"
 )
 endif(ENABLE_GR_CTRLPORT)
-
diff --git a/gr-fft/lib/CMakeLists.txt b/gr-fft/lib/CMakeLists.txt
index 77476e58b4..9777d243df 100644
--- a/gr-fft/lib/CMakeLists.txt
+++ b/gr-fft/lib/CMakeLists.txt
@@ -83,7 +83,7 @@ endif()
 
 add_library(gnuradio-fft SHARED ${fft_sources})
 target_link_libraries(gnuradio-fft ${fft_libs})
-GR_LIBRARY_FOO(gnuradio-fft RUNTIME_COMPONENT "fft_runtime" DEVEL_COMPONENT "fft_devel")
+GR_LIBRARY_FOO(gnuradio-fft)
 
 if(ENABLE_STATIC_LIBS)
   if(ENABLE_GR_CTRLPORT)
@@ -105,6 +105,6 @@ if(ENABLE_STATIC_LIBS)
   endif(NOT WIN32)
 
   install(TARGETS gnuradio-fft_static
-    ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "fft_devel"   # .lib file
+    ARCHIVE DESTINATION lib${LIB_SUFFIX} # .lib file
     )
 endif(ENABLE_STATIC_LIBS)
diff --git a/gr-fft/python/fft/CMakeLists.txt b/gr-fft/python/fft/CMakeLists.txt
index b5a8c9d4f7..016c76d27d 100644
--- a/gr-fft/python/fft/CMakeLists.txt
+++ b/gr-fft/python/fft/CMakeLists.txt
@@ -25,7 +25,6 @@ GR_PYTHON_INSTALL(
     __init__.py
     logpwrfft.py
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/fft
-    COMPONENT "fft_python"
 )
 
 ########################################################################
diff --git a/gr-fft/swig/CMakeLists.txt b/gr-fft/swig/CMakeLists.txt
index 74a4a25b10..67e34bbba8 100644
--- a/gr-fft/swig/CMakeLists.txt
+++ b/gr-fft/swig/CMakeLists.txt
@@ -44,7 +44,6 @@ GR_SWIG_MAKE(fft_swig fft_swig.i)
 GR_SWIG_INSTALL(
     TARGETS fft_swig
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/fft
-    COMPONENT "fft_python"
 )
 
 install(
@@ -52,5 +51,4 @@ install(
     fft_swig.i
     ${CMAKE_CURRENT_BINARY_DIR}/fft_swig_doc.i
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
-    COMPONENT "fft_swig"
 )
diff --git a/gr-filter/CMakeLists.txt b/gr-filter/CMakeLists.txt
index c0d46d521a..972cd2c8b0 100644
--- a/gr-filter/CMakeLists.txt
+++ b/gr-filter/CMakeLists.txt
@@ -50,40 +50,6 @@ SET(GR_PKG_FILTER_EXAMPLES_DIR ${GR_PKG_DATA_DIR}/examples/filter)
 ########################################################################
 if(ENABLE_GR_FILTER)
 
-########################################################################
-# Setup CPack components
-########################################################################
-include(GrPackage)
-CPACK_SET(CPACK_COMPONENT_GROUP_FILTER_DESCRIPTION "GNU Radio Filter Blocks")
-
-CPACK_COMPONENT("filter_runtime"
-    GROUP        "Filter"
-    DISPLAY_NAME "Runtime"
-    DESCRIPTION  "Runtime"
-    DEPENDS      "runtime_runtime"
-)
-
-CPACK_COMPONENT("filter_devel"
-    GROUP        "Filter"
-    DISPLAY_NAME "Development"
-    DESCRIPTION  "C++ headers, package config, import libraries"
-    DEPENDS      "runtime_devel"
-)
-
-CPACK_COMPONENT("filter_python"
-    GROUP        "Filter"
-    DISPLAY_NAME "Python"
-    DESCRIPTION  "Python modules for runtime; GRC xml files"
-    DEPENDS      "runtime_python;filter_runtime"
-)
-
-CPACK_COMPONENT("filter_swig"
-    GROUP        "Filter"
-    DISPLAY_NAME "SWIG"
-    DESCRIPTION  "SWIG development .i files"
-    DEPENDS      "runtime_swig;filter_python;filter_devel"
-)
-
 ########################################################################
 # Add subdirectories
 ########################################################################
@@ -111,7 +77,6 @@ configure_file(
 install(
     FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-filter.pc
     DESTINATION ${GR_LIBRARY_DIR}/pkgconfig
-    COMPONENT "filter_devel"
 )
 
 endif(ENABLE_GR_FILTER)
diff --git a/gr-filter/apps/CMakeLists.txt b/gr-filter/apps/CMakeLists.txt
index 61e2f183ad..8df2c025c6 100644
--- a/gr-filter/apps/CMakeLists.txt
+++ b/gr-filter/apps/CMakeLists.txt
@@ -26,5 +26,4 @@ GR_PYTHON_INSTALL(
     PROGRAMS
     gr_filter_design
     DESTINATION ${GR_RUNTIME_DIR}
-    COMPONENT "filter_python"
 )
diff --git a/gr-filter/examples/CMakeLists.txt b/gr-filter/examples/CMakeLists.txt
index a6229f38f4..c7410a839c 100644
--- a/gr-filter/examples/CMakeLists.txt
+++ b/gr-filter/examples/CMakeLists.txt
@@ -37,7 +37,6 @@ GR_PYTHON_INSTALL(PROGRAMS
     gr_filtdes_restrict.py
     gr_filtdes_live_upd.py
     DESTINATION ${GR_PKG_FILTER_EXAMPLES_DIR}
-    COMPONENT "filter_python"
 )
 
 install(
@@ -45,5 +44,4 @@ install(
     filter_taps.grc
     resampler_demo.grc
     DESTINATION ${GR_PKG_FILTER_EXAMPLES_DIR}
-    COMPONENT "filter_python"
 )
diff --git a/gr-filter/grc/CMakeLists.txt b/gr-filter/grc/CMakeLists.txt
index b3bc2e1828..6c67a5a6ae 100644
--- a/gr-filter/grc/CMakeLists.txt
+++ b/gr-filter/grc/CMakeLists.txt
@@ -51,5 +51,4 @@ install(FILES
     variable_band_reject_filter_taps.xml
     variable_rrc_filter_taps.xml
     DESTINATION ${GRC_BLOCKS_DIR}
-    COMPONENT "filter_python"
 )
diff --git a/gr-filter/include/gnuradio/filter/CMakeLists.txt b/gr-filter/include/gnuradio/filter/CMakeLists.txt
index e75f02b7a2..7ad692743a 100644
--- a/gr-filter/include/gnuradio/filter/CMakeLists.txt
+++ b/gr-filter/include/gnuradio/filter/CMakeLists.txt
@@ -76,6 +76,5 @@ install(FILES
     single_pole_iir_filter_cc.h
     single_pole_iir_filter_ff.h
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio/filter
-    COMPONENT "filter_devel"
 )
 
diff --git a/gr-filter/lib/CMakeLists.txt b/gr-filter/lib/CMakeLists.txt
index feabe73be7..ff869eafe5 100644
--- a/gr-filter/lib/CMakeLists.txt
+++ b/gr-filter/lib/CMakeLists.txt
@@ -119,7 +119,7 @@ list(APPEND filter_libs
 
 add_library(gnuradio-filter SHARED ${filter_sources})
 target_link_libraries(gnuradio-filter ${filter_libs})
-GR_LIBRARY_FOO(gnuradio-filter RUNTIME_COMPONENT "filter_runtime" DEVEL_COMPONENT "filter_devel")
+GR_LIBRARY_FOO(gnuradio-filter)
 add_dependencies(gnuradio-filter
   filter_generated_includes filter_generated_swigs
   gnuradio-runtime gnuradio-fft)
@@ -148,7 +148,7 @@ if(ENABLE_STATIC_LIBS)
   endif(NOT WIN32)
 
   install(TARGETS gnuradio-filter_static
-    ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "filter_devel"   # .lib file
+    ARCHIVE DESTINATION lib${LIB_SUFFIX} # .lib file
     )
 endif(ENABLE_STATIC_LIBS)
 
diff --git a/gr-filter/python/filter/CMakeLists.txt b/gr-filter/python/filter/CMakeLists.txt
index 1dd055abaf..bc4892412e 100644
--- a/gr-filter/python/filter/CMakeLists.txt
+++ b/gr-filter/python/filter/CMakeLists.txt
@@ -29,7 +29,6 @@ GR_PYTHON_INSTALL(
     pfb.py
     rational_resampler.py
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/filter
-    COMPONENT "filter_python"
 )
 
 ########################################################################
diff --git a/gr-filter/python/filter/design/CMakeLists.txt b/gr-filter/python/filter/design/CMakeLists.txt
index 21e47b86d6..2c800e9148 100644
--- a/gr-filter/python/filter/design/CMakeLists.txt
+++ b/gr-filter/python/filter/design/CMakeLists.txt
@@ -26,6 +26,5 @@ GR_PYTHON_INSTALL(
 	filter_design.py
 	fir_design.py
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/filter
-    COMPONENT "filter_python"
 )
 
diff --git a/gr-filter/python/filter/gui/CMakeLists.txt b/gr-filter/python/filter/gui/CMakeLists.txt
index 6c9bbfa2f3..6c1d98894f 100644
--- a/gr-filter/python/filter/gui/CMakeLists.txt
+++ b/gr-filter/python/filter/gui/CMakeLists.txt
@@ -29,6 +29,5 @@ GR_PYTHON_INSTALL(
 	polezero_plot.py
 	pyqt_filter_stacked.py
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/filter
-    COMPONENT "filter_python"
 )
 
diff --git a/gr-filter/swig/CMakeLists.txt b/gr-filter/swig/CMakeLists.txt
index b7bf203d16..ee8389dddb 100644
--- a/gr-filter/swig/CMakeLists.txt
+++ b/gr-filter/swig/CMakeLists.txt
@@ -50,7 +50,6 @@ GR_SWIG_MAKE(filter_swig filter_swig.i)
 GR_SWIG_INSTALL(
     TARGETS filter_swig
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/filter
-    COMPONENT "filter_python"
 )
 
 install(
@@ -58,5 +57,4 @@ install(
     filter_swig.i
     ${CMAKE_CURRENT_BINARY_DIR}/gr_filter_swig_doc.i
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
-    COMPONENT "filter_swig"
 )
diff --git a/gr-qtgui/CMakeLists.txt b/gr-qtgui/CMakeLists.txt
index ad10363c1e..80bb8b3bdb 100644
--- a/gr-qtgui/CMakeLists.txt
+++ b/gr-qtgui/CMakeLists.txt
@@ -69,40 +69,6 @@ if(ENABLE_GR_QTGUI)
 # populate the environment with QT variables
 include(GrSetupQt4)
 
-########################################################################
-# Setup CPack components
-########################################################################
-include(GrPackage)
-CPACK_SET(CPACK_COMPONENT_GROUP_QTGUI_DESCRIPTION "GNU Radio QtGUI Blocks")
-
-CPACK_COMPONENT("qtgui_runtime"
-    GROUP        "QtGUI"
-    DISPLAY_NAME "Runtime"
-    DESCRIPTION  "Runtime"
-    DEPENDS      "runtime_runtime"
-)
-
-CPACK_COMPONENT("qtgui_devel"
-    GROUP        "QtGUI"
-    DISPLAY_NAME "Development"
-    DESCRIPTION  "C++ headers, package config, import libraries"
-    DEPENDS      "runtime_devel"
-)
-
-CPACK_COMPONENT("qtgui_python"
-    GROUP        "QtGUI"
-    DISPLAY_NAME "Python"
-    DESCRIPTION  "Python modules for runtime; GRC xml files"
-    DEPENDS      "runtime_python;qtgui_runtime"
-)
-
-CPACK_COMPONENT("qtgui_swig"
-    GROUP        "QtGUI"
-    DISPLAY_NAME "SWIG"
-    DESCRIPTION  "SWIG development .i files"
-    DEPENDS      "runtime_swig;qtgui_python;qtgui_devel"
-)
-
 ########################################################################
 # Add subdirectories
 ########################################################################
@@ -129,7 +95,6 @@ configure_file(
 install(
     FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-qtgui.pc
     DESTINATION ${GR_LIBRARY_DIR}/pkgconfig
-    COMPONENT "qtgui_devel"
 )
 
 ########################################################################
@@ -138,7 +103,6 @@ install(
 install(
     FILES ${CMAKE_CURRENT_SOURCE_DIR}/gr-qtgui.conf
     DESTINATION ${GR_PREFSDIR}
-    COMPONENT "qtgui"
 )
 
 
@@ -152,7 +116,6 @@ install(
     themes/alt.qss
     themes/projector.qss
     DESTINATION ${GR_THEMES_DIR}
-    COMPONENT "qtgui"
 )
 
 endif(ENABLE_GR_QTGUI)
diff --git a/gr-qtgui/apps/CMakeLists.txt b/gr-qtgui/apps/CMakeLists.txt
index 3c64cb6e0a..6a8e6c51aa 100644
--- a/gr-qtgui/apps/CMakeLists.txt
+++ b/gr-qtgui/apps/CMakeLists.txt
@@ -33,7 +33,6 @@ GR_PYTHON_INSTALL(
     plot_time_form.py
     plot_time_raster_form.py
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/qtgui
-    COMPONENT "qtgui_python"
 )
 
 GR_PYTHON_INSTALL(
@@ -58,5 +57,4 @@ GR_PYTHON_INSTALL(
     gr_spectrogram_plot
     gr_constellation_plot
     DESTINATION ${GR_RUNTIME_DIR}
-    COMPONENT "qtgui_python"
 )
diff --git a/gr-qtgui/examples/CMakeLists.txt b/gr-qtgui/examples/CMakeLists.txt
index 5662dfa9c8..a91e374772 100644
--- a/gr-qtgui/examples/CMakeLists.txt
+++ b/gr-qtgui/examples/CMakeLists.txt
@@ -33,7 +33,6 @@ GR_PYTHON_INSTALL(PROGRAMS
   pyqt_waterfall_c.py
   pyqt_waterfall_f.py
   DESTINATION ${GR_PKG_QTGUI_EXAMPLES_DIR}
-  COMPONENT "qtgui_python"
 )
 
 install(
@@ -43,5 +42,4 @@ install(
     qtgui_message_inputs.grc
     test_qtgui_msg.grc
     DESTINATION ${GR_PKG_QTGUI_EXAMPLES_DIR}
-    COMPONENT "qtgui_python"
 )
diff --git a/gr-qtgui/examples/c++/CMakeLists.txt b/gr-qtgui/examples/c++/CMakeLists.txt
index ad84287367..f7c61bc316 100644
--- a/gr-qtgui/examples/c++/CMakeLists.txt
+++ b/gr-qtgui/examples/c++/CMakeLists.txt
@@ -45,5 +45,4 @@ target_link_libraries(display_qt ${QTGUI_LIBRARIES})
 INSTALL(TARGETS
   display_qt
   DESTINATION ${GR_PKG_QTGUI_EXAMPLES_DIR}
-  COMPONENT "qtgui_examples"
 )
diff --git a/gr-qtgui/grc/CMakeLists.txt b/gr-qtgui/grc/CMakeLists.txt
index d56158ac70..7da5fbc352 100644
--- a/gr-qtgui/grc/CMakeLists.txt
+++ b/gr-qtgui/grc/CMakeLists.txt
@@ -19,4 +19,4 @@
 
 ########################################################################
 file(GLOB xml_files "*.xml")
-install(FILES ${xml_files} DESTINATION ${GRC_BLOCKS_DIR} COMPONENT "qtgui_python")
+install(FILES ${xml_files} DESTINATION ${GRC_BLOCKS_DIR})
diff --git a/gr-qtgui/include/gnuradio/qtgui/CMakeLists.txt b/gr-qtgui/include/gnuradio/qtgui/CMakeLists.txt
index 991c7583a8..92ffef9ee7 100644
--- a/gr-qtgui/include/gnuradio/qtgui/CMakeLists.txt
+++ b/gr-qtgui/include/gnuradio/qtgui/CMakeLists.txt
@@ -68,5 +68,4 @@ install(FILES
   VectorDisplayPlot.h
   vector_sink_f.h
   DESTINATION ${GR_INCLUDE_DIR}/gnuradio/qtgui
-  COMPONENT "qtgui_devel"
 )
diff --git a/gr-qtgui/lib/CMakeLists.txt b/gr-qtgui/lib/CMakeLists.txt
index b1ee580398..aafb61699d 100644
--- a/gr-qtgui/lib/CMakeLists.txt
+++ b/gr-qtgui/lib/CMakeLists.txt
@@ -177,7 +177,7 @@ endif(ENABLE_PYTHON)
 add_definitions(-DQWT_DLL) #setup QWT library linkage
 add_library(gnuradio-qtgui SHARED ${qtgui_sources})
 target_link_libraries(gnuradio-qtgui ${qtgui_libs})
-GR_LIBRARY_FOO(gnuradio-qtgui RUNTIME_COMPONENT "qtgui_runtime" DEVEL_COMPONENT "qtgui_devel")
+GR_LIBRARY_FOO(gnuradio-qtgui)
 
 if(ENABLE_STATIC_LIBS)
   if(ENABLE_GR_CTRLPORT)
@@ -199,6 +199,6 @@ if(ENABLE_STATIC_LIBS)
   endif(NOT WIN32)
 
   install(TARGETS gnuradio-qtgui_static
-    ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "qtgui_devel"   # .lib file
+    ARCHIVE DESTINATION lib${LIB_SUFFIX} # .lib file
     )
 endif(ENABLE_STATIC_LIBS)
diff --git a/gr-qtgui/python/qtgui/CMakeLists.txt b/gr-qtgui/python/qtgui/CMakeLists.txt
index 4fa4d0f484..212c98ebb4 100644
--- a/gr-qtgui/python/qtgui/CMakeLists.txt
+++ b/gr-qtgui/python/qtgui/CMakeLists.txt
@@ -24,7 +24,6 @@ GR_PYTHON_INSTALL(
     FILES __init__.py
           range.py
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/qtgui
-    COMPONENT "qtgui_python"
 )
 
 ########################################################################
diff --git a/gr-qtgui/swig/CMakeLists.txt b/gr-qtgui/swig/CMakeLists.txt
index 44b5c2fbd4..2990ac9086 100644
--- a/gr-qtgui/swig/CMakeLists.txt
+++ b/gr-qtgui/swig/CMakeLists.txt
@@ -51,12 +51,10 @@ GR_SWIG_MAKE(qtgui_swig qtgui_swig.i)
 GR_SWIG_INSTALL(
     TARGETS qtgui_swig
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/qtgui
-    COMPONENT "qtgui_python"
 )
 
 install(FILES
     qtgui_swig.i
     ${CMAKE_CURRENT_BINARY_DIR}/qtgui_swig_doc.i
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
-    COMPONENT "qtgui_swig"
 )
diff --git a/gr-trellis/CMakeLists.txt b/gr-trellis/CMakeLists.txt
index a3f0ad486c..20c1c6b54d 100644
--- a/gr-trellis/CMakeLists.txt
+++ b/gr-trellis/CMakeLists.txt
@@ -50,53 +50,6 @@ SET(GR_PKG_TRELLIS_EXAMPLES_DIR ${GR_PKG_DATA_DIR}/examples/trellis)
 ########################################################################
 if(ENABLE_GR_TRELLIS)
 
-########################################################################
-# Setup CPack components
-########################################################################
-include(GrPackage)
-CPACK_SET(CPACK_COMPONENT_GROUP_TRELLIS_DESCRIPTION "GNU Radio Trellis Blocks")
-
-CPACK_COMPONENT("trellis_docs"
-    GROUP        "Trellis"
-    DISPLAY_NAME "Documentation"
-    DESCRIPTION  "Doxygen HTML and XML"
-)
-
-CPACK_COMPONENT("trellis_runtime"
-    GROUP        "Trellis"
-    DISPLAY_NAME "Runtime"
-    DESCRIPTION  "Dynamic link libraries"
-    DEPENDS      "runtime_runtime"
-)
-
-CPACK_COMPONENT("trellis_devel"
-    GROUP        "Trellis"
-    DISPLAY_NAME "Development"
-    DESCRIPTION  "C++ headers, package config, import libraries"
-    DEPENDS      "runtime_devel"
-)
-
-CPACK_COMPONENT("trellis_python"
-    GROUP        "Trellis"
-    DISPLAY_NAME "Python"
-    DESCRIPTION  "Python modules for runtime"
-    DEPENDS      "runtime_python;trellis_runtime"
-)
-
-CPACK_COMPONENT("trellis_examples"
-    GROUP        "Trellis"
-    DISPLAY_NAME "Examples"
-    DESCRIPTION  "Python examples for trellis"
-    DEPENDS      "trellis_python"
-)
-
-CPACK_COMPONENT("trellis_swig"
-    GROUP        "Trellis"
-    DISPLAY_NAME "SWIG"
-    DESCRIPTION  "SWIG development .i files"
-    DEPENDS      "runtime_swig;trellis_python;trellis_devel"
-)
-
 ########################################################################
 # Add subdirectories
 ########################################################################
@@ -122,7 +75,6 @@ configure_file(
 install(
     FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-trellis.pc
     DESTINATION ${GR_LIBRARY_DIR}/pkgconfig
-    COMPONENT "trellis_devel"
 )
 
 endif(ENABLE_GR_TRELLIS)
diff --git a/gr-trellis/doc/CMakeLists.txt b/gr-trellis/doc/CMakeLists.txt
index 568539582d..06813258f3 100644
--- a/gr-trellis/doc/CMakeLists.txt
+++ b/gr-trellis/doc/CMakeLists.txt
@@ -35,7 +35,6 @@ add_custom_target(gr_trellis_html ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/gr-tre
 install(
     FILES ${CMAKE_CURRENT_BINARY_DIR}/gr-trellis.html
     DESTINATION ${GR_PKG_DOC_DIR}/html
-    COMPONENT "trellis_docs"
 
 )
 endif(XMLTO_EXECUTABLE)
@@ -69,5 +68,4 @@ install(FILES
     ${CMAKE_CURRENT_BINARY_DIR}/test_tcm.py.xml
     ${CMAKE_CURRENT_BINARY_DIR}/test_viterbi_equalization1.py.xml
     DESTINATION ${GR_PKG_DOC_DIR}/xml
-    COMPONENT "trellis_docs"
 )
diff --git a/gr-trellis/examples/grc/CMakeLists.txt b/gr-trellis/examples/grc/CMakeLists.txt
index c5d4fc8965..a4718dd59b 100644
--- a/gr-trellis/examples/grc/CMakeLists.txt
+++ b/gr-trellis/examples/grc/CMakeLists.txt
@@ -59,5 +59,4 @@ install(
     ${CMAKE_CURRENT_BINARY_DIR}/interference_cancellation.grc
     readme.txt
     DESTINATION ${GR_PKG_TRELLIS_EXAMPLES_DIR}
-    COMPONENT "trellis-examples"
 )
diff --git a/gr-trellis/examples/python/CMakeLists.txt b/gr-trellis/examples/python/CMakeLists.txt
index 8a05525bc4..76c88ee2f4 100644
--- a/gr-trellis/examples/python/CMakeLists.txt
+++ b/gr-trellis/examples/python/CMakeLists.txt
@@ -24,13 +24,11 @@ GR_PYTHON_INSTALL(
     test_tcm.py
     test_cpm.py
     DESTINATION ${GR_PKG_TRELLIS_EXAMPLES_DIR}
-    COMPONENT "trellis_examples"
 )
 
 install(
     FILES README
     DESTINATION ${GR_PKG_DATA_DIR}/examples/trellis
-    COMPONENT "trellis_examples"
 )
 
 install(
@@ -68,5 +66,4 @@ install(
     fsm_files/simple.fsm
     fsm_files/uncoded4.fsm
     DESTINATION ${GR_PKG_TRELLIS_EXAMPLES_DIR}/fsm_files
-    COMPONENT "trellis_examples"
 )
diff --git a/gr-trellis/grc/CMakeLists.txt b/gr-trellis/grc/CMakeLists.txt
index d60d64872c..9fbadd50d8 100644
--- a/gr-trellis/grc/CMakeLists.txt
+++ b/gr-trellis/grc/CMakeLists.txt
@@ -32,5 +32,4 @@ install(FILES
     trellis_pccc_decoder_x.xml
     trellis_pccc_decoder_combined_xx.xml
     DESTINATION ${GRC_BLOCKS_DIR}
-    COMPONENT "trellis_python"
 )
diff --git a/gr-trellis/include/gnuradio/trellis/CMakeLists.txt b/gr-trellis/include/gnuradio/trellis/CMakeLists.txt
index ef60ce7370..831f2916dc 100644
--- a/gr-trellis/include/gnuradio/trellis/CMakeLists.txt
+++ b/gr-trellis/include/gnuradio/trellis/CMakeLists.txt
@@ -54,6 +54,5 @@ install(FILES
     siso_combined_f.h
     siso_f.h
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio/trellis
-    COMPONENT "trellis_devel"
 )
 
diff --git a/gr-trellis/lib/CMakeLists.txt b/gr-trellis/lib/CMakeLists.txt
index 9c51d06604..3d268c608f 100644
--- a/gr-trellis/lib/CMakeLists.txt
+++ b/gr-trellis/lib/CMakeLists.txt
@@ -90,7 +90,7 @@ ENDIF(MSVC)
 
 add_library(gnuradio-trellis SHARED ${trellis_sources})
 target_link_libraries(gnuradio-trellis ${trellis_libs})
-GR_LIBRARY_FOO(gnuradio-trellis RUNTIME_COMPONENT "trellis_runtime" DEVEL_COMPONENT "trellis_devel")
+GR_LIBRARY_FOO(gnuradio-trellis)
 add_dependencies(gnuradio-trellis
   trellis_generated_includes trellis_generated_swigs
   gnuradio-runtime gnuradio-digital)
@@ -120,6 +120,6 @@ if(ENABLE_STATIC_LIBS)
   endif(NOT WIN32)
 
   install(TARGETS gnuradio-trellis_static
-    ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "trellis_devel"   # .lib file
+    ARCHIVE DESTINATION lib${LIB_SUFFIX} # .lib file
     )
 endif(ENABLE_STATIC_LIBS)
diff --git a/gr-trellis/python/trellis/CMakeLists.txt b/gr-trellis/python/trellis/CMakeLists.txt
index 5cfe927412..10fd9d5c0e 100644
--- a/gr-trellis/python/trellis/CMakeLists.txt
+++ b/gr-trellis/python/trellis/CMakeLists.txt
@@ -27,7 +27,6 @@ GR_PYTHON_INSTALL(
     __init__.py
     fsm_utils.py
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/trellis
-    COMPONENT "trellis_python"
 )
 
 ########################################################################
diff --git a/gr-trellis/swig/CMakeLists.txt b/gr-trellis/swig/CMakeLists.txt
index d03d0998ef..e1ee66cba0 100644
--- a/gr-trellis/swig/CMakeLists.txt
+++ b/gr-trellis/swig/CMakeLists.txt
@@ -50,7 +50,6 @@ GR_SWIG_MAKE(trellis_swig trellis_swig.i)
 GR_SWIG_INSTALL(
     TARGETS trellis_swig
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/trellis
-    COMPONENT "trellis_python"
 )
 
 install(
@@ -58,5 +57,4 @@ install(
     trellis_swig.i
     ${CMAKE_CURRENT_BINARY_DIR}/trellis_swig_doc.i
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
-    COMPONENT "trellis_swig"
 )
diff --git a/gr-uhd/CMakeLists.txt b/gr-uhd/CMakeLists.txt
index 43ac4ab8a9..6310822cf4 100644
--- a/gr-uhd/CMakeLists.txt
+++ b/gr-uhd/CMakeLists.txt
@@ -49,47 +49,6 @@ SET(GR_PKG_UHD_EXAMPLES_DIR ${GR_PKG_DATA_DIR}/examples/uhd)
 ########################################################################
 if(ENABLE_GR_UHD)
 
-########################################################################
-# Setup CPack components
-########################################################################
-include(GrPackage)
-CPACK_SET(CPACK_COMPONENT_GROUP_UHD_DESCRIPTION "GNU Radio UHD Blocks")
-
-CPACK_COMPONENT("uhd_runtime"
-    GROUP        "UHD"
-    DISPLAY_NAME "Runtime"
-    DESCRIPTION  "Runtime"
-    DEPENDS      "runtime_runtime"
-)
-
-CPACK_COMPONENT("uhd_devel"
-    GROUP        "UHD"
-    DISPLAY_NAME "Development"
-    DESCRIPTION  "C++ headers, package config, import libraries"
-    DEPENDS      "runtime_devel"
-)
-
-CPACK_COMPONENT("uhd_python"
-    GROUP        "UHD"
-    DISPLAY_NAME "Python"
-    DESCRIPTION  "Python modules for runtime; GRC xml files"
-    DEPENDS      "runtime_python;uhd_runtime"
-)
-
-CPACK_COMPONENT("uhd_examples"
-    GROUP        "UHD"
-    DISPLAY_NAME "Examples"
-    DESCRIPTION  "Example programs"
-    DEPENDS      "uhd_runtime"
-)
-
-CPACK_COMPONENT("uhd_swig"
-    GROUP        "UHD"
-    DISPLAY_NAME "SWIG"
-    DESCRIPTION  "SWIG development .i files"
-    DEPENDS      "runtime_swig;uhd_python;uhd_devel"
-)
-
 ########################################################################
 # Add subdirectories
 ########################################################################
@@ -117,7 +76,6 @@ configure_file(
 install(
     FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-uhd.pc
     DESTINATION ${GR_LIBRARY_DIR}/pkgconfig
-    COMPONENT "uhd_devel"
 )
 
 endif(ENABLE_GR_UHD)
diff --git a/gr-uhd/apps/CMakeLists.txt b/gr-uhd/apps/CMakeLists.txt
index ebcaf6e9f8..ce94a43cff 100644
--- a/gr-uhd/apps/CMakeLists.txt
+++ b/gr-uhd/apps/CMakeLists.txt
@@ -27,7 +27,6 @@ GR_PYTHON_INSTALL(
     uhd_siggen_base.py
     uhd_app.py
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/uhd
-    COMPONENT "uhd_python"
 )
 
 GR_PYTHON_INSTALL(
@@ -38,7 +37,6 @@ GR_PYTHON_INSTALL(
     uhd_siggen_gui
     uhd_rx_nogui
     DESTINATION ${GR_RUNTIME_DIR}
-    COMPONENT "uhd_python"
 )
 
 ########################################################################
@@ -51,7 +49,6 @@ install(
     hf_radio/README.TXT
     hf_radio/ssb_taps
     DESTINATION ${GR_PKG_DATA_DIR}/examples/hf_radio
-    COMPONENT "uhd_python"
 )
 
 GR_PYTHON_INSTALL(
@@ -62,7 +59,6 @@ GR_PYTHON_INSTALL(
     hf_radio/ssbdemod.py
     hf_radio/startup.py
     DESTINATION ${GR_PKG_DATA_DIR}/examples/hf_radio
-    COMPONENT "uhd_python"
 )
 
 GR_PYTHON_INSTALL(
@@ -70,7 +66,6 @@ GR_PYTHON_INSTALL(
     hf_radio/radio.py
     hf_radio/ui.py
     DESTINATION ${GR_PKG_DATA_DIR}/examples/hf_radio
-    COMPONENT "uhd_python"
 )
 
 ########################################################################
@@ -81,12 +76,10 @@ install(
     hf_explorer/README
     hf_explorer/hfx_help
     DESTINATION ${GR_PKG_DATA_DIR}/examples/hf_explorer
-    COMPONENT "uhd_python"
 )
 
 GR_PYTHON_INSTALL(
     PROGRAMS
     hf_explorer/hfx.py
     DESTINATION ${GR_PKG_DATA_DIR}/examples/hf_explorer
-    COMPONENT "uhd_python"
 )
diff --git a/gr-uhd/examples/c++/CMakeLists.txt b/gr-uhd/examples/c++/CMakeLists.txt
index 655ef0c0a9..c5a55520f6 100644
--- a/gr-uhd/examples/c++/CMakeLists.txt
+++ b/gr-uhd/examples/c++/CMakeLists.txt
@@ -40,5 +40,4 @@ target_link_libraries(tags_demo gnuradio-uhd)
 INSTALL(TARGETS
     tags_demo
     DESTINATION ${GR_PKG_UHD_EXAMPLES_DIR}
-    COMPONENT "uhd_examples"
 )
diff --git a/gr-uhd/examples/grc/CMakeLists.txt b/gr-uhd/examples/grc/CMakeLists.txt
index 06c233d45c..4c124b5c03 100644
--- a/gr-uhd/examples/grc/CMakeLists.txt
+++ b/gr-uhd/examples/grc/CMakeLists.txt
@@ -27,5 +27,4 @@ install(
     uhd_tx_dpsk.grc
     uhd_wbfm_receive.grc
     DESTINATION ${GR_PKG_UHD_EXAMPLES_DIR}
-    COMPONENT "uhd_python"
 )
diff --git a/gr-uhd/examples/python/CMakeLists.txt b/gr-uhd/examples/python/CMakeLists.txt
index 7642b536b8..cf50feb148 100644
--- a/gr-uhd/examples/python/CMakeLists.txt
+++ b/gr-uhd/examples/python/CMakeLists.txt
@@ -38,5 +38,4 @@ GR_PYTHON_INSTALL(
     usrp_wfm_rcv_sca.py
     usrp_wxapt_rcv.py
     DESTINATION ${GR_PKG_UHD_EXAMPLES_DIR}
-    COMPONENT "uhd_python"
 )
diff --git a/gr-uhd/grc/CMakeLists.txt b/gr-uhd/grc/CMakeLists.txt
index 2d8f24aa3c..d748bfacef 100644
--- a/gr-uhd/grc/CMakeLists.txt
+++ b/gr-uhd/grc/CMakeLists.txt
@@ -42,5 +42,4 @@ install(FILES
     uhd_amsg_source.xml
     uhd_block_tree.xml
     DESTINATION ${GRC_BLOCKS_DIR}
-    COMPONENT "uhd_python"
 )
diff --git a/gr-uhd/include/gnuradio/uhd/CMakeLists.txt b/gr-uhd/include/gnuradio/uhd/CMakeLists.txt
index b1f3345d78..8d75afc1bc 100644
--- a/gr-uhd/include/gnuradio/uhd/CMakeLists.txt
+++ b/gr-uhd/include/gnuradio/uhd/CMakeLists.txt
@@ -27,5 +27,4 @@ install(FILES
     usrp_sink.h
     amsg_source.h
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio/uhd
-    COMPONENT "uhd_devel"
 )
diff --git a/gr-uhd/lib/CMakeLists.txt b/gr-uhd/lib/CMakeLists.txt
index b57b80b557..2427516c9a 100644
--- a/gr-uhd/lib/CMakeLists.txt
+++ b/gr-uhd/lib/CMakeLists.txt
@@ -75,7 +75,7 @@ list(APPEND uhd_libs
 
 add_library(gnuradio-uhd SHARED ${gr_uhd_sources})
 target_link_libraries(gnuradio-uhd ${uhd_libs})
-GR_LIBRARY_FOO(gnuradio-uhd RUNTIME_COMPONENT "uhd_runtime" DEVEL_COMPONENT "uhd_devel")
+GR_LIBRARY_FOO(gnuradio-uhd)
 
 ########################################################################
 # Build static libraries if enabled
@@ -91,7 +91,7 @@ if(ENABLE_STATIC_LIBS)
     endif(NOT WIN32)
 
     install(TARGETS gnuradio-uhd_static
-      ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "uhd_devel"   # .lib file
+      ARCHIVE DESTINATION lib${LIB_SUFFIX} # .lib file
     )
   else(UHD_VERSION VERSION_GREATER "3.8.1")
     message(STATUS "Not building gr-uhd static library; requires UHD >= 3.8.2")
diff --git a/gr-uhd/python/uhd/CMakeLists.txt b/gr-uhd/python/uhd/CMakeLists.txt
index aa1d1a6b4a..ee69e8eb7d 100644
--- a/gr-uhd/python/uhd/CMakeLists.txt
+++ b/gr-uhd/python/uhd/CMakeLists.txt
@@ -26,7 +26,6 @@ GR_PYTHON_INSTALL(
     FILES
     __init__.py
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/uhd
-    COMPONENT "uhd_python"
 )
 
 ########################################################################
diff --git a/gr-uhd/swig/CMakeLists.txt b/gr-uhd/swig/CMakeLists.txt
index ef54761d0f..5cbc6c642c 100644
--- a/gr-uhd/swig/CMakeLists.txt
+++ b/gr-uhd/swig/CMakeLists.txt
@@ -48,12 +48,10 @@ GR_SWIG_MAKE(uhd_swig uhd_swig.i)
 GR_SWIG_INSTALL(
     TARGETS uhd_swig
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/uhd
-    COMPONENT "uhd_python"
 )
 
 install(
     FILES uhd_swig.i
     ${CMAKE_CURRENT_BINARY_DIR}/uhd_swig_doc.i
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
-    COMPONENT "uhd_swig"
 )
diff --git a/gr-utils/CMakeLists.txt b/gr-utils/CMakeLists.txt
index b9d3763e48..d54a06abd1 100644
--- a/gr-utils/CMakeLists.txt
+++ b/gr-utils/CMakeLists.txt
@@ -45,16 +45,6 @@ GR_REGISTER_COMPONENT("gr-utils" ENABLE_GR_UTILS
 ########################################################################
 if(ENABLE_GR_UTILS)
 
-########################################################################
-# Setup CPack components
-########################################################################
-include(GrPackage)
-CPACK_COMPONENT("utils"
-    DISPLAY_NAME "Utils"
-    DESCRIPTION  "Misc gnuradio python utilities"
-    DEPENDS      "runtime_python"
-)
-
 ########################################################################
 # Add subdirectories
 ########################################################################
diff --git a/gr-utils/python/modtool/CMakeLists.txt b/gr-utils/python/modtool/CMakeLists.txt
index 697a84ddd1..5fc5b0287f 100644
--- a/gr-utils/python/modtool/CMakeLists.txt
+++ b/gr-utils/python/modtool/CMakeLists.txt
@@ -37,13 +37,11 @@ GR_PYTHON_INSTALL(FILES
     templates.py
     util_functions.py
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/modtool
-    COMPONENT "utils"
 )
 
 set(GR_PKG_MODTOOL_DATA_DIR ${GR_PKG_DATA_DIR}/modtool)
 install(DIRECTORY gr-newmod
     DESTINATION ${GR_PKG_MODTOOL_DATA_DIR}
-    COMPONENT "utils"
 )
 
 
@@ -60,6 +58,5 @@ configure_file(
 install(
     FILES ${CMAKE_CURRENT_BINARY_DIR}/modtool.conf
     DESTINATION ${GR_PREFSDIR}
-    COMPONENT "utils"
 )
 
diff --git a/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrMiscUtils.cmake b/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrMiscUtils.cmake
index 5bad57c51e..3ed74cf1e2 100644
--- a/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrMiscUtils.cmake
+++ b/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrMiscUtils.cmake
@@ -135,18 +135,14 @@ endfunction(GR_LIBTOOL)
 # Also handle gnuradio custom naming conventions w/ extras mode.
 ########################################################################
 function(GR_LIBRARY_FOO target)
-    #parse the arguments for component names
-    include(CMakeParseArgumentsCopy)
-    CMAKE_PARSE_ARGUMENTS(GR_LIBRARY "" "RUNTIME_COMPONENT;DEVEL_COMPONENT" "" ${ARGN})
-
     #set additional target properties
     set_target_properties(${target} PROPERTIES SOVERSION ${LIBVER})
 
     #install the generated files like so...
     install(TARGETS ${target}
-        LIBRARY DESTINATION ${GR_LIBRARY_DIR} COMPONENT ${GR_LIBRARY_RUNTIME_COMPONENT} # .so/.dylib file
-        ARCHIVE DESTINATION ${GR_LIBRARY_DIR} COMPONENT ${GR_LIBRARY_DEVEL_COMPONENT}   # .lib file
-        RUNTIME DESTINATION ${GR_RUNTIME_DIR} COMPONENT ${GR_LIBRARY_RUNTIME_COMPONENT} # .dll file
+        LIBRARY DESTINATION ${GR_LIBRARY_DIR} # .so/.dylib file
+        ARCHIVE DESTINATION ${GR_LIBRARY_DIR} # .lib file
+        RUNTIME DESTINATION ${GR_RUNTIME_DIR} # .dll file
     )
 
     #extras mode enabled automatically on linux
@@ -178,7 +174,7 @@ function(GR_LIBRARY_FOO target)
             FILES
             ${CMAKE_CURRENT_BINARY_DIR}/lib${target}.so
             ${CMAKE_CURRENT_BINARY_DIR}/lib${target}-${LIBVER}.so.0
-            DESTINATION ${GR_LIBRARY_DIR} COMPONENT ${GR_LIBRARY_RUNTIME_COMPONENT}
+            DESTINATION ${GR_LIBRARY_DIR}
         )
 
     endif(LIBRARY_EXTRAS)
diff --git a/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrPython.cmake b/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrPython.cmake
index 06e061e212..0bfa92db8d 100644
--- a/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrPython.cmake
+++ b/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrPython.cmake
@@ -130,7 +130,7 @@ endfunction(GR_UNIQUE_TARGET)
 ########################################################################
 function(GR_PYTHON_INSTALL)
     include(CMakeParseArgumentsCopy)
-    CMAKE_PARSE_ARGUMENTS(GR_PYTHON_INSTALL "" "DESTINATION;COMPONENT" "FILES;PROGRAMS" ${ARGN})
+    CMAKE_PARSE_ARGUMENTS(GR_PYTHON_INSTALL "" "DESTINATION" "FILES;PROGRAMS" ${ARGN})
 
     ####################################################################
     if(GR_PYTHON_INSTALL_FILES)
@@ -182,7 +182,6 @@ function(GR_PYTHON_INSTALL)
         set(python_install_gen_targets ${pycfiles} ${pyofiles})
         install(FILES ${python_install_gen_targets}
             DESTINATION ${GR_PYTHON_INSTALL_DESTINATION}
-            COMPONENT ${GR_PYTHON_INSTALL_COMPONENT}
         )
 
     ####################################################################
@@ -219,7 +218,6 @@ function(GR_PYTHON_INSTALL)
 
             install(PROGRAMS ${pyexefile} RENAME ${pyfile_name}
                 DESTINATION ${GR_PYTHON_INSTALL_DESTINATION}
-                COMPONENT ${GR_PYTHON_INSTALL_COMPONENT}
             )
         endforeach(pyfile)
 
diff --git a/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrSwig.cmake b/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrSwig.cmake
index abf4dc4612..ab8926ba7e 100644
--- a/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrSwig.cmake
+++ b/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrSwig.cmake
@@ -183,24 +183,21 @@ endmacro(GR_SWIG_MAKE)
 # GR_SWIG_INSTALL(
 #   TARGETS target target target...
 #   [DESTINATION destination]
-#   [COMPONENT component]
 # )
 ########################################################################
 macro(GR_SWIG_INSTALL)
 
     include(CMakeParseArgumentsCopy)
-    CMAKE_PARSE_ARGUMENTS(GR_SWIG_INSTALL "" "DESTINATION;COMPONENT" "TARGETS" ${ARGN})
+    CMAKE_PARSE_ARGUMENTS(GR_SWIG_INSTALL "" "DESTINATION" "TARGETS" ${ARGN})
 
     foreach(name ${GR_SWIG_INSTALL_TARGETS})
         install(TARGETS ${SWIG_MODULE_${name}_REAL_NAME}
             DESTINATION ${GR_SWIG_INSTALL_DESTINATION}
-            COMPONENT ${GR_SWIG_INSTALL_COMPONENT}
         )
 
         include(GrPython)
         GR_PYTHON_INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${name}.py
             DESTINATION ${GR_SWIG_INSTALL_DESTINATION}
-            COMPONENT ${GR_SWIG_INSTALL_COMPONENT}
         )
 
         GR_LIBTOOL(
diff --git a/gr-utils/python/modtool/gr-newmod/lib/CMakeLists.txt b/gr-utils/python/modtool/gr-newmod/lib/CMakeLists.txt
index 10a15b7dd9..24ffa41fc1 100644
--- a/gr-utils/python/modtool/gr-newmod/lib/CMakeLists.txt
+++ b/gr-utils/python/modtool/gr-newmod/lib/CMakeLists.txt
@@ -48,7 +48,7 @@ endif(APPLE)
 # Install built library files
 ########################################################################
 include(GrMiscUtils)
-GR_LIBRARY_FOO(gnuradio-howto RUNTIME_COMPONENT "howto_runtime" DEVEL_COMPONENT "howto_devel")
+GR_LIBRARY_FOO(gnuradio-howto)
 
 ########################################################################
 # Build and register unit test
@@ -79,4 +79,3 @@ GR_ADD_TEST(test_howto test-howto)
 ########################################################################
 message(STATUS "Using install prefix: ${CMAKE_INSTALL_PREFIX}")
 message(STATUS "Building for version: ${VERSION} / ${LIBVER}")
-
diff --git a/gr-utils/python/utils/CMakeLists.txt b/gr-utils/python/utils/CMakeLists.txt
index 54eba51170..46a21c1508 100644
--- a/gr-utils/python/utils/CMakeLists.txt
+++ b/gr-utils/python/utils/CMakeLists.txt
@@ -30,7 +30,6 @@ GR_PYTHON_INSTALL(
     pyqt_plot.py
     pyqt_filter.py
     DESTINATION ${GR_PYTHON_DIR}/gnuradio
-    COMPONENT "utils"
 )
 
 GR_PYTHON_INSTALL(
@@ -52,5 +51,4 @@ GR_PYTHON_INSTALL(
     gr_read_file_metadata
     grcc
     DESTINATION ${GR_RUNTIME_DIR}
-    COMPONENT "utils"
 )
diff --git a/gr-video-sdl/CMakeLists.txt b/gr-video-sdl/CMakeLists.txt
index 50975eb675..a171535c37 100644
--- a/gr-video-sdl/CMakeLists.txt
+++ b/gr-video-sdl/CMakeLists.txt
@@ -44,40 +44,6 @@ GR_SET_GLOBAL(GR_VIDEO_SDL_INCLUDE_DIRS
 ########################################################################
 if(ENABLE_GR_VIDEO_SDL)
 
-########################################################################
-# Setup CPack components
-########################################################################
-include(GrPackage)
-CPACK_SET(CPACK_COMPONENT_GROUP_VIDEO_SDL_DESCRIPTION "GNU Radio Video SDL Blocks")
-
-CPACK_COMPONENT("video_sdl_runtime"
-    GROUP        "Video SDL"
-    DISPLAY_NAME "Runtime"
-    DESCRIPTION  "Runtime"
-    DEPENDS      "runtime_runtime"
-)
-
-CPACK_COMPONENT("video_sdl_devel"
-    GROUP        "Video SDL"
-    DISPLAY_NAME "Development"
-    DESCRIPTION  "C++ headers, package config, import libraries"
-    DEPENDS      "runtime_devel"
-)
-
-CPACK_COMPONENT("video_sdl_python"
-    GROUP        "Video SDL"
-    DISPLAY_NAME "Python"
-    DESCRIPTION  "Python modules for runtime; GRC xml files"
-    DEPENDS      "runtime_python;video_sdl_runtime"
-)
-
-CPACK_COMPONENT("video_sdl_swig"
-    GROUP        "Video SDL"
-    DISPLAY_NAME "SWIG"
-    DESCRIPTION  "SWIG development .i files"
-    DEPENDS      "runtime_swig;video_sdl_python;video_sdl_devel"
-)
-
 ########################################################################
 # Add subdirectories
 ########################################################################
@@ -100,7 +66,6 @@ configure_file(
 install(
     FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-video-sdl.pc
     DESTINATION ${GR_LIBRARY_DIR}/pkgconfig
-    COMPONENT "video_sdl_devel"
 )
 
 endif(ENABLE_GR_VIDEO_SDL)
diff --git a/gr-video-sdl/grc/CMakeLists.txt b/gr-video-sdl/grc/CMakeLists.txt
index b696224274..f62d41b6db 100644
--- a/gr-video-sdl/grc/CMakeLists.txt
+++ b/gr-video-sdl/grc/CMakeLists.txt
@@ -23,5 +23,3 @@ install(FILES
 
     DESTINATION share/gnuradio/grc/blocks
 )
-
-
diff --git a/gr-video-sdl/include/gnuradio/video_sdl/CMakeLists.txt b/gr-video-sdl/include/gnuradio/video_sdl/CMakeLists.txt
index 8831fd8172..97b211031d 100644
--- a/gr-video-sdl/include/gnuradio/video_sdl/CMakeLists.txt
+++ b/gr-video-sdl/include/gnuradio/video_sdl/CMakeLists.txt
@@ -25,6 +25,5 @@ install(FILES
     sink_s.h
     sink_uc.h
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio/video_sdl
-    COMPONENT "video_sdl_devel"
 )
 
diff --git a/gr-video-sdl/lib/CMakeLists.txt b/gr-video-sdl/lib/CMakeLists.txt
index 42ad24e3ff..d43f0bb914 100644
--- a/gr-video-sdl/lib/CMakeLists.txt
+++ b/gr-video-sdl/lib/CMakeLists.txt
@@ -65,7 +65,7 @@ ENDIF(MSVC)
 
 add_library(gnuradio-video-sdl SHARED ${video_sdl_sources})
 target_link_libraries(gnuradio-video-sdl ${video_sdl_libs})
-GR_LIBRARY_FOO(gnuradio-video-sdl RUNTIME_COMPONENT "video_sdl_runtime" DEVEL_COMPONENT "video_sdl_devel")
+GR_LIBRARY_FOO(gnuradio-video-sdl)
 add_dependencies(gnuradio-video-sdl gnuradio-runtime)
 
 if(ENABLE_STATIC_LIBS)
@@ -90,6 +90,6 @@ if(ENABLE_STATIC_LIBS)
   endif(NOT WIN32)
 
   install(TARGETS gnuradio-video-sdl_static
-    ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "video_sdl_devel"   # .lib file
+    ARCHIVE DESTINATION lib${LIB_SUFFIX} # .lib file
     )
 endif(ENABLE_STATIC_LIBS)
diff --git a/gr-video-sdl/python/video_sdl/CMakeLists.txt b/gr-video-sdl/python/video_sdl/CMakeLists.txt
index 7b2f01aace..6465affa10 100644
--- a/gr-video-sdl/python/video_sdl/CMakeLists.txt
+++ b/gr-video-sdl/python/video_sdl/CMakeLists.txt
@@ -26,7 +26,6 @@ GR_PYTHON_INSTALL(
     FILES
     __init__.py
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/video_sdl
-    COMPONENT "video_sdl_python"
 )
 
 ########################################################################
diff --git a/gr-video-sdl/swig/CMakeLists.txt b/gr-video-sdl/swig/CMakeLists.txt
index 46343741a1..0d5974f21c 100644
--- a/gr-video-sdl/swig/CMakeLists.txt
+++ b/gr-video-sdl/swig/CMakeLists.txt
@@ -48,7 +48,6 @@ GR_SWIG_MAKE(video_sdl_swig video_sdl_swig.i)
 GR_SWIG_INSTALL(
     TARGETS video_sdl_swig
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/video_sdl
-    COMPONENT "video_sdl_python"
 )
 
 install(
@@ -56,5 +55,4 @@ install(
     video_sdl_swig.i
     ${CMAKE_CURRENT_BINARY_DIR}/video_sdl_swig_doc.i
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
-    COMPONENT "video_sdl_swig"
 )
diff --git a/gr-vocoder/CMakeLists.txt b/gr-vocoder/CMakeLists.txt
index 37c0cf70e9..2fb9986a70 100644
--- a/gr-vocoder/CMakeLists.txt
+++ b/gr-vocoder/CMakeLists.txt
@@ -47,47 +47,6 @@ SET(GR_PKG_VOCODER_EXAMPLES_DIR ${GR_PKG_DATA_DIR}/examples/vocoder)
 ########################################################################
 if(ENABLE_GR_VOCODER)
 
-########################################################################
-# Setup CPack components
-########################################################################
-include(GrPackage)
-CPACK_SET(CPACK_COMPONENT_GROUP_VOCODER_DESCRIPTION "GNU Radio Vocoder Blocks")
-
-CPACK_COMPONENT("vocoder_runtime"
-    GROUP        "Vocoder"
-    DISPLAY_NAME "Runtime"
-    DESCRIPTION  "Dynamic link libraries"
-    DEPENDS      "runtime_runtime"
-)
-
-CPACK_COMPONENT("vocoder_devel"
-    GROUP        "Vocoder"
-    DISPLAY_NAME "Development"
-    DESCRIPTION  "C++ headers, package config, import libraries"
-    DEPENDS      "runtime_devel"
-)
-
-CPACK_COMPONENT("vocoder_python"
-    GROUP        "Vocoder"
-    DISPLAY_NAME "Python"
-    DESCRIPTION  "Python modules for runtime"
-    DEPENDS      "runtime_python;vocoder_runtime"
-)
-
-CPACK_COMPONENT("vocoder_examples"
-    GROUP        "Vocoder"
-    DISPLAY_NAME "Examples"
-    DESCRIPTION  "Python examples for vocoder"
-    DEPENDS      "vocoder_python"
-)
-
-CPACK_COMPONENT("vocoder_swig"
-    GROUP        "Vocoder"
-    DISPLAY_NAME "SWIG"
-    DESCRIPTION  "SWIG development .i files"
-    DEPENDS      "runtime_swig;vocoder_python;vocoder_devel"
-)
-
 ########################################################################
 # Add subdirectories
 ########################################################################
@@ -112,7 +71,6 @@ configure_file(
 install(
     FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-vocoder.pc
     DESTINATION ${GR_LIBRARY_DIR}/pkgconfig
-    COMPONENT "vocoder_devel"
 )
 
 endif(ENABLE_GR_VOCODER)
diff --git a/gr-vocoder/examples/CMakeLists.txt b/gr-vocoder/examples/CMakeLists.txt
index 769ddf602a..fc92ecd88e 100644
--- a/gr-vocoder/examples/CMakeLists.txt
+++ b/gr-vocoder/examples/CMakeLists.txt
@@ -33,5 +33,4 @@ GR_PYTHON_INSTALL(
     gsm_audio_loopback.py
     ulaw_audio_loopback.py
     DESTINATION ${GR_PKG_VOCODER_EXAMPLES_DIR}
-    COMPONENT "vocoder_examples"
 )
diff --git a/gr-vocoder/grc/CMakeLists.txt b/gr-vocoder/grc/CMakeLists.txt
index f8cf8231b2..0f8bbb0637 100644
--- a/gr-vocoder/grc/CMakeLists.txt
+++ b/gr-vocoder/grc/CMakeLists.txt
@@ -38,5 +38,4 @@ install(FILES
     vocoder_ulaw_decode_bs.xml
     vocoder_ulaw_encode_sb.xml
     DESTINATION ${GRC_BLOCKS_DIR}
-    COMPONENT "vocoder_python"
 )
diff --git a/gr-vocoder/include/gnuradio/vocoder/CMakeLists.txt b/gr-vocoder/include/gnuradio/vocoder/CMakeLists.txt
index 60f75e7913..ed0990dd62 100644
--- a/gr-vocoder/include/gnuradio/vocoder/CMakeLists.txt
+++ b/gr-vocoder/include/gnuradio/vocoder/CMakeLists.txt
@@ -37,5 +37,4 @@ install(FILES
     ulaw_decode_bs.h
     ulaw_encode_sb.h
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio/vocoder
-    COMPONENT "vocoder_devel"
 )
diff --git a/gr-vocoder/lib/CMakeLists.txt b/gr-vocoder/lib/CMakeLists.txt
index a347cbf7fe..29075afea2 100644
--- a/gr-vocoder/lib/CMakeLists.txt
+++ b/gr-vocoder/lib/CMakeLists.txt
@@ -232,7 +232,7 @@ endif(GR_USE_SYSTEM_LIBGSM)
 
 add_library(gnuradio-vocoder SHARED ${gr_vocoder_sources})
 target_link_libraries(gnuradio-vocoder ${vocoder_libs})
-GR_LIBRARY_FOO(gnuradio-vocoder RUNTIME_COMPONENT "vocoder_runtime" DEVEL_COMPONENT "vocoder_devel")
+GR_LIBRARY_FOO(gnuradio-vocoder)
 
 if(ENABLE_STATIC_LIBS)
   if(ENABLE_GR_CTRLPORT)
@@ -254,6 +254,6 @@ if(ENABLE_STATIC_LIBS)
   endif(NOT WIN32)
 
   install(TARGETS gnuradio-vocoder_static
-    ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "vocoder_devel"   # .lib file
+    ARCHIVE DESTINATION lib${LIB_SUFFIX} # .lib file
     )
 endif(ENABLE_STATIC_LIBS)
diff --git a/gr-vocoder/python/vocoder/CMakeLists.txt b/gr-vocoder/python/vocoder/CMakeLists.txt
index ca8323daab..31317aee2e 100644
--- a/gr-vocoder/python/vocoder/CMakeLists.txt
+++ b/gr-vocoder/python/vocoder/CMakeLists.txt
@@ -27,7 +27,6 @@ GR_PYTHON_INSTALL(
     __init__.py
     cvsd.py
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/vocoder
-    COMPONENT "vocoder_python"
 )
 
 ########################################################################
diff --git a/gr-vocoder/swig/CMakeLists.txt b/gr-vocoder/swig/CMakeLists.txt
index 26623969a7..e2079a05de 100644
--- a/gr-vocoder/swig/CMakeLists.txt
+++ b/gr-vocoder/swig/CMakeLists.txt
@@ -44,7 +44,6 @@ GR_SWIG_MAKE(vocoder_swig vocoder_swig.i)
 GR_SWIG_INSTALL(
     TARGETS vocoder_swig
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/vocoder
-    COMPONENT "vocoder_python"
 )
 
 install(
@@ -52,5 +51,4 @@ install(
     vocoder_swig.i
     ${CMAKE_CURRENT_BINARY_DIR}/vocoder_swig_doc.i
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
-    COMPONENT "vocoder_swig"
 )
diff --git a/gr-wavelet/CMakeLists.txt b/gr-wavelet/CMakeLists.txt
index bdc19a1ebc..aab17ae7f3 100644
--- a/gr-wavelet/CMakeLists.txt
+++ b/gr-wavelet/CMakeLists.txt
@@ -47,40 +47,6 @@ GR_SET_GLOBAL(GR_WAVELET_INCLUDE_DIRS
 ########################################################################
 if(ENABLE_GR_WAVELET)
 
-########################################################################
-# Setup CPack components
-########################################################################
-include(GrPackage)
-CPACK_SET(CPACK_COMPONENT_GROUP_WAVELET_DESCRIPTION "GNU Radio Wavelet Blocks")
-
-CPACK_COMPONENT("wavelet_runtime"
-    GROUP        "WAVELET"
-    DISPLAY_NAME "Runtime"
-    DESCRIPTION  "Runtime"
-    DEPENDS      "runtime_runtime"
-)
-
-CPACK_COMPONENT("wavelet_devel"
-    GROUP        "WAVELET"
-    DISPLAY_NAME "Development"
-    DESCRIPTION  "C++ headers, package config, import libraries"
-    DEPENDS      "runtime_devel"
-)
-
-CPACK_COMPONENT("wavelet_python"
-    GROUP        "WAVELET"
-    DISPLAY_NAME "Python"
-    DESCRIPTION  "Python modules for runtime; GRC xml files"
-    DEPENDS      "runtime_python;wavelet_runtime"
-)
-
-CPACK_COMPONENT("wavelet_swig"
-    GROUP        "WAVELET"
-    DISPLAY_NAME "SWIG"
-    DESCRIPTION  "SWIG development .i files"
-    DEPENDS      "runtime_swig;wavelet_python;wavelet_devel"
-)
-
 ########################################################################
 # Add subdirectories
 ########################################################################
@@ -105,7 +71,6 @@ configure_file(
 install(
     FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-wavelet.pc
     DESTINATION ${GR_LIBRARY_DIR}/pkgconfig
-    COMPONENT "wavelet_devel"
 )
 
 endif(ENABLE_GR_WAVELET)
diff --git a/gr-wavelet/include/gnuradio/wavelet/CMakeLists.txt b/gr-wavelet/include/gnuradio/wavelet/CMakeLists.txt
index 43c1603d15..c1fcd9c3ea 100644
--- a/gr-wavelet/include/gnuradio/wavelet/CMakeLists.txt
+++ b/gr-wavelet/include/gnuradio/wavelet/CMakeLists.txt
@@ -26,6 +26,5 @@ install(FILES
     wavelet_ff.h
     wvps_ff.h
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio/wavelet
-    COMPONENT "wavelet_devel"
 )
 
diff --git a/gr-wavelet/lib/CMakeLists.txt b/gr-wavelet/lib/CMakeLists.txt
index be2a7a8471..3ae8e591af 100644
--- a/gr-wavelet/lib/CMakeLists.txt
+++ b/gr-wavelet/lib/CMakeLists.txt
@@ -85,7 +85,7 @@ if(CMAKE_COMPILER_IS_GNUCC AND NOT APPLE)
     SET_TARGET_PROPERTIES(gnuradio-wavelet PROPERTIES LINK_FLAGS "-Wl,--no-as-needed")
 endif()
 
-GR_LIBRARY_FOO(gnuradio-wavelet RUNTIME_COMPONENT "wavelet_runtime" DEVEL_COMPONENT "wavelet_devel")
+GR_LIBRARY_FOO(gnuradio-wavelet)
 add_dependencies(gnuradio-wavelet
   wavelet_generated_includes wavelet_generated_swigs
   gnuradio-runtime)
@@ -113,6 +113,6 @@ if(ENABLE_STATIC_LIBS)
   endif(NOT WIN32)
 
   install(TARGETS gnuradio-wavelet_static
-    ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "wavelet_devel"   # .lib file
+    ARCHIVE DESTINATION lib${LIB_SUFFIX} # .lib file
     )
 endif(ENABLE_STATIC_LIBS)
diff --git a/gr-wavelet/python/wavelet/CMakeLists.txt b/gr-wavelet/python/wavelet/CMakeLists.txt
index bb88c50b65..9e1961d4e0 100644
--- a/gr-wavelet/python/wavelet/CMakeLists.txt
+++ b/gr-wavelet/python/wavelet/CMakeLists.txt
@@ -24,7 +24,6 @@ GR_PYTHON_INSTALL(
     FILES
     __init__.py
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/wavelet
-    COMPONENT "wavelet_python"
 )
 
 ########################################################################
diff --git a/gr-wavelet/swig/CMakeLists.txt b/gr-wavelet/swig/CMakeLists.txt
index 1f31497844..d9bc02edab 100644
--- a/gr-wavelet/swig/CMakeLists.txt
+++ b/gr-wavelet/swig/CMakeLists.txt
@@ -46,7 +46,6 @@ GR_SWIG_MAKE(wavelet_swig wavelet_swig.i)
 GR_SWIG_INSTALL(
     TARGETS wavelet_swig
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/wavelet
-    COMPONENT "wavelet_python"
 )
 
 install(
@@ -54,5 +53,4 @@ install(
     wavelet_swig.i
     ${CMAKE_CURRENT_BINARY_DIR}/wavelet_swig_doc.i
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
-    COMPONENT "wavelet_swig"
 )
diff --git a/gr-wxgui/CMakeLists.txt b/gr-wxgui/CMakeLists.txt
index 3d8b59c691..d77e36ad4a 100644
--- a/gr-wxgui/CMakeLists.txt
+++ b/gr-wxgui/CMakeLists.txt
@@ -58,37 +58,6 @@ GR_SET_GLOBAL(GR_WXGUI_INCLUDE_DIRS
     ${CMAKE_CURRENT_BINARY_DIR}/include
 )
 
-########################################################################
-# Setup CPack components
-########################################################################
-include(GrPackage)
-CPACK_COMPONENT("wxgui_runtime"
-    DISPLAY_NAME "WxGUI"
-    DESCRIPTION  "Wx GUI plotter widgets and grc wrappers"
-    DEPENDS      "runtime_python"
-)
-
-CPACK_COMPONENT("wxgui_devel"
-    GROUP        "WxGUI"
-    DISPLAY_NAME "Development"
-    DESCRIPTION  "C++ headers, package config, import libraries"
-    DEPENDS      "runtime_devel"
-)
-
-CPACK_COMPONENT("wxgui_python"
-    GROUP        "WxGUI"
-    DISPLAY_NAME "Python"
-    DESCRIPTION  "Python modules for runtime; GRC xml files"
-    DEPENDS      "runtime_python;wxgui_runtime"
-)
-
-CPACK_COMPONENT("wxgui_swig"
-    GROUP        "WxGUI"
-    DISPLAY_NAME "SWIG"
-    DESCRIPTION  "SWIG development .i files"
-    DEPENDS      "runtime_swig;wxgui_python;wxgui_devel"
-)
-
 ########################################################################
 # Create Pkg Config File
 ########################################################################
@@ -100,7 +69,6 @@ configure_file(
 install(
     FILES ${CMAKE_CURRENT_BINARY_DIR}/gr-wxgui.pc
     DESTINATION ${GR_LIBRARY_DIR}/pkgconfig
-    COMPONENT "wxgui"
 )
 
 ########################################################################
@@ -109,7 +77,6 @@ install(
 install(
     FILES ${CMAKE_CURRENT_SOURCE_DIR}/gr-wxgui.conf
     DESTINATION ${GR_PREFSDIR}
-    COMPONENT "wxgui"
 )
 
 ########################################################################
diff --git a/gr-wxgui/grc/CMakeLists.txt b/gr-wxgui/grc/CMakeLists.txt
index 9ee6e2370e..52c9bbda43 100644
--- a/gr-wxgui/grc/CMakeLists.txt
+++ b/gr-wxgui/grc/CMakeLists.txt
@@ -19,7 +19,7 @@
 
 ########################################################################
 file(GLOB xml_files "*.xml")
-install(FILES ${xml_files} DESTINATION ${GRC_BLOCKS_DIR} COMPONENT "wxgui_python")
+install(FILES ${xml_files} DESTINATION ${GRC_BLOCKS_DIR})
 
 ########################################################################
 #The wxgui module contains a top_block + wxgui frame.
@@ -32,5 +32,4 @@ GR_PYTHON_INSTALL(
     panel.py
     top_block_gui.py
     DESTINATION ${GR_PYTHON_DIR}/grc_gnuradio/wxgui
-    COMPONENT "wxgui_python"
 )
diff --git a/gr-wxgui/include/gnuradio/wxgui/CMakeLists.txt b/gr-wxgui/include/gnuradio/wxgui/CMakeLists.txt
index fad84792e1..468d9b7992 100644
--- a/gr-wxgui/include/gnuradio/wxgui/CMakeLists.txt
+++ b/gr-wxgui/include/gnuradio/wxgui/CMakeLists.txt
@@ -28,5 +28,4 @@ install(FILES
     oscope_sink_x.h
     trigger_mode.h
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio/wxgui
-    COMPONENT "wxgui_devel"
 )
diff --git a/gr-wxgui/lib/CMakeLists.txt b/gr-wxgui/lib/CMakeLists.txt
index d4c244177f..2f1f6135f3 100644
--- a/gr-wxgui/lib/CMakeLists.txt
+++ b/gr-wxgui/lib/CMakeLists.txt
@@ -71,9 +71,7 @@ list(APPEND wxgui_libs
 add_library(gnuradio-wxgui SHARED ${gr_wxgui_sources})
 
 target_link_libraries(gnuradio-wxgui ${wxgui_libs})
-GR_LIBRARY_FOO(gnuradio-wxgui
-  RUNTIME_COMPONENT "wxgui_runtime"
-  DEVEL_COMPONENT "wxgui_devel")
+GR_LIBRARY_FOO(gnuradio-wxgui)
 
 if(ENABLE_STATIC_LIBS)
   if(ENABLE_GR_CTRLPORT)
@@ -95,6 +93,6 @@ if(ENABLE_STATIC_LIBS)
   endif(NOT WIN32)
 
   install(TARGETS gnuradio-wxgui_static
-    ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "wxgui_devel"   # .lib file
+    ARCHIVE DESTINATION lib${LIB_SUFFIX} # .lib file
     )
 endif(ENABLE_STATIC_LIBS)
diff --git a/gr-wxgui/python/wxgui/CMakeLists.txt b/gr-wxgui/python/wxgui/CMakeLists.txt
index 3a5cc11527..a06cba70b7 100644
--- a/gr-wxgui/python/wxgui/CMakeLists.txt
+++ b/gr-wxgui/python/wxgui/CMakeLists.txt
@@ -55,7 +55,6 @@ GR_PYTHON_INSTALL(
     slider.py
     stdgui2.py
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/wxgui
-    COMPONENT "wxgui_python"
 )
 
 ########################################################################
@@ -67,7 +66,6 @@ GR_PYTHON_INSTALL(
     forms/forms.py
     forms/converters.py
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/wxgui/forms
-    COMPONENT "wxgui_python"
 )
 
 ########################################################################
@@ -84,5 +82,4 @@ GR_PYTHON_INSTALL(
     plotter/plotter_base.py
     plotter/waterfall_plotter.py
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/wxgui/plotter
-    COMPONENT "wxgui_python"
 )
diff --git a/gr-wxgui/swig/CMakeLists.txt b/gr-wxgui/swig/CMakeLists.txt
index 034036e267..4eb11633a7 100644
--- a/gr-wxgui/swig/CMakeLists.txt
+++ b/gr-wxgui/swig/CMakeLists.txt
@@ -45,7 +45,6 @@ GR_SWIG_MAKE(wxgui_swig wxgui_swig.i)
 GR_SWIG_INSTALL(
     TARGETS wxgui_swig
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/wxgui
-    COMPONENT "wxgui_python"
 )
 
 install(
@@ -53,5 +52,4 @@ install(
     wxgui_swig.i
     ${CMAKE_CURRENT_BINARY_DIR}/wxgui_swig_doc.i
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
-    COMPONENT "wxgui_swig"
 )
diff --git a/gr-zeromq/CMakeLists.txt b/gr-zeromq/CMakeLists.txt
index ffb9a0fc67..1ebd0ff4f5 100644
--- a/gr-zeromq/CMakeLists.txt
+++ b/gr-zeromq/CMakeLists.txt
@@ -47,41 +47,6 @@ SET(GR_PKG_ZEROMQ_EXAMPLES_DIR ${GR_PKG_DATA_DIR}/examples/zeromq)
 ########################################################################
 if(ENABLE_GR_ZEROMQ)
 
-
-########################################################################
-# Setup CPack components
-########################################################################
-include(GrPackage)
-CPACK_SET(CPACK_COMPONENT_GROUP_ZEROMQ_DESCRIPTION "GNU Radio ZeromMQ Interface Blocks")
-
-CPACK_COMPONENT("zeromq_runtime"
-    GROUP        "ZeroMQ Blocks"
-    DISPLAY_NAME "Runtime"
-    DESCRIPTION  "Runtime"
-    DEPENDS      "runtime_runtime"
-)
-
-CPACK_COMPONENT("zeromq_devel"
-    GROUP        "ZeroMQ Blocks"
-    DISPLAY_NAME "Development"
-    DESCRIPTION  "C++ headers, package config, import libraries"
-    DEPENDS      "runtime_devel"
-)
-
-CPACK_COMPONENT("zeromq_python"
-    GROUP        "ZeroMQ Blocks"
-    DISPLAY_NAME "Python"
-    DESCRIPTION  "Python modules for runtime; GRC xml files"
-    DEPENDS      "runtime_python;zeromq_runtime"
-)
-
-CPACK_COMPONENT("zeromq_swig"
-    GROUP        "ZeroMQ Blocks"
-    DISPLAY_NAME "SWIG"
-    DESCRIPTION  "SWIG development .i files"
-    DEPENDS      "runtime_swig;zeromq_python;zeromq_devel"
-)
-
 ########################################################################
 # Add subdirectories
 ########################################################################
@@ -105,7 +70,6 @@ configure_file(
 install(
     FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-zeromq.pc
     DESTINATION ${GR_LIBRARY_DIR}/pkgconfig
-    COMPONENT "zeromq_devel"
 )
 
 endif(ENABLE_GR_ZEROMQ)
diff --git a/gr-zeromq/examples/CMakeLists.txt b/gr-zeromq/examples/CMakeLists.txt
index ce673cf1f5..dd31185d99 100644
--- a/gr-zeromq/examples/CMakeLists.txt
+++ b/gr-zeromq/examples/CMakeLists.txt
@@ -27,5 +27,4 @@ INSTALL(FILES
     zmq_msg.grc
     zmq_stream.grc
     DESTINATION ${GR_PKG_ZEROMQ_EXAMPLES_DIR}
-    COMPONENT "zeromq_python"
 )
diff --git a/gr-zeromq/include/gnuradio/zeromq/CMakeLists.txt b/gr-zeromq/include/gnuradio/zeromq/CMakeLists.txt
index d365532003..5e99ab140b 100644
--- a/gr-zeromq/include/gnuradio/zeromq/CMakeLists.txt
+++ b/gr-zeromq/include/gnuradio/zeromq/CMakeLists.txt
@@ -36,5 +36,4 @@ install(FILES
   req_msg_source.h
 
   DESTINATION ${GR_INCLUDE_DIR}/gnuradio/zeromq
-  COMPONENT "zeromq_devel"
 )
diff --git a/gr-zeromq/lib/CMakeLists.txt b/gr-zeromq/lib/CMakeLists.txt
index d7b03fa4ed..880a6522a9 100644
--- a/gr-zeromq/lib/CMakeLists.txt
+++ b/gr-zeromq/lib/CMakeLists.txt
@@ -75,7 +75,7 @@ list(APPEND zeromq_libs
 
 add_library(gnuradio-zeromq SHARED ${zeromq_sources})
 target_link_libraries(gnuradio-zeromq ${zeromq_libs})
-GR_LIBRARY_FOO(gnuradio-zeromq RUNTIME_COMPONENT "zeromq_runtime" DEVEL_COMPONENT "zeromq_devel")
+GR_LIBRARY_FOO(gnuradio-zeromq)
 
 if(ENABLE_STATIC_LIBS)
   if(ENABLE_GR_CTRLPORT)
@@ -97,6 +97,6 @@ if(ENABLE_STATIC_LIBS)
   endif(NOT WIN32)
 
   install(TARGETS gnuradio-zeromq_static
-    ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "zeromq_devel"   # .lib file
+    ARCHIVE DESTINATION lib${LIB_SUFFIX} # .lib file
     )
 endif(ENABLE_STATIC_LIBS)
diff --git a/gr-zeromq/swig/CMakeLists.txt b/gr-zeromq/swig/CMakeLists.txt
index 5c2aff2ed0..0c557a3ffa 100644
--- a/gr-zeromq/swig/CMakeLists.txt
+++ b/gr-zeromq/swig/CMakeLists.txt
@@ -44,7 +44,6 @@ GR_SWIG_MAKE(zeromq_swig zeromq_swig.i)
 GR_SWIG_INSTALL(
     TARGETS zeromq_swig
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/zeromq
-    COMPONENT "zeromq_python"
 )
 
 install(
@@ -52,5 +51,4 @@ install(
     zeromq_swig.i
     ${CMAKE_CURRENT_BINARY_DIR}/zeromq_swig_doc.i
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
-    COMPONENT "zeromq_swig"
 )
diff --git a/grc/CMakeLists.txt b/grc/CMakeLists.txt
index 4c782a7f7d..eed5202657 100644
--- a/grc/CMakeLists.txt
+++ b/grc/CMakeLists.txt
@@ -53,16 +53,6 @@ GR_REGISTER_COMPONENT("gnuradio-companion" ENABLE_GRC
 ########################################################################
 if(ENABLE_GRC)
 
-########################################################################
-# Setup CPack components
-########################################################################
-include(GrPackage)
-CPACK_COMPONENT("grc"
-    DISPLAY_NAME "GNU Radio Companion"
-    DESCRIPTION  "Graphical flow graph designer"
-    DEPENDS      "runtime_python"
-)
-
 ########################################################################
 # Create and install the grc conf file
 ########################################################################
@@ -93,7 +83,6 @@ configure_file(
 install(
     FILES ${CMAKE_CURRENT_BINARY_DIR}/grc.conf
     DESTINATION ${GR_PREFSDIR}
-    COMPONENT "grc"
 )
 
 file(GLOB py_files "*.py")
@@ -101,7 +90,6 @@ file(GLOB py_files "*.py")
 GR_PYTHON_INSTALL(
     FILES ${py_files}
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/grc
-    COMPONENT "grc"
 )
 
 ########################################################################
@@ -118,18 +106,6 @@ string(REPLACE "\\" "\\\\" GRC_BLOCKS_PATH ${GRC_BLOCKS_PATH})
 file(TO_NATIVE_PATH ${GR_PYTHON_DIR} GR_PYTHON_POSTFIX)
 string(REPLACE "\\" "\\\\" GR_PYTHON_POSTFIX ${GR_PYTHON_POSTFIX})
 
-CPACK_SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}
-    #!include \\\"winmessages.nsh\\\"
-    WriteRegStr HKLM ${HLKM_ENV} \\\"GRC_BLOCKS_PATH\\\" \\\"$INSTDIR\\\\${GRC_BLOCKS_PATH}\\\"
-    SendMessage \\\${HWND_BROADCAST} \\\${WM_WININICHANGE} 0 \\\"STR:Environment\\\" /TIMEOUT=5000
-")
-
-CPACK_SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS}
-    #!include \\\"winmessages.nsh\\\"
-    DeleteRegValue HKLM ${HLKM_ENV} \\\"GRC_BLOCKS_PATH\\\"
-    SendMessage \\\${HWND_BROADCAST} \\\${WM_WININICHANGE} 0 \\\"STR:Environment\\\" /TIMEOUT=5000
-")
-
 endif(WIN32)
 
 ########################################################################
diff --git a/grc/blocks/CMakeLists.txt b/grc/blocks/CMakeLists.txt
index 0c2a1f7901..eaa57970a6 100644
--- a/grc/blocks/CMakeLists.txt
+++ b/grc/blocks/CMakeLists.txt
@@ -39,5 +39,4 @@ add_custom_target(grc_generated_xml ALL DEPENDS ${generated_xml_files})
 install(
     FILES ${xml_files} ${generated_xml_files}
     DESTINATION ${GRC_BLOCKS_DIR}
-    COMPONENT "grc"
 )
diff --git a/grc/core/CMakeLists.txt b/grc/core/CMakeLists.txt
index 51b0dacba6..f340127873 100644
--- a/grc/core/CMakeLists.txt
+++ b/grc/core/CMakeLists.txt
@@ -22,7 +22,6 @@ file(GLOB py_files "*.py")
 GR_PYTHON_INSTALL(
     FILES ${py_files}
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/grc/core
-    COMPONENT "grc"
 )
 
 file(GLOB dtd_files "*.dtd")
@@ -30,7 +29,6 @@ file(GLOB dtd_files "*.dtd")
 install(
     FILES ${dtd_files} default_flow_graph.grc
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/grc/core
-    COMPONENT "grc"
 )
 
 add_subdirectory(generator)
diff --git a/grc/core/generator/CMakeLists.txt b/grc/core/generator/CMakeLists.txt
index 4bdd59a7a2..492ad7c4ad 100644
--- a/grc/core/generator/CMakeLists.txt
+++ b/grc/core/generator/CMakeLists.txt
@@ -22,11 +22,9 @@ file(GLOB py_files "*.py")
 GR_PYTHON_INSTALL(
     FILES ${py_files}
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/grc/core/generator
-    COMPONENT "grc"
 )
 
 install(FILES
     flow_graph.tmpl
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/grc/core/generator
-    COMPONENT "grc"
 )
diff --git a/grc/core/utils/CMakeLists.txt b/grc/core/utils/CMakeLists.txt
index 2528fbc43c..3ba65258a5 100644
--- a/grc/core/utils/CMakeLists.txt
+++ b/grc/core/utils/CMakeLists.txt
@@ -22,5 +22,4 @@ file(GLOB py_files "*.py")
 GR_PYTHON_INSTALL(
     FILES ${py_files}
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/grc/core/utils
-    COMPONENT "grc"
 )
diff --git a/grc/gui/CMakeLists.txt b/grc/gui/CMakeLists.txt
index aa9592b351..12be4a8151 100644
--- a/grc/gui/CMakeLists.txt
+++ b/grc/gui/CMakeLists.txt
@@ -22,5 +22,4 @@ file(GLOB py_files "*.py")
 GR_PYTHON_INSTALL(
     FILES ${py_files}
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/grc/gui
-    COMPONENT "grc"
 )
diff --git a/grc/scripts/CMakeLists.txt b/grc/scripts/CMakeLists.txt
index 6cc78c3cf3..9751952118 100644
--- a/grc/scripts/CMakeLists.txt
+++ b/grc/scripts/CMakeLists.txt
@@ -21,7 +21,6 @@
 GR_PYTHON_INSTALL(
     PROGRAMS gnuradio-companion
     DESTINATION ${GR_RUNTIME_DIR}
-    COMPONENT "grc"
 )
 
 add_subdirectory(freedesktop)
diff --git a/grc/scripts/freedesktop/CMakeLists.txt b/grc/scripts/freedesktop/CMakeLists.txt
index 47e836f697..f936b366fc 100644
--- a/grc/scripts/freedesktop/CMakeLists.txt
+++ b/grc/scripts/freedesktop/CMakeLists.txt
@@ -31,7 +31,6 @@ install(FILES
     gnuradio-grc.xml
     gnuradio-grc.desktop
     DESTINATION ${grc_freedesktop_path}
-    COMPONENT "grc"
 )
 
 find_program(HAVE_XDG_UTILS xdg-desktop-menu)
@@ -44,6 +43,6 @@ if(UNIX AND HAVE_XDG_UTILS)
     @ONLY)
     install(
         PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/grc_setup_freedesktop
-        DESTINATION ${GR_PKG_LIBEXEC_DIR} COMPONENT "grc"
+        DESTINATION ${GR_PKG_LIBEXEC_DIR}
     )
 endif(UNIX AND HAVE_XDG_UTILS)
-- 
cgit v1.2.3


From 6d9a16470bbb416d311a8830d7db42d6c69a39cf Mon Sep 17 00:00:00 2001
From: Johnathan Corgan <johnathan@corganlabs.com>
Date: Thu, 8 Sep 2016 13:15:11 -0700
Subject: wxgui: removed

---
 CMakeLists.txt                                     |    1 -
 cmake/Modules/FindGnuradio.cmake                   |    3 +-
 cmake/Modules/GnuradioConfig.cmake.in              |    1 -
 docs/doxygen/Doxyfile.in                           |    5 -
 docs/doxygen/other/build_guide.dox                 |    2 -
 docs/doxygen/other/group_defs.dox                  |    1 -
 docs/sphinx/source/index.rst                       |   14 -
 docs/sphinx/source/wxgui.rst                       |    5 -
 docs/sphinx/source/wxgui_blocks.rst                |    7 -
 gnuradio-runtime/python/gnuradio/__init__.py       |    1 -
 gr-audio/examples/python/CMakeLists.txt            |    1 -
 gr-audio/examples/python/audio_fft.py              |  138 --
 gr-blocks/python/grc_gnuradio/README               |    3 -
 gr-uhd/CMakeLists.txt                              |    1 -
 gr-uhd/apps/CMakeLists.txt                         |   47 +-
 gr-uhd/apps/hf_explorer/README                     |   28 -
 gr-uhd/apps/hf_explorer/hfx.py                     |  755 --------
 gr-uhd/apps/hf_explorer/hfx_help                   |  180 --
 gr-uhd/apps/hf_radio/README.TXT                    |   60 -
 gr-uhd/apps/hf_radio/hfir.sci                      |   59 -
 gr-uhd/apps/hf_radio/input.py                      |   78 -
 gr-uhd/apps/hf_radio/output.py                     |   43 -
 gr-uhd/apps/hf_radio/radio.py                      |  320 ----
 gr-uhd/apps/hf_radio/radio.xml                     |  441 -----
 gr-uhd/apps/hf_radio/ssb_taps                      | 1023 -----------
 gr-uhd/apps/hf_radio/ssbagc.py                     |   72 -
 gr-uhd/apps/hf_radio/ssbdemod.py                   |  118 --
 gr-uhd/apps/hf_radio/startup.py                    |    1 -
 gr-uhd/apps/hf_radio/ui.py                         |  316 ----
 gr-uhd/apps/uhd_fft_wx                             |  348 ----
 gr-uhd/examples/python/CMakeLists.txt              |   41 -
 gr-uhd/examples/python/fm_tx4.py                   |  211 ---
 gr-uhd/examples/python/fm_tx_2_daughterboards.py   |  216 ---
 gr-uhd/examples/python/freq_hopping.py             |  220 ---
 gr-uhd/examples/python/max_power.py                |  142 --
 gr-uhd/examples/python/usrp_am_mw_rcv.py           |  316 ----
 gr-uhd/examples/python/usrp_nbfm_ptt.py            |  494 ------
 gr-uhd/examples/python/usrp_nbfm_rcv.py            |  384 ----
 gr-uhd/examples/python/usrp_spectrum_sense.py      |  318 ----
 gr-uhd/examples/python/usrp_tv_rcv.py              |  446 -----
 gr-uhd/examples/python/usrp_tv_rcv_nogui.py        |  215 ---
 gr-uhd/examples/python/usrp_wfm_rcv.py             |  290 ----
 gr-uhd/examples/python/usrp_wfm_rcv2_nogui.py      |  157 --
 gr-uhd/examples/python/usrp_wfm_rcv_fmdet.py       |  353 ----
 gr-uhd/examples/python/usrp_wfm_rcv_nogui.py       |  179 --
 gr-uhd/examples/python/usrp_wfm_rcv_pll.py         |  350 ----
 gr-uhd/examples/python/usrp_wfm_rcv_sca.py         |  407 -----
 gr-uhd/examples/python/usrp_wxapt_rcv.py           |  286 ---
 gr-wxgui/CMakeLists.txt                            |   91 -
 gr-wxgui/README                                    |    1 -
 gr-wxgui/README.gl                                 |   29 -
 gr-wxgui/gr-wxgui.conf                             |   13 -
 gr-wxgui/gr-wxgui.pc.in                            |   11 -
 gr-wxgui/grc/CMakeLists.txt                        |   35 -
 gr-wxgui/grc/__init__.py                           |   22 -
 gr-wxgui/grc/notebook.xml                          |   70 -
 gr-wxgui/grc/panel.py                              |   53 -
 gr-wxgui/grc/top_block_gui.py                      |   87 -
 gr-wxgui/grc/variable_check_box.xml                |   85 -
 gr-wxgui/grc/variable_chooser.xml                  |  123 --
 gr-wxgui/grc/variable_slider.xml                   |  139 --
 gr-wxgui/grc/variable_static_text.xml              |   98 --
 gr-wxgui/grc/variable_text_box.xml                 |  102 --
 gr-wxgui/grc/wxgui_constellationsink2.xml          |  141 --
 gr-wxgui/grc/wxgui_fftsink2.xml                    |  246 ---
 gr-wxgui/grc/wxgui_histosink2.xml                  |   79 -
 gr-wxgui/grc/wxgui_numbersink2.xml                 |  194 ---
 gr-wxgui/grc/wxgui_scopesink2.xml                  |  187 --
 gr-wxgui/grc/wxgui_termsink.xml                    |   57 -
 gr-wxgui/grc/wxgui_waterfallsink2.xml              |  203 ---
 gr-wxgui/include/gnuradio/wxgui/CMakeLists.txt     |   31 -
 gr-wxgui/include/gnuradio/wxgui/api.h              |   33 -
 gr-wxgui/include/gnuradio/wxgui/histo_sink_f.h     |   55 -
 gr-wxgui/include/gnuradio/wxgui/oscope_guts.h      |  131 --
 gr-wxgui/include/gnuradio/wxgui/oscope_sink_f.h    |   53 -
 gr-wxgui/include/gnuradio/wxgui/oscope_sink_x.h    |   91 -
 gr-wxgui/include/gnuradio/wxgui/trigger_mode.h     |   44 -
 gr-wxgui/lib/CMakeLists.txt                        |   98 --
 gr-wxgui/lib/gnuradio-wxgui.rc.in                  |   54 -
 gr-wxgui/lib/histo_sink_f_impl.cc                  |  186 --
 gr-wxgui/lib/histo_sink_f_impl.h                   |   63 -
 gr-wxgui/lib/oscope_guts.cc                        |  439 -----
 gr-wxgui/lib/oscope_sink_f_impl.cc                 |   83 -
 gr-wxgui/lib/oscope_sink_f_impl.h                  |   51 -
 gr-wxgui/lib/oscope_sink_x.cc                      |  161 --
 gr-wxgui/python/wxgui/CMakeLists.txt               |   85 -
 gr-wxgui/python/wxgui/__init__.py                  |   32 -
 gr-wxgui/python/wxgui/common.py                    |  296 ----
 gr-wxgui/python/wxgui/const_window.py              |  211 ---
 gr-wxgui/python/wxgui/constants.py                 |   76 -
 gr-wxgui/python/wxgui/constsink_gl.py              |  142 --
 gr-wxgui/python/wxgui/fft_window.py                |  412 -----
 gr-wxgui/python/wxgui/fftsink2.py                  |   41 -
 gr-wxgui/python/wxgui/fftsink_gl.py                |  204 ---
 gr-wxgui/python/wxgui/fftsink_nongl.py             |  656 -------
 gr-wxgui/python/wxgui/form.py                      |  391 -----
 gr-wxgui/python/wxgui/forms/__init__.py            |  102 --
 gr-wxgui/python/wxgui/forms/converters.py          |  154 --
 gr-wxgui/python/wxgui/forms/forms.py               |  675 -------
 gr-wxgui/python/wxgui/gui.py                       |  135 --
 gr-wxgui/python/wxgui/histo_window.py              |  168 --
 gr-wxgui/python/wxgui/histosink_gl.py              |  113 --
 gr-wxgui/python/wxgui/number_window.py             |  219 ---
 gr-wxgui/python/wxgui/numbersink2.py               |  173 --
 gr-wxgui/python/wxgui/plot.py                      | 1834 --------------------
 gr-wxgui/python/wxgui/plotter/__init__.py          |   24 -
 gr-wxgui/python/wxgui/plotter/bar_plotter.py       |  150 --
 gr-wxgui/python/wxgui/plotter/channel_plotter.py   |  249 ---
 gr-wxgui/python/wxgui/plotter/common.py            |  149 --
 gr-wxgui/python/wxgui/plotter/gltext.py            |  507 ------
 gr-wxgui/python/wxgui/plotter/grid_plotter_base.py |  458 -----
 gr-wxgui/python/wxgui/plotter/plotter_base.py      |  220 ---
 gr-wxgui/python/wxgui/plotter/waterfall_plotter.py |  294 ----
 gr-wxgui/python/wxgui/powermate.py                 |  448 -----
 gr-wxgui/python/wxgui/pubsub.py                    |  153 --
 gr-wxgui/python/wxgui/scope_window.py              |  691 --------
 gr-wxgui/python/wxgui/scopesink2.py                |   41 -
 gr-wxgui/python/wxgui/scopesink_gl.py              |  239 ---
 gr-wxgui/python/wxgui/scopesink_nongl.py           |  654 -------
 gr-wxgui/python/wxgui/slider.py                    |   48 -
 gr-wxgui/python/wxgui/stdgui2.py                   |  107 --
 gr-wxgui/python/wxgui/termsink.py                  |   77 -
 gr-wxgui/python/wxgui/waterfall_window.py          |  328 ----
 gr-wxgui/python/wxgui/waterfallsink2.py            |   41 -
 gr-wxgui/python/wxgui/waterfallsink_gl.py          |  176 --
 gr-wxgui/python/wxgui/waterfallsink_nongl.py       |  434 -----
 gr-wxgui/swig/CMakeLists.txt                       |   55 -
 gr-wxgui/swig/wxgui_swig.i                         |   43 -
 128 files changed, 2 insertions(+), 24439 deletions(-)
 delete mode 100644 docs/sphinx/source/wxgui.rst
 delete mode 100644 docs/sphinx/source/wxgui_blocks.rst
 delete mode 100755 gr-audio/examples/python/audio_fft.py
 delete mode 100644 gr-uhd/apps/hf_explorer/README
 delete mode 100755 gr-uhd/apps/hf_explorer/hfx.py
 delete mode 100644 gr-uhd/apps/hf_explorer/hfx_help
 delete mode 100644 gr-uhd/apps/hf_radio/README.TXT
 delete mode 100644 gr-uhd/apps/hf_radio/hfir.sci
 delete mode 100644 gr-uhd/apps/hf_radio/input.py
 delete mode 100644 gr-uhd/apps/hf_radio/output.py
 delete mode 100755 gr-uhd/apps/hf_radio/radio.py
 delete mode 100644 gr-uhd/apps/hf_radio/radio.xml
 delete mode 100644 gr-uhd/apps/hf_radio/ssb_taps
 delete mode 100644 gr-uhd/apps/hf_radio/ssbagc.py
 delete mode 100644 gr-uhd/apps/hf_radio/ssbdemod.py
 delete mode 100644 gr-uhd/apps/hf_radio/startup.py
 delete mode 100755 gr-uhd/apps/hf_radio/ui.py
 delete mode 100755 gr-uhd/apps/uhd_fft_wx
 delete mode 100644 gr-uhd/examples/python/CMakeLists.txt
 delete mode 100755 gr-uhd/examples/python/fm_tx4.py
 delete mode 100755 gr-uhd/examples/python/fm_tx_2_daughterboards.py
 delete mode 100755 gr-uhd/examples/python/freq_hopping.py
 delete mode 100755 gr-uhd/examples/python/max_power.py
 delete mode 100755 gr-uhd/examples/python/usrp_am_mw_rcv.py
 delete mode 100755 gr-uhd/examples/python/usrp_nbfm_ptt.py
 delete mode 100755 gr-uhd/examples/python/usrp_nbfm_rcv.py
 delete mode 100755 gr-uhd/examples/python/usrp_spectrum_sense.py
 delete mode 100755 gr-uhd/examples/python/usrp_tv_rcv.py
 delete mode 100755 gr-uhd/examples/python/usrp_tv_rcv_nogui.py
 delete mode 100755 gr-uhd/examples/python/usrp_wfm_rcv.py
 delete mode 100755 gr-uhd/examples/python/usrp_wfm_rcv2_nogui.py
 delete mode 100755 gr-uhd/examples/python/usrp_wfm_rcv_fmdet.py
 delete mode 100755 gr-uhd/examples/python/usrp_wfm_rcv_nogui.py
 delete mode 100755 gr-uhd/examples/python/usrp_wfm_rcv_pll.py
 delete mode 100755 gr-uhd/examples/python/usrp_wfm_rcv_sca.py
 delete mode 100755 gr-uhd/examples/python/usrp_wxapt_rcv.py
 delete mode 100644 gr-wxgui/CMakeLists.txt
 delete mode 100644 gr-wxgui/README
 delete mode 100644 gr-wxgui/README.gl
 delete mode 100644 gr-wxgui/gr-wxgui.conf
 delete mode 100644 gr-wxgui/gr-wxgui.pc.in
 delete mode 100644 gr-wxgui/grc/CMakeLists.txt
 delete mode 100644 gr-wxgui/grc/__init__.py
 delete mode 100644 gr-wxgui/grc/notebook.xml
 delete mode 100644 gr-wxgui/grc/panel.py
 delete mode 100644 gr-wxgui/grc/top_block_gui.py
 delete mode 100644 gr-wxgui/grc/variable_check_box.xml
 delete mode 100644 gr-wxgui/grc/variable_chooser.xml
 delete mode 100644 gr-wxgui/grc/variable_slider.xml
 delete mode 100644 gr-wxgui/grc/variable_static_text.xml
 delete mode 100644 gr-wxgui/grc/variable_text_box.xml
 delete mode 100644 gr-wxgui/grc/wxgui_constellationsink2.xml
 delete mode 100644 gr-wxgui/grc/wxgui_fftsink2.xml
 delete mode 100644 gr-wxgui/grc/wxgui_histosink2.xml
 delete mode 100644 gr-wxgui/grc/wxgui_numbersink2.xml
 delete mode 100644 gr-wxgui/grc/wxgui_scopesink2.xml
 delete mode 100644 gr-wxgui/grc/wxgui_termsink.xml
 delete mode 100644 gr-wxgui/grc/wxgui_waterfallsink2.xml
 delete mode 100644 gr-wxgui/include/gnuradio/wxgui/CMakeLists.txt
 delete mode 100644 gr-wxgui/include/gnuradio/wxgui/api.h
 delete mode 100644 gr-wxgui/include/gnuradio/wxgui/histo_sink_f.h
 delete mode 100644 gr-wxgui/include/gnuradio/wxgui/oscope_guts.h
 delete mode 100644 gr-wxgui/include/gnuradio/wxgui/oscope_sink_f.h
 delete mode 100644 gr-wxgui/include/gnuradio/wxgui/oscope_sink_x.h
 delete mode 100644 gr-wxgui/include/gnuradio/wxgui/trigger_mode.h
 delete mode 100644 gr-wxgui/lib/CMakeLists.txt
 delete mode 100644 gr-wxgui/lib/gnuradio-wxgui.rc.in
 delete mode 100644 gr-wxgui/lib/histo_sink_f_impl.cc
 delete mode 100644 gr-wxgui/lib/histo_sink_f_impl.h
 delete mode 100644 gr-wxgui/lib/oscope_guts.cc
 delete mode 100644 gr-wxgui/lib/oscope_sink_f_impl.cc
 delete mode 100644 gr-wxgui/lib/oscope_sink_f_impl.h
 delete mode 100644 gr-wxgui/lib/oscope_sink_x.cc
 delete mode 100644 gr-wxgui/python/wxgui/CMakeLists.txt
 delete mode 100644 gr-wxgui/python/wxgui/__init__.py
 delete mode 100644 gr-wxgui/python/wxgui/common.py
 delete mode 100644 gr-wxgui/python/wxgui/const_window.py
 delete mode 100644 gr-wxgui/python/wxgui/constants.py
 delete mode 100644 gr-wxgui/python/wxgui/constsink_gl.py
 delete mode 100644 gr-wxgui/python/wxgui/fft_window.py
 delete mode 100644 gr-wxgui/python/wxgui/fftsink2.py
 delete mode 100644 gr-wxgui/python/wxgui/fftsink_gl.py
 delete mode 100644 gr-wxgui/python/wxgui/fftsink_nongl.py
 delete mode 100644 gr-wxgui/python/wxgui/form.py
 delete mode 100644 gr-wxgui/python/wxgui/forms/__init__.py
 delete mode 100644 gr-wxgui/python/wxgui/forms/converters.py
 delete mode 100644 gr-wxgui/python/wxgui/forms/forms.py
 delete mode 100644 gr-wxgui/python/wxgui/gui.py
 delete mode 100644 gr-wxgui/python/wxgui/histo_window.py
 delete mode 100644 gr-wxgui/python/wxgui/histosink_gl.py
 delete mode 100644 gr-wxgui/python/wxgui/number_window.py
 delete mode 100644 gr-wxgui/python/wxgui/numbersink2.py
 delete mode 100644 gr-wxgui/python/wxgui/plot.py
 delete mode 100644 gr-wxgui/python/wxgui/plotter/__init__.py
 delete mode 100644 gr-wxgui/python/wxgui/plotter/bar_plotter.py
 delete mode 100644 gr-wxgui/python/wxgui/plotter/channel_plotter.py
 delete mode 100644 gr-wxgui/python/wxgui/plotter/common.py
 delete mode 100644 gr-wxgui/python/wxgui/plotter/gltext.py
 delete mode 100644 gr-wxgui/python/wxgui/plotter/grid_plotter_base.py
 delete mode 100644 gr-wxgui/python/wxgui/plotter/plotter_base.py
 delete mode 100644 gr-wxgui/python/wxgui/plotter/waterfall_plotter.py
 delete mode 100644 gr-wxgui/python/wxgui/powermate.py
 delete mode 100644 gr-wxgui/python/wxgui/pubsub.py
 delete mode 100644 gr-wxgui/python/wxgui/scope_window.py
 delete mode 100644 gr-wxgui/python/wxgui/scopesink2.py
 delete mode 100644 gr-wxgui/python/wxgui/scopesink_gl.py
 delete mode 100644 gr-wxgui/python/wxgui/scopesink_nongl.py
 delete mode 100644 gr-wxgui/python/wxgui/slider.py
 delete mode 100644 gr-wxgui/python/wxgui/stdgui2.py
 delete mode 100644 gr-wxgui/python/wxgui/termsink.py
 delete mode 100644 gr-wxgui/python/wxgui/waterfall_window.py
 delete mode 100644 gr-wxgui/python/wxgui/waterfallsink2.py
 delete mode 100644 gr-wxgui/python/wxgui/waterfallsink_gl.py
 delete mode 100644 gr-wxgui/python/wxgui/waterfallsink_nongl.py
 delete mode 100644 gr-wxgui/swig/CMakeLists.txt
 delete mode 100644 gr-wxgui/swig/wxgui_swig.i

(limited to 'docs/doxygen')

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8d9e4de33d..8880155b71 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -410,7 +410,6 @@ add_subdirectory(gr-utils)
 add_subdirectory(gr-video-sdl)
 add_subdirectory(gr-vocoder)
 add_subdirectory(gr-wavelet)
-add_subdirectory(gr-wxgui)
 add_subdirectory(gr-zeromq)
 add_subdirectory(grc)
 
diff --git a/cmake/Modules/FindGnuradio.cmake b/cmake/Modules/FindGnuradio.cmake
index 72b7313737..3e899f5d26 100644
--- a/cmake/Modules/FindGnuradio.cmake
+++ b/cmake/Modules/FindGnuradio.cmake
@@ -1,4 +1,4 @@
-# Copyright 2013 Free Software Foundation, Inc.
+# Copyright 2013,2016 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -115,5 +115,4 @@ GR_MODULE(TRELLIS gnuradio-trellis gnuradio/trellis/api.h gnuradio-trellis)
 GR_MODULE(UHD gnuradio-uhd gnuradio/uhd/api.h gnuradio-uhd)
 GR_MODULE(VOCODER gnuradio-vocoder gnuradio/vocoder/api.h gnuradio-vocoder)
 GR_MODULE(WAVELET gnuradio-wavelet gnuradio/wavelet/api.h gnuradio-wavelet)
-GR_MODULE(WXGUI gnuradio-wxgui gnuradio/wxgui/api.h gnuradio-wxgui)
 GR_MODULE(PMT gnuradio-pmt pmt/pmt.h gnuradio-pmt)
diff --git a/cmake/Modules/GnuradioConfig.cmake.in b/cmake/Modules/GnuradioConfig.cmake.in
index d9ca22dd7a..b323a0d911 100644
--- a/cmake/Modules/GnuradioConfig.cmake.in
+++ b/cmake/Modules/GnuradioConfig.cmake.in
@@ -135,7 +135,6 @@ GR_MODULE(TRELLIS gnuradio-trellis gnuradio/trellis/api.h gnuradio-trellis)
 GR_MODULE(UHD gnuradio-uhd gnuradio/uhd/api.h gnuradio-uhd)
 GR_MODULE(VOCODER gnuradio-vocoder gnuradio/vocoder/api.h gnuradio-vocoder)
 GR_MODULE(WAVELET gnuradio-wavelet gnuradio/wavelet/api.h gnuradio-wavelet)
-GR_MODULE(WXGUI gnuradio-wxgui gnuradio/wxgui/api.h gnuradio-wxgui)
 GR_MODULE(ZEROMQ gnuradio-zeromq gnuradio/zeromq/api.h gnuradio-zeromq)
 GR_MODULE(PMT gnuradio-runtime pmt/pmt.h gnuradio-pmt)
 GR_MODULE(VOLK volk volk/volk.h volk)
diff --git a/docs/doxygen/Doxyfile.in b/docs/doxygen/Doxyfile.in
index c5795dfa1f..731c0dfed8 100644
--- a/docs/doxygen/Doxyfile.in
+++ b/docs/doxygen/Doxyfile.in
@@ -181,8 +181,6 @@ STRIP_FROM_INC_PATH    = @CMAKE_SOURCE_DIR@/gnuradio-runtime/include \
                          @CMAKE_BINARY_DIR@/gr-vocoder/include \
                          @CMAKE_SOURCE_DIR@/gr-wavelet/include \
                          @CMAKE_BINARY_DIR@/gr-wavelet/include \
-                         @CMAKE_SOURCE_DIR@/gr-wxgui/include \
-                         @CMAKE_BINARY_DIR@/gr-wxgui/include \
                          @CMAKE_SOURCE_DIR@/gr-zeromq/include \
                          @CMAKE_BINARY_DIR@/gr-zeromq/include \
                          @CMAKE_SOURCE_DIR@/volk/include \
@@ -754,7 +752,6 @@ EXCLUDE                = @abs_top_srcdir@/volk \
                          @abs_top_builddir@/gr-trellis/doc \
                          @abs_top_builddir@/gr-trellis/swig/trellis_swig.py \
                          @abs_top_builddir@/gr-video-sdl/swig/video_sdl_swig.py \
-                         @abs_top_builddir@/gr-wxgui/python \
                          @abs_top_builddir@/grc \
                          @abs_top_builddir@/_CPack_Packages \
                          @abs_top_srcdir@/cmake \
@@ -813,8 +810,6 @@ EXCLUDE                = @abs_top_srcdir@/volk \
                          @abs_top_builddir@/gr-vocoder/lib \
                          @abs_top_srcdir@/gr-wavelet/lib \
                          @abs_top_builddir@/gr-wavelet/lib \
-                         @abs_top_srcdir@/gr-wxgui/lib \
-                         @abs_top_builddir@/gr-wxgui/lib \
                          @abs_top_srcdir@/gr-zeromq/lib \
                          @abs_top_builddir@/gr-zeromq/lib \
                          @abs_top_srcdir@/volk/cmake/msvc \
diff --git a/docs/doxygen/other/build_guide.dox b/docs/doxygen/other/build_guide.dox
index 87e5a456f3..b7218a2dbe 100644
--- a/docs/doxygen/other/build_guide.dox
+++ b/docs/doxygen/other/build_guide.dox
@@ -52,8 +52,6 @@ first. Most recent systems have these packages available.
 \li qwt         (>= 5.2.0)   http://sourceforge.net/projects/qwt/
 \li pyqt        (>= 4.10.0)  http://www.riverbankcomputing.co.uk/software/pyqt/download
 
-\subsection dep_gr_wxgui gr-wxgui: The WX-based Graphical User Interface
-\li wxpython    (>= 2.8)     http://www.wxpython.org/
 \li python-lxml (>= 1.3.6)   http://lxml.de/
 
 \subsection dep_gr_audio gr-audio: Audio Subsystems (system/OS dependent)
diff --git a/docs/doxygen/other/group_defs.dox b/docs/doxygen/other/group_defs.dox
index 1cb3ff9f97..a534473ee4 100644
--- a/docs/doxygen/other/group_defs.dox
+++ b/docs/doxygen/other/group_defs.dox
@@ -48,7 +48,6 @@
 /*! \defgroup uhd_blk UHD Interface */
 /*! \defgroup waveform_generators_blk Waveform Generators */
 /*! \defgroup wavelet_blk Wavelet Transforms */
-/*! \defgroup wxgui_blk WX Graphical Interfaces */
 
 /*!
  * \defgroup base_blk Base classes for GR Blocks
diff --git a/docs/sphinx/source/index.rst b/docs/sphinx/source/index.rst
index 5c14d22cce..137c17a6ba 100644
--- a/docs/sphinx/source/index.rst
+++ b/docs/sphinx/source/index.rst
@@ -25,7 +25,6 @@ gnuradio
    blocks_video_sdl <video_sdl_blocks>
    blocks_vocoder <vocoder_blocks>
    blocks_wavelet <wavelet_blocks>
-   blocks_wxgui <wxgui_blocks>
    blocks_zeromq <zeromq_blocks>
    analog <analog>
    channels <channels>
@@ -37,7 +36,6 @@ gnuradio
    trellis <trellis>
    uhd <uhd>
    vocoder <vocoder>
-   wxgui <wxgui>
 
 .. automodule:: gnuradio
 .. automodule:: pmt
@@ -656,8 +654,6 @@ Instrumentation Blocks
    gnuradio.qtgui.vector_sink_f
    gnuradio.qtgui.waterfall_sink_c
    gnuradio.qtgui.waterfall_sink_f
-   gnuradio.wxgui.histo_sink_f
-   gnuradio.wxgui.oscope_sink_f
 
 
 
@@ -1464,13 +1460,3 @@ Helper Classes: Vocoder
    gnuradio.vocoder.codec2
    gnuradio.vocoder.cvsd_encode_fb
    gnuradio.vocoder.cvsd_decode_bf
-
-
-Helper Classes: WXGUI
----------------------
-
-.. autosummary::
-   :nosignatures:
-
-   gnuradio.wxgui.oscope_sink_x
-   gnuradio.wxgui.histo_sink_f
diff --git a/docs/sphinx/source/wxgui.rst b/docs/sphinx/source/wxgui.rst
deleted file mode 100644
index dcaa4a8e4a..0000000000
--- a/docs/sphinx/source/wxgui.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-gnuradio.wxgui
-==============
-
-.. autoclass:: gnuradio.wxgui.oscope_sink_x
-.. autoclass:: gnuradio.wxgui.histo_sink_f
diff --git a/docs/sphinx/source/wxgui_blocks.rst b/docs/sphinx/source/wxgui_blocks.rst
deleted file mode 100644
index ccccd854da..0000000000
--- a/docs/sphinx/source/wxgui_blocks.rst
+++ /dev/null
@@ -1,7 +0,0 @@
-gnuradio.wxgui
-==============
-
-.. automodule:: gnuradio.wxgui
-
-.. autoblock:: gnuradio.wxgui.histo_sink_f
-.. autoblock:: gnuradio.wxgui.oscope_sink_f
diff --git a/gnuradio-runtime/python/gnuradio/__init__.py b/gnuradio-runtime/python/gnuradio/__init__.py
index 43274dbd1c..062450cb5f 100644
--- a/gnuradio-runtime/python/gnuradio/__init__.py
+++ b/gnuradio-runtime/python/gnuradio/__init__.py
@@ -37,7 +37,6 @@ if path.endswith(path_ending):
     __path__.append(os.path.join(build_path, 'gr-wavelet', 'python'))
     __path__.append(os.path.join(build_path, 'gr-audio', 'python'))
     __path__.append(os.path.join(build_path, 'gr-qtgui', 'python'))
-    __path__.append(os.path.join(build_path, 'gr-wxgui', 'python'))
     __path__.append(os.path.join(build_path, 'gr-video-sdl', 'python'))
     __path__.append(os.path.join(build_path, 'gr-vocoder', 'python'))
     __path__.append(os.path.join(build_path, 'gr-comedi', 'python'))
diff --git a/gr-audio/examples/python/CMakeLists.txt b/gr-audio/examples/python/CMakeLists.txt
index 01a03fefcd..6e90b0ef5a 100644
--- a/gr-audio/examples/python/CMakeLists.txt
+++ b/gr-audio/examples/python/CMakeLists.txt
@@ -21,7 +21,6 @@ include(GrPython)
 
 GR_PYTHON_INSTALL(PROGRAMS
     audio_copy.py
-    audio_fft.py
     audio_play.py
     audio_to_file.py
     dial_tone.py
diff --git a/gr-audio/examples/python/audio_fft.py b/gr-audio/examples/python/audio_fft.py
deleted file mode 100755
index 519963da54..0000000000
--- a/gr-audio/examples/python/audio_fft.py
+++ /dev/null
@@ -1,138 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2004,2005,2007 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-from gnuradio import gr, gru, audio
-from gnuradio import eng_notation
-from gnuradio.eng_option import eng_option
-from gnuradio.wxgui import stdgui2, fftsink2, waterfallsink2, scopesink2, form, slider
-from optparse import OptionParser
-import wx
-import sys
-
-class app_top_block(stdgui2.std_top_block):
-    def __init__(self, frame, panel, vbox, argv):
-        stdgui2.std_top_block.__init__(self, frame, panel, vbox, argv)
-
-        self.frame = frame
-        self.panel = panel
-
-        parser = OptionParser(option_class=eng_option)
-        parser.add_option("-W", "--waterfall", action="store_true", default=False,
-                          help="Enable waterfall display")
-        parser.add_option("-S", "--oscilloscope", action="store_true", default=False,
-                          help="Enable oscilloscope display")
-        parser.add_option("-I", "--audio-input", type="string", default="",
-                          help="pcm input device name.  E.g., hw:0,0 or /dev/dsp")
-        parser.add_option("-r", "--sample-rate", type="eng_float", default=48000,
-                          help="set sample rate to RATE (48000)")
-
-        (options, args) = parser.parse_args()
-	sample_rate = int(options.sample_rate)
-
-	if len(args) != 0:
-            parser.print_help()
-            sys.exit(1)
-
-        self.show_debug_info = True
-
-        # build the graph
-        if options.waterfall:
-            self.scope = \
-              waterfallsink2.waterfall_sink_f (panel, fft_size=1024, sample_rate=sample_rate)
-        elif options.oscilloscope:
-            self.scope = scopesink2.scope_sink_f(panel, sample_rate=sample_rate)
-        else:
-            self.scope = fftsink2.fft_sink_f (panel, fft_size=1024, sample_rate=sample_rate, fft_rate=30,
-					      ref_scale=1.0, ref_level=0, y_divs=12)
-
-	self.src = audio.source (sample_rate, options.audio_input)
-
-        self.connect(self.src, self.scope)
-
-        self._build_gui(vbox)
-
-        # set initial values
-
-    def _set_status_msg(self, msg):
-        self.frame.GetStatusBar().SetStatusText(msg, 0)
-
-    def _build_gui(self, vbox):
-
-        def _form_set_freq(kv):
-            return self.set_freq(kv['freq'])
-
-        vbox.Add(self.scope.win, 10, wx.EXPAND)
-
-	#self._build_subpanel(vbox)
-
-    def _build_subpanel(self, vbox_arg):
-        # build a secondary information panel (sometimes hidden)
-
-        # FIXME figure out how to have this be a subpanel that is always
-        # created, but has its visibility controlled by foo.Show(True/False)
-
-        def _form_set_decim(kv):
-            return self.set_decim(kv['decim'])
-
-        if not(self.show_debug_info):
-            return
-
-        panel = self.panel
-        vbox = vbox_arg
-        myform = self.myform
-
-        #panel = wx.Panel(self.panel, -1)
-        #vbox = wx.BoxSizer(wx.VERTICAL)
-
-        hbox = wx.BoxSizer(wx.HORIZONTAL)
-        hbox.Add((5,0), 0)
-
-        myform['decim'] = form.int_field(
-            parent=panel, sizer=hbox, label="Decim",
-            callback=myform.check_input_and_call(_form_set_decim, self._set_status_msg))
-
-        hbox.Add((5,0), 1)
-        myform['fs@usb'] = form.static_float_field(
-            parent=panel, sizer=hbox, label="Fs@USB")
-
-        hbox.Add((5,0), 1)
-        myform['dbname'] = form.static_text_field(
-            parent=panel, sizer=hbox)
-
-        hbox.Add((5,0), 1)
-        myform['baseband'] = form.static_float_field(
-            parent=panel, sizer=hbox, label="Analog BB")
-
-        hbox.Add((5,0), 1)
-        myform['ddc'] = form.static_float_field(
-            parent=panel, sizer=hbox, label="DDC")
-
-        hbox.Add((5,0), 0)
-        vbox.Add(hbox, 0, wx.EXPAND)
-
-
-def main ():
-    app = stdgui2.stdapp(app_top_block, "Audio FFT", nstatus=1)
-    app.MainLoop()
-
-if __name__ == '__main__':
-    main ()
diff --git a/gr-blocks/python/grc_gnuradio/README b/gr-blocks/python/grc_gnuradio/README
index 897eed65ca..e27b01af54 100644
--- a/gr-blocks/python/grc_gnuradio/README
+++ b/gr-blocks/python/grc_gnuradio/README
@@ -6,6 +6,3 @@ These will be phased-out as new functionaility is merged into gnuradio.
 The blk2s module wraps many blocks in blks2 and gives them streaming outputs.
 Will be phased-out by new message passing implementations.
 Other blks2 blocks will hopefully make their way into blks2impl.
-
-The wxgui module contains a top_block + wxgui frame.
-Will be phased-out by gui.py in wxgui and a new top block template.
diff --git a/gr-uhd/CMakeLists.txt b/gr-uhd/CMakeLists.txt
index 6310822cf4..cb4fda82af 100644
--- a/gr-uhd/CMakeLists.txt
+++ b/gr-uhd/CMakeLists.txt
@@ -61,7 +61,6 @@ if(ENABLE_PYTHON)
     add_subdirectory(python/uhd)
     add_subdirectory(grc)
     add_subdirectory(apps)
-    add_subdirectory(examples/python)
     add_subdirectory(examples/grc)
 endif(ENABLE_PYTHON)
 
diff --git a/gr-uhd/apps/CMakeLists.txt b/gr-uhd/apps/CMakeLists.txt
index ce94a43cff..0d49b4ca9e 100644
--- a/gr-uhd/apps/CMakeLists.txt
+++ b/gr-uhd/apps/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright 2011 Free Software Foundation, Inc.
+# Copyright 2011,2016 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -38,48 +38,3 @@ GR_PYTHON_INSTALL(
     uhd_rx_nogui
     DESTINATION ${GR_RUNTIME_DIR}
 )
-
-########################################################################
-# Install hf radio apps
-########################################################################
-install(
-    FILES
-    hf_radio/hfir.sci
-    hf_radio/radio.xml
-    hf_radio/README.TXT
-    hf_radio/ssb_taps
-    DESTINATION ${GR_PKG_DATA_DIR}/examples/hf_radio
-)
-
-GR_PYTHON_INSTALL(
-    PROGRAMS
-    hf_radio/input.py
-    hf_radio/output.py
-    hf_radio/ssbagc.py
-    hf_radio/ssbdemod.py
-    hf_radio/startup.py
-    DESTINATION ${GR_PKG_DATA_DIR}/examples/hf_radio
-)
-
-GR_PYTHON_INSTALL(
-    PROGRAMS
-    hf_radio/radio.py
-    hf_radio/ui.py
-    DESTINATION ${GR_PKG_DATA_DIR}/examples/hf_radio
-)
-
-########################################################################
-# Install hf explorer
-########################################################################
-install(
-    FILES
-    hf_explorer/README
-    hf_explorer/hfx_help
-    DESTINATION ${GR_PKG_DATA_DIR}/examples/hf_explorer
-)
-
-GR_PYTHON_INSTALL(
-    PROGRAMS
-    hf_explorer/hfx.py
-    DESTINATION ${GR_PKG_DATA_DIR}/examples/hf_explorer
-)
diff --git a/gr-uhd/apps/hf_explorer/README b/gr-uhd/apps/hf_explorer/README
deleted file mode 100644
index 39b6b66cd0..0000000000
--- a/gr-uhd/apps/hf_explorer/README
+++ /dev/null
@@ -1,28 +0,0 @@
-hfx.py is meant to be a full-featured Long Wave / Medium Wave
-and Short Wave (250kHz to 30Mhz) AM and Single Sideband receiver.
-It uses the USRP with a Basic RX board, and will need an
-antenna and some preamps, about 30db gain will work. See the
-'Help' menu or hfx_help for more info.
-
-----------------------------------------------------------
-
-Powermate knob supported but not required, tooltip frequency display,
-single click tuning, AGC, record to disk, play from disk and record
-audio.  Ability to tailor the audio passband with two sliders over the
-spectrum display. The sliders almost align with the actual
-frequency. Preset filter settings for LSB (-3000 to 0kHz), USB (0 to
-+3000kHz), CW (-400 to -800Hz) and AM (-5kHz from carrier to +5kHz).
-
-AM now switches in a synchronous PLL detector with the carriers at
-7.5kHz. Everything gets shifted up 7.5kHz in AM, center frequency,
-tooltips, etc.  The target AM carrier needs to be closely tuned in, it
-will have a hollow sound until it is locked.  The filter in AM is
-preset to 2500/12500 (7.5kHz +/- 5kHz) and is handy for removing
-adjacent channel interference.
-
-There is code for Web based control of frequency and volume - so
-I can tune the radio with a handheld device.  Disabled by default - it
-takes a web server, some directories and scripts to use.
-
-
-
diff --git a/gr-uhd/apps/hf_explorer/hfx.py b/gr-uhd/apps/hf_explorer/hfx.py
deleted file mode 100755
index 043ab2ca92..0000000000
--- a/gr-uhd/apps/hf_explorer/hfx.py
+++ /dev/null
@@ -1,755 +0,0 @@
-#!/usr/bin/python
-#!/usr/bin/env python
-# generated by wxGlade 0.4 on Tue Mar 14 10:16:06 2006
-#
-# Copyright 2006,2011 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-#-----------------------------------------------------------------
-#
-#                 +-->(fft)
-#                 |
-# (src)->(xlate)--+->(audio filter)--+-->(sel_am)-+--------------+
-#                                    |            |              |
-#                                    |          (pll)            |
-#                                    |            |              |
-#                                    |   (pll_carrier_scale)     |
-#                                    |            |              |
-#                                    |   (pll_carrier_filter)    |
-#                                    |            |              |
-#                                    |            +--(fft2)      |
-#                                    |            |              |
-#                                    |       +--(c2f3)--+        |
-#                                    |       |          |        |
-#                                    |   (phaser1)  (phaser2)    |
-#                                    |       |          |        |
-#                                    |       +--(f2c)---+        |
-#                                    |            |              V
-#                                    V            +---------->(am_det)
-#                                  (c2f)                         |
-#                                    |                         (c2f2)
-#                                    |                           |
-#                                    +-->(sel_sb)------------>(combine)
-#                                                                |
-#                                                                V
-#                                  +--------------------------(scale)
-#                                  |                             |
-#                                  |                             |
-#                                  |                            +++
-#                                  V                            | |
-#                                (agc)<--(offset)<--(intr)<---(sqr1)
-#                                  |
-#                                  V
-#                                (dst)
-#
-#----------------------------------------------------------------------
-#
-# 3.0.1 - updated to support uhd correctly, old code for usrp had display negative, removed antenna tuner controls
-#
-
-# Web server control disabled by default. Do not enable
-# until directory structure and scripts are in place.
-WEB_CONTROL = False
-
-import os, wx, sys, math
-import wx.lib.evtmgr as em
-from gnuradio.wxgui import powermate, fftsink2
-from gnuradio import gr, audio, eng_notation
-from gnuradio import analog
-from gnuradio import filter
-from gnuradio import blocks
-from gnuradio.eng_option import eng_option
-from gnuradio import uhd
-from optparse import OptionParser
-
-n2s = eng_notation.num_to_str
-
-ID_BUTTON_1 = wx.NewId()	# LSB button
-ID_BUTTON_2 = wx.NewId()	# USB
-ID_BUTTON_3 = wx.NewId()	# AM
-ID_BUTTON_4 = wx.NewId()	# CW
-ID_BUTTON_5 = wx.NewId()	# Powermate controls: Upper audio freq cutoff
-ID_BUTTON_6 = wx.NewId()	#  "                  Lower audio freq cutoff
-ID_BUTTON_7 = wx.NewId()	#  "                  Frequency
-ID_BUTTON_8 = wx.NewId()	#  "                  Volume
-ID_BUTTON_9 = wx.NewId()	#  "                  Time
-ID_BUTTON_10 = wx.NewId()	# Time Seek Forwards
-ID_BUTTON_11 = wx.NewId()	# Time Seek Backwards
-ID_TEXT_1 = wx.NewId()		# Band Center, USRP ddc Freq
-ID_SPIN_1 = wx.NewId()		# Frequency display and control
-ID_SLIDER_1 = wx.NewId()	# Upper audio freq cutoff
-ID_SLIDER_2 = wx.NewId()	# Lower audio freq cutoff
-ID_SLIDER_3 = wx.NewId()	# Frequency
-ID_SLIDER_4 = wx.NewId()	# Volume
-ID_SLIDER_5 = wx.NewId()	# Programmable Gain Amp, PGA, RF gain
-ID_SLIDER_7 = wx.NewId()	# AT control voltage output
-ID_EXIT = wx.NewId()            # Menu Exit
-
-
-class MyFrame(wx.Frame):
-    def __init__(self, *args, **kwds):
-        # begin wxGlade: MyFrame.__init__
-        kwds["style"] = wx.DEFAULT_FRAME_STYLE
-        wx.Frame.__init__(self, *args, **kwds)
-
-        # Menu Bar
-        self.frame_1_menubar = wx.MenuBar()
-        self.SetMenuBar(self.frame_1_menubar)
-        wxglade_tmp_menu = wx.Menu()
-        self.Exit = wx.MenuItem(wxglade_tmp_menu, ID_EXIT, "Exit",
-                                "Exit", wx.ITEM_NORMAL)
-        wxglade_tmp_menu.AppendItem(self.Exit)
-        self.frame_1_menubar.Append(wxglade_tmp_menu, "File")
-        # Menu Bar end
-        self.panel_1 = wx.Panel(self, -1)
-        self.button_1 = wx.Button(self, ID_BUTTON_1, "LSB")
-        self.button_2 = wx.Button(self, ID_BUTTON_2, "USB")
-        self.button_3 = wx.Button(self, ID_BUTTON_3, "AM")
-        self.button_4 = wx.Button(self, ID_BUTTON_4, "CW")
-        self.button_5 = wx.ToggleButton(self, ID_BUTTON_5, "Upper")
-        self.slider_fcutoff_hi = wx.Slider(self, ID_SLIDER_1, 0, -15798, 15799,
-                                  style=wx.SL_HORIZONTAL|wx.SL_LABELS)
-        self.button_6 = wx.ToggleButton(self, ID_BUTTON_6, "Lower")
-        self.slider_fcutoff_lo = wx.Slider(self, ID_SLIDER_2, 0, -15799, 15798,
-                                  style=wx.SL_HORIZONTAL|wx.SL_LABELS)
-        self.panel_5 = wx.Panel(self, -1)
-        self.label_1 = wx.StaticText(self, -1, " Band\nCenter")
-        self.text_ctrl_1 = wx.TextCtrl(self, ID_TEXT_1, "")
-        self.panel_6 = wx.Panel(self, -1)
-        self.panel_7 = wx.Panel(self, -1)
-        self.panel_2 = wx.Panel(self, -1)
-        self.button_7 = wx.ToggleButton(self, ID_BUTTON_7, "Freq")
-        self.slider_3 = wx.Slider(self, ID_SLIDER_3, 3000, 0, 6000)
-        self.spin_ctrl_1 = wx.SpinCtrl(self, ID_SPIN_1, "", min=0, max=100)
-        self.button_8 = wx.ToggleButton(self, ID_BUTTON_8, "Vol")
-        self.slider_4 = wx.Slider(self, ID_SLIDER_4, 0, 0, 500)
-        self.slider_5 = wx.Slider(self, ID_SLIDER_5, 0, 0, 20)
-        self.button_9 = wx.ToggleButton(self, ID_BUTTON_9, "Time")
-        self.button_11 = wx.Button(self, ID_BUTTON_11, "Rew")
-        self.button_10 = wx.Button(self, ID_BUTTON_10, "Fwd")
-        self.panel_3 = wx.Panel(self, -1)
-        self.label_2 = wx.StaticText(self, -1, "PGA               ")
-        self.panel_4 = wx.Panel(self, -1)
-        self.panel_8 = wx.Panel(self, -1)
-        self.panel_9 = wx.Panel(self, -1)
-        self.panel_10 = wx.Panel(self, -1)
-        self.panel_11 = wx.Panel(self, -1)
-        self.panel_12 = wx.Panel(self, -1)
-
-        self.__set_properties()
-        self.__do_layout()
-        # end wxGlade
-
-        parser = OptionParser (option_class=eng_option)
-        parser.add_option("", "--args", type="string", default="addr=''",
-                          help="Arguments for UHD device, [default=%default]")
-        parser.add_option("", "--spec", type="string", default="A:0",
-                          help="UHD device subdev spec, [default=%default]")
-        parser.add_option ("-c", "--ddc-freq", type="eng_float", default=3.9e6,
-                           help="set Rx DDC frequency to FREQ", metavar="FREQ")
-        parser.add_option ("-s", "--samp-rate", type="eng_float", default=256000,
-                           help="set sample rate (bandwidth) [default=%default]")
-        parser.add_option ("-a", "--audio_file", default="",
-                           help="audio output file", metavar="FILE")
-        parser.add_option ("-r", "--radio_file", default="",
-                           help="radio output file", metavar="FILE")
-        parser.add_option ("-i", "--input_file", default="",
-                           help="radio input file", metavar="FILE")
-        parser.add_option ("-O", "--audio-output", type="string", default="",
-                           help="audio output device name. E.g., hw:0,0, /dev/dsp, or pulse")
-        parser.add_option ("", "--audio-rate", type="int", default=32000,
-                           help="audio output sample rate [default=%default]")
-
-        (options, args) = parser.parse_args ()
-
-        self.usrp_center = options.ddc_freq
-        self.input_rate = input_rate = options.samp_rate
-        self.slider_range = input_rate * 0.9375
-        self.f_lo = self.usrp_center - (self.slider_range/2)
-        self.f_hi = self.usrp_center + (self.slider_range/2)
-        self.af_sample_rate = options.audio_rate
-        self.tb = gr.top_block()
-
-        # radio variables, initial conditions
-        self.frequency = self.usrp_center
-        # these map the frequency slider (0-6000) to the actual range
-        self.f_slider_offset = self.f_lo
-        self.f_slider_scale = 10000/250
-        self.spin_ctrl_1.SetRange(self.f_lo,self.f_hi)
-        self.text_ctrl_1.SetValue(str(int(self.usrp_center)))
-        self.slider_5.SetValue(0)
-        self.AM_mode = False
-
-        self.slider_3.SetValue((self.frequency-self.f_slider_offset)/self.f_slider_scale)
-        self.spin_ctrl_1.SetValue(int(self.frequency))
-
-        POWERMATE = True
-        try:
-            self.pm = powermate.powermate(self)
-        except:
-            sys.stderr.write("Unable to find PowerMate or Contour Shuttle\n")
-            POWERMATE = False
-
-        if POWERMATE:
-          powermate.EVT_POWERMATE_ROTATE(self, self.on_rotate)
-          powermate.EVT_POWERMATE_BUTTON(self, self.on_pmButton)
-          self.active_button = 7
-
-        # command line options
-        if options.audio_file == "": SAVE_AUDIO_TO_FILE = False
-        else: SAVE_AUDIO_TO_FILE = True
-        if options.radio_file == "": SAVE_RADIO_TO_FILE = False
-        else: SAVE_RADIO_TO_FILE = True
-        if options.input_file == "": self.PLAY_FROM_USRP = True
-        else: self.PLAY_FROM_USRP = False
-
-        if self.PLAY_FROM_USRP:
-            self.src = uhd.usrp_source(options.args, stream_args=uhd.stream_args('fc32'))
-            self.src.set_samp_rate(input_rate)
-            self.src.set_subdev_spec(options.spec)
-            self.input_rate = input_rate = self.src.get_samp_rate()
-
-            self.src.set_center_freq(self.usrp_center, 0)
-            self.tune_offset = 0
-
-            fir_decim = long(self.input_rate / self.af_sample_rate)
-            rrate = self.af_sample_rate / (self.input_rate / float(fir_decim))
-
-
-            print "Actual Input Rate: ", self.input_rate
-            print "FIR DECIM: ", fir_decim
-            print "Remaining resampling: ", rrate
-            print "Sampling Rate at Audio Sink: ", (self.input_rate / fir_decim) * rrate
-            print "Request Rate at Audio Sink: ", self.af_sample_rate
-
-        else:
-            self.src = blocks.file_source (gr.sizeof_short,options.input_file)
-            self.tune_offset = 2200 # 2200 works for 3.5-4Mhz band
-
-            # convert rf data in interleaved short int form to complex
-            s2ss = blocks.stream_to_streams(gr.sizeof_short,2)
-            s2f1 = blocks.short_to_float()
-            s2f2 = blocks.short_to_float()
-            src_f2c = blocks.float_to_complex()
-            self.tb.connect(self.src,s2ss)
-            self.tb.connect((s2ss,0),s2f1)
-            self.tb.connect((s2ss,1),s2f2)
-            self.tb.connect(s2f1,(src_f2c,0))
-            self.tb.connect(s2f2,(src_f2c,1))
-
-            fir_decim = long(self.input_rate / self.af_sample_rate)
-            rrate = self.af_sample_rate / (self.input_rate / float(fir_decim))
-
-            print "FIR DECIM: ", fir_decim
-            print "Remaining resampling: ", rrate
-            print "Sampling Rate at Audio Sink: ", (self.input_rate / fir_decim) * rrate
-            print "Request Rate at Audio Sink: ", self.af_sample_rate
-
-        # save radio data to a file
-        if SAVE_RADIO_TO_FILE:
-           radio_file = blocks.file_sink(gr.sizeof_short, options.radio_file)
-           self.tb.connect (self.src, radio_file)
-
-        # 2nd DDC
-        xlate_taps = filter.firdes.low_pass ( \
-           1.0, input_rate, 16e3, 4e3, filter.firdes.WIN_HAMMING )
-        self.xlate = filter.freq_xlating_fir_filter_ccf ( \
-           fir_decim, xlate_taps, self.tune_offset, input_rate )
-
-        nflts = 32
-        audio_coeffs = filter.firdes.complex_band_pass (
-            nflts,                     # gain
-            self.input_rate*nflts,     # sample rate
-            -3000.0,                   # low cutoff
-            0.0,                       # high cutoff
-            100.0,                     # transition
-            filter.firdes.WIN_KAISER, 7.0)  # window
-        self.slider_fcutoff_hi.SetValue(0)
-        self.slider_fcutoff_lo.SetValue(-3000)
-
-        # Filter and resample based on actual radio's sample rate
-        self.audio_filter = filter.pfb.arb_resampler_ccc(rrate, audio_coeffs)
-
-        # Main +/- 16Khz spectrum display
-        self.fft = fftsink2.fft_sink_c(self.panel_2, fft_size=512,
-                                       sample_rate=self.af_sample_rate,
-                                       average=True, size=(640,240),
-                                       baseband_freq=self.usrp_center)
-        c2f = blocks.complex_to_float()
-
-
-        # AM branch
-        self.sel_am = blocks.multiply_const_cc(0)
-        # the following frequencies turn out to be in radians/sample
-        # analog.pll_refout_cc(alpha,beta,min_freq,max_freq)
-        # suggested alpha = X, beta = .25 * X * X
-        pll = analog.pll_refout_cc(.05,(2.*math.pi*7.5e3/self.af_sample_rate),
-                                    (2.*math.pi*6.5e3/self.af_sample_rate))
-        self.pll_carrier_scale = blocks.multiply_const_cc(complex(10,0))
-        am_det = blocks.multiply_cc()
-        # these are for converting +7.5kHz to -7.5kHz
-        # for some reason blocks.conjugate_cc() adds noise ??
-        c2f2 = blocks.complex_to_float()
-        c2f3 = blocks.complex_to_float()
-        f2c = blocks.float_to_complex()
-        phaser1 = blocks.multiply_const_ff(1)
-        phaser2 = blocks.multiply_const_ff(-1)
-
-        # filter for pll generated carrier
-        pll_carrier_coeffs = filter.firdes.complex_band_pass (
-                2.0,    # gain
-                self.af_sample_rate, # sample rate
-                7400,    # low cutoff
-                7600,   # high cutoff
-                100,    # transition
-                filter.firdes.WIN_HAMMING)  # window
-
-        self.pll_carrier_filter = filter.fir_filter_ccc (1, pll_carrier_coeffs)
-
-        self.sel_sb = blocks.multiply_const_ff(1)
-        combine = blocks.add_ff()
-
-        #AGC
-        sqr1 = blocks.multiply_ff()
-        intr = filter.iir_filter_ffd( [.004, 0], [0, .999] )
-        offset = blocks.add_const_ff(1)
-        agc = blocks.divide_ff()
-
-        self.scale = blocks.multiply_const_ff(0.00001)
-        dst = audio.sink(long(self.af_sample_rate),
-                         options.audio_output)
-
-
-        if self.PLAY_FROM_USRP:
-            self.tb.connect(self.src, self.xlate, self.fft)
-        else:
-            self.tb.connect(src_f2c, self.xlate, self.fft)
-
-        self.tb.connect(self.xlate,self.audio_filter,self.sel_am,(am_det,0))
-        self.tb.connect(self.sel_am,pll,self.pll_carrier_scale,
-                        self.pll_carrier_filter,c2f3)
-        self.tb.connect((c2f3,0),phaser1,(f2c,0))
-        self.tb.connect((c2f3,1),phaser2,(f2c,1))
-        self.tb.connect(f2c,(am_det,1))
-        self.tb.connect(am_det,c2f2,(combine,0))
-        self.tb.connect(self.audio_filter,c2f,
-                        self.sel_sb,(combine,1))
-
-
-        self.tb.connect(combine,self.scale)
-        self.tb.connect(self.scale,(sqr1,0))
-        self.tb.connect(self.scale,(sqr1,1))
-        self.tb.connect(sqr1, intr, offset, (agc, 1))
-        self.tb.connect(self.scale,(agc, 0))
-        self.tb.connect(agc, blocks.null_sink(gr.sizeof_float))
-        self.tb.connect(c2f3, dst)
-
-        if SAVE_AUDIO_TO_FILE:
-            f_out = blocks.file_sink(gr.sizeof_short,options.audio_file)
-            sc1 = blocks.multiply_const_ff(64000)
-            f2s1 = blocks.float_to_short()
-            self.tb.connect(agc,sc1,f2s1,f_out)
-
-        self.tb.start()
-
-        # left click to re-tune
-        self.fft.win.plotter.Bind(wx.EVT_LEFT_DOWN, self.Click)
-
-        # start a timer to check for web commands
-        if WEB_CONTROL:
-            self.timer = UpdateTimer(self, 1000) # every 1000 mSec, 1 Sec
-
-
-        wx.EVT_BUTTON(self,ID_BUTTON_1,self.set_lsb)
-        wx.EVT_BUTTON(self,ID_BUTTON_2,self.set_usb)
-        wx.EVT_BUTTON(self,ID_BUTTON_3,self.set_am)
-        wx.EVT_BUTTON(self,ID_BUTTON_4,self.set_cw)
-        wx.EVT_BUTTON(self,ID_BUTTON_10,self.fwd)
-        wx.EVT_BUTTON(self,ID_BUTTON_11,self.rew)
-        wx.EVT_TOGGLEBUTTON(self,ID_BUTTON_5,self.on_button)
-        wx.EVT_TOGGLEBUTTON(self,ID_BUTTON_6,self.on_button)
-        wx.EVT_TOGGLEBUTTON(self,ID_BUTTON_7,self.on_button)
-        wx.EVT_TOGGLEBUTTON(self,ID_BUTTON_8,self.on_button)
-        wx.EVT_TOGGLEBUTTON(self,ID_BUTTON_9,self.on_button)
-        wx.EVT_SLIDER(self,ID_SLIDER_1,self.set_filter)
-        wx.EVT_SLIDER(self,ID_SLIDER_2,self.set_filter)
-        wx.EVT_SLIDER(self,ID_SLIDER_3,self.slide_tune)
-        wx.EVT_SLIDER(self,ID_SLIDER_4,self.set_volume)
-        wx.EVT_SLIDER(self,ID_SLIDER_5,self.set_pga)
-        wx.EVT_SPINCTRL(self,ID_SPIN_1,self.spin_tune)
-
-        wx.EVT_MENU(self, ID_EXIT,  self.TimeToQuit)
-
-    def __set_properties(self):
-        # begin wxGlade: MyFrame.__set_properties
-        self.SetTitle("HF Explorer")
-        self.slider_fcutoff_hi.SetMinSize((650, 38))
-        self.slider_fcutoff_lo.SetMinSize((650, 38))
-        self.panel_2.SetMinSize((800, 400))
-        self.button_7.SetValue(1)
-        self.slider_3.SetMinSize((650, 19))
-        self.slider_4.SetMinSize((275, 19))
-        self.slider_5.SetMinSize((275, 19))
-        # end wxGlade
-
-    def __do_layout(self):
-        # begin wxGlade: MyFrame.__do_layout
-        sizer_1 = wx.BoxSizer(wx.VERTICAL)
-        grid_sizer_1 = wx.FlexGridSizer(11, 2, 0, 0)
-        sizer_7 = wx.BoxSizer(wx.HORIZONTAL)
-        sizer_5 = wx.BoxSizer(wx.HORIZONTAL)
-        sizer_4 = wx.BoxSizer(wx.HORIZONTAL)
-        sizer_3 = wx.BoxSizer(wx.HORIZONTAL)
-        sizer_6 = wx.BoxSizer(wx.VERTICAL)
-        sizer_2 = wx.BoxSizer(wx.HORIZONTAL)
-        grid_sizer_1.Add(self.panel_1, 1, wx.EXPAND, 0)
-        sizer_2.Add(self.button_1, 0, wx.ADJUST_MINSIZE, 0)
-        sizer_2.Add(self.button_2, 0, wx.ADJUST_MINSIZE, 0)
-        sizer_2.Add(self.button_3, 0, wx.ADJUST_MINSIZE, 0)
-        sizer_2.Add(self.button_4, 0, wx.ADJUST_MINSIZE, 0)
-        grid_sizer_1.Add(sizer_2, 1, wx.EXPAND, 0)
-        grid_sizer_1.Add(self.button_5, 0, wx.ADJUST_MINSIZE, 0)
-        grid_sizer_1.Add(self.slider_fcutoff_hi, 0,
-                         wx.ALIGN_LEFT|wx.ADJUST_MINSIZE, 0)
-        grid_sizer_1.Add(self.button_6, 0, wx.ADJUST_MINSIZE, 0)
-        grid_sizer_1.Add(self.slider_fcutoff_lo, 0,
-                         wx.ALIGN_LEFT|wx.ADJUST_MINSIZE, 0)
-        sizer_6.Add(self.panel_5, 1, wx.EXPAND, 0)
-        sizer_6.Add(self.label_1, 0,
-                    wx.ALIGN_CENTER_HORIZONTAL|wx.ADJUST_MINSIZE, 0)
-        sizer_6.Add(self.text_ctrl_1, 0, wx.ADJUST_MINSIZE, 0)
-        sizer_6.Add(self.panel_6, 1, wx.EXPAND, 0)
-        sizer_6.Add(self.panel_7, 1, wx.EXPAND, 0)
-        grid_sizer_1.Add(sizer_6, 1, wx.EXPAND, 0)
-        grid_sizer_1.Add(self.panel_2, 1, wx.EXPAND, 0)
-        grid_sizer_1.Add(self.button_7, 0, wx.ADJUST_MINSIZE, 0)
-        sizer_3.Add(self.slider_3, 0, wx.ADJUST_MINSIZE, 0)
-        sizer_3.Add(self.spin_ctrl_1, 0, wx.ADJUST_MINSIZE, 0)
-        grid_sizer_1.Add(sizer_3, 1, wx.EXPAND, 0)
-        grid_sizer_1.Add(self.button_8, 0, wx.ADJUST_MINSIZE, 0)
-        sizer_4.Add(self.slider_4, 0, wx.ADJUST_MINSIZE, 0)
-        sizer_4.Add(self.slider_5, 0, wx.ADJUST_MINSIZE, 0)
-        grid_sizer_1.Add(sizer_4, 1, wx.EXPAND, 0)
-        grid_sizer_1.Add(self.button_9, 0, wx.ADJUST_MINSIZE, 0)
-        sizer_5.Add(self.button_11, 0, wx.ADJUST_MINSIZE, 0)
-        sizer_5.Add(self.button_10, 0, wx.ADJUST_MINSIZE, 0)
-        sizer_5.Add(self.panel_3, 1, wx.EXPAND, 0)
-        sizer_5.Add(self.label_2, 0, wx.ADJUST_MINSIZE, 0)
-        sizer_5.Add(self.panel_4, 1, wx.EXPAND, 0)
-        grid_sizer_1.Add(sizer_5, 1, wx.EXPAND, 0)
-        grid_sizer_1.Add(self.panel_8, 1, wx.EXPAND, 0)
-        grid_sizer_1.Add(self.panel_9, 1, wx.EXPAND, 0)
-        grid_sizer_1.Add(self.panel_10, 1, wx.EXPAND, 0)
-        sizer_7.Add(self.panel_11, 1, wx.EXPAND, 0)
-        sizer_7.Add(self.panel_12, 1, wx.EXPAND, 0)
-        grid_sizer_1.Add(sizer_7, 1, wx.EXPAND, 0)
-        sizer_1.Add(grid_sizer_1, 1, wx.EXPAND, 0)
-        self.SetAutoLayout(True)
-        self.SetSizer(sizer_1)
-        sizer_1.Fit(self)
-        sizer_1.SetSizeHints(self)
-        self.Layout()
-        # end wxGlade
-
-    # Menu exit
-    def TimeToQuit(self, event):
-        self.tb.stop()
-        self.Close(True)
-
-    # Powermate being turned
-    def on_rotate(self, event):
-        if self.active_button == 5:
-           self.slider_fcutoff_hi.SetValue(self.slider_fcutoff_hi.GetValue()+event.delta)
-           if self.slider_fcutoff_lo.GetValue() > (self.slider_fcutoff_hi.GetValue() - 200) :
-              self.slider_fcutoff_lo.SetValue(self.slider_fcutoff_hi.GetValue() - 200)
-           self.filter()
-        if self.active_button == 6:
-           self.slider_fcutoff_lo.SetValue(self.slider_fcutoff_lo.GetValue()+event.delta)
-           if self.slider_fcutoff_hi.GetValue() < (self.slider_fcutoff_lo.GetValue() + 200) :
-              self.slider_fcutoff_hi.SetValue(self.slider_fcutoff_lo.GetValue() + 200)
-           self.filter()
-        if self.active_button == 7:
-           new = max(0, min(6000, self.slider_3.GetValue() + event.delta))
-           self.slider_3.SetValue(new)
-           self.frequency = (self.f_slider_scale * new) + self.f_slider_offset
-           self.spin_ctrl_1.SetValue(self.frequency)
-           if self.AM_mode == False:
-             self.xlate.set_center_freq( (self.frequency - self.tune_offset) - self.usrp_center)
-             self.fft.set_baseband_freq( self.frequency - self.tune_offset )
-           else:
-             self.xlate.set_center_freq( (self.frequency - self.tune_offset - 7.5e3) - self.usrp_center)
-             self.fft.set_baseband_freq( self.frequency - self.tune_offset - 7.5e3 )
-        if self.active_button == 8:
-           new = max(0, min(500, self.slider_4.GetValue() + event.delta))
-           self.slider_4.SetValue(new)
-           self.scale.set_k(math.pow(10.,((self.slider_4.GetValue()-500.)/100.)))
-        if self.active_button == 9:
-           if self.PLAY_FROM_USRP == False:
-              if event.delta == -1:
-                 self.src.seek(-1000000,gr.SEEK_CUR)
-              elif event.delta == 1:
-                 self.src.seek(1000000,gr.SEEK_CUR)
-
-
-    # Powermate pressed to switch controlled function
-    def on_pmButton(self, event):
-        if event.value == 0:
-           if self.active_button == 5:
-              self.active_button = 6
-              self.button_5.SetValue(False)
-              self.button_6.SetValue(True)
-           elif self.active_button == 6:
-              self.active_button = 7
-              self.button_6.SetValue(False)
-              self.button_7.SetValue(True)
-           elif self.active_button == 7:
-              self.active_button = 8
-              self.button_7.SetValue(False)
-              self.button_8.SetValue(True)
-           elif self.active_button == 8:
-              self.active_button = 9
-              self.button_8.SetValue(False)
-              self.button_9.SetValue(True)
-           elif self.active_button == 9:
-              self.active_button = 5
-              self.button_9.SetValue(False)
-              self.button_5.SetValue(True)
-
-    # Clicking one PM control button turns the rest off
-    def on_button(self, event):
-        id = event.GetId()
-        if id == ID_BUTTON_5:
-           self.active_button = 5
-           self.button_6.SetValue(False)
-           self.button_7.SetValue(False)
-           self.button_8.SetValue(False)
-           self.button_9.SetValue(False)
-        if id == ID_BUTTON_6:
-           self.active_button = 6
-           self.button_5.SetValue(False)
-           self.button_7.SetValue(False)
-           self.button_8.SetValue(False)
-           self.button_9.SetValue(False)
-        if id == ID_BUTTON_7:
-           self.active_button = 7
-           self.button_5.SetValue(False)
-           self.button_6.SetValue(False)
-           self.button_8.SetValue(False)
-           self.button_9.SetValue(False)
-        if id == ID_BUTTON_8:
-           self.active_button = 8
-           self.button_5.SetValue(False)
-           self.button_6.SetValue(False)
-           self.button_7.SetValue(False)
-           self.button_9.SetValue(False)
-        if id == ID_BUTTON_9:
-           self.active_button = 9
-           self.button_5.SetValue(False)
-           self.button_6.SetValue(False)
-           self.button_7.SetValue(False)
-           self.button_8.SetValue(False)
-
-    # Make sure filter settings are legal
-    def set_filter(self, event):
-        slider = event.GetId()
-        slider1 = self.slider_fcutoff_hi.GetValue()
-        slider2 = self.slider_fcutoff_lo.GetValue()
-        if slider == ID_SLIDER_1:
-           if slider2 > (self.slider_fcutoff_hi.GetValue() - 200) :
-              self.slider_fcutoff_lo.SetValue(slider1 - 200)
-        elif slider == ID_SLIDER_2:
-           if slider1 < (self.slider_fcutoff_lo.GetValue() + 200) :
-              self.slider_fcutoff_hi.SetValue(slider2 + 200)
-        self.filter()
-
-    # Calculate taps and apply
-    def filter(self):
-        nflts = 32
-        audio_coeffs = filter.firdes.complex_band_pass (
-            nflts,                             # gain
-            self.input_rate*nflts,             # sample rate
-            self.slider_fcutoff_lo.GetValue(), # low cutoff
-            self.slider_fcutoff_hi.GetValue(), # high cutoff
-            100.0,                             # transition
-            filter.firdes.WIN_KAISER, 7.0)     # window
-        self.audio_filter.set_taps(audio_coeffs)
-
-    def set_lsb(self, event):
-        self.AM_mode = False
-        self.xlate.set_center_freq( (self.frequency - self.tune_offset) - self.usrp_center)
-        self.fft.set_baseband_freq( self.frequency - self.tune_offset )
-        self.sel_sb.set_k(1)
-        self.sel_am.set_k(0)
-        self.slider_fcutoff_hi.SetValue(0)
-        self.slider_fcutoff_lo.SetValue(-3000)
-        self.filter()
-
-    def set_usb(self, event):
-        self.AM_mode = False
-        self.xlate.set_center_freq( (self.frequency - self.tune_offset) - self.usrp_center)
-        self.fft.set_baseband_freq( self.frequency - self.tune_offset )
-        self.sel_sb.set_k(1)
-        self.sel_am.set_k(0)
-        self.slider_fcutoff_hi.SetValue(3000)
-        self.slider_fcutoff_lo.SetValue(0)
-        self.filter()
-
-    def set_am(self, event):
-        self.AM_mode = True
-        self.xlate.set_center_freq( (self.frequency - self.tune_offset - 7.5e3) - self.usrp_center)
-        self.fft.set_baseband_freq( self.frequency - self.tune_offset - 7.5e3 )
-        self.sel_sb.set_k(0)
-        self.sel_am.set_k(1)
-        self.slider_fcutoff_hi.SetValue(12500)
-        self.slider_fcutoff_lo.SetValue(2500)
-        self.filter()
-
-    def set_cw(self, event):
-        self.AM_mode = False
-        self.xlate.set_center_freq( (self.frequency - self.tune_offset) - self.usrp_center)
-        self.fft.set_baseband_freq( self.frequency - self.tune_offset )
-        self.AM_mode = False
-        self.sel_sb.set_k(1)
-        self.sel_am.set_k(0)
-        self.slider_fcutoff_hi.SetValue(-400)
-        self.slider_fcutoff_lo.SetValue(-800)
-        self.filter()
-
-    def set_volume(self, event):
-        self.scale.set_k(math.pow(10.,((self.slider_4.GetValue()-500.)/100.)))
-
-    def set_pga(self,event):
-        if self.PLAY_FROM_USRP:
-           self.src.set_gain(self.slider_5.GetValue())
-
-    def slide_tune(self, event):
-        self.frequency = (self.f_slider_scale * self.slider_3.GetValue()) + self.f_slider_offset
-        if self.AM_mode == False:
-          self.xlate.set_center_freq( (self.frequency - self.tune_offset) - self.usrp_center)
-          self.fft.set_baseband_freq( self.frequency - self.tune_offset )
-        else:
-          self.xlate.set_center_freq( (self.frequency - self.tune_offset - 7.5e3) - self.usrp_center)
-          self.fft.set_baseband_freq( self.frequency - self.tune_offset - 7.5e3 )
-        self.spin_ctrl_1.SetValue(self.frequency)
-
-    def spin_tune(self, event):
-        self.frequency = self.spin_ctrl_1.GetValue()
-        if self.AM_mode == False:
-           self.xlate.set_center_freq( (self.frequency - self.tune_offset) - self.usrp_center)
-           self.fft.set_baseband_freq( self.frequency - self.tune_offset )
-        else:
-           self.xlate.set_center_freq( (self.frequency - self.tune_offset - 7.5e3) - self.usrp_center)
-           self.fft.set_baseband_freq( self.frequency - self.tune_offset - 7.5e3 )
-        self.slider_3.SetValue(int((self.frequency-self.f_slider_offset)/self.f_slider_scale))
-
-    # Seek forwards in file
-    def fwd(self, event):
-        if self.PLAY_FROM_USRP == False:
-            self.src.seek(10000000,gr.SEEK_CUR)
-
-    # Seek backwards in file
-    def rew(self, event):
-        if self.PLAY_FROM_USRP == False:
-            self.src.seek(-10000000,gr.SEEK_CUR)
-
-    # Mouse clicked on fft display - change frequency
-    def Click(self,event):
-        fRel = ( event.GetX() - 340. ) / 18.125
-        if self.AM_mode == False:
-            self.frequency = self.frequency + (fRel*1e3)
-        else:
-            self.frequency = self.frequency + (fRel*1e3) - 7.5e3
-        self.spin_ctrl_1.SetValue(int(self.frequency))
-        self.slider_3.SetValue(int((self.frequency-self.f_slider_offset)/self.f_slider_scale))
-        if self.AM_mode == False:
-            self.xlate.set_center_freq ( ( self.frequency - self.tune_offset ) - self.usrp_center)
-            self.fft.set_baseband_freq( self.frequency - self.tune_offset )
-        else:
-            self.xlate.set_center_freq( (self.frequency - self.tune_offset - 7.5e3) - self.usrp_center)
-            self.fft.set_baseband_freq( self.frequency - self.tune_offset - 7.5e3 )
-
-
-    # Timer events - check for web commands
-    def OnUpdate(self):
-      cmds = os.listdir("/var/www/cgi-bin/commands/")
-      if cmds!=[]:
-        if cmds[0]=='chfreq':
-          fd=open("/var/www/cgi-bin/commands/chfreq","r")
-          new=fd.readline()
-          fd.close()
-          if new!='':
-            os.unlink("/var/www/cgi-bin/commands/chfreq")
-            if ( int(new) >= self.f_lo ) & ( int(new) <= self.f_hi ):
-               self.frequency = int(new)
-               self.slider_3.SetValue(( self.frequency - self.f_slider_offset) / self.f_slider_scale )
-               self.spin_ctrl_1.SetValue(self.frequency)
-               if self.AM_mode:
-                 self.xlate.set_center_freq ( ( self.frequency - self.tune_offset - 7.5e3 ) - self.usrp_center)
-                 self.fft.set_baseband_freq( self.frequency - self.tune_offset )
-               else:
-                 self.xlate.set_center_freq ( ( self.frequency - self.tune_offset ) - self.usrp_center)
-                 self.fft.set_baseband_freq( self.frequency - self.tune_offset - 7.5e3 )
-
-        if cmds[0]=='chvolume':
-          fd=open("/var/www/cgi-bin/commands/chvolume","r")
-          new=fd.readline()
-          fd.close()
-          if new!='':
-            os.unlink("/var/www/cgi-bin/commands/chvolume")
-            if ( int(new) >= 0 ) & ( int(new) <= 500 ):
-               self.volume = int(new)
-               self.slider_4.SetValue(self.volume)
-               self.scale.set_k(math.pow(10.,((self.slider_4.GetValue()-500.)/100.)))
-
-      else: # no new web commands, update state
-        fh = open("/var/www/cgi-bin/state/freq","w")
-        fh.write(str(int(self.frequency))+'\n')
-        fh.close()
-        fh = open("/var/www/cgi-bin/state/volume","w")
-        fh.write(str(self.slider_4.GetValue())+'\n')
-        fh.close()
-
-
-# end of class MyFrame
-
-# wx.Timer to check for web updates
-class UpdateTimer(wx.Timer):
-    def __init__(self, target, dur=1000):
-        wx.Timer.__init__(self)
-        self.target = target
-        self.Start(dur)
-
-    def Notify(self):
-        """Called every timer interval"""
-        if self.target:
-            self.target.OnUpdate()
-
-
-class MyApp(wx.App):
-  def OnInit(self):
-    frame = MyFrame(None, -1, "HF Explorer")
-    frame.Show(True)
-    self.SetTopWindow(frame)
-    return True
-
-
-if __name__ == "__main__":
-    app = MyApp(0)
-    app.MainLoop()
-
diff --git a/gr-uhd/apps/hf_explorer/hfx_help b/gr-uhd/apps/hf_explorer/hfx_help
deleted file mode 100644
index c8fa28dbd1..0000000000
--- a/gr-uhd/apps/hf_explorer/hfx_help
+++ /dev/null
@@ -1,180 +0,0 @@
-
-		HF Explorer Help
-
-	-----------------------------------------------------------------------
-
- Command Line Switches:
-
-	-c	DDC center frequency, set band.
-		-c 7.2e6 or -c 7.2M for 40 meter ham band.
-		Default is 3.9e6 80 meter ham band.
-		Example:
-
-		hfx.py -c 9500k
-
-		starts up in the 31 meter band.
-
-	-a	Audio output file. Output file for 32kHz two channel
-		signed word audio. Two channels are used for
-		independent sideband. This file can be converted
-		to a wav file with sox. Example:
-
-		sox -c 2 -r 3200 file.sw file.wav
-
-		sox needs the .sw extension to indicate file type.
-		If not specified no audio file is created.
-
-	-r	Radio output file. File to write RF data to for later
-		demodulation. Records the entire band to disk, width
-		determined by sample rate/decimation. Be sure to
-		note the decimation and center freq for later use!
-		Example:
-
-		hfx.py -c 900e3 -d 80 -r rf_data_AM-c900e3-d80
-
-		writes a pre-demod rf file centered on 900kHz with a
-		bandwidth of 800kHz (That's 80 AM stations!). The
-		center and decimation could be put in the filename for
-		proper use later.
-		If not specified no rf data file is created.
-		At default 250 decimation disk usage is about
-		8Gb / hour.
-
-	-i	Radio input file. Use to play back a previously
-		recorded rf data file. Example:
-
-		hfx.py -c 900e3 -d 80 -i rf_data_AM-c900e3-d80
-
-		plays back the previously recorded band, no
-		usrp hardware needed. Tune about the 800kHz wide band.
-		When playing a recorded file, time controls
-		fast-forward and rewind are available.
-
-	-d	Decimation. Sets sample rate and bandwidth.
-		This is the factor that the usrp sample rate, 64e6,
-		is divided by. Default is 250 for 256kHz bandwidth
-		which is enough to record a ham band without
-		eating up disk space too fast. The 64e6 sample
-		rate limits the upper practical frequency to 32MHz.
-		The Basic RX transformer limits the lower frequency
-		to about 200kHz.
-
-
- Powermate Knob:
-
-	A Powermate knob is recommended but not necessary. If a knob
-	is used, it is in one of 3 or 4 modes controlling frequency,
-	volume, filter and (if playing a recorded file) time.
-	Pushing the knob switches mode and the buttons on the HFX panel
-	change to show which mode is in effect. Then just turn the knob
-	to set frequency, volume, filter or go fast forward or rewind.
-
-
- Bandswitch:
-
-        Across the top are a set of predefined bands and buttons
-        to rapidly switch to the center of that band. To change a band,
-        type the frequency in Hz into the box under "Center Frequency",
-        then press "Set" on the left, then the button you want to
-        program. From then on (untill the program is exited) pushing
-        that button takes you to that band.  To make a band button
-        permenant edit the hfx.py script with whatever frequency you
-        want assigned to what button.
-
-
- Frequency:
-
-	There are 6 ways to set the frequency.
-	1) Move the slider with the mouse
-	2) Use the Spin Control up/down arrows (very fine 1Hz control)
-	3) Type the frequency in Hz into the Spin Control
-	4) Turn the Powermate knob
-	5) Web control.
-	6) Clicking on the FFT display to set demod center. This is very
-	   convenient for tuning +-15kHz when you see a signal on the
-	   display. If in Lower Sideband, clicking just to the right of
-	   a signal will tune to it immediately. Clicking several times
-	   on the far right right or left of the display will rapidly
-	   tune up or down the band.
-
-
- Volume:
-
-	Move the volume slider with the mouse, or push the Powermate knob
-	untill the volume button is active, or click on the volume button,
-	then turn the knob. Volume can also be set by web control if web
-	control is setup and enabled.
-
-
- Filter:
-
-	Similar to volume, switches in any of 30 audio filters from 600
-	to 3600Hz in Sideband or up to 5kHz in AM.
-
-
- Mode:
-
-	Demodulation modes are chosen by clicking on the buttons for
-	Lower Sideband, Upper Sideband, or AM.
-
-
- PGA:
-
-	PGA slider sets the rf gain in the Analog-to-Digital converter
-	before digitizing. 0 to 20db gain easily shows up on the FFT
-	display.
-
-
- Time:
-
-	When playing back a recorded RF data file, you can enjoy the
-	freedom of rewinding or fast-forwarding. Replay a weak signal
-	or skip through annoying AM commercials.
-
-
- Antennas and Preamps:
-
-	The USRP Basic RX board is not sensitive enough for anything but
-	the strongest signals. In my experience about 40 db of small
-	signal gain is required to make the HFX as sensitive as other
-	receivers. Some working amplifiers are the Ramsey PR-2 with 20db
-	gain, fairly low noise and more bandwidth than we can use here.
-	Also the amp modules from Advanced Receiver Research are nice.
-	I use an ARR 7-7.4MHz GaAsFET 29db amp with .5db noise at the
-	apex of a 40 meter dipole with excellent results. Another
-	amp I like is a Minicircuits ZHL-32A 29db amp but they are
-	expensive and hard to find. Also it may help to use some filters
-	to keep strong local signals from the ADC, or limit rf input
-	to the band of interest, etc.
-	Resonant outdoor antennas, like a dipole, in a low-noise (away
-	from consumer electronics) environment are nice.  Long random wires
-	with a tuner work. I like a small indoor tuned loop made from 10ft
-	of 1/4" copper tube, a 365pf tuning cap and a pickup loop connected
-	to rg-58.
-
-
- Web Control:
-
-	To control your radio remotely, ensure you have a web server
-	(Apache, etc) working and a compatible directory structure in
-	place. Directories /var/www/cgi-bin/commands and
-	/var/www/cgi-bin/state must already exist. You will need a
-	home page with forms and a set of scripts to put commands in
-	and put the current state on the home page. email me for further
-	help. Setting WEB_CONTROL to True in hfx.py turns on the timers
-	that check for commands and update the state.
-
-
- IF Output:
-
-	There is a provision for outputting un-demodulated complex
-	through the audio out in stereo for use with Digital Radio
-	Mondial (DRM) or using a seperate demodulation program like
-	SDRadio (by I2PHD).
-	Set IF_OUTPUT to True in weaver_isb_am1_usrp4.py.
-
-
- --Good luck and happy LW/MW/SW Exploring.
-	Chuck
-        chuckek@musicriver.homeunix.com
-
diff --git a/gr-uhd/apps/hf_radio/README.TXT b/gr-uhd/apps/hf_radio/README.TXT
deleted file mode 100644
index c5c57f8479..0000000000
--- a/gr-uhd/apps/hf_radio/README.TXT
+++ /dev/null
@@ -1,60 +0,0 @@
-# 2008-02-07
-#
-# These files have not yet been update to use the new top_block/hier_block2
-# interfaces.  Until someone does that, this files will no longer run.
-#
-
-
-The files in this directory implement a fairly simple HF radio that works
-with the basic rx daughter board on the USRP.
-
-Many thanks to the Gnu Radio folks for a great new way to waste large blocks
-of time in infinitely tweaking a huge number of free parameters.
-
-Start the receiver by running the radio.py in this directory. Or from the
-Python prompt type "from radio import *" and you'll get the prompt back
-with the receiver running. You can then poke around to see what's going on.
-
-There are two spectrum displays. One is the output of the USRP and displays
-about 300KHz of bandwidth centered at the current tuning freq. The other
-displays the output spectrum of the demodulator.
-
-The demodulator does AM demod using the complex modulus block from gr. It
-does SSB demod using the frequency translating fir filter as a complex
-hilbert transformer. The taps for this filter were generated using a program
-called Scilab and the Scilab program in the file hfir.sci. More details in
-the associated files.
-
-Tune the receiver using the spin buttons under the big frequency display.
-
-The agc block is a roll your own. The standard agc in the newer CVS updates
-seems to work but doesn't seem to have adjustable time constants or provide
-access to internal signal nodes which are used for the RSSI.
-
-The AGC authority (a sort of gain parameter) and the reference level used
-in the power to dB computagion can be adjusted using the spin buttons.
-
-The audio bandwidth can be similarly adjusted from about 50Hz to 10KHz.
-
-The GUI layout was produced using wxGlade. The file radio.xml is the GUI
-specification. It will produce a file called ui.py which is subclassed
-by classes defined in radio.py. The ui.py is purely generated by wxGlade
-all app specific code for the GUI is in radio.py.
-
-Most of the actual signal processing code is built up in the other included
-files using the hierarchical block facilities. This organization should
-make it easier to tweak to your heart's content.
-
-Known bugs weakness and other
-
-wxPython and wxGlade seem to conspire to insure that the layout can never
-be exactly what you have in mind.
-
-Some of the controls don't behave as one might like. wx spin controls
-and spin boxes only support integers so it is rather a nuisance to make
-units come out nice. In the process of development I came up with a reasonable
-kluge so there is a mixture of approaches.
-
-Enjoy.
-
-M. Revnell 2006-Jan-06
diff --git a/gr-uhd/apps/hf_radio/hfir.sci b/gr-uhd/apps/hf_radio/hfir.sci
deleted file mode 100644
index 64f5385d73..0000000000
--- a/gr-uhd/apps/hf_radio/hfir.sci
+++ /dev/null
@@ -1,59 +0,0 @@
-// designs a complex tap fir filter akin to the hilbert transformer.
-//
-// The hilbert transformer is classified as a linear phase fir
-// with allpass magnitude response and 90 degree phase response for
-// positive frequencies and -90 degrees phase for negative frequencies.
-// Or, if you prefer, normalized frequencies between .5 and 1 since
-// negative frequencies don't really have much meaning outside the complex
-// domain.
-//
-// Normally one would use the hilbert transformer in one leg of a complex
-// processing block and a compensating delay in the other.
-//
-// This one differs in the following respects:
-//  It is low pass with a cutoff of .078125
-//  The filter is a lowpass kaiser windowed filter with parameter 3
-//  The phase response is 45 degrees for positive frequencies and -45
-//   for negative frequencies.
-//  The coefficent set is used in one path and the same coefficients
-//   are used time reversed in the other. This results in the net effect
-//   of +/- 90 degrees as in the usual hilbert application.
-//
-// The coefficient set can be used in the gnuradio frequency translating
-// fir filter for ssb demodulation.
-//
-// This isn't as computationally efficient as using the hilbert transformer
-// and compensating delay but fascinating none the less.
-//
-// This program is for the scilab language a very powerful free math
-// package similar to Matlab with infinitely better price/performace.
-//
-// compute the prototype lowpass fir
-// length is 255 (odd) for the same symmetry reasons as the hilbert transformer
-
-len = 1023;
-l2 = floor(len/2);
-md = l2 + 1;
-l3 = md + 1;
-
-h = wfir( 'lp', len, [10.0/256 0], 'kr', [3 0] );
-
-H = fft(h);
-
-H(1:l2)=H(1:l2)*exp(%i*%pi/4);
-H(md)=0+%i*0;
-H(l3:len)=H(l3:len)*exp(-%i*%pi/4);
-
-j=real(ifft(H));
-k(1:len)=j(len:-1:1);
-x=j+%i.*k;
-X=fft(x);
-plot(abs(X))
-
-f = file('open','taps')
-for i=(1:len)
-  fprintf( f, '%f%+fj', j(i), k(i) )
-end
-
-file('close',f)
-
diff --git a/gr-uhd/apps/hf_radio/input.py b/gr-uhd/apps/hf_radio/input.py
deleted file mode 100644
index 49df347e8b..0000000000
--- a/gr-uhd/apps/hf_radio/input.py
+++ /dev/null
@@ -1,78 +0,0 @@
-# Copyright 2011 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-# Basic USRP setup and control.
-# It's only ever been tried with a basic rx daughter card.
-#
-# Imagine that the gnuradio boilerplate is here.
-#
-# M. Revnell 2005-Dec
-
-from gnuradio import gr
-from gnuradio import uhd
-
-class uhd_input(gr.hier_block2):
-    def __init__( self, address, samp_rate):
-        gr.hier_block2.__init__(self, "uhd_input",
-                                gr.io_signature(0,0,0),
-                                gr.io_signature(1,1,gr.sizeof_gr_complex))
-
-        self.src = uhd.usrp_source(device_addr=address,
-                                   io_type=uhd.io_type.COMPLEX_FLOAT32,
-                                   num_channels=1)
-
-        self.src.set_samp_rate(samp_rate)
-        self.usrp_rate = self.src.get_samp_rate()
-
-        self.connect(self.src, self)
-
-    def set_freq(self, target_freq):
-        """
-        Set the center frequency.
-
-        Args:
-            target_freq: frequency in Hz
-        """
-        r = self.src.set_center_freq(target_freq, 0)
-
-        if r:
-            self.freq = target_freq
-     	    return True
-        else:
-            return False
-
-    def get_freq(self):
-        return self.src.get_center_freq(0)
-
-    def set_gain(self, gain):
-        self.gain = gain
-        self.src.set_gain(gain, 0)
-
-    @staticmethod
-    def add_options(parser):
-        parser.add_option("-a", "--address", type="string",
-                          default="addr=192.168.10.2",
-                          help="Address of UHD device, [default=%default]")
-        parser.add_option("-A", "--antenna", type="string", default=None,
-                          help="select Rx Antenna where appropriate")
-        parser.add_option("-f", "--freq", type="eng_float", default=None,
-                          help="set frequency to FREQ", metavar="FREQ")
-        parser.add_option("-g", "--gain", type="eng_float", default=None,
-                          help="set gain in dB (default is midpoint)")
diff --git a/gr-uhd/apps/hf_radio/output.py b/gr-uhd/apps/hf_radio/output.py
deleted file mode 100644
index 3e80c8d315..0000000000
--- a/gr-uhd/apps/hf_radio/output.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright 2011 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-
-# Audio output with a volume control.
-#
-# M. Revnell 2005-Dec
-
-from gnuradio import gr, gru
-from gnuradio import blocks
-from gnuradio import audio
-
-class output( gr.hier_block2 ):
-    def __init__( self, rate, device ):
-        gr.hier_block2.__init__(self, "output",
-                                gr.io_signature(1,1,gr.sizeof_float),
-                                gr.io_signature(0,0,0))
-
-        self.vol = blocks.multiply_const_ff( 0.1 )
-        self.out = audio.sink( int(rate), device )
-
-        self.connect( self, self.vol, self.out )
-
-    def set( self, val ):
-        self.vol.set_k( val )
-
diff --git a/gr-uhd/apps/hf_radio/radio.py b/gr-uhd/apps/hf_radio/radio.py
deleted file mode 100755
index 970ec01a38..0000000000
--- a/gr-uhd/apps/hf_radio/radio.py
+++ /dev/null
@@ -1,320 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2011 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-# GUI interactions and high level connections handled here.
-#
-# Interacts with classes defined by wxGlade in ui.py.
-#
-# M. Revnell 2006-Jan
-
-from threading import *
-import wx
-import wx.lib.evtmgr as em
-import time
-
-from gnuradio import gr, gru, eng_notation
-from gnuradio import audio
-from gnuradio import blocks
-from gnuradio import uhd
-from gnuradio import blks2
-from gnuradio.wxgui import fftsink2
-from gnuradio.wxgui import waterfallsink2
-from gnuradio.wxgui import scopesink2
-
-from input    import *
-from output   import *
-from ssbdemod import *
-from ssbagc   import *
-from ui       import *
-from math     import log10
-
-class radio_top_block( gr.top_block ):
-    def __init__( self ):
-        gr.top_block.__init__(self, "radio_top_block")
-
-        self.address      = "addr=192.168.11.2"
-        self.samp_rate    = 256e3
-        self.freq         = -2.5e6
-        self.gain         = 0
-        self.src          = uhd_input( self.address,
-                                       self.samp_rate)
-        self.src.set_freq(self.freq)
-        self.src.set_gain(self.gain)
-
-        self.fe_rate      = self.src.usrp_rate
-        self.filter_decim = 1
-        self.audio_decim  = 16
-        self.demod_rate   = self.fe_rate / self.filter_decim
-        self.audio_rate   = self.demod_rate / self.audio_decim
-        self.audio_dev    = "pulse"
-
-        self.demod        = ssb_demod( self.demod_rate, self.audio_rate )
-        self.agc          = agc()
-        self.out          = output( self.audio_rate, self.audio_dev )
-
-        self.connect( self.src, self.demod, self.agc, self.out )
-
-    def tune( self, freq ):
-        fe_target = -freq
-        self.src.set_freq( fe_target )
-        demod_cf = fe_target - self.src.get_freq()
-        self.demod.tune( demod_cf )
-
-class radio_frame( ui_frame ):
-    def __init__( self, block, *args, **kwds ):
-        ui_frame.__init__( self, *args, **kwds )
-        self.block = block
-        self.freq_disp.SetRange(0, 30e6)
-        f = self.block.src.freq
-        self.freq_disp.SetValue( -f )
-        self.volume.SetRange( 0, 20 )
-        self.pga.SetRange( 0, 20 )
-        self.rssi_range = 1
-        self.rssi.SetRange( self.rssi_range )
-        self.agc_max.SetValue( str( self.rssi_range ) )
-        self.spin_e0.SetValue( 50 )
-        self.spin_e1.SetValue( 50 )
-        self.spin_e2.SetValue( 50 )
-        self.spin_e3.SetValue( 50 )
-        self.spin_e4.SetValue( 50 )
-        self.spin_e5.SetValue( 50 )
-        self.spin_e6.SetValue( 50 )
-        bw = 3.3e3
-        self.bandwidth.SetValue( str( bw ) )
-        self.block.demod.set_bw( bw )
-        self.bw_spin.SetValue( 5 )
-        agc_gain = self.block.agc.gain.k()
-        self.agc_gain_s.SetValue( 5 )
-        self.agc_gain.SetValue( str( agc_gain ) )
-        agc_ref = self.block.agc.offs.k()
-        self.agc_ref.SetValue( str( agc_ref ) )
-        self.agc_ref_s.SetValue( 5 )
-
-        self.fespectrum = fftsink2.fft_sink_c(
-            self.fe_panel,
-            fft_size=512,
-            sample_rate = block.fe_rate,
-            ref_scale = 1.0,
-            ref_level = 20.0,
-            y_divs = 12,
-            avg_alpha = 0.1)
-
-        self.ifspectrum = fftsink2.fft_sink_c(
-            self.if_panel,
-            fft_size=512,
-            sample_rate = block.audio_rate,
-            ref_scale = 1.0,
-            ref_level = 20.0,
-            y_divs = 12,
-            avg_alpha = 0.1)
-
-        self.fespectrum.win.Bind( wx.EVT_MOTION, self.fe_mouse)
-        self.fespectrum.win.Bind( wx.EVT_LEFT_DOWN, self.fe_click)
-
-        block.connect( block.src.src, self.fespectrum )
-        block.connect( block.demod.xlate, self.ifspectrum )
-
-    def agc_ref_up( self, event ):
-        self.agc_ref_s.SetValue( 5 )
-        r = float( self.agc_ref.GetValue() )
-        r = r + 5
-        self.agc_ref.SetValue( str( r ) )
-        self.block.agc.offs.set_k( r )
-
-    def agc_ref_down( self, event ):
-        self.agc_ref_s.SetValue( 5 )
-        r = float( self.agc_ref.GetValue() )
-        r = r - 5
-        self.agc_ref.SetValue( str( r ) )
-        self.block.agc.offs.set_k( r )
-
-    def agc_gain_up( self, event ):
-        self.agc_gain_s.SetValue( 5 )
-        g = float(self.agc_gain.GetValue())
-        g = g + 10
-        self.agc_gain.SetValue( str( g ) )
-        self.block.agc.gain.set_k( g )
-
-    def agc_gain_down( self, event ):
-        self.agc_gain_s.SetValue( 5 )
-        g = float(self.agc_gain.GetValue())
-        g = g - 10
-        self.agc_gain.SetValue( str( g ) )
-        self.block.agc.gain.set_k( g )
-
-    def fe_mouse( self, event ):
-        f = int(self.freq_disp.GetValue())
-        f = f+((event.GetX()-346.)*(400./610.))*1000
-        self.fespectrum.win.SetToolTip(
-            wx.ToolTip( eng_notation.num_to_str(f)))
-
-    def fe_click( self, event ):
-        f = int(self.freq_disp.GetValue())
-        f = f+((event.GetX()-346.)*(400./610.))*1000
-        self.tune( f )
-
-    def setrssi( self, level ):
-        if level < 0:
-            level = 0
-        if level > self.rssi_range:
-            self.rssi_range = level
-            self.rssi.SetRange( level )
-            self.agc_max.SetValue( str( level ))
-        self.rssi.SetValue( level )
-        self.agc_level.SetValue( str( level ))
-
-    def tune_evt( self, event ):
-        f = self.freq_disp.GetValue()
-        self.tune( f )
-
-    def tune( self, frequency ):
-        self.freq_disp.SetValue( frequency )
-        self.block.tune( frequency )
-
-    def up_e0( self, event ):
-        self.spin_e0.SetValue( 50 )
-        self.tune( self.freq_disp.GetValue() + 1e0 )
-
-    def down_e0( self, event ):
-        self.spin_e0.SetValue( 50 )
-        self.tune( self.freq_disp.GetValue() - 1e0 )
-
-    def up_e1( self, event ):
-        self.spin_e1.SetValue( 50 )
-        self.tune( self.freq_disp.GetValue() + 1e1 )
-
-    def down_e1( self, event ):
-        self.spin_e1.SetValue( 50 )
-        self.tune( self.freq_disp.GetValue() - 1e1 )
-
-    def up_e2( self, event ):
-        self.spin_e2.SetValue( 50 )
-        self.tune( self.freq_disp.GetValue() + 1e2 )
-
-    def down_e2( self, event ):
-        self.spin_e2.SetValue( 50 )
-        self.tune( self.freq_disp.GetValue() - 1e2 )
-
-    def up_e3( self, event ):
-        self.spin_e3.SetValue( 50 )
-        self.tune( self.freq_disp.GetValue() + 1e3 )
-
-    def down_e3( self, event ):
-        self.spin_e3.SetValue( 50 )
-        self.tune( self.freq_disp.GetValue() - 1e3 )
-
-    def up_e4( self, event ):
-        self.spin_e4.SetValue( 50 )
-        self.tune( self.freq_disp.GetValue() + 1e4 )
-
-    def down_e4( self, event ):
-        self.spin_e4.SetValue( 50 )
-        self.tune( self.freq_disp.GetValue() - 1e4 )
-
-    def up_e5( self, event ):
-        self.spin_e5.SetValue( 50 )
-        self.tune( self.freq_disp.GetValue() + 1e5 )
-
-    def down_e5( self, event ):
-        self.spin_e5.SetValue( 50 )
-        self.tune( self.freq_disp.GetValue() - 1e5 )
-
-    def up_e6( self, event ):
-        self.spin_e6.SetValue( 50 )
-        self.tune( self.freq_disp.GetValue() + 1e6 )
-
-    def down_e6( self, event ):
-        self.spin_e6.SetValue( 50 )
-        self.tune( self.freq_disp.GetValue() - 1e6 )
-
-    def event_pga( self, event ):
-        self.block.src.set_gain(self.pga.GetValue())
-
-    def event_vol( self, event ):
-        self.block.out.set( self.volume.GetValue()/20.0 )
-
-    def set_usb( self, event ):
-        self.block.demod.upper_sb()
-
-    def set_lsb( self, event ):
-        self.block.demod.lower_sb()
-
-    def set_am( self, event ):
-        self.block.demod.set_am()
-
-    def bw_up( self, event ):
-        self.bw_spin.SetValue( 5 )
-        bw = float(self.bandwidth.GetValue())
-        bw = bw + 20.0
-        if bw > 10e3:
-            bw = 10e3
-        self.bandwidth.SetValue( str( bw ) )
-        self.block.demod.set_bw( bw )
-
-    def bw_down( self, event ):
-        self.bw_spin.SetValue( 5 )
-        bw = float(self.bandwidth.GetValue())
-        bw = bw - 20.0
-        if bw < 50:
-            bw = 50
-        self.bandwidth.SetValue( str( bw ) )
-        self.block.demod.set_bw( bw )
-
-
-class radio( wx.App ):
-    def OnInit( self ):
-        self.block = radio_top_block()
-        self.frame = radio_frame( self.block, None, -1, "HF Receiver" )
-        self.frame.Show( True )
-        self.SetTopWindow( self.frame )
-        self.block.start()
-        return True
-
-def rssi_function():
-    global radio_obj
-    global sig_probe
-
-    go = True
-    while go:
-        try:
-            level = sig_probe.level()
-            wx.CallAfter( radio_obj.frame.setrssi, level )
-            time.sleep( .1 )
-        except:
-            go = False
-
-def main():
-    global radio_obj, sig_probe
-
-    radio_obj = radio( 0 )
-    sig_probe = blocks.probe_signal_f()
-    radio_obj.block.connect(radio_obj.block.agc.offs, sig_probe)
-
-    thread2 = Thread( target = rssi_function )
-    thread2.start()
-
-    radio_obj.MainLoop()
-
-
-if __name__ == "__main__":
-    main()
-
diff --git a/gr-uhd/apps/hf_radio/radio.xml b/gr-uhd/apps/hf_radio/radio.xml
deleted file mode 100644
index 81daa19b0d..0000000000
--- a/gr-uhd/apps/hf_radio/radio.xml
+++ /dev/null
@@ -1,441 +0,0 @@
-<?xml version="1.0"?>
-<!-- generated by wxGlade 0.4 on Fri Jan  6 09:51:36 2006 -->
-
-<application path="/root/radio/ui.py" name="" class="" option="0" language="python" top_window="" encoding="UTF-8" use_gettext="0" overwrite="0" use_new_namespace="1" for_version="2.6">
-    <object class="ui_frame" name="frame_1" base="EditFrame">
-        <style>wxDEFAULT_FRAME_STYLE</style>
-        <title>frame_1</title>
-        <object class="wxStaticBoxSizer" name="sizer_1" base="EditStaticBoxSizer">
-            <orient>wxVERTICAL</orient>
-            <label>sizer_1</label>
-            <object class="sizeritem">
-                <flag>wxEXPAND</flag>
-                <border>0</border>
-                <option>1</option>
-                <object class="wxBoxSizer" name="sizer_2" base="EditBoxSizer">
-                    <orient>wxHORIZONTAL</orient>
-                    <object class="sizeritem">
-                        <flag>wxEXPAND</flag>
-                        <border>0</border>
-                        <option>1</option>
-                        <object class="wxBoxSizer" name="sizer_3" base="EditBoxSizer">
-                            <orient>wxVERTICAL</orient>
-                            <object class="sizeritem">
-                                <flag>wxEXPAND|wxADJUST_MINSIZE</flag>
-                                <border>0</border>
-                                <option>1</option>
-                                <object class="wxSpinCtrl" name="freq_disp" base="EditSpinCtrl">
-                                    <font>
-                                        <size>32</size>
-                                        <family>default</family>
-                                        <style>normal</style>
-                                        <weight>normal</weight>
-                                        <underlined>0</underlined>
-                                        <face></face>
-                                    </font>
-                                    <events>
-                                        <handler event="EVT_SPINCTRL">tune_evt</handler>
-                                    </events>
-                                </object>
-                            </object>
-                            <object class="sizeritem">
-                                <flag>wxEXPAND</flag>
-                                <border>0</border>
-                                <option>1</option>
-                                <object class="wxGridSizer" name="grid_sizer_1" base="EditGridSizer">
-                                    <hgap>0</hgap>
-                                    <rows>2</rows>
-                                    <cols>3</cols>
-                                    <vgap>0</vgap>
-                                    <object class="sizeritem">
-                                        <flag>wxEXPAND</flag>
-                                        <border>0</border>
-                                        <option>1</option>
-                                        <object class="wxGridSizer" name="grid_sizer_2" base="EditGridSizer">
-                                            <hgap>0</hgap>
-                                            <rows>1</rows>
-                                            <cols>7</cols>
-                                            <vgap>0</vgap>
-                                            <object class="sizeritem">
-                                                <flag>wxADJUST_MINSIZE</flag>
-                                                <border>0</border>
-                                                <option>0</option>
-                                                <object class="wxSpinButton" name="spin_e6" base="EditSpinButton">
-                                                    <events>
-                                                        <handler event="EVT_SPIN_UP">up_e6</handler>
-                                                        <handler event="EVT_SPIN_DOWN">down_e6</handler>
-                                                    </events>
-                                                </object>
-                                            </object>
-                                            <object class="sizeritem">
-                                                <flag>wxADJUST_MINSIZE</flag>
-                                                <border>0</border>
-                                                <option>0</option>
-                                                <object class="wxSpinButton" name="spin_e5" base="EditSpinButton">
-                                                    <events>
-                                                        <handler event="EVT_SPIN_UP">up_e5</handler>
-                                                        <handler event="EVT_SPIN_DOWN">down_e5</handler>
-                                                    </events>
-                                                </object>
-                                            </object>
-                                            <object class="sizeritem">
-                                                <flag>wxADJUST_MINSIZE</flag>
-                                                <border>0</border>
-                                                <option>0</option>
-                                                <object class="wxSpinButton" name="spin_e4" base="EditSpinButton">
-                                                    <events>
-                                                        <handler event="EVT_SPIN_UP">up_e4</handler>
-                                                        <handler event="EVT_SPIN_DOWN">down_e4</handler>
-                                                    </events>
-                                                </object>
-                                            </object>
-                                            <object class="sizeritem">
-                                                <flag>wxADJUST_MINSIZE</flag>
-                                                <border>0</border>
-                                                <option>0</option>
-                                                <object class="wxSpinButton" name="spin_e3" base="EditSpinButton">
-                                                    <events>
-                                                        <handler event="EVT_SPIN_UP">up_e3</handler>
-                                                        <handler event="EVT_SPIN_DOWN">down_e3</handler>
-                                                    </events>
-                                                </object>
-                                            </object>
-                                            <object class="sizeritem">
-                                                <flag>wxADJUST_MINSIZE</flag>
-                                                <border>0</border>
-                                                <option>0</option>
-                                                <object class="wxSpinButton" name="spin_e2" base="EditSpinButton">
-                                                    <events>
-                                                        <handler event="EVT_SPIN_UP">up_e2</handler>
-                                                        <handler event="EVT_SPIN_DOWN">down_e2</handler>
-                                                    </events>
-                                                </object>
-                                            </object>
-                                            <object class="sizeritem">
-                                                <flag>wxADJUST_MINSIZE</flag>
-                                                <border>0</border>
-                                                <option>0</option>
-                                                <object class="wxSpinButton" name="spin_e1" base="EditSpinButton">
-                                                    <events>
-                                                        <handler event="EVT_SPIN_UP">up_e1</handler>
-                                                        <handler event="EVT_SPIN_DOWN">down_e1</handler>
-                                                    </events>
-                                                </object>
-                                            </object>
-                                            <object class="sizeritem">
-                                                <flag>wxADJUST_MINSIZE</flag>
-                                                <border>0</border>
-                                                <option>0</option>
-                                                <object class="wxSpinButton" name="spin_e0" base="EditSpinButton">
-                                                    <events>
-                                                        <handler event="EVT_SPIN_UP">up_e0</handler>
-                                                        <handler event="EVT_SPIN_DOWN">down_e0</handler>
-                                                    </events>
-                                                </object>
-                                            </object>
-                                        </object>
-                                    </object>
-                                    <object class="sizeritem">
-                                        <flag>wxEXPAND</flag>
-                                        <border>0</border>
-                                        <option>1</option>
-                                        <object class="wxPanel" name="panel_1" base="EditPanel">
-                                            <style>wxTAB_TRAVERSAL</style>
-                                        </object>
-                                    </object>
-                                    <object class="sizeritem">
-                                        <flag>wxEXPAND</flag>
-                                        <border>0</border>
-                                        <option>1</option>
-                                        <object class="wxPanel" name="panel_2" base="EditPanel">
-                                            <style>wxTAB_TRAVERSAL</style>
-                                        </object>
-                                    </object>
-                                    <object class="sizeritem">
-                                        <flag>wxADJUST_MINSIZE</flag>
-                                        <border>0</border>
-                                        <option>0</option>
-                                        <object class="wxButton" name="button_lsb" base="EditButton">
-                                            <label>LSB</label>
-                                            <events>
-                                                <handler event="EVT_BUTTON">set_lsb</handler>
-                                            </events>
-                                        </object>
-                                    </object>
-                                    <object class="sizeritem">
-                                        <flag>wxADJUST_MINSIZE</flag>
-                                        <border>0</border>
-                                        <option>0</option>
-                                        <object class="wxButton" name="button_usb" base="EditButton">
-                                            <label>USB</label>
-                                            <events>
-                                                <handler event="EVT_BUTTON">set_usb</handler>
-                                            </events>
-                                        </object>
-                                    </object>
-                                    <object class="sizeritem">
-                                        <flag>wxADJUST_MINSIZE</flag>
-                                        <border>0</border>
-                                        <option>0</option>
-                                        <object class="wxButton" name="button_am" base="EditButton">
-                                            <label>AM</label>
-                                            <events>
-                                                <handler event="EVT_BUTTON">set_am</handler>
-                                            </events>
-                                        </object>
-                                    </object>
-                                </object>
-                            </object>
-                        </object>
-                    </object>
-                    <object class="sizeritem">
-                        <flag>wxEXPAND</flag>
-                        <border>0</border>
-                        <option>1</option>
-                        <object class="wxBoxSizer" name="sizer_4" base="EditBoxSizer">
-                            <orient>wxVERTICAL</orient>
-                            <object class="sizeritem">
-                                <flag>wxEXPAND</flag>
-                                <border>0</border>
-                                <option>1</option>
-                                <object class="wxGridSizer" name="grid_sizer_3" base="EditGridSizer">
-                                    <hgap>0</hgap>
-                                    <rows>2</rows>
-                                    <cols>4</cols>
-                                    <vgap>0</vgap>
-                                    <object class="sizeritem">
-                                        <flag>wxADJUST_MINSIZE</flag>
-                                        <border>0</border>
-                                        <option>0</option>
-                                        <object class="wxStaticText" name="label_1" base="EditStaticText">
-                                            <attribute>1</attribute>
-                                            <label>VOLUME</label>
-                                        </object>
-                                    </object>
-                                    <object class="sizeritem">
-                                        <flag>wxADJUST_MINSIZE</flag>
-                                        <border>0</border>
-                                        <option>0</option>
-                                        <object class="wxStaticText" name="label_2" base="EditStaticText">
-                                            <attribute>1</attribute>
-                                            <label>PGA</label>
-                                        </object>
-                                    </object>
-                                    <object class="sizeritem">
-                                        <flag>wxADJUST_MINSIZE</flag>
-                                        <border>0</border>
-                                        <option>0</option>
-                                        <object class="wxTextCtrl" name="agc_level" base="EditTextCtrl">
-                                        </object>
-                                    </object>
-                                    <object class="sizeritem">
-                                        <flag>wxADJUST_MINSIZE</flag>
-                                        <border>0</border>
-                                        <option>0</option>
-                                        <object class="wxStaticText" name="label_6" base="EditStaticText">
-                                            <attribute>1</attribute>
-                                        </object>
-                                    </object>
-                                    <object class="sizeritem">
-                                        <flag>wxADJUST_MINSIZE</flag>
-                                        <border>0</border>
-                                        <option>0</option>
-                                        <object class="wxSpinCtrl" name="volume" base="EditSpinCtrl">
-                                            <events>
-                                                <handler event="EVT_SPINCTRL">event_vol</handler>
-                                            </events>
-                                        </object>
-                                    </object>
-                                    <object class="sizeritem">
-                                        <flag>wxADJUST_MINSIZE</flag>
-                                        <border>0</border>
-                                        <option>0</option>
-                                        <object class="wxSpinCtrl" name="pga" base="EditSpinCtrl">
-                                            <events>
-                                                <handler event="EVT_SPINCTRL">event_pga</handler>
-                                            </events>
-                                        </object>
-                                    </object>
-                                    <object class="sizeritem">
-                                        <flag>wxADJUST_MINSIZE</flag>
-                                        <border>0</border>
-                                        <option>0</option>
-                                        <object class="wxTextCtrl" name="agc_max" base="EditTextCtrl">
-                                        </object>
-                                    </object>
-                                    <object class="sizeritem">
-                                        <flag>wxADJUST_MINSIZE</flag>
-                                        <border>0</border>
-                                        <option>0</option>
-                                        <object class="wxStaticText" name="label_7" base="EditStaticText">
-                                            <attribute>1</attribute>
-                                        </object>
-                                    </object>
-                                </object>
-                            </object>
-                            <object class="sizeritem">
-                                <flag>wxEXPAND</flag>
-                                <border>0</border>
-                                <option>1</option>
-                                <object class="wxGridSizer" name="grid_sizer_4" base="EditGridSizer">
-                                    <hgap>0</hgap>
-                                    <rows>2</rows>
-                                    <cols>4</cols>
-                                    <vgap>0</vgap>
-                                    <object class="sizeritem">
-                                        <flag>wxADJUST_MINSIZE</flag>
-                                        <border>0</border>
-                                        <option>0</option>
-                                        <object class="wxStaticText" name="label_4" base="EditStaticText">
-                                            <attribute>1</attribute>
-                                            <label>AGC AUTHORITY</label>
-                                        </object>
-                                    </object>
-                                    <object class="sizeritem">
-                                        <flag>wxADJUST_MINSIZE</flag>
-                                        <border>0</border>
-                                        <option>0</option>
-                                        <object class="wxStaticText" name="label_5" base="EditStaticText">
-                                            <attribute>1</attribute>
-                                            <label>AGC REF LVL</label>
-                                        </object>
-                                    </object>
-                                    <object class="sizeritem">
-                                        <flag>wxADJUST_MINSIZE</flag>
-                                        <border>0</border>
-                                        <option>0</option>
-                                        <object class="wxStaticText" name="label_3" base="EditStaticText">
-                                            <attribute>1</attribute>
-                                            <label>BANDWIDTH</label>
-                                        </object>
-                                    </object>
-                                    <object class="sizeritem">
-                                        <flag>wxADJUST_MINSIZE</flag>
-                                        <border>0</border>
-                                        <option>0</option>
-                                        <object class="wxStaticText" name="label_8" base="EditStaticText">
-                                            <attribute>1</attribute>
-                                        </object>
-                                    </object>
-                                    <object class="sizeritem">
-                                        <flag>wxEXPAND</flag>
-                                        <border>0</border>
-                                        <option>1</option>
-                                        <object class="wxBoxSizer" name="sizer_6" base="EditBoxSizer">
-                                            <orient>wxHORIZONTAL</orient>
-                                            <object class="sizeritem">
-                                                <flag>wxADJUST_MINSIZE</flag>
-                                                <border>0</border>
-                                                <option>0</option>
-                                                <object class="wxTextCtrl" name="agc_gain" base="EditTextCtrl">
-                                                </object>
-                                            </object>
-                                            <object class="sizeritem">
-                                                <flag>wxADJUST_MINSIZE</flag>
-                                                <border>0</border>
-                                                <option>0</option>
-                                                <object class="wxSpinButton" name="agc_gain_s" base="EditSpinButton">
-                                                    <events>
-                                                        <handler event="EVT_SPIN_UP">agc_gain_up</handler>
-                                                        <handler event="EVT_SPIN_DOWN">agc_gain_down</handler>
-                                                    </events>
-                                                </object>
-                                            </object>
-                                        </object>
-                                    </object>
-                                    <object class="sizeritem">
-                                        <flag>wxEXPAND</flag>
-                                        <border>0</border>
-                                        <option>1</option>
-                                        <object class="wxBoxSizer" name="sizer_7" base="EditBoxSizer">
-                                            <orient>wxHORIZONTAL</orient>
-                                            <object class="sizeritem">
-                                                <flag>wxADJUST_MINSIZE</flag>
-                                                <border>0</border>
-                                                <option>0</option>
-                                                <object class="wxTextCtrl" name="agc_ref" base="EditTextCtrl">
-                                                </object>
-                                            </object>
-                                            <object class="sizeritem">
-                                                <flag>wxADJUST_MINSIZE</flag>
-                                                <border>0</border>
-                                                <option>0</option>
-                                                <object class="wxSpinButton" name="agc_ref_s" base="EditSpinButton">
-                                                    <events>
-                                                        <handler event="EVT_SPIN_UP">agc_ref_up</handler>
-                                                        <handler event="EVT_SPIN_DOWN">agc_ref_down</handler>
-                                                    </events>
-                                                </object>
-                                            </object>
-                                        </object>
-                                    </object>
-                                    <object class="sizeritem">
-                                        <flag>wxEXPAND</flag>
-                                        <border>0</border>
-                                        <option>1</option>
-                                        <object class="wxBoxSizer" name="sizer_5" base="EditBoxSizer">
-                                            <orient>wxHORIZONTAL</orient>
-                                            <object class="sizeritem">
-                                                <flag>wxADJUST_MINSIZE</flag>
-                                                <border>0</border>
-                                                <option>0</option>
-                                                <object class="wxTextCtrl" name="bandwidth" base="EditTextCtrl">
-                                                </object>
-                                            </object>
-                                            <object class="sizeritem">
-                                                <flag>wxADJUST_MINSIZE</flag>
-                                                <border>0</border>
-                                                <option>0</option>
-                                                <object class="wxSpinButton" name="bw_spin" base="EditSpinButton">
-                                                    <events>
-                                                        <handler event="EVT_SPIN_UP">bw_up</handler>
-                                                        <handler event="EVT_SPIN_DOWN">bw_down</handler>
-                                                    </events>
-                                                </object>
-                                            </object>
-                                        </object>
-                                    </object>
-                                    <object class="sizeritem">
-                                        <flag>wxADJUST_MINSIZE</flag>
-                                        <border>0</border>
-                                        <option>0</option>
-                                        <object class="wxStaticText" name="label_9" base="EditStaticText">
-                                            <attribute>1</attribute>
-                                        </object>
-                                    </object>
-                                </object>
-                            </object>
-                            <object class="sizeritem">
-                                <flag>wxEXPAND|wxADJUST_MINSIZE</flag>
-                                <border>0</border>
-                                <option>1</option>
-                                <object class="wxGauge" name="rssi" base="EditGauge">
-                                    <foreground>#ff0000</foreground>
-                                    <style>wxGA_HORIZONTAL|wxGA_SMOOTH</style>
-                                    <range>10</range>
-                                    <size>315, 10</size>
-                                </object>
-                            </object>
-                        </object>
-                    </object>
-                </object>
-            </object>
-            <object class="sizeritem">
-                <flag>wxEXPAND</flag>
-                <border>0</border>
-                <option>1</option>
-                <object class="wxPanel" name="fe_panel" base="EditPanel">
-                    <style>wxTAB_TRAVERSAL</style>
-                </object>
-            </object>
-            <object class="sizeritem">
-                <flag>wxEXPAND</flag>
-                <border>0</border>
-                <option>1</option>
-                <object class="wxPanel" name="if_panel" base="EditPanel">
-                    <style>wxTAB_TRAVERSAL</style>
-                </object>
-            </object>
-        </object>
-    </object>
-</application>
diff --git a/gr-uhd/apps/hf_radio/ssb_taps b/gr-uhd/apps/hf_radio/ssb_taps
deleted file mode 100644
index 0ef3bbf267..0000000000
--- a/gr-uhd/apps/hf_radio/ssb_taps
+++ /dev/null
@@ -1,1023 +0,0 @@
--0.000035-0.000009j
--0.000066-0.000020j
--0.000080-0.000044j
--0.000084-0.000071j
--0.000077-0.000100j
--0.000063-0.000127j
--0.000041-0.000150j
--0.000013-0.000167j
-0.000020-0.000177j
-0.000054-0.000180j
-0.000089-0.000174j
-0.000121-0.000161j
-0.000150-0.000140j
-0.000173-0.000113j
-0.000188-0.000081j
-0.000196-0.000046j
-0.000194-0.000011j
-0.000184+0.000022j
-0.000165+0.000052j
-0.000139+0.000077j
-0.000107+0.000093j
-0.000071+0.000102j
-0.000034+0.000101j
--0.000002+0.000090j
--0.000036+0.000070j
--0.000064+0.000042j
--0.000086+0.000006j
--0.000098-0.000034j
--0.000101-0.000077j
--0.000093-0.000120j
--0.000076-0.000161j
--0.000049-0.000197j
--0.000014-0.000227j
-0.000026-0.000248j
-0.000071-0.000259j
-0.000117-0.000259j
-0.000162-0.000249j
-0.000203-0.000228j
-0.000237-0.000199j
-0.000263-0.000162j
-0.000279-0.000120j
-0.000284-0.000075j
-0.000278-0.000031j
-0.000260+0.000010j
-0.000232+0.000045j
-0.000196+0.000073j
-0.000153+0.000090j
-0.000106+0.000095j
-0.000059+0.000089j
-0.000014+0.000071j
--0.000027+0.000041j
--0.000059+0.000002j
--0.000082-0.000046j
--0.000093-0.000098j
--0.000091-0.000152j
--0.000077-0.000206j
--0.000050-0.000255j
--0.000012-0.000298j
-0.000034-0.000330j
-0.000088-0.000351j
-0.000145-0.000359j
-0.000202-0.000354j
-0.000256-0.000335j
-0.000304-0.000304j
-0.000343-0.000262j
-0.000370-0.000213j
-0.000384-0.000158j
-0.000384-0.000102j
-0.000369-0.000048j
-0.000341+0.000002j
-0.000302+0.000042j
-0.000252+0.000072j
-0.000196+0.000088j
-0.000137+0.000089j
-0.000078+0.000075j
-0.000024+0.000047j
--0.000023+0.000005j
--0.000059-0.000048j
--0.000082-0.000109j
--0.000090-0.000175j
--0.000081-0.000242j
--0.000058-0.000306j
--0.000019-0.000364j
-0.000032-0.000411j
-0.000093-0.000445j
-0.000161-0.000465j
-0.000232-0.000467j
-0.000301-0.000453j
-0.000365-0.000423j
-0.000419-0.000379j
-0.000461-0.000323j
-0.000487-0.000259j
-0.000497-0.000190j
-0.000489-0.000121j
-0.000464-0.000056j
-0.000423+0.000001j
-0.000369+0.000046j
-0.000304+0.000076j
-0.000233+0.000089j
-0.000160+0.000083j
-0.000089+0.000060j
-0.000025+0.000018j
--0.000027-0.000038j
--0.000065-0.000107j
--0.000086-0.000185j
--0.000088-0.000266j
--0.000071-0.000347j
--0.000035-0.000422j
-0.000019-0.000487j
-0.000086-0.000538j
-0.000164-0.000573j
-0.000248-0.000588j
-0.000334-0.000582j
-0.000415-0.000557j
-0.000488-0.000513j
-0.000548-0.000452j
-0.000592-0.000379j
-0.000616-0.000297j
-0.000619-0.000213j
-0.000600-0.000130j
-0.000561-0.000054j
-0.000504+0.000010j
-0.000432+0.000058j
-0.000350+0.000086j
-0.000261+0.000093j
-0.000173+0.000078j
-0.000090+0.000040j
-0.000017-0.000017j
--0.000040-0.000092j
--0.000078-0.000180j
--0.000095-0.000275j
--0.000088-0.000374j
--0.000058-0.000469j
--0.000006-0.000555j
-0.000065-0.000627j
-0.000152-0.000681j
-0.000250-0.000712j
-0.000352-0.000720j
-0.000454-0.000703j
-0.000548-0.000663j
-0.000630-0.000601j
-0.000694-0.000521j
-0.000737-0.000428j
-0.000755-0.000327j
-0.000748-0.000225j
-0.000715-0.000128j
-0.000659-0.000042j
-0.000582+0.000028j
-0.000490+0.000077j
-0.000387+0.000101j
-0.000280+0.000099j
-0.000175+0.000070j
-0.000080+0.000015j
--0.000001-0.000063j
--0.000061-0.000159j
--0.000097-0.000268j
--0.000106-0.000385j
--0.000087-0.000501j
--0.000040-0.000611j
-0.000032-0.000708j
-0.000125-0.000786j
-0.000235-0.000839j
-0.000354-0.000866j
-0.000477-0.000863j
-0.000595-0.000831j
-0.000702-0.000772j
-0.000792-0.000688j
-0.000859-0.000585j
-0.000898-0.000469j
-0.000907-0.000347j
-0.000886-0.000227j
-0.000835-0.000115j
-0.000757-0.000019j
-0.000657+0.000055j
-0.000540+0.000102j
-0.000415+0.000119j
-0.000287+0.000103j
-0.000165+0.000056j
-0.000058-0.000020j
--0.000029-0.000122j
--0.000090-0.000243j
--0.000121-0.000378j
--0.000118-0.000517j
--0.000082-0.000653j
--0.000014-0.000778j
-0.000082-0.000885j
-0.000201-0.000966j
-0.000337-0.001017j
-0.000481-0.001034j
-0.000626-0.001016j
-0.000762-0.000965j
-0.000882-0.000882j
-0.000978-0.000772j
-0.001044-0.000643j
-0.001076-0.000501j
-0.001072-0.000355j
-0.001032-0.000215j
-0.000958-0.000089j
-0.000854+0.000016j
-0.000726+0.000091j
-0.000582+0.000133j
-0.000431+0.000138j
-0.000281+0.000105j
-0.000143+0.000035j
-0.000024-0.000068j
--0.000068-0.000199j
--0.000126-0.000350j
--0.000147-0.000513j
--0.000128-0.000677j
--0.000070-0.000834j
-0.000024-0.000974j
-0.000150-0.001089j
-0.000300-0.001171j
-0.000465-0.001216j
-0.000637-0.001219j
-0.000805-0.001182j
-0.000960-0.001105j
-0.001091-0.000993j
-0.001191-0.000853j
-0.001253-0.000692j
-0.001274-0.000521j
-0.001252-0.000350j
-0.001188-0.000189j
-0.001085-0.000049j
-0.000950+0.000062j
-0.000790+0.000136j
-0.000614+0.000168j
-0.000435+0.000156j
-0.000261+0.000099j
-0.000105+0.000000j
--0.000024-0.000136j
--0.000117-0.000301j
--0.000169-0.000486j
--0.000175-0.000680j
--0.000134-0.000872j
--0.000048-0.001051j
-0.000079-0.001206j
-0.000240-0.001326j
-0.000426-0.001406j
-0.000626-0.001439j
-0.000829-0.001424j
-0.001022-0.001361j
-0.001195-0.001252j
-0.001336-0.001106j
-0.001437-0.000929j
-0.001491-0.000733j
-0.001496-0.000529j
-0.001449-0.000330j
-0.001354-0.000148j
-0.001217+0.000005j
-0.001044+0.000120j
-0.000846+0.000188j
-0.000635+0.000206j
-0.000424+0.000170j
-0.000226+0.000083j
-0.000053-0.000053j
--0.000084-0.000228j
--0.000176-0.000434j
--0.000216-0.000659j
--0.000201-0.000889j
--0.000131-0.001111j
--0.000009-0.001312j
-0.000158-0.001480j
-0.000362-0.001604j
-0.000590-0.001677j
-0.000829-0.001694j
-0.001066-0.001653j
-0.001286-0.001556j
-0.001477-0.001408j
-0.001626-0.001219j
-0.001724-0.001000j
-0.001765-0.000762j
-0.001746-0.000522j
-0.001668-0.000293j
-0.001534-0.000090j
-0.001353+0.000075j
-0.001135+0.000190j
-0.000893+0.000247j
-0.000642+0.000243j
-0.000396+0.000176j
-0.000172+0.000049j
--0.000017-0.000131j
--0.000159-0.000355j
--0.000244-0.000609j
--0.000266-0.000880j
--0.000222-0.001151j
--0.000114-0.001406j
-0.000053-0.001630j
-0.000270-0.001810j
-0.000524-0.001934j
-0.000802-0.001994j
-0.001087-0.001987j
-0.001362-0.001911j
-0.001611-0.001772j
-0.001819-0.001576j
-0.001973-0.001336j
-0.002063-0.001065j
-0.002084-0.000779j
-0.002033-0.000497j
-0.001914-0.000236j
-0.001732-0.000011j
-0.001498+0.000162j
-0.001225+0.000272j
-0.000931+0.000312j
-0.000633+0.000277j
-0.000349+0.000168j
-0.000097-0.000009j
--0.000107-0.000246j
--0.000250-0.000528j
--0.000322-0.000841j
--0.000316-0.001166j
--0.000233-0.001484j
--0.000076-0.001775j
-0.000148-0.002024j
-0.000426-0.002213j
-0.000743-0.002332j
-0.001080-0.002373j
-0.001418-0.002332j
-0.001736-0.002211j
-0.002017-0.002017j
-0.002241-0.001760j
-0.002397-0.001457j
-0.002473-0.001124j
-0.002464-0.000783j
-0.002371-0.000453j
-0.002198-0.000156j
-0.001954+0.000091j
-0.001654+0.000269j
-0.001316+0.000369j
-0.000959+0.000381j
-0.000606+0.000303j
-0.000279+0.000139j
--0.000003-0.000103j
--0.000220-0.000411j
--0.000359-0.000768j
--0.000408-0.001152j
--0.000365-0.001542j
--0.000229-0.001915j
--0.000006-0.002248j
-0.000292-0.002522j
-0.000648-0.002719j
-0.001042-0.002826j
-0.001452-0.002837j
-0.001853-0.002750j
-0.002223-0.002569j
-0.002537-0.002304j
-0.002778-0.001971j
-0.002930-0.001588j
-0.002984-0.001179j
-0.002933-0.000770j
-0.002782-0.000384j
-0.002538-0.000046j
-0.002215+0.000222j
-0.001831+0.000402j
-0.001410+0.000481j
-0.000976+0.000452j
-0.000557+0.000316j
-0.000179+0.000077j
--0.000134-0.000252j
--0.000362-0.000654j
--0.000490-0.001105j
--0.000506-0.001580j
--0.000407-0.002052j
--0.000197-0.002492j
-0.000113-0.002875j
-0.000508-0.003176j
-0.000966-0.003377j
-0.001460-0.003464j
-0.001963-0.003432j
-0.002444-0.003281j
-0.002876-0.003019j
-0.003231-0.002659j
-0.003488-0.002224j
-0.003631-0.001739j
-0.003649-0.001233j
-0.003540-0.000737j
-0.003309-0.000282j
-0.002969+0.000103j
-0.002539+0.000393j
-0.002044+0.000568j
-0.001515+0.000614j
-0.000982+0.000525j
-0.000480+0.000304j
-0.000039-0.000039j
--0.000311-0.000487j
--0.000547-0.001016j
--0.000652-0.001595j
--0.000615-0.002193j
--0.000436-0.002773j
--0.000122-0.003301j
-0.000311-0.003746j
-0.000842-0.004081j
-0.001440-0.004282j
-0.002071-0.004338j
-0.002700-0.004243j
-0.003289-0.004000j
-0.003803-0.003622j
-0.004210-0.003132j
-0.004485-0.002556j
-0.004610-0.001930j
-0.004574-0.001291j
-0.004379-0.000679j
-0.004034-0.000133j
-0.003558+0.000313j
-0.002977+0.000627j
-0.002327+0.000787j
-0.001647+0.000779j
-0.000977+0.000598j
-0.000360+0.000250j
--0.000163-0.000249j
--0.000559-0.000872j
--0.000799-0.001587j
--0.000864-0.002354j
--0.000744-0.003129j
--0.000442-0.003866j
-0.000031-0.004522j
-0.000651-0.005057j
-0.001385-0.005437j
-0.002193-0.005637j
-0.003030-0.005643j
-0.003848-0.005451j
-0.004597-0.005069j
-0.005234-0.004519j
-0.005718-0.003830j
-0.006019-0.003044j
-0.006114-0.002206j
-0.005997-0.001368j
-0.005669-0.000583j
-0.005147+0.000099j
-0.004460+0.000631j
-0.003647+0.000975j
-0.002757+0.001105j
-0.001842+0.001003j
-0.000961+0.000668j
-0.000168+0.000111j
--0.000482-0.000643j
--0.000944-0.001555j
--0.001183-0.002578j
--0.001176-0.003656j
--0.000912-0.004727j
--0.000397-0.005728j
-0.000346-0.006601j
-0.001284-0.007292j
-0.002368-0.007755j
-0.003540-0.007959j
-0.004735-0.007886j
-0.005885-0.007535j
-0.006922-0.006922j
-0.007782-0.006078j
-0.008412-0.005050j
-0.008769-0.003898j
-0.008825-0.002691j
-0.008572-0.001504j
-0.008016-0.000412j
-0.007185+0.000510j
-0.006123+0.001196j
-0.004891+0.001591j
-0.003560+0.001657j
-0.002212+0.001372j
-0.000933+0.000734j
--0.000192-0.000236j
--0.001083-0.001500j
--0.001672-0.002998j
--0.001905-0.004655j
--0.001747-0.006384j
--0.001182-0.008090j
--0.000222-0.009676j
-0.001101-0.011045j
-0.002732-0.012114j
-0.004593-0.012810j
-0.006591-0.013081j
-0.008621-0.012896j
-0.010571-0.012253j
-0.012328-0.011175j
-0.013785-0.009712j
-0.014847-0.007941j
-0.015438-0.005962j
-0.015507-0.003893j
-0.015029-0.001863j
-0.014011-0.000011j
-0.012494+0.001529j
-0.010549+0.002630j
-0.008277+0.003179j
-0.005809+0.003090j
-0.003294+0.002304j
-0.000896+0.000795j
--0.001212-0.001423j
--0.002859-0.004299j
--0.003886-0.007744j
--0.004151-0.011630j
--0.003539-0.015799j
--0.001969-0.020066j
-0.000601-0.024225j
-0.004168-0.028064j
-0.008684-0.031367j
-0.014056-0.033927j
-0.020145-0.035558j
-0.026775-0.036101j
-0.033735-0.035433j
-0.040789-0.033475j
-0.047684-0.030197j
-0.054164-0.025619j
-0.059974-0.019815j
-0.064878-0.012907j
-0.068665-0.005067j
-0.071159+0.003494j
-0.072228+0.012531j
-0.071791+0.021776j
-0.069818+0.030947j
-0.066339+0.039761j
-0.061435+0.047944j
-0.055243+0.055243j
-0.047944+0.061435j
-0.039761+0.066339j
-0.030947+0.069818j
-0.021776+0.071791j
-0.012531+0.072228j
-0.003494+0.071159j
--0.005067+0.068665j
--0.012907+0.064878j
--0.019815+0.059974j
--0.025619+0.054164j
--0.030197+0.047684j
--0.033475+0.040789j
--0.035433+0.033735j
--0.036101+0.026775j
--0.035558+0.020145j
--0.033927+0.014056j
--0.031367+0.008684j
--0.028064+0.004168j
--0.024225+0.000601j
--0.020066-0.001969j
--0.015799-0.003539j
--0.011630-0.004151j
--0.007744-0.003886j
--0.004299-0.002859j
--0.001423-0.001212j
-0.000795+0.000896j
-0.002304+0.003294j
-0.003090+0.005809j
-0.003179+0.008277j
-0.002630+0.010549j
-0.001529+0.012494j
--0.000011+0.014011j
--0.001863+0.015029j
--0.003893+0.015507j
--0.005962+0.015438j
--0.007941+0.014847j
--0.009712+0.013785j
--0.011175+0.012328j
--0.012253+0.010571j
--0.012896+0.008621j
--0.013081+0.006591j
--0.012810+0.004593j
--0.012114+0.002732j
--0.011045+0.001101j
--0.009676-0.000222j
--0.008090-0.001182j
--0.006384-0.001747j
--0.004655-0.001905j
--0.002998-0.001672j
--0.001500-0.001083j
--0.000236-0.000192j
-0.000734+0.000933j
-0.001372+0.002212j
-0.001657+0.003560j
-0.001591+0.004891j
-0.001196+0.006123j
-0.000510+0.007185j
--0.000412+0.008016j
--0.001504+0.008572j
--0.002691+0.008825j
--0.003898+0.008769j
--0.005050+0.008412j
--0.006078+0.007782j
--0.006922+0.006922j
--0.007535+0.005885j
--0.007886+0.004735j
--0.007959+0.003540j
--0.007755+0.002368j
--0.007292+0.001284j
--0.006601+0.000346j
--0.005728-0.000397j
--0.004727-0.000912j
--0.003656-0.001176j
--0.002578-0.001183j
--0.001555-0.000944j
--0.000643-0.000482j
-0.000111+0.000168j
-0.000668+0.000961j
-0.001003+0.001842j
-0.001105+0.002757j
-0.000975+0.003647j
-0.000631+0.004460j
-0.000099+0.005147j
--0.000583+0.005669j
--0.001368+0.005997j
--0.002206+0.006114j
--0.003044+0.006019j
--0.003830+0.005718j
--0.004519+0.005234j
--0.005069+0.004597j
--0.005451+0.003848j
--0.005643+0.003030j
--0.005637+0.002193j
--0.005437+0.001385j
--0.005057+0.000651j
--0.004522+0.000031j
--0.003866-0.000442j
--0.003129-0.000744j
--0.002354-0.000864j
--0.001587-0.000799j
--0.000872-0.000559j
--0.000249-0.000163j
-0.000250+0.000360j
-0.000598+0.000977j
-0.000779+0.001647j
-0.000787+0.002327j
-0.000627+0.002977j
-0.000313+0.003558j
--0.000133+0.004034j
--0.000679+0.004379j
--0.001291+0.004574j
--0.001930+0.004610j
--0.002556+0.004485j
--0.003132+0.004210j
--0.003622+0.003803j
--0.004000+0.003289j
--0.004243+0.002700j
--0.004338+0.002071j
--0.004282+0.001440j
--0.004081+0.000842j
--0.003746+0.000311j
--0.003301-0.000122j
--0.002773-0.000436j
--0.002193-0.000615j
--0.001595-0.000652j
--0.001016-0.000547j
--0.000487-0.000311j
--0.000039+0.000039j
-0.000304+0.000480j
-0.000525+0.000982j
-0.000614+0.001515j
-0.000568+0.002044j
-0.000393+0.002539j
-0.000103+0.002969j
--0.000282+0.003309j
--0.000737+0.003540j
--0.001233+0.003649j
--0.001739+0.003631j
--0.002224+0.003488j
--0.002659+0.003231j
--0.003019+0.002876j
--0.003281+0.002444j
--0.003432+0.001963j
--0.003464+0.001460j
--0.003377+0.000966j
--0.003176+0.000508j
--0.002875+0.000113j
--0.002492-0.000197j
--0.002052-0.000407j
--0.001580-0.000506j
--0.001105-0.000490j
--0.000654-0.000362j
--0.000252-0.000134j
-0.000077+0.000179j
-0.000316+0.000557j
-0.000452+0.000976j
-0.000481+0.001410j
-0.000402+0.001831j
-0.000222+0.002215j
--0.000046+0.002538j
--0.000384+0.002782j
--0.000770+0.002933j
--0.001179+0.002984j
--0.001588+0.002930j
--0.001971+0.002778j
--0.002304+0.002537j
--0.002569+0.002223j
--0.002750+0.001853j
--0.002837+0.001452j
--0.002826+0.001042j
--0.002719+0.000648j
--0.002522+0.000292j
--0.002248-0.000006j
--0.001915-0.000229j
--0.001542-0.000365j
--0.001152-0.000408j
--0.000768-0.000359j
--0.000411-0.000220j
--0.000103-0.000003j
-0.000139+0.000279j
-0.000303+0.000606j
-0.000381+0.000959j
-0.000369+0.001316j
-0.000269+0.001654j
-0.000091+0.001954j
--0.000156+0.002198j
--0.000453+0.002371j
--0.000783+0.002464j
--0.001124+0.002473j
--0.001457+0.002397j
--0.001760+0.002241j
--0.002017+0.002017j
--0.002211+0.001736j
--0.002332+0.001418j
--0.002373+0.001080j
--0.002332+0.000743j
--0.002213+0.000426j
--0.002024+0.000148j
--0.001775-0.000076j
--0.001484-0.000233j
--0.001166-0.000316j
--0.000841-0.000322j
--0.000528-0.000250j
--0.000246-0.000107j
--0.000009+0.000097j
-0.000168+0.000349j
-0.000277+0.000633j
-0.000312+0.000931j
-0.000272+0.001225j
-0.000162+0.001498j
--0.000011+0.001732j
--0.000236+0.001914j
--0.000497+0.002033j
--0.000779+0.002084j
--0.001065+0.002063j
--0.001336+0.001973j
--0.001576+0.001819j
--0.001772+0.001611j
--0.001911+0.001362j
--0.001987+0.001087j
--0.001994+0.000802j
--0.001934+0.000524j
--0.001810+0.000270j
--0.001630+0.000053j
--0.001406-0.000114j
--0.001151-0.000222j
--0.000880-0.000266j
--0.000609-0.000244j
--0.000355-0.000159j
--0.000131-0.000017j
-0.000049+0.000172j
-0.000176+0.000396j
-0.000243+0.000642j
-0.000247+0.000893j
-0.000190+0.001135j
-0.000075+0.001353j
--0.000090+0.001534j
--0.000293+0.001668j
--0.000522+0.001746j
--0.000762+0.001765j
--0.001000+0.001724j
--0.001219+0.001626j
--0.001408+0.001477j
--0.001556+0.001286j
--0.001653+0.001066j
--0.001694+0.000829j
--0.001677+0.000590j
--0.001604+0.000362j
--0.001480+0.000158j
--0.001312-0.000009j
--0.001111-0.000131j
--0.000889-0.000201j
--0.000659-0.000216j
--0.000434-0.000176j
--0.000228-0.000084j
--0.000053+0.000053j
-0.000083+0.000226j
-0.000170+0.000424j
-0.000206+0.000635j
-0.000188+0.000846j
-0.000120+0.001044j
-0.000005+0.001217j
--0.000148+0.001354j
--0.000330+0.001449j
--0.000529+0.001496j
--0.000733+0.001491j
--0.000929+0.001437j
--0.001106+0.001336j
--0.001252+0.001195j
--0.001361+0.001022j
--0.001424+0.000829j
--0.001439+0.000626j
--0.001406+0.000426j
--0.001326+0.000240j
--0.001206+0.000079j
--0.001051-0.000048j
--0.000872-0.000134j
--0.000680-0.000175j
--0.000486-0.000169j
--0.000301-0.000117j
--0.000136-0.000024j
-0.000000+0.000105j
-0.000099+0.000261j
-0.000156+0.000435j
-0.000168+0.000614j
-0.000136+0.000790j
-0.000062+0.000950j
--0.000049+0.001085j
--0.000189+0.001188j
--0.000350+0.001252j
--0.000521+0.001274j
--0.000692+0.001253j
--0.000853+0.001191j
--0.000993+0.001091j
--0.001105+0.000960j
--0.001182+0.000805j
--0.001219+0.000637j
--0.001216+0.000465j
--0.001171+0.000300j
--0.001089+0.000150j
--0.000974+0.000024j
--0.000834-0.000070j
--0.000677-0.000128j
--0.000513-0.000147j
--0.000350-0.000126j
--0.000199-0.000068j
--0.000068+0.000024j
-0.000035+0.000143j
-0.000105+0.000281j
-0.000138+0.000431j
-0.000133+0.000582j
-0.000091+0.000726j
-0.000016+0.000854j
--0.000089+0.000958j
--0.000215+0.001032j
--0.000355+0.001072j
--0.000501+0.001076j
--0.000643+0.001044j
--0.000772+0.000978j
--0.000882+0.000882j
--0.000965+0.000762j
--0.001016+0.000626j
--0.001034+0.000481j
--0.001017+0.000337j
--0.000966+0.000201j
--0.000885+0.000082j
--0.000778-0.000014j
--0.000653-0.000082j
--0.000517-0.000118j
--0.000378-0.000121j
--0.000243-0.000090j
--0.000122-0.000029j
--0.000020+0.000058j
-0.000056+0.000165j
-0.000103+0.000287j
-0.000119+0.000415j
-0.000102+0.000540j
-0.000055+0.000657j
--0.000019+0.000757j
--0.000115+0.000835j
--0.000227+0.000886j
--0.000347+0.000907j
--0.000469+0.000898j
--0.000585+0.000859j
--0.000688+0.000792j
--0.000772+0.000702j
--0.000831+0.000595j
--0.000863+0.000477j
--0.000866+0.000354j
--0.000839+0.000235j
--0.000786+0.000125j
--0.000708+0.000032j
--0.000611-0.000040j
--0.000501-0.000087j
--0.000385-0.000106j
--0.000268-0.000097j
--0.000159-0.000061j
--0.000063-0.000001j
-0.000015+0.000080j
-0.000070+0.000175j
-0.000099+0.000280j
-0.000101+0.000387j
-0.000077+0.000490j
-0.000028+0.000582j
--0.000042+0.000659j
--0.000128+0.000715j
--0.000225+0.000748j
--0.000327+0.000755j
--0.000428+0.000737j
--0.000521+0.000694j
--0.000601+0.000630j
--0.000663+0.000548j
--0.000703+0.000454j
--0.000720+0.000352j
--0.000712+0.000250j
--0.000681+0.000152j
--0.000627+0.000065j
--0.000555-0.000006j
--0.000469-0.000058j
--0.000374-0.000088j
--0.000275-0.000095j
--0.000180-0.000078j
--0.000092-0.000040j
--0.000017+0.000017j
-0.000040+0.000090j
-0.000078+0.000173j
-0.000093+0.000261j
-0.000086+0.000350j
-0.000058+0.000432j
-0.000010+0.000504j
--0.000054+0.000561j
--0.000130+0.000600j
--0.000213+0.000619j
--0.000297+0.000616j
--0.000379+0.000592j
--0.000452+0.000548j
--0.000513+0.000488j
--0.000557+0.000415j
--0.000582+0.000334j
--0.000588+0.000248j
--0.000573+0.000164j
--0.000538+0.000086j
--0.000487+0.000019j
--0.000422-0.000035j
--0.000347-0.000071j
--0.000266-0.000088j
--0.000185-0.000086j
--0.000107-0.000065j
--0.000038-0.000027j
-0.000018+0.000025j
-0.000060+0.000089j
-0.000083+0.000160j
-0.000089+0.000233j
-0.000076+0.000304j
-0.000046+0.000369j
-0.000001+0.000423j
--0.000056+0.000464j
--0.000121+0.000489j
--0.000190+0.000497j
--0.000259+0.000487j
--0.000323+0.000461j
--0.000379+0.000419j
--0.000423+0.000365j
--0.000453+0.000301j
--0.000467+0.000232j
--0.000465+0.000161j
--0.000445+0.000093j
--0.000411+0.000032j
--0.000364-0.000019j
--0.000306-0.000058j
--0.000242-0.000081j
--0.000175-0.000090j
--0.000109-0.000082j
--0.000048-0.000059j
-0.000005-0.000023j
-0.000047+0.000024j
-0.000075+0.000078j
-0.000089+0.000137j
-0.000088+0.000196j
-0.000072+0.000252j
-0.000042+0.000302j
-0.000002+0.000341j
--0.000048+0.000369j
--0.000102+0.000384j
--0.000158+0.000384j
--0.000213+0.000370j
--0.000262+0.000343j
--0.000304+0.000304j
--0.000335+0.000256j
--0.000354+0.000202j
--0.000359+0.000145j
--0.000351+0.000088j
--0.000330+0.000034j
--0.000298-0.000012j
--0.000255-0.000050j
--0.000206-0.000077j
--0.000152-0.000091j
--0.000098-0.000093j
--0.000046-0.000082j
-0.000002-0.000059j
-0.000041-0.000027j
-0.000071+0.000014j
-0.000089+0.000059j
-0.000095+0.000106j
-0.000090+0.000153j
-0.000073+0.000196j
-0.000045+0.000232j
-0.000010+0.000260j
--0.000031+0.000278j
--0.000075+0.000284j
--0.000120+0.000279j
--0.000162+0.000263j
--0.000199+0.000237j
--0.000228+0.000203j
--0.000249+0.000162j
--0.000259+0.000117j
--0.000259+0.000071j
--0.000248+0.000026j
--0.000227-0.000014j
--0.000197-0.000049j
--0.000161-0.000076j
--0.000120-0.000093j
--0.000077-0.000101j
--0.000034-0.000098j
-0.000006-0.000086j
-0.000042-0.000064j
-0.000070-0.000036j
-0.000090-0.000002j
-0.000101+0.000034j
-0.000102+0.000071j
-0.000093+0.000107j
-0.000077+0.000139j
-0.000052+0.000165j
-0.000022+0.000184j
--0.000011+0.000194j
--0.000046+0.000196j
--0.000081+0.000188j
--0.000113+0.000173j
--0.000140+0.000150j
--0.000161+0.000121j
--0.000174+0.000089j
--0.000180+0.000054j
--0.000177+0.000020j
--0.000167-0.000013j
--0.000150-0.000041j
--0.000127-0.000063j
--0.000100-0.000077j
--0.000071-0.000084j
--0.000044-0.000080j
--0.000020-0.000066j
--0.000009-0.000035j
diff --git a/gr-uhd/apps/hf_radio/ssbagc.py b/gr-uhd/apps/hf_radio/ssbagc.py
deleted file mode 100644
index 48cc009101..0000000000
--- a/gr-uhd/apps/hf_radio/ssbagc.py
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright 2011 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-
-
-# post detection agc processing
-#
-# This agc strategy is copied more or less verbatim from
-# weaver_isb_am1_usrp3.py by cswiger.
-#
-# Thanks.
-#
-# Then modified in a variety of ways.
-#
-# There doesn't appear to be a way to hook multiple blocks to the
-# input port when building a hier block like this. Thus the
-# split below.
-#
-# Basic operation.
-# Power is estimated by squaring the input.
-# Low pass filter using a 1 pole iir.
-# The time constant can be tweaked by changing the taps.
-# Currently there is no implementation to change this while operating
-#   a potentially useful addition.
-# The log block turns this into dB
-# gain adjusts the agc authority.
-#
-# M. Revnell 2006-Jan
-
-from gnuradio import gr
-from gnuradio import blocks
-from gnuradio import filter
-
-class agc( gr.hier_block2 ):
-    def __init__( self ):
-        gr.hier_block2.__init__(self, "agc",
-                                gr.io_signature(1,1,gr.sizeof_float),
-                                gr.io_signature(1,1,gr.sizeof_float))
-
-        self.split = blocks.multiply_const_ff( 1 )
-        self.sqr   = blocks.multiply_ff( )
-        self.int0  = filter.iir_filter_ffd( [.004, 0], [0, .999] )
-        self.offs  = blocks.add_const_ff( -30 )
-        self.gain  = blocks.multiply_const_ff( 70 )
-        self.log   = blocks.nlog10_ff( 10, 1 )
-        self.agc   = blocks.divide_ff( )
-
-        self.connect(self,       self.split)
-        self.connect(self.split, (self.agc, 0))
-        self.connect(self.split, (self.sqr, 0))
-        self.connect(self.split, (self.sqr, 1))
-        self.connect(self.sqr,    self.int0)
-        self.connect(self.int0,   self.log)
-        self.connect(self.log,    self.offs)
-        self.connect(self.offs,   self.gain)
-        self.connect(self.gain,  (self.agc, 1))
-        self.connect(self.agc,    self)
diff --git a/gr-uhd/apps/hf_radio/ssbdemod.py b/gr-uhd/apps/hf_radio/ssbdemod.py
deleted file mode 100644
index d364f5e0ec..0000000000
--- a/gr-uhd/apps/hf_radio/ssbdemod.py
+++ /dev/null
@@ -1,118 +0,0 @@
-# Copyright 2011 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-# This tries to push the hilbert transform for ssb demod back into the
-# freq. xlating filter.
-#
-# The starting point for this was weaver_isb_am1_usrp3.py.
-#
-# The tap coefficients for freq_xlating_fir_filter_ccf were generated
-# externally and are read from a file because I didn't want to learn how
-# to make fir filters with arbitrary phase response using python numeric
-# facilities.
-#
-# They were generated using Scilab which I am already familiar with.
-# M. Revnell Jan 06
-
-from gnuradio import gr
-from gnuradio import blocks
-from gnuradio import filter
-
-class ssb_demod( gr.hier_block2 ):
-    def __init__( self, if_rate, af_rate ):
-        gr.hier_block2.__init__(self, "ssb_demod",
-                                gr.io_signature(1,1,gr.sizeof_gr_complex),
-                                gr.io_signature(1,1,gr.sizeof_float))
-
-        self.if_rate  = int(if_rate)
-        self.af_rate  = int(af_rate)
-        self.if_decim = int(if_rate / af_rate)
-        self.sideband = 1
-
-        self.xlate_taps = ([complex(v) for v in file('ssb_taps').readlines()])
-
-        self.audio_taps = filter.firdes.low_pass(
-            1.0,
-            self.af_rate,
-            3e3,
-            600,
-            filter.firdes.WIN_HAMMING )
-
-        self.xlate = filter.freq_xlating_fir_filter_ccc(
-            self.if_decim,
-            self.xlate_taps,
-            0,
-            self.if_rate )
-
-        self.split = blocks.complex_to_float()
-
-        self.lpf = filter.fir_filter_fff(
-            1, self.audio_taps )
-
-        self.sum   = blocks.add_ff( )
-        self.am_sel = blocks.multiply_const_ff( 0 )
-        self.sb_sel = blocks.multiply_const_ff( 1 )
-        self.mixer  = blocks.add_ff()
-        self.am_det = blocks.complex_to_mag()
-
-        self.connect(self,             self.xlate)
-        self.connect(self.xlate,       self.split)
-        self.connect((self.split, 0), (self.sum, 0))
-        self.connect((self.split, 1), (self.sum, 1))
-        self.connect(self.sum,         self.sb_sel)
-        self.connect(self.xlate,       self.am_det)
-        self.connect(self.sb_sel,     (self.mixer, 0))
-        self.connect(self.am_det,      self.am_sel)
-        self.connect(self.am_sel,     (self.mixer, 1))
-        self.connect(self.mixer,       self.lpf)
-        self.connect(self.lpf,         self)
-
-    def upper_sb( self ):
-        self.xlate.set_taps([v.conjugate() for v in self.xlate_taps])
-        self.sb_sel.set_k( 1.0 )
-        self.am_sel.set_k( 0.0 )
-
-    def lower_sb( self ):
-        self.xlate.set_taps(self.xlate_taps)
-        self.sb_sel.set_k( 1.0 )
-        self.am_sel.set_k( 0.0 )
-
-    def set_am( self ):
-        taps = filter.firdes.low_pass( 1.0,
-                                       self.if_rate,
-                                       5e3,
-                                       2e3,
-                                       filter.firdes.WIN_HAMMING )
-        self.xlate.set_taps( taps )
-        self.sb_sel.set_k( 0.0 )
-        self.am_sel.set_k( 1.0 )
-
-    def set_bw( self, bw ):
-        self.audio_taps = filter.firdes.low_pass(
-            1.0,
-            self.af_rate,
-            bw,
-            600,
-            filter.firdes.WIN_HAMMING )
-        self.lpf.set_taps( self.audio_taps )
-
-    def tune( self, freq ):
-        self.xlate.set_center_freq( freq )
-
diff --git a/gr-uhd/apps/hf_radio/startup.py b/gr-uhd/apps/hf_radio/startup.py
deleted file mode 100644
index 093369b577..0000000000
--- a/gr-uhd/apps/hf_radio/startup.py
+++ /dev/null
@@ -1 +0,0 @@
-from radio import *
diff --git a/gr-uhd/apps/hf_radio/ui.py b/gr-uhd/apps/hf_radio/ui.py
deleted file mode 100755
index a20ba4faba..0000000000
--- a/gr-uhd/apps/hf_radio/ui.py
+++ /dev/null
@@ -1,316 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2011 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-# -*- coding: UTF-8 -*-
-# generated by wxGlade 0.4 on Mon Jan  2 19:02:03 2006
-
-import wx
-
-class ui_frame(wx.Frame):
-    def __init__(self, *args, **kwds):
-        # begin wxGlade: ui_frame.__init__
-        kwds["style"] = wx.DEFAULT_FRAME_STYLE
-        wx.Frame.__init__(self, *args, **kwds)
-        self.sizer_1_staticbox = wx.StaticBox(self, -1, "sizer_1")
-        self.freq_disp = wx.SpinCtrl(self, -1, "", min=0, max=100)
-        self.spin_e6 = wx.SpinButton(self, -1 )
-        self.spin_e5 = wx.SpinButton(self, -1 )
-        self.spin_e4 = wx.SpinButton(self, -1 )
-        self.spin_e3 = wx.SpinButton(self, -1 )
-        self.spin_e2 = wx.SpinButton(self, -1 )
-        self.spin_e1 = wx.SpinButton(self, -1 )
-        self.spin_e0 = wx.SpinButton(self, -1 )
-        self.panel_1 = wx.Panel(self, -1)
-        self.panel_2 = wx.Panel(self, -1)
-        self.button_lsb = wx.Button(self, -1, "LSB")
-        self.button_usb = wx.Button(self, -1, "USB")
-        self.button_am = wx.Button(self, -1, "AM")
-        self.label_1 = wx.StaticText(self, -1, "VOLUME")
-        self.label_2 = wx.StaticText(self, -1, "PGA")
-        self.agc_level = wx.TextCtrl(self, -1, "")
-        self.label_6 = wx.StaticText(self, -1, "")
-        self.volume = wx.SpinCtrl(self, -1, "", min=0, max=100)
-        self.pga = wx.SpinCtrl(self, -1, "", min=0, max=100)
-        self.agc_max = wx.TextCtrl(self, -1, "")
-        self.label_7 = wx.StaticText(self, -1, "")
-        self.label_4 = wx.StaticText(self, -1, "AGC AUTHORITY")
-        self.label_5 = wx.StaticText(self, -1, "AGC REF LVL")
-        self.label_3 = wx.StaticText(self, -1, "BANDWIDTH")
-        self.label_8 = wx.StaticText(self, -1, "")
-        self.agc_gain = wx.TextCtrl(self, -1, "")
-        self.agc_gain_s = wx.SpinButton(self, -1 )
-        self.agc_ref = wx.TextCtrl(self, -1, "")
-        self.agc_ref_s = wx.SpinButton(self, -1 )
-        self.bandwidth = wx.TextCtrl(self, -1, "")
-        self.bw_spin = wx.SpinButton(self, -1 )
-        self.label_9 = wx.StaticText(self, -1, "")
-        self.rssi = wx.Gauge(self, -1, 10, style=wx.GA_HORIZONTAL|wx.GA_SMOOTH)
-        self.fe_panel = wx.Panel(self, -1)
-        self.if_panel = wx.Panel(self, -1)
-
-        self.__set_properties()
-        self.__do_layout()
-
-        self.Bind(wx.EVT_SPINCTRL, self.tune_evt, self.freq_disp)
-        self.Bind(wx.EVT_SPIN_DOWN, self.down_e6, self.spin_e6)
-        self.Bind(wx.EVT_SPIN_UP, self.up_e6, self.spin_e6)
-        self.Bind(wx.EVT_SPIN_DOWN, self.down_e5, self.spin_e5)
-        self.Bind(wx.EVT_SPIN_UP, self.up_e5, self.spin_e5)
-        self.Bind(wx.EVT_SPIN_DOWN, self.down_e4, self.spin_e4)
-        self.Bind(wx.EVT_SPIN_UP, self.up_e4, self.spin_e4)
-        self.Bind(wx.EVT_SPIN_DOWN, self.down_e3, self.spin_e3)
-        self.Bind(wx.EVT_SPIN_UP, self.up_e3, self.spin_e3)
-        self.Bind(wx.EVT_SPIN_DOWN, self.down_e2, self.spin_e2)
-        self.Bind(wx.EVT_SPIN_UP, self.up_e2, self.spin_e2)
-        self.Bind(wx.EVT_SPIN_DOWN, self.down_e1, self.spin_e1)
-        self.Bind(wx.EVT_SPIN_UP, self.up_e1, self.spin_e1)
-        self.Bind(wx.EVT_SPIN_DOWN, self.down_e0, self.spin_e0)
-        self.Bind(wx.EVT_SPIN_UP, self.up_e0, self.spin_e0)
-        self.Bind(wx.EVT_BUTTON, self.set_lsb, self.button_lsb)
-        self.Bind(wx.EVT_BUTTON, self.set_usb, self.button_usb)
-        self.Bind(wx.EVT_BUTTON, self.set_am, self.button_am)
-        self.Bind(wx.EVT_SPINCTRL, self.event_vol, self.volume)
-        self.Bind(wx.EVT_SPINCTRL, self.event_pga, self.pga)
-        self.Bind(wx.EVT_SPIN_DOWN, self.agc_gain_down, self.agc_gain_s)
-        self.Bind(wx.EVT_SPIN_UP, self.agc_gain_up, self.agc_gain_s)
-        self.Bind(wx.EVT_SPIN_DOWN, self.agc_ref_down, self.agc_ref_s)
-        self.Bind(wx.EVT_SPIN_UP, self.agc_ref_up, self.agc_ref_s)
-        self.Bind(wx.EVT_SPIN_DOWN, self.bw_down, self.bw_spin)
-        self.Bind(wx.EVT_SPIN_UP, self.bw_up, self.bw_spin)
-        # end wxGlade
-
-    def __set_properties(self):
-        # begin wxGlade: ui_frame.__set_properties
-        self.SetTitle("frame_1")
-        self.freq_disp.SetFont(wx.Font(32, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, ""))
-        self.rssi.SetMinSize((315, 10))
-        self.rssi.SetForegroundColour(wx.Colour(255, 0, 0))
-        # end wxGlade
-
-    def __do_layout(self):
-        # begin wxGlade: ui_frame.__do_layout
-        sizer_1 = wx.StaticBoxSizer(self.sizer_1_staticbox, wx.VERTICAL)
-        sizer_2 = wx.BoxSizer(wx.HORIZONTAL)
-        sizer_4 = wx.BoxSizer(wx.VERTICAL)
-        grid_sizer_4 = wx.GridSizer(2, 4, 0, 0)
-        sizer_5 = wx.BoxSizer(wx.HORIZONTAL)
-        sizer_7 = wx.BoxSizer(wx.HORIZONTAL)
-        sizer_6 = wx.BoxSizer(wx.HORIZONTAL)
-        grid_sizer_3 = wx.GridSizer(2, 4, 0, 0)
-        sizer_3 = wx.BoxSizer(wx.VERTICAL)
-        grid_sizer_1 = wx.GridSizer(2, 3, 0, 0)
-        grid_sizer_2 = wx.GridSizer(1, 7, 0, 0)
-        sizer_3.Add(self.freq_disp, 1, wx.EXPAND|wx.ADJUST_MINSIZE, 0)
-        grid_sizer_2.Add(self.spin_e6, 0, wx.ADJUST_MINSIZE, 0)
-        grid_sizer_2.Add(self.spin_e5, 0, wx.ADJUST_MINSIZE, 0)
-        grid_sizer_2.Add(self.spin_e4, 0, wx.ADJUST_MINSIZE, 0)
-        grid_sizer_2.Add(self.spin_e3, 0, wx.ADJUST_MINSIZE, 0)
-        grid_sizer_2.Add(self.spin_e2, 0, wx.ADJUST_MINSIZE, 0)
-        grid_sizer_2.Add(self.spin_e1, 0, wx.ADJUST_MINSIZE, 0)
-        grid_sizer_2.Add(self.spin_e0, 0, wx.ADJUST_MINSIZE, 0)
-        grid_sizer_1.Add(grid_sizer_2, 1, wx.EXPAND, 0)
-        grid_sizer_1.Add(self.panel_1, 1, wx.EXPAND, 0)
-        grid_sizer_1.Add(self.panel_2, 1, wx.EXPAND, 0)
-        grid_sizer_1.Add(self.button_lsb, 0, wx.ADJUST_MINSIZE, 0)
-        grid_sizer_1.Add(self.button_usb, 0, wx.ADJUST_MINSIZE, 0)
-        grid_sizer_1.Add(self.button_am, 0, wx.ADJUST_MINSIZE, 0)
-        sizer_3.Add(grid_sizer_1, 1, wx.EXPAND, 0)
-        sizer_2.Add(sizer_3, 1, wx.EXPAND, 0)
-        grid_sizer_3.Add(self.label_1, 0, wx.ADJUST_MINSIZE, 0)
-        grid_sizer_3.Add(self.label_2, 0, wx.ADJUST_MINSIZE, 0)
-        grid_sizer_3.Add(self.agc_level, 0, wx.ADJUST_MINSIZE, 0)
-        grid_sizer_3.Add(self.label_6, 0, wx.ADJUST_MINSIZE, 0)
-        grid_sizer_3.Add(self.volume, 0, wx.ADJUST_MINSIZE, 0)
-        grid_sizer_3.Add(self.pga, 0, wx.ADJUST_MINSIZE, 0)
-        grid_sizer_3.Add(self.agc_max, 0, wx.ADJUST_MINSIZE, 0)
-        grid_sizer_3.Add(self.label_7, 0, wx.ADJUST_MINSIZE, 0)
-        sizer_4.Add(grid_sizer_3, 1, wx.EXPAND, 0)
-        grid_sizer_4.Add(self.label_4, 0, wx.ADJUST_MINSIZE, 0)
-        grid_sizer_4.Add(self.label_5, 0, wx.ADJUST_MINSIZE, 0)
-        grid_sizer_4.Add(self.label_3, 0, wx.ADJUST_MINSIZE, 0)
-        grid_sizer_4.Add(self.label_8, 0, wx.ADJUST_MINSIZE, 0)
-        sizer_6.Add(self.agc_gain, 0, wx.ADJUST_MINSIZE, 0)
-        sizer_6.Add(self.agc_gain_s, 0, wx.ADJUST_MINSIZE, 0)
-        grid_sizer_4.Add(sizer_6, 1, wx.EXPAND, 0)
-        sizer_7.Add(self.agc_ref, 0, wx.ADJUST_MINSIZE, 0)
-        sizer_7.Add(self.agc_ref_s, 0, wx.ADJUST_MINSIZE, 0)
-        grid_sizer_4.Add(sizer_7, 1, wx.EXPAND, 0)
-        sizer_5.Add(self.bandwidth, 0, wx.ADJUST_MINSIZE, 0)
-        sizer_5.Add(self.bw_spin, 0, wx.ADJUST_MINSIZE, 0)
-        grid_sizer_4.Add(sizer_5, 1, wx.EXPAND, 0)
-        grid_sizer_4.Add(self.label_9, 0, wx.ADJUST_MINSIZE, 0)
-        sizer_4.Add(grid_sizer_4, 1, wx.EXPAND, 0)
-        sizer_4.Add(self.rssi, 1, wx.EXPAND|wx.ADJUST_MINSIZE, 0)
-        sizer_2.Add(sizer_4, 1, wx.EXPAND, 0)
-        sizer_1.Add(sizer_2, 1, wx.EXPAND, 0)
-        sizer_1.Add(self.fe_panel, 1, wx.EXPAND, 0)
-        sizer_1.Add(self.if_panel, 1, wx.EXPAND, 0)
-        self.SetAutoLayout(True)
-        self.SetSizer(sizer_1)
-        sizer_1.Fit(self)
-        sizer_1.SetSizeHints(self)
-        self.Layout()
-        # end wxGlade
-
-    def down_e6(self, event): # wxGlade: ui_frame.<event_handler>
-        print "Event handler `down_e6' not implemented"
-        event.Skip()
-
-    def up_e6(self, event): # wxGlade: ui_frame.<event_handler>
-        print "Event handler `up_e6' not implemented"
-        event.Skip()
-
-    def down_e5(self, event): # wxGlade: ui_frame.<event_handler>
-        print "Event handler `down_e5' not implemented"
-        event.Skip()
-
-    def up_e5(self, event): # wxGlade: ui_frame.<event_handler>
-        print "Event handler `up_e5' not implemented"
-        event.Skip()
-
-    def down_e4(self, event): # wxGlade: ui_frame.<event_handler>
-        print "Event handler `down_e4' not implemented"
-        event.Skip()
-
-    def up_e4(self, event): # wxGlade: ui_frame.<event_handler>
-        print "Event handler `up_e4' not implemented"
-        event.Skip()
-
-    def down_e3(self, event): # wxGlade: ui_frame.<event_handler>
-        print "Event handler `down_e3' not implemented"
-        event.Skip()
-
-    def up_e3(self, event): # wxGlade: ui_frame.<event_handler>
-        print "Event handler `up_e3' not implemented"
-        event.Skip()
-
-    def down_e2(self, event): # wxGlade: ui_frame.<event_handler>
-        print "Event handler `down_e2' not implemented"
-        event.Skip()
-
-    def up_e2(self, event): # wxGlade: ui_frame.<event_handler>
-        print "Event handler `up_e2' not implemented"
-        event.Skip()
-
-    def down_e1(self, event): # wxGlade: ui_frame.<event_handler>
-        print "Event handler `down_e1' not implemented"
-        event.Skip()
-
-    def up_e1(self, event): # wxGlade: ui_frame.<event_handler>
-        print "Event handler `up_e1' not implemented"
-        event.Skip()
-
-    def down_e0(self, event): # wxGlade: ui_frame.<event_handler>
-        print "Event handler `down_e0' not implemented"
-        event.Skip()
-
-    def up_e0(self, event): # wxGlade: ui_frame.<event_handler>
-        print "Event handler `up_e0' not implemented"
-        event.Skip()
-
-    def event_vol(self, event): # wxGlade: ui_frame.<event_handler>
-        print "Event handler `event_vol' not implemented"
-        event.Skip()
-
-    def event_pga(self, event): # wxGlade: ui_frame.<event_handler>
-        print "Event handler `event_pga' not implemented"
-        event.Skip()
-
-    def set_lsb(self, event): # wxGlade: ui_frame.<event_handler>
-        print "Event handler `set_lsb' not implemented"
-        event.Skip()
-
-    def set_usb(self, event): # wxGlade: ui_frame.<event_handler>
-        print "Event handler `set_usb' not implemented"
-        event.Skip()
-
-    def set_am(self, event): # wxGlade: ui_frame.<event_handler>
-        print "Event handler `set_am' not implemented"
-        event.Skip()
-
-    def set_bw(self, event): # wxGlade: ui_frame.<event_handler>
-        print "Event handler `set_bw' not implemented"
-        event.Skip()
-
-    def tune_evt(self, event): # wxGlade: ui_frame.<event_handler>
-        print "Event handler `tune_evt' not implemented"
-        event.Skip()
-
-    def bw_down(self, event): # wxGlade: ui_frame.<event_handler>
-        print "Event handler `bw_down' not implemented"
-        event.Skip()
-
-    def bw_up(self, event): # wxGlade: ui_frame.<event_handler>
-        print "Event handler `bw_up' not implemented"
-        event.Skip()
-
-    def agc_gain_down(self, event): # wxGlade: ui_frame.<event_handler>
-        print "Event handler `agc_gain_down' not implemented"
-        event.Skip()
-
-    def agc_gain_up(self, event): # wxGlade: ui_frame.<event_handler>
-        print "Event handler `agc_gain_up' not implemented"
-        event.Skip()
-
-    def agc_ref_down(self, event): # wxGlade: ui_frame.<event_handler>
-        print "Event handler `agc_ref_down' not implemented"
-        event.Skip()
-
-    def agc_ref_up(self, event): # wxGlade: ui_frame.<event_handler>
-        print "Event handler `agc_ref_up' not implemented"
-        event.Skip()
-
-# end of class ui_frame
-
-
-class RadioFrame(wx.Frame):
-    def __init__(self, *args, **kwds):
-        # content of this block not found: did you rename this class?
-        pass
-
-    def __set_properties(self):
-        # content of this block not found: did you rename this class?
-        pass
-
-    def __do_layout(self):
-        # content of this block not found: did you rename this class?
-        pass
-
-# end of class RadioFrame
-
-
-class MyFrame(wx.Frame):
-    def __init__(self, *args, **kwds):
-        # content of this block not found: did you rename this class?
-        pass
-
-    def __set_properties(self):
-        # content of this block not found: did you rename this class?
-        pass
-
-    def __do_layout(self):
-        # content of this block not found: did you rename this class?
-        pass
-
-# end of class MyFrame
-
-
diff --git a/gr-uhd/apps/uhd_fft_wx b/gr-uhd/apps/uhd_fft_wx
deleted file mode 100755
index 0e80de6bd8..0000000000
--- a/gr-uhd/apps/uhd_fft_wx
+++ /dev/null
@@ -1,348 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2012 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-from gnuradio import gr, gru
-from gnuradio import uhd
-from gnuradio import eng_notation
-from gnuradio.eng_option import eng_option
-from optparse import OptionParser
-
-import sys
-import numpy
-
-try:
-    from gnuradio.wxgui import stdgui2, form, slider
-    from gnuradio.wxgui import forms
-    from gnuradio.wxgui import fftsink2, waterfallsink2, scopesink2
-    import wx
-except ImportError:
-    sys.stderr.write("Error importing GNU Radio's wxgui. Please make sure gr-wxgui is installed.\n")
-    sys.exit(1)
-
-class app_top_block(stdgui2.std_top_block):
-    def __init__(self, frame, panel, vbox, argv):
-        stdgui2.std_top_block.__init__(self, frame, panel, vbox, argv)
-
-        self.frame = frame
-        self.panel = panel
-
-        parser = OptionParser(option_class=eng_option)
-        parser.add_option("-a", "--args", type="string", default="",
-                          help="UHD device address args , [default=%default]")
-        parser.add_option("", "--spec", type="string", default=None,
-                          help="Subdevice of UHD device where appropriate")
-        parser.add_option("-A", "--antenna", type="string", default=None,
-                          help="select Rx Antenna where appropriate")
-        parser.add_option("-s", "--samp-rate", type="eng_float", default=1e6,
-                          help="set sample rate (bandwidth) [default=%default]")
-        parser.add_option("-f", "--freq", type="eng_float", default=None,
-                          help="set frequency to FREQ", metavar="FREQ")
-        parser.add_option("-g", "--gain", type="eng_float", default=None,
-                          help="set gain in dB (default is midpoint)")
-        parser.add_option("-W", "--waterfall", action="store_true", default=False,
-                          help="Enable waterfall display")
-        parser.add_option("-S", "--oscilloscope", action="store_true", default=False,
-                          help="Enable oscilloscope display")
-        parser.add_option("", "--avg-alpha", type="eng_float", default=1e-1,
-                          help="Set fftsink averaging factor, default=[%default]")
-        parser.add_option ("", "--averaging", action="store_true", default=False,
-                           help="Enable fftsink averaging, default=[%default]")
-        parser.add_option("", "--ref-scale", type="eng_float", default=1.0,
-                          help="Set dBFS=0dB input value, default=[%default]")
-        parser.add_option("", "--fft-size", type="int", default=1024,
-                          help="Set number of FFT bins [default=%default]")
-        parser.add_option("", "--fft-rate", type="int", default=30,
-                          help="Set FFT update rate, [default=%default]")
-        parser.add_option("", "--wire-format", type="string", default="sc16",
-                          help="Set wire format from USRP [default=%default]")
-        parser.add_option("", "--stream-args", type="string", default="",
-                          help="Set additional stream args [default=%default]")
-        parser.add_option("", "--show-async-msg", action="store_true", default=False,
-                          help="Show asynchronous message notifications from UHD [default=%default]")
-        (options, args) = parser.parse_args()
-        if len(args) != 0:
-            parser.print_help()
-            sys.exit(1)
-        self.options = options
-        self.show_debug_info = True
-
-        self.u = uhd.usrp_source(device_addr=options.args,
-                                 stream_args=uhd.stream_args(cpu_format='fc32',
-                                 otw_format=options.wire_format, args=options.stream_args))
-
-        # Set the subdevice spec
-        if(options.spec):
-            self.u.set_subdev_spec(options.spec, 0)
-
-        # Set the antenna
-        if(options.antenna):
-            self.u.set_antenna(options.antenna, 0)
-
-        self.u.set_samp_rate(options.samp_rate)
-        input_rate = self.u.get_samp_rate()
-
-        if options.waterfall:
-            self.scope = \
-              waterfallsink2.waterfall_sink_c (panel, fft_size=1024,
-                                               sample_rate=input_rate)
-            self.frame.SetMinSize((800, 420))
-        elif options.oscilloscope:
-            self.scope = scopesink2.scope_sink_c(panel, sample_rate=input_rate)
-            self.frame.SetMinSize((800, 600))
-        else:
-            self.scope = fftsink2.fft_sink_c (panel,
-                                              fft_size=options.fft_size,
-                                              sample_rate=input_rate,
-                          ref_scale=options.ref_scale,
-                                              ref_level=20.0,
-                                              y_divs = 12,
-                                              average=options.averaging,
-                          avg_alpha=options.avg_alpha,
-                                              fft_rate=options.fft_rate)
-            def fftsink_callback(x, y):
-                self.set_freq(x)
-
-            self.scope.set_callback(fftsink_callback)
-            self.frame.SetMinSize((800, 420))
-
-        self.connect(self.u, self.scope)
-
-        self._build_gui(vbox)
-        self._setup_events()
-
-
-        # set initial values
-
-        if options.gain is None:
-            # if no gain was specified, use the mid-point in dB
-            g = self.u.get_gain_range()
-            options.gain = float(g.start()+g.stop())/2
-
-        if options.freq is None:
-            # if no freq was specified, use the mid-point
-            r = self.u.get_freq_range()
-            options.freq = float(r.start()+r.stop())/2
-
-        self.set_gain(options.gain)
-
-        if self.show_debug_info:
-            self.myform['samprate'].set_value(self.u.get_samp_rate())
-            self.myform['rffreq'].set_value(0)
-            self.myform['dspfreq'].set_value(0)
-
-        if not(self.set_freq(options.freq)):
-            self._set_status_msg("Failed to set initial frequency")
-
-        # Direct asynchronous notifications to callback function
-        if self.options.show_async_msg:
-            self.async_msgq = gr.msg_queue(0)
-            self.async_src = uhd.amsg_source("", self.async_msgq)
-            self.async_rcv = gru.msgq_runner(self.async_msgq, self.async_callback)
-
-    def async_callback(self, msg):
-        md = self.async_src.msg_to_async_metadata_t(msg)
-        print "Channel: %i Time: %f Event: %i" % (md.channel, md.time_spec.get_real_secs(), md.event_code)
-
-    def _set_status_msg(self, msg):
-        self.frame.GetStatusBar().SetStatusText(msg, 0)
-
-    def _build_gui(self, vbox):
-
-        def _form_set_freq(kv):
-            return self.set_freq(kv['freq'])
-
-        vbox.Add(self.scope.win, 10, wx.EXPAND)
-
-        # add control area at the bottom
-        self.myform = myform = form.form()
-        hbox = wx.BoxSizer(wx.HORIZONTAL)
-        hbox.Add((5,0), 0, 0)
-        myform['freq'] = form.float_field(
-            parent=self.panel, sizer=hbox, label="Center freq", weight=1,
-            callback=myform.check_input_and_call(_form_set_freq,
-                                                 self._set_status_msg))
-
-        hbox.Add((5,0), 0, 0)
-        g = self.u.get_gain_range()
-
-        # some configurations don't have gain control
-        if g.stop() <= g.start():
-            glow = 0.0
-            ghigh = 1.0
-
-        else:
-            glow = g.start()
-            ghigh = g.stop()
-
-        myform['gain'] = form.slider_field(parent=self.panel,
-                                               sizer=hbox, label="Gain",
-                                               weight=3,
-                                               min=int(glow), max=int(ghigh),
-                                               callback=self.set_gain)
-
-        try:
-            mboard_id = self.u.get_usrp_info()["mboard_id"]
-            mboard_serial = self.u.get_usrp_info()["mboard_serial"]
-            if mboard_serial == "":
-                mboard_serial = "no serial"
-            dboard_subdev_name = self.u.get_usrp_info()["rx_subdev_name"]
-            dboard_serial = self.u.get_usrp_info()["rx_serial"]
-            if dboard_serial == "":
-                dboard_serial = "no serial"
-            subdev = self.u.get_subdev_spec()
-            antenna = self.u.get_antenna()
-
-            if "B200" in mboard_id or "B210" in mboard_id:
-                usrp_config_val = "%s (%s), %s (%s, %s)" % (mboard_id, mboard_serial, dboard_subdev_name, subdev, antenna)
-            else:
-                usrp_config_val = "%s (%s), %s (%s, %s, %s)" % (mboard_id, mboard_serial, dboard_subdev_name, dboard_serial, subdev, antenna)
-        except:
-            usrp_config_val = "Not implemented in this version."
-
-        uhd_box = forms.static_box_sizer(parent=self.panel,
-                                         label="UHD (%s)" % (uhd.get_version_string()),
-                                         orient=wx.HORIZONTAL)
-        usrp_config_form = forms.static_text(
-            parent=self.panel,
-            sizer=uhd_box,
-            value=usrp_config_val,
-            label="USRP",
-            converter=forms.str_converter(),
-        )
-        vbox.Add(uhd_box, 0, wx.EXPAND)
-        vbox.AddSpacer(5)
-
-        hbox.Add((5,0), 0, 0)
-        vbox.Add(hbox, 0, wx.EXPAND)
-
-        self._build_subpanel(vbox)
-
-    def _build_subpanel(self, vbox_arg):
-        # build a secondary information panel (sometimes hidden)
-
-        # FIXME figure out how to have this be a subpanel that is always
-        # created, but has its visibility controlled by foo.Show(True/False)
-
-        def _form_set_samp_rate(kv):
-            return self.set_samp_rate(kv['samprate'])
-
-        if not(self.show_debug_info):
-            return
-
-        panel = self.panel
-        vbox = vbox_arg
-        myform = self.myform
-
-        hbox = wx.BoxSizer(wx.HORIZONTAL)
-
-        hbox.Add((5,0), 0)
-        myform['samprate'] = form.float_field(
-            parent=panel, sizer=hbox, label="Sample Rate",
-            callback=myform.check_input_and_call(_form_set_samp_rate,
-                                                 self._set_status_msg))
-
-        hbox.Add((5,0), 1)
-        myform['rffreq'] = form.static_float_field(
-            parent=panel, sizer=hbox, label="RF Freq.")
-
-        hbox.Add((5,0), 1)
-        myform['dspfreq'] = form.static_float_field(
-            parent=panel, sizer=hbox, label="DSP Freq.")
-
-        vbox.AddSpacer(5)
-
-        vbox.Add(hbox, 0, wx.EXPAND)
-        vbox.AddSpacer(5)
-
-    def set_freq(self, target_freq):
-        """
-        Set the center frequency we're interested in.
-
-        @param target_freq: frequency in Hz
-        @rypte: bool
-        """
-        r = self.u.set_center_freq(target_freq, 0)
-
-        if r:
-            self.myform['freq'].set_value(self.u.get_center_freq())
-            self.myform['rffreq'].set_value(r.actual_rf_freq)
-            self.myform['dspfreq'].set_value(r.actual_dsp_freq)
-
-            if not self.options.oscilloscope:
-                self.scope.set_baseband_freq(target_freq)
-            return True
-
-        return False
-
-    def set_gain(self, gain):
-        if self.myform.has_key('gain'):
-            self.myform['gain'].set_value(gain)     # update displayed value
-        self.u.set_gain(gain, 0)
-
-    def set_samp_rate(self, samp_rate):
-        ok = self.u.set_samp_rate(samp_rate)
-        input_rate = self.u.get_samp_rate()
-        self.scope.set_sample_rate(input_rate)
-        if self.show_debug_info:  # update displayed values
-            self.myform['samprate'].set_value(self.u.get_samp_rate())
-
-        # uhd set_samp_rate never fails; always falls back to closest requested.
-        return True
-
-    def _setup_events(self):
-        if not self.options.waterfall and not self.options.oscilloscope:
-            self.scope.win.Bind(wx.EVT_LEFT_DCLICK, self.evt_left_dclick)
-
-    def evt_left_dclick(self, event):
-        (ux, uy) = self.scope.win.GetXY(event)
-        if event.CmdDown():
-            # Re-center on maximum power
-            points = self.scope.win._points
-            if self.scope.win.peak_hold:
-                if self.scope.win.peak_vals is not None:
-                    ind = numpy.argmax(self.scope.win.peak_vals)
-                else:
-                    ind = int(points.shape()[0]/2)
-            else:
-                ind = numpy.argmax(points[:,1])
-
-            (freq, pwr) = points[ind]
-            target_freq = freq/self.scope.win._scale_factor
-            print ind, freq, pwr
-            self.set_freq(target_freq)
-        else:
-            # Re-center on clicked frequency
-            target_freq = ux/self.scope.win._scale_factor
-            self.set_freq(target_freq)
-
-
-def main ():
-    try:
-        app = stdgui2.stdapp(app_top_block, "UHD FFT", nstatus=1)
-        app.MainLoop()
-
-    except RuntimeError, e:
-        print e
-        sys.exit(1)
-
-if __name__ == '__main__':
-    main ()
diff --git a/gr-uhd/examples/python/CMakeLists.txt b/gr-uhd/examples/python/CMakeLists.txt
deleted file mode 100644
index cf50feb148..0000000000
--- a/gr-uhd/examples/python/CMakeLists.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright 2011 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-
-include(GrPython)
-
-GR_PYTHON_INSTALL(
-    PROGRAMS
-    fm_tx4.py
-    fm_tx_2_daughterboards.py
-    max_power.py
-    usrp_am_mw_rcv.py
-    usrp_nbfm_ptt.py
-    usrp_nbfm_rcv.py
-    usrp_spectrum_sense.py
-    usrp_tv_rcv_nogui.py
-    usrp_tv_rcv.py
-    usrp_wfm_rcv2_nogui.py
-    usrp_wfm_rcv_fmdet.py
-    usrp_wfm_rcv_nogui.py
-    usrp_wfm_rcv_pll.py
-    usrp_wfm_rcv.py
-    usrp_wfm_rcv_sca.py
-    usrp_wxapt_rcv.py
-    DESTINATION ${GR_PKG_UHD_EXAMPLES_DIR}
-)
diff --git a/gr-uhd/examples/python/fm_tx4.py b/gr-uhd/examples/python/fm_tx4.py
deleted file mode 100755
index 516033dae1..0000000000
--- a/gr-uhd/examples/python/fm_tx4.py
+++ /dev/null
@@ -1,211 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2005-2007,2011 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-"""
-Transmit N simultaneous narrow band FM signals.
-
-They will be centered at the frequency specified on the command line,
-and will spaced at 25kHz steps from there.
-
-The program opens N files with names audio-N.dat where N is in [0,7].
-These files should contain floating point audio samples in the range [-1,1]
-sampled at 32kS/sec.  You can create files like this using
-audio_to_file.py
-"""
-
-from gnuradio import gr, eng_notation
-from gnuradio import uhd
-from gnuradio import analog
-from gnuradio import blocks
-from gnuradio.eng_option import eng_option
-from optparse import OptionParser
-import math
-import sys
-
-from gnuradio.wxgui import stdgui2, fftsink2
-import wx
-
-
-########################################################
-# instantiate one transmit chain for each call
-
-class pipeline(gr.hier_block2):
-    def __init__(self, filename, lo_freq, audio_rate, if_rate):
-
-        gr.hier_block2.__init__(self, "pipeline",
-                                gr.io_signature(0, 0, 0),
-                                gr.io_signature(1, 1, gr.sizeof_gr_complex))
-
-        try:
-            src = blocks.file_source (gr.sizeof_float, filename, True)
-        except RuntimeError:
-            sys.stderr.write(("\nError: Could not open file '%s'\n\n" % \
-                                  filename))
-            sys.exit(1)
-
-        print audio_rate, if_rate
-        fmtx = analog.nbfm_tx(audio_rate, if_rate, max_dev=5e3,
-	                      tau=75e-6, fh=0.925*if_rate/2.0)
-
-        # Local oscillator
-        lo = analog.sig_source_c(if_rate,            # sample rate
-                                 analog.GR_SIN_WAVE, # waveform type
-                                 lo_freq,            # frequency
-                                 1.0,                # amplitude
-                                 0)                  # DC Offset
-        mixer = blocks.multiply_cc()
-
-        self.connect(src, fmtx, (mixer, 0))
-        self.connect(lo, (mixer, 1))
-        self.connect(mixer, self)
-
-class fm_tx_block(stdgui2.std_top_block):
-    def __init__(self, frame, panel, vbox, argv):
-        MAX_CHANNELS = 7
-        stdgui2.std_top_block.__init__ (self, frame, panel, vbox, argv)
-
-        parser = OptionParser (option_class=eng_option)
-        parser.add_option("-a", "--args", type="string", default="",
-                          help="UHD device address args [default=%default]")
-        parser.add_option("", "--spec", type="string", default=None,
-	                  help="Subdevice of UHD device where appropriate")
-        parser.add_option("-A", "--antenna", type="string", default=None,
-                          help="select Rx Antenna where appropriate")
-        parser.add_option("-s", "--samp-rate", type="eng_float", default=400e3,
-                          help="set sample rate (bandwidth) [default=%default]")
-        parser.add_option("-f", "--freq", type="eng_float", default=None,
-                          help="set frequency to FREQ", metavar="FREQ")
-        parser.add_option("-g", "--gain", type="eng_float", default=None,
-                          help="set gain in dB (default is midpoint)")
-        parser.add_option("-n", "--nchannels", type="int", default=4,
-                           help="number of Tx channels [1,4]")
-        #parser.add_option("","--debug", action="store_true", default=False,
-        #                  help="Launch Tx debugger")
-        (options, args) = parser.parse_args ()
-
-        if len(args) != 0:
-            parser.print_help()
-            sys.exit(1)
-
-        if options.nchannels < 1 or options.nchannels > MAX_CHANNELS:
-            sys.stderr.write ("fm_tx4: nchannels out of range.  Must be in [1,%d]\n" % MAX_CHANNELS)
-            sys.exit(1)
-
-        if options.freq is None:
-            sys.stderr.write("fm_tx4: must specify frequency with -f FREQ\n")
-            parser.print_help()
-            sys.exit(1)
-
-        # ----------------------------------------------------------------
-        # Set up constants and parameters
-
-        self.u = uhd.usrp_sink(device_addr=options.args, stream_args=uhd.stream_args('fc32'))
-
-        # Set the subdevice spec
-        if(options.spec):
-            self.u.set_subdev_spec(options.spec, 0)
-
-        # Set the antenna
-        if(options.antenna):
-            self.u.set_antenna(options.antenna, 0)
-
-        self.usrp_rate = options.samp_rate
-        self.u.set_samp_rate(self.usrp_rate)
-        self.usrp_rate = self.u.get_samp_rate()
-
-        self.sw_interp = 10
-        self.audio_rate = self.usrp_rate / self.sw_interp    # 32 kS/s
-
-        if options.gain is None:
-            # if no gain was specified, use the mid-point in dB
-            g = self.u.get_gain_range()
-            options.gain = float(g.start()+g.stop())/2
-
-        self.set_gain(options.gain)
-        self.set_freq(options.freq)
-
-        self.sum = blocks.add_cc ()
-
-        # Instantiate N NBFM channels
-        step = 25e3
-        offset = (0 * step, 1 * step, -1 * step,
-                  2 * step, -2 * step, 3 * step, -3 * step)
-
-        for i in range (options.nchannels):
-            t = pipeline("audio-%d.dat" % (i % 4), offset[i],
-                         self.audio_rate, self.usrp_rate)
-            self.connect(t, (self.sum, i))
-
-        self.gain = blocks.multiply_const_cc (1.0 / options.nchannels)
-
-        # connect it all
-        self.connect (self.sum, self.gain)
-        self.connect (self.gain, self.u)
-
-        # plot an FFT to verify we are sending what we want
-        if 1:
-            post_mod = fftsink2.fft_sink_c(panel, title="Post Modulation",
-                                           fft_size=512,
-                                           sample_rate=self.usrp_rate,
-                                           y_per_div=20,
-                                           ref_level=40)
-            self.connect (self.gain, post_mod)
-            vbox.Add (post_mod.win, 1, wx.EXPAND)
-
-
-        #if options.debug:
-        #    self.debugger = tx_debug_gui.tx_debug_gui(self.subdev)
-        #    self.debugger.Show(True)
-
-
-    def set_freq(self, target_freq):
-        """
-        Set the center frequency we're interested in.
-
-        Args:
-            target_freq: frequency in Hz
-        @rypte: bool
-
-        Tuning is a two step process.  First we ask the front-end to
-        tune as close to the desired frequency as it can.  Then we use
-        the result of that operation and our target_frequency to
-        determine the value for the digital up converter.  Finally, we feed
-        any residual_freq to the s/w freq translater.
-        """
-
-        r = self.u.set_center_freq(target_freq, 0)
-        if r:
-            print "Frequency =", eng_notation.num_to_str(self.u.get_center_freq())
-            return True
-
-        return False
-
-    def set_gain(self, gain):
-        self.u.set_gain(gain, 0)
-
-
-def main ():
-    app = stdgui2.stdapp(fm_tx_block, "Multichannel FM Tx", nstatus=1)
-    app.MainLoop ()
-
-if __name__ == '__main__':
-    main ()
diff --git a/gr-uhd/examples/python/fm_tx_2_daughterboards.py b/gr-uhd/examples/python/fm_tx_2_daughterboards.py
deleted file mode 100755
index b4958b8596..0000000000
--- a/gr-uhd/examples/python/fm_tx_2_daughterboards.py
+++ /dev/null
@@ -1,216 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2005-2007,2011,2012 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-"""
-Transmit 2 signals, one out each daughterboard.
-
-Outputs SSB (USB) signals on side A and side B at frequencies
-specified on command line.
-
-Side A is 600 Hz tone.
-Side B is 350 + 440 Hz tones.
-"""
-
-from gnuradio import gr, uhd
-from gnuradio import filter
-from gnuradio import analog
-from gnuradio import blocks
-from gnuradio.eng_notation import num_to_str, str_to_num
-from gnuradio.eng_option import eng_option
-from optparse import OptionParser
-import math
-import sys
-
-
-class example_signal_0(gr.hier_block2):
-    """
-    Sinusoid at 600 Hz.
-    """
-    def __init__(self, sample_rate):
-        gr.hier_block2.__init__(self, "example_signal_0",
-                                gr.io_signature(0, 0, 0),                    # Input signature
-                                gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature
-
-        src = analog.sig_source_c(sample_rate,        # sample rate
-                                  analog.GR_SIN_WAVE, # waveform type
-                                  600,                # frequency
-                                  1.0,                # amplitude
-                                  0)                 # DC Offset
-
-        self.connect(src, self)
-
-
-class example_signal_1(gr.hier_block2):
-    """
-    North American dial tone (350 + 440 Hz).
-    """
-    def __init__(self, sample_rate):
-        gr.hier_block2.__init__(self, "example_signal_1",
-                                gr.io_signature(0, 0, 0),                    # Input signature
-                                gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature
-
-        src0 = analog.sig_source_c(sample_rate,        # sample rate
-                                   analog.GR_SIN_WAVE, # waveform type
-                                   350,                # frequency
-                                   1.0,                # amplitude
-                                   0)                  # DC Offset
-
-        src1 = analog.sig_source_c(sample_rate,        # sample rate
-                                   analog.GR_SIN_WAVE, # waveform type
-                                   440,                # frequency
-                                   1.0,                # amplitude
-                                   0)                  # DC Offset
-        sum = blocks.add_cc()
-        self.connect(src0, (sum, 0))
-        self.connect(src1, (sum, 1))
-        self.connect(sum, self)
-
-class my_top_block(gr.top_block):
-
-    def __init__(self):
-        gr.top_block.__init__(self)
-
-        usage = "%prog: [options] tx-freq0 tx-freq1"
-        parser = OptionParser (option_class=eng_option, usage=usage)
-        parser.add_option("-a", "--args", type="string", default="",
-                          help="UHD device address args [default=%default]")
-        parser.add_option("", "--spec", type="string", default=None,
-	                  help="Subdevice of UHD device where appropriate")
-        parser.add_option("-A", "--antenna", type="string", default=None,
-                          help="select Rx Antenna where appropriate")
-        parser.add_option("-s", "--samp-rate", type="eng_float", default=320e3,
-                          help="set sample rate [default=%default]")
-        parser.add_option("-g", "--gain", type="eng_float", default=None,
-                          help="set gain in dB (default is midpoint)")
-        (options, args) = parser.parse_args ()
-
-        if len(args) != 2:
-            parser.print_help()
-            raise SystemExit
-        else:
-            freq0 = str_to_num(args[0])
-            freq1 = str_to_num(args[1])
-
-        # ----------------------------------------------------------------
-        # Set up USRP to transmit on both daughterboards
-
-        d = uhd.find_devices(uhd.device_addr(options.args))
-        uhd_type = d[0].get('type')
-
-        stream_args = uhd.stream_args('fc32', channels=range(2))
-        self.u = uhd.usrp_sink(device_addr=options.args, stream_args=stream_args)
-
-        # Set up USRP system based on type
-        if(uhd_type == "usrp"):
-            self.u.set_subdev_spec("A:0 B:0")
-            tr0 = uhd.tune_request(freq0)
-            tr1 = uhd.tune_request(freq1)
-
-        else:
-            if abs(freq0 - freq1) > 5.5e6:
-                sys.stderr.write("\nError: When not using two separate d'boards, frequencies must bewithin 5.5MHz of each other.\n")
-                raise SystemExit
-
-            self.u.set_subdev_spec("A:0 A:0")
-
-            mid_freq = (freq0 + freq1)/2.0
-            tr0 = uhd.tune_request(freq0, rf_freq=mid_freq,
-                                   rf_freq_policy=uhd.tune_request.POLICY_MANUAL)
-
-            tr1 = uhd.tune_request(freq1, rf_freq=mid_freq,
-                                   rf_freq_policy=uhd.tune_request.POLICY_MANUAL)
-
-        # Use the tune requests to tune each channel
-        self.set_freq(tr0, 0)
-        self.set_freq(tr1, 1)
-
-        self.usrp_rate  = options.samp_rate
-
-        self.u.set_samp_rate(self.usrp_rate)
-        dev_rate = self.u.get_samp_rate()
-
-        # ----------------------------------------------------------------
-        # build two signal sources, interleave them, amplify and
-        # connect them to usrp
-
-        sig0 = example_signal_0(self.usrp_rate)
-        sig1 = example_signal_1(self.usrp_rate)
-
-        intl = blocks.interleave(gr.sizeof_gr_complex)
-        self.connect(sig0, (intl, 0))
-        self.connect(sig1, (intl, 1))
-
-        # Correct for any difference in requested and actual rates
-        rrate = self.usrp_rate / dev_rate
-        resamp = filter.pfb.arb_resampler_ccf(rrate)
-
-        # and wire them up
-        self.connect(intl, resamp, self.u)
-
-        if options.gain is None:
-            # if no gain was specified, use the mid-point in dB
-            g = self.u.get_gain_range()
-            options.gain = float(g.start()+g.stop())/2.0
-
-        self.set_gain(options.gain, 0)
-        self.set_gain(options.gain, 1)
-
-        # Set the subdevice spec
-        if(options.spec):
-            self.u.set_subdev_spec(options.spec, 0)
-
-        # Set the antenna
-        if(options.antenna):
-            self.u.set_antenna(options.antenna, 0)
-            self.u.set_antenna(options.antenna, 1)
-
-    def set_freq(self, target_freq, chan):
-        """
-        Set the center frequency we're interested in.
-
-        Args:
-            side: 0 = side A, 1 = side B
-            target_freq: frequency in Hz
-        @rtype: bool
-        """
-
-        print "Tuning channel %s to %sHz" % \
-            (chan, num_to_str(target_freq))
-
-        r = self.u.set_center_freq(target_freq, chan)
-
-        if r:
-            return True
-
-        else:
-            print "  Set Frequency Failed!"
-
-        return False
-
-    def set_gain(self, gain, chan):
-        self.u.set_gain(gain, chan)
-
-if __name__ == '__main__':
-    try:
-        my_top_block().run()
-    except KeyboardInterrupt:
-        pass
diff --git a/gr-uhd/examples/python/freq_hopping.py b/gr-uhd/examples/python/freq_hopping.py
deleted file mode 100755
index ce33a92a51..0000000000
--- a/gr-uhd/examples/python/freq_hopping.py
+++ /dev/null
@@ -1,220 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2014 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-"""
-TXs a waveform (either from a file, or a sinusoid) in a frequency-hopping manner.
-"""
-
-import numpy
-import argparse
-import pmt
-from gnuradio import gr
-from gnuradio import blocks
-from gnuradio import uhd
-
-def setup_parser():
-    """ Setup the parser for the frequency hopper. """
-    parser = argparse.ArgumentParser(
-        description="Transmit a signal in a frequency-hopping manner, using tx_freq tags."
-    )
-    parser.add_argument('-i', '--input-file', type=file, default=None,
-            help="File with samples to transmit. If left out, will transmit a sinusoid.")
-    parser.add_argument("-a", "--args", default="",
-            help="UHD device address args.")
-    parser.add_argument("--spec", default="",
-            help="UHD subdev spec.")
-    parser.add_argument("--antenna", default="",
-            help="UHD antenna settings.")
-    parser.add_argument("--gain", default=None, type=float,
-            help="USRP gain (defaults to mid-point in dB).")
-    parser.add_argument("-r", "--rate", type=float, default=1e6,
-            help="Sampling rate")
-    parser.add_argument("-N", "--samp-per-burst", type=int, default=10000,
-            help="Samples per burst")
-    parser.add_argument("-t", "--hop-time", type=float, default=1000,
-            help="Time between hops in milliseconds. This must be larger than or equal to the burst duration as set by --samp-per-burst")
-    parser.add_argument("-f", "--freq", type=float, default=2.45e9,
-            help="Base frequency. This is the middle channel frequency at which the USRP will Tx.")
-    parser.add_argument("--dsp", action='store_true',
-            help="DSP tuning only.")
-    parser.add_argument("-d", "--freq-delta", type=float, default=1e6,
-            help="Channel spacing.")
-    parser.add_argument("-c", "--num-channels", type=int, default=5,
-            help="Number of channels.")
-    parser.add_argument("-B", "--num-bursts", type=int, default=30,
-            help="Number of bursts to transmit before terminating.")
-    parser.add_argument("-p", "--post-tuning", action='count',
-            help="Tune after transmitting. Default is to tune immediately before transmitting.")
-    parser.add_argument("-v", "--verbose", action='count',
-            help="Print more information. The morer the printier.")
-    return parser
-
-
-class FrequencyHopperSrc(gr.hier_block2):
-    """ Provides tags for frequency hopping """
-    def __init__(
-            self,
-            n_bursts, n_channels,
-            freq_delta, base_freq, dsp_tuning,
-            burst_length, base_time, hop_time,
-            post_tuning=False,
-            tx_gain=0,
-            verbose=False
-        ):
-        gr.hier_block2.__init__(self,
-            "FrequencyHopperSrc",
-            gr.io_signature(1, 1, gr.sizeof_gr_complex),
-            gr.io_signature(1, 1, gr.sizeof_gr_complex),
-        )
-        n_samples_total = n_bursts * burst_length
-        lowest_frequency = base_freq - numpy.floor(n_channels/2) * freq_delta
-        self.hop_sequence = [lowest_frequency + n * freq_delta for n in xrange(n_channels)]
-        numpy.random.shuffle(self.hop_sequence)
-        # Repeat that:
-        self.hop_sequence = [self.hop_sequence[x % n_channels] for x in xrange(n_bursts)]
-        if verbose:
-            print "Hop Frequencies  | Hop Pattern"
-            print "=================|================================"
-            for f in self.hop_sequence:
-                print "{:6.3f} MHz      |  ".format(f/1e6),
-                if n_channels < 50:
-                    print " " * int((f - base_freq) / freq_delta) + "#"
-                else:
-                    print "\n"
-            print "=================|================================"
-        # There's no real point in setting the gain via tag for this application,
-        # but this is an example to show you how to do it.
-        gain_tag = gr.tag_t()
-        gain_tag.offset = 0
-        gain_tag.key = pmt.string_to_symbol('tx_command')
-        gain_tag.value = pmt.to_pmt({'gain': tx_gain})
-        tag_list = [gain_tag,]
-        for i in xrange(len(self.hop_sequence)):
-            tune_tag = gr.tag_t()
-            tune_tag.offset = i * burst_length
-            if i > 0 and post_tuning and not dsp_tuning: # TODO dsp_tuning should also be able to do post_tuning
-                tune_tag.offset -= 1 # Move it to last sample of previous burst
-            if dsp_tuning:
-                tune_tag.key = pmt.string_to_symbol('tx_command')
-                tune_tag.value = pmt.to_pmt({'lo_freq': base_freq, 'dsp_freq': base_freq - self.hop_sequence[i]})
-            else:
-                tune_tag.key = pmt.string_to_symbol('tx_freq')
-                tune_tag.value = pmt.to_pmt(self.hop_sequence[i])
-            tag_list.append(tune_tag)
-            length_tag = gr.tag_t()
-            length_tag.offset = i * burst_length
-            length_tag.key = pmt.string_to_symbol('packet_len')
-            length_tag.value = pmt.from_long(burst_length)
-            tag_list.append(length_tag)
-            time_tag = gr.tag_t()
-            time_tag.offset = i * burst_length
-            time_tag.key = pmt.string_to_symbol('tx_time')
-            time_tag.value = pmt.make_tuple(
-                    pmt.from_uint64(int(base_time + i * hop_time)),
-                    pmt.from_double((base_time + i * hop_time) % 1),
-            )
-            tag_list.append(time_tag)
-        tag_source = blocks.vector_source_c((1.0,) * n_samples_total, repeat=False, tags=tag_list)
-        mult = blocks.multiply_cc()
-        self.connect(self, mult, self)
-        self.connect(tag_source, (mult, 1))
-
-
-class FlowGraph(gr.top_block):
-    """ Flow graph that does the frequency hopping. """
-    def __init__(self, options):
-        gr.top_block.__init__(self)
-
-        if options.input_file is not None:
-            src = blocks.file_source(gr.sizeof_gr_complex, options.filename, repeat=True)
-        else:
-            src = blocks.vector_source_c((.5,) * int(1e6) * 2, repeat=True)
-        # Setup USRP
-        self.u = uhd.usrp_sink(options.args, uhd.stream_args('fc32'), "packet_len")
-        if(options.spec):
-            self.u.set_subdev_spec(options.spec, 0)
-        if(options.antenna):
-            self.u.set_antenna(options.antenna, 0)
-        self.u.set_samp_rate(options.rate)
-        # Gain is set in the hopper block
-        if options.gain is None:
-            g = self.u.get_gain_range()
-            options.gain = float(g.start()+g.stop())/2.0
-        print "-- Setting gain to {} dB".format(options.gain)
-        r = self.u.set_center_freq(options.freq)
-        if not r:
-            print '[ERROR] Failed to set base frequency.'
-            raise SystemExit, 1
-        hopper_block = FrequencyHopperSrc(
-                options.num_bursts, options.num_channels,
-                options.freq_delta, options.freq, options.dsp,
-                options.samp_per_burst, 1.0, options.hop_time / 1000.,
-                options.post_tuning,
-                options.gain,
-                options.verbose,
-        )
-        self.connect(src, hopper_block, self.u)
-
-def print_hopper_stats(args):
-    """ Nothing to do with Grace Hopper """
-    print """
-Parameter          | Value
-===================+=========================
-Hop Interval       | {hop_time} ms
-Burst duration     | {hop_duration} ms
-Lowest Frequency   | {lowest_freq:6.3f} MHz
-Highest Frequency  | {highest_freq:6.3f} MHz
-Frequency spacing  | {freq_delta:6.4f} MHz
-Number of channels | {num_channels}
-Sampling rate      | {rate} Msps
-Transmit Gain      | {gain} dB
-===================+=========================
-    """.format(
-            hop_time=args.hop_time,
-            hop_duration=1000.0/args.rate*args.samp_per_burst,
-            gain=args.gain,
-            lowest_freq=args.freq/1e6,
-            highest_freq=(args.freq + (args.num_channels-1) * args.freq_delta)/1e6,
-            freq_delta=args.freq_delta/1e6,
-            num_channels=args.num_channels,
-            rate=args.rate/1e6,
-        )
-
-def main():
-    """ Go, go, go! """
-    args = setup_parser().parse_args()
-    if (1.0 * args.samp_per_burst / args.rate) > args.hop_time * 1e-3:
-        print "Burst duration must be smaller than hop time."
-        exit(1)
-    if args.verbose:
-        print_hopper_stats(args)
-    top_block = FlowGraph(args)
-    print "Starting to hop, skip and jump... press Ctrl+C to exit."
-    top_block.u.set_time_now(uhd.time_spec(0.0))
-    top_block.run()
-
-if __name__ == '__main__':
-    try:
-        main()
-    except KeyboardInterrupt:
-        pass
-
diff --git a/gr-uhd/examples/python/max_power.py b/gr-uhd/examples/python/max_power.py
deleted file mode 100755
index e1504e5ea2..0000000000
--- a/gr-uhd/examples/python/max_power.py
+++ /dev/null
@@ -1,142 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2004,2007,2011,2012 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-"""
-Setup USRP for maximum power consumption.
-"""
-
-
-from gnuradio import gr
-from gnuradio import analog
-from gnuradio import blocks
-from gnuradio import uhd
-from gnuradio.eng_option import eng_option
-from optparse import OptionParser
-
-from gnuradio import eng_notation
-
-n2s = eng_notation.num_to_str
-
-# Set this to a huge number; UHD will adjust to the
-# maximum the USRP xxxx device can handle
-MAX_RATE = 1000e6
-
-class build_block(gr.top_block):
-    def __init__(self, args, tx_enable, rx_enable):
-        gr.top_block.__init__(self)
-
-        d = uhd.find_devices(uhd.device_addr(args))
-        uhd_type = d[0].get('type')
-
-        print "\nFound '%s' at args '%s'" % \
-            (uhd_type, args)
-
-        # Test the type of USRP; if it's a USRP (v1), it has
-        # 2 channels; otherwise, it has 1 channel
-        if uhd_type == "usrp":
-            tx_nchan = 2
-            rx_nchan = 2
-        else:
-            tx_nchan = 1
-            rx_nchan = 1
-
-        if tx_enable:
-            print "\nTRANSMIT CHAIN"
-            stream_args = uhd.stream_args('fc32', channels=range(tx_nchan))
-            self.u_tx = uhd.usrp_sink(device_addr=args, stream_args=stream_args)
-            self.u_tx.set_samp_rate(MAX_RATE)
-
-            self.tx_src0 = analog.sig_source_c(self.u_tx.get_samp_rate(),
-                                               analog.GR_CONST_WAVE,
-                                               0, 1.0, 0)
-
-            # Get dboard gain range and select maximum
-            tx_gain_range = self.u_tx.get_gain_range()
-            tx_gain = tx_gain_range.stop()
-
-            # Get dboard freq range and select midpoint
-            tx_freq_range = self.u_tx.get_freq_range()
-            tx_freq_mid = (tx_freq_range.start() + tx_freq_range.stop())/2.0
-
-            for i in xrange(tx_nchan):
-                self.u_tx.set_center_freq (tx_freq_mid + i*1e6, i)
-                self.u_tx.set_gain(tx_gain, i)
-
-            print "\nTx Sample Rate: %ssps" % (n2s(self.u_tx.get_samp_rate()))
-            for i in xrange(tx_nchan):
-                print "Tx Channel %d: " % (i)
-                print "\tFrequency = %sHz" % \
-                    (n2s(self.u_tx.get_center_freq(i)))
-                print "\tGain = %f dB" % (self.u_tx.get_gain(i))
-            print ""
-
-            self.connect (self.tx_src0, self.u_tx)
-
-        if rx_enable:
-            print "\nRECEIVE CHAIN"
-            self.u_rx = uhd.usrp_source(device_addr=args,
-                                        io_type=uhd.io_type.COMPLEX_FLOAT32,
-                                        num_channels=rx_nchan)
-            self.rx_dst0 = blocks.null_sink(gr.sizeof_gr_complex)
-
-            self.u_rx.set_samp_rate(MAX_RATE)
-
-            # Get dboard gain range and select maximum
-            rx_gain_range = self.u_rx.get_gain_range()
-            rx_gain = rx_gain_range.stop()
-
-            # Get dboard freq range and select midpoint
-            rx_freq_range = self.u_rx.get_freq_range()
-            rx_freq_mid = (rx_freq_range.start() + rx_freq_range.stop())/2.0
-
-            for i in xrange(tx_nchan):
-                self.u_rx.set_center_freq (rx_freq_mid + i*1e6, i)
-                self.u_rx.set_gain(rx_gain, i)
-
-            print "\nRx Sample Rate: %ssps" % (n2s(self.u_rx.get_samp_rate()))
-            for i in xrange(rx_nchan):
-                print "Rx Channel %d: " % (i)
-                print "\tFrequency = %sHz" % \
-                    (n2s(self.u_rx.get_center_freq(i)))
-                print "\tGain = %f dB" % (self.u_rx.get_gain(i))
-            print ""
-
-            self.connect (self.u_rx, self.rx_dst0)
-
-def main ():
-    parser = OptionParser (option_class=eng_option)
-    parser.add_option("-a", "--args", type="string", default="",
-                      help="UHD device address args [default=%default]")
-    parser.add_option("-t", action="store_true", dest="tx_enable",
-                      default=False, help="enable Tx path")
-    parser.add_option("-r", action="store_true", dest="rx_enable",
-                      default=False, help="enable Rx path")
-    (options, args) = parser.parse_args ()
-
-    tb = build_block (options.args, options.tx_enable, options.rx_enable)
-
-    tb.start ()
-    raw_input ('Press Enter to quit: ')
-    tb.stop ()
-
-if __name__ == '__main__':
-    main ()
diff --git a/gr-uhd/examples/python/usrp_am_mw_rcv.py b/gr-uhd/examples/python/usrp_am_mw_rcv.py
deleted file mode 100755
index eebbd7c041..0000000000
--- a/gr-uhd/examples/python/usrp_am_mw_rcv.py
+++ /dev/null
@@ -1,316 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2005-2007,2011,2012 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-from gnuradio import gr, eng_notation
-from gnuradio import blocks
-from gnuradio import filter
-from gnuradio import analog
-from gnuradio import audio
-from gnuradio import uhd
-from gnuradio.eng_option import eng_option
-from gnuradio.wxgui import slider, powermate
-from gnuradio.wxgui import stdgui2, fftsink2, form
-from optparse import OptionParser
-import sys
-import math
-import wx
-
-class wfm_rx_block (stdgui2.std_top_block):
-    def __init__(self, frame, panel, vbox, argv):
-        stdgui2.std_top_block.__init__ (self, frame, panel, vbox, argv)
-
-        parser=OptionParser(option_class=eng_option)
-        parser.add_option("-a", "--args", type="string", default="",
-                          help="UHD device address args [default=%default]")
-        parser.add_option("", "--spec", type="string", default=None,
-	                  help="Subdevice of UHD device where appropriate")
-        parser.add_option("-A", "--antenna", type="string", default=None,
-                          help="select Rx Antenna where appropriate")
-        parser.add_option("-s", "--samp-rate", type="eng_float", default=1e6,
-                          help="set sample rate (bandwidth) [default=%default]")
-        parser.add_option("-f", "--freq", type="eng_float", default=1008.0e3,
-                          help="set frequency to FREQ", metavar="FREQ")
-        parser.add_option("-I", "--use-if-freq", action="store_true", default=False,
-                          help="use intermediate freq (compensates DC problems in quadrature boards)" )
-        parser.add_option("-g", "--gain", type="eng_float", default=None,
-                          help="set gain in dB (default is maximum)")
-        parser.add_option("-V", "--volume", type="eng_float", default=None,
-                          help="set volume (default is midpoint)")
-        parser.add_option("-O", "--audio-output", type="string", default="default",
-                          help="pcm device name.  E.g., hw:0,0 or surround51 or /dev/dsp")
-
-        (options, args) = parser.parse_args()
-        if len(args) != 0:
-            parser.print_help()
-            sys.exit(1)
-
-        self.frame = frame
-        self.panel = panel
-        self.use_IF=options.use_if_freq
-        if self.use_IF:
-          self.IF_freq=64000.0
-        else:
-          self.IF_freq=0.0
-
-        self.vol = 0
-        self.state = "FREQ"
-        self.freq = 0
-
-        # build graph
-        self.u = uhd.usrp_source(device_addr=options.args, stream_args=uhd.stream_args('fc32'))
-
-        # Set the subdevice spec
-        if(options.spec):
-            self.u.set_subdev_spec(options.spec, 0)
-
-        # Set the antenna
-        if(options.antenna):
-            self.u.set_antenna(options.antenna, 0)
-
-        usrp_rate  = 256e3
-        demod_rate = 64e3
-        audio_rate = 32e3
-        chanfilt_decim = int(usrp_rate // demod_rate)
-        audio_decim = int(demod_rate // audio_rate)
-
-        self.u.set_samp_rate(usrp_rate)
-        dev_rate = self.u.get_samp_rate()
-
-        # Resample signal to exactly self.usrp_rate
-        # FIXME: make one of the follow-on filters an arb resampler
-        rrate = usrp_rate / dev_rate
-        self.resamp = filter.pfb.arb_resampler_ccf(rrate)
-
-        chan_filt_coeffs = filter.firdes.low_pass_2(1,          # gain
-                                                    usrp_rate,  # sampling rate
-                                                    8e3,        # passband cutoff
-                                                    4e3,        # transition bw
-                                                    60)         # stopband attenuation
-
-        if self.use_IF:
-          # Turn If to baseband and filter.
-          self.chan_filt = filter.freq_xlating_fir_filter_ccf(chanfilt_decim,
-                                                              chan_filt_coeffs,
-                                                              self.IF_freq,
-                                                              usrp_rate)
-        else:
-          self.chan_filt = filter.fir_filter_ccf(chanfilt_decim, chan_filt_coeffs)
-
-        self.agc = analog.agc_cc(0.1, 1, 1, 100000)
-        self.am_demod = blocks.complex_to_mag()
-        self.volume_control = blocks.multiply_const_ff(self.vol)
-
-        audio_filt_coeffs = filter.firdes.low_pass_2(1,          # gain
-                                                     demod_rate, # sampling rate
-                                                     8e3,        # passband cutoff
-                                                     2e3,        # transition bw
-                                                     60)         # stopband attenuation
-        self.audio_filt = filter.fir_filter_fff(audio_decim, audio_filt_coeffs)
-
-        # sound card as final sink
-        self.audio_sink = audio.sink(int (audio_rate),
-                                      options.audio_output,
-                                      False)  # ok_to_block
-
-        # now wire it all together
-        self.connect (self.u, self.resamp, self.chan_filt, self.agc,
-                      self.am_demod, self.audio_filt,
-                      self.volume_control, self.audio_sink)
-
-        self._build_gui(vbox, usrp_rate, demod_rate, audio_rate)
-
-        if options.gain is None:
-            g = self.u.get_gain_range()
-            # if no gain was specified, use the mid gain
-            options.gain = (g.start() + g.stop())/2.0
-
-        if options.volume is None:
-            v = self.volume_range()
-            options.volume = float(v[0]*3+v[1])/4.0
-
-        if abs(options.freq) < 1e3:
-            options.freq *= 1e3
-
-        # set initial values
-
-        self.set_gain(options.gain)
-        self.set_vol(options.volume)
-        if not(self.set_freq(options.freq)):
-            self._set_status_msg("Failed to set initial frequency")
-
-    def _set_status_msg(self, msg, which=0):
-        self.frame.GetStatusBar().SetStatusText(msg, which)
-
-
-    def _build_gui(self, vbox, usrp_rate, demod_rate, audio_rate):
-
-        def _form_set_freq(kv):
-            return self.set_freq(kv['freq'])
-
-
-        if 0:
-            self.src_fft = fftsink2.fft_sink_c(self.panel, title="Data from USRP",
-                                               fft_size=512, sample_rate=usrp_rate,
-					       ref_scale=32768.0, ref_level=0.0, y_divs=12)
-            self.connect (self.u, self.src_fft)
-            vbox.Add (self.src_fft.win, 4, wx.EXPAND)
-
-        if 0:
-            self.post_filt_fft = fftsink2.fft_sink_c(self.panel, title="Post Channel filter",
-                                               fft_size=512, sample_rate=demod_rate)
-            self.connect (self.chan_filt, self.post_filt_fft)
-            vbox.Add (self.post_filt_fft.win, 4, wx.EXPAND)
-
-        if 0:
-            post_demod_fft = fftsink2.fft_sink_f(self.panel, title="Post Demod",
-                                                fft_size=1024, sample_rate=demod_rate,
-                                                y_per_div=10, ref_level=0)
-            self.connect (self.am_demod, post_demod_fft)
-            vbox.Add (post_demod_fft.win, 4, wx.EXPAND)
-
-        if 1:
-            audio_fft = fftsink2.fft_sink_f(self.panel, title="Audio",
-                                                  fft_size=512, sample_rate=audio_rate,
-                                                  y_per_div=10, ref_level=20)
-            self.connect (self.audio_filt, audio_fft)
-            vbox.Add (audio_fft.win, 4, wx.EXPAND)
-
-
-        # control area form at bottom
-        self.myform = myform = form.form()
-
-        hbox = wx.BoxSizer(wx.HORIZONTAL)
-        hbox.Add((5,0), 0)
-        myform['freq'] = form.float_field(
-            parent=self.panel, sizer=hbox, label="Freq", weight=1,
-            callback=myform.check_input_and_call(_form_set_freq, self._set_status_msg))
-
-        hbox.Add((5,0), 0)
-        myform['freq_slider'] = \
-            form.quantized_slider_field(parent=self.panel, sizer=hbox, weight=3,
-                                        range=(520.0e3, 1611.0e3, 1.0e3),
-                                        callback=self.set_freq)
-        hbox.Add((5,0), 0)
-        vbox.Add(hbox, 0, wx.EXPAND)
-
-        hbox = wx.BoxSizer(wx.HORIZONTAL)
-        hbox.Add((5,0), 0)
-
-        myform['volume'] = \
-            form.quantized_slider_field(parent=self.panel, sizer=hbox, label="Volume",
-                                        weight=3, range=self.volume_range(),
-                                        callback=self.set_vol)
-        hbox.Add((5,0), 1)
-
-        g = self.u.get_gain_range()
-        myform['gain'] = \
-            form.quantized_slider_field(parent=self.panel, sizer=hbox, label="Gain",
-                                        weight=3, range=(g.start(), g.stop(), g.step()),
-                                        callback=self.set_gain)
-        hbox.Add((5,0), 0)
-        vbox.Add(hbox, 0, wx.EXPAND)
-
-        try:
-            self.knob = powermate.powermate(self.frame)
-            self.rot = 0
-            powermate.EVT_POWERMATE_ROTATE (self.frame, self.on_rotate)
-            powermate.EVT_POWERMATE_BUTTON (self.frame, self.on_button)
-        except:
-            print "FYI: No Powermate or Contour Knob found"
-
-
-    def on_rotate (self, event):
-        self.rot += event.delta
-        if (self.state == "FREQ"):
-            if self.rot >= 3:
-                self.set_freq(self.freq + .1e6)
-                self.rot -= 3
-            elif self.rot <=-3:
-                self.set_freq(self.freq - .1e6)
-                self.rot += 3
-        else:
-            step = self.volume_range()[2]
-            if self.rot >= 3:
-                self.set_vol(self.vol + step)
-                self.rot -= 3
-            elif self.rot <=-3:
-                self.set_vol(self.vol - step)
-                self.rot += 3
-
-    def on_button (self, event):
-        if event.value == 0:        # button up
-            return
-        self.rot = 0
-        if self.state == "FREQ":
-            self.state = "VOL"
-        else:
-            self.state = "FREQ"
-        self.update_status_bar ()
-
-
-    def set_vol (self, vol):
-        g = self.volume_range()
-        self.vol = max(g[0], min(g[1], vol))
-        self.volume_control.set_k(10**(self.vol/10))
-        self.myform['volume'].set_value(self.vol)
-        self.update_status_bar ()
-
-    def set_freq(self, target_freq):
-        """
-        Set the center frequency we're interested in.
-
-        Args:
-            target_freq: frequency in Hz
-        @rypte: bool
-        """
-        r = self.u.set_center_freq(target_freq  + self.IF_freq, 0)
-
-        if r:
-            self.freq = target_freq
-            self.myform['freq'].set_value(target_freq)         # update displayed value
-            self.myform['freq_slider'].set_value(target_freq)  # update displayed value
-            self.update_status_bar()
-            self._set_status_msg("OK", 0)
-            return True
-
-        self._set_status_msg("Failed", 0)
-        return False
-
-    def set_gain(self, gain):
-        self.myform['gain'].set_value(gain)     # update displayed value
-        self.u.set_gain(gain)
-
-    def update_status_bar (self):
-        msg = "Volume:%r  Setting:%s" % (self.vol, self.state)
-        self._set_status_msg(msg, 1)
-        try:
-          self.src_fft.set_baseband_freq(self.freq)
-        except:
-          None
-
-    def volume_range(self):
-        return (-40.0, 0.0, 0.5)
-
-
-if __name__ == '__main__':
-    app = stdgui2.stdapp (wfm_rx_block, "USRP Broadcast AM MW RX")
-    app.MainLoop ()
diff --git a/gr-uhd/examples/python/usrp_nbfm_ptt.py b/gr-uhd/examples/python/usrp_nbfm_ptt.py
deleted file mode 100755
index 76e1f47c3c..0000000000
--- a/gr-uhd/examples/python/usrp_nbfm_ptt.py
+++ /dev/null
@@ -1,494 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2005,2007,2011 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-import math
-import sys
-import wx
-from optparse import OptionParser
-
-from gnuradio import gr, audio, uhd
-from gnuradio import analog
-from gnuradio import blocks
-from gnuradio import filter
-from gnuradio.eng_option import eng_option
-from gnuradio.wxgui import stdgui2, fftsink2, scopesink2, slider, form
-
-from numpy import convolve, array
-
-#import os
-#print "pid =", os.getpid()
-#raw_input('Press Enter to continue: ')
-
-# ////////////////////////////////////////////////////////////////////////
-#                           Control Stuff
-# ////////////////////////////////////////////////////////////////////////
-
-class ptt_block(stdgui2.std_top_block):
-    def __init__(self, frame, panel, vbox, argv):
-        stdgui2.std_top_block.__init__ (self, frame, panel, vbox, argv)
-
-        self.frame = frame
-        self.space_bar_pressed = False
-
-        parser = OptionParser (option_class=eng_option)
-        parser.add_option("-a", "--args", type="string", default="",
-                          help="UHD device address args [default=%default]")
-        parser.add_option("", "--spec", type="string", default=None,
-	                  help="Subdevice of UHD device where appropriate")
-        parser.add_option("-A", "--antenna", type="string", default=None,
-                          help="select Rx Antenna where appropriate")
-        parser.add_option ("-f", "--freq", type="eng_float", default=442.1e6,
-                           help="set Tx and Rx frequency to FREQ", metavar="FREQ")
-        parser.add_option ("-g", "--rx-gain", type="eng_float", default=None,
-                           help="set rx gain [default=midpoint in dB]")
-        parser.add_option ("", "--tx-gain", type="eng_float", default=None,
-                           help="set tx gain [default=midpoint in dB]")
-        parser.add_option("-I", "--audio-input", type="string", default="default",
-                          help="pcm input device name.  E.g., hw:0,0 or /dev/dsp")
-        parser.add_option("-O", "--audio-output", type="string", default="default",
-                          help="pcm output device name.  E.g., hw:0,0 or /dev/dsp")
-        parser.add_option ("-N", "--no-gui", action="store_true", default=False)
-        (options, args) = parser.parse_args ()
-
-        if len(args) != 0:
-            parser.print_help()
-            sys.exit(1)
-
-        if options.freq < 1e6:
-            options.freq *= 1e6
-
-        self.txpath = transmit_path(options.args, options.spec,
-                                    options.antenna, options.tx_gain,
-                                    options.audio_input)
-        self.rxpath = receive_path(options.args, options.spec,
-                                   options.antenna, options.rx_gain,
-                                   options.audio_output)
-	self.connect(self.txpath)
-	self.connect(self.rxpath)
-
-        self._build_gui(frame, panel, vbox, argv, options.no_gui)
-
-        self.set_transmit(False)
-        self.set_freq(options.freq)
-        self.set_rx_gain(self.rxpath.gain)               # update gui
-        self.set_volume(self.rxpath.volume)              # update gui
-        self.set_squelch(self.rxpath.threshold())        # update gui
-
-
-    def set_transmit(self, enabled):
-        self.txpath.set_enable(enabled)
-        self.rxpath.set_enable(not(enabled))
-        if enabled:
-            self.frame.SetStatusText ("Transmitter ON", 1)
-        else:
-            self.frame.SetStatusText ("Receiver ON", 1)
-
-
-    def set_rx_gain(self, gain):
-        self.myform['rx_gain'].set_value(gain)            # update displayed value
-        self.rxpath.set_gain(gain)
-
-    def set_tx_gain(self, gain):
-        self.txpath.set_gain(gain)
-
-    def set_squelch(self, threshold):
-        self.rxpath.set_squelch(threshold)
-        self.myform['squelch'].set_value(self.rxpath.threshold())
-
-    def set_volume (self, vol):
-        self.rxpath.set_volume(vol)
-        self.myform['volume'].set_value(self.rxpath.volume)
-        #self.update_status_bar ()
-
-    def set_freq(self, freq):
-        r1 = self.txpath.set_freq(freq)
-        r2 = self.rxpath.set_freq(freq)
-        #print "txpath.set_freq =", r1
-        #print "rxpath.set_freq =", r2
-        if r1 and r2:
-            self.myform['freq'].set_value(freq)     # update displayed value
-        return r1 and r2
-
-    def _build_gui(self, frame, panel, vbox, argv, no_gui):
-
-        def _form_set_freq(kv):
-            return self.set_freq(kv['freq'])
-
-        self.panel = panel
-
-        # FIXME This REALLY needs to be replaced with a hand-crafted button
-        # that sends both button down and button up events
-        hbox = wx.BoxSizer(wx.HORIZONTAL)
-        hbox.Add((10,0), 1)
-        self.status_msg = wx.StaticText(panel, -1, "Press Space Bar to Transmit")
-        of = self.status_msg.GetFont()
-        self.status_msg.SetFont(wx.Font(15, of.GetFamily(), of.GetStyle(), of.GetWeight()))
-        hbox.Add(self.status_msg, 0, wx.ALIGN_CENTER)
-        hbox.Add((10,0), 1)
-        vbox.Add(hbox, 0, wx.EXPAND | wx.ALIGN_CENTER)
-
-        panel.Bind(wx.EVT_KEY_DOWN, self._on_key_down)
-        panel.Bind(wx.EVT_KEY_UP, self._on_key_up)
-        panel.Bind(wx.EVT_KILL_FOCUS, self._on_kill_focus)
-        panel.SetFocus()
-
-        if 1 and not(no_gui):
-            rx_fft = fftsink2.fft_sink_c(panel, title="Rx Input", fft_size=512,
-                                         sample_rate=self.rxpath.if_rate,
-                                         ref_level=80, y_per_div=20)
-            self.connect (self.rxpath.u, rx_fft)
-            vbox.Add (rx_fft.win, 1, wx.EXPAND)
-
-        if 1 and not(no_gui):
-            rx_fft = fftsink2.fft_sink_c(panel, title="Post s/w Resampler",
-                                         fft_size=512, sample_rate=self.rxpath.quad_rate,
-                                         ref_level=80, y_per_div=20)
-            self.connect (self.rxpath.resamp, rx_fft)
-            vbox.Add (rx_fft.win, 1, wx.EXPAND)
-
-        if 0 and not(no_gui):
-            foo = scopesink2.scope_sink_f(panel, title="Squelch",
-                                    	  sample_rate=32000)
-            self.connect (self.rxpath.fmrx.div, (foo,0))
-            self.connect (self.rxpath.fmrx.gate, (foo,1))
-            self.connect (self.rxpath.fmrx.squelch_lpf, (foo,2))
-            vbox.Add (foo.win, 1, wx.EXPAND)
-
-        if 0 and not(no_gui):
-            tx_fft = fftsink2.fft_sink_c(panel, title="Tx Output",
-                                         fft_size=512, sample_rate=self.txpath.usrp_rate)
-            self.connect (self.txpath.amp, tx_fft)
-            vbox.Add (tx_fft.win, 1, wx.EXPAND)
-
-
-        # add control area at the bottom
-
-        self.myform = myform = form.form()
-
-        # first row
-        hbox = wx.BoxSizer(wx.HORIZONTAL)
-        hbox.Add((5,0), 0, 0)
-        myform['freq'] = form.float_field(
-            parent=panel, sizer=hbox, label="Freq", weight=1,
-            callback=myform.check_input_and_call(_form_set_freq, self._set_status_msg))
-
-        hbox.Add((5,0), 0, 0)
-        vbox.Add(hbox, 0, wx.EXPAND)
-
-
-        # second row
-        hbox = wx.BoxSizer(wx.HORIZONTAL)
-        myform['volume'] = \
-            form.quantized_slider_field(parent=self.panel, sizer=hbox, label="Volume",
-                                        weight=3, range=self.rxpath.volume_range(),
-                                        callback=self.set_volume)
-        hbox.Add((5,0), 0)
-        myform['squelch'] = \
-            form.quantized_slider_field(parent=self.panel, sizer=hbox, label="Squelch",
-                                        weight=3, range=self.rxpath.squelch_range(),
-                                        callback=self.set_squelch)
-
-        g = self.rxpath.u.get_gain_range()
-        hbox.Add((5,0), 0)
-        myform['rx_gain'] = \
-            form.quantized_slider_field(parent=self.panel, sizer=hbox, label="Rx Gain",
-                                        weight=3, range=(g.start(), g.stop(), g.step()),
-                                        callback=self.set_rx_gain)
-        hbox.Add((5,0), 0)
-        vbox.Add(hbox, 0, wx.EXPAND)
-
-
-        self._build_subpanel(vbox)
-
-    def _build_subpanel(self, vbox_arg):
-        # build a secondary information panel (sometimes hidden)
-
-        # FIXME figure out how to have this be a subpanel that is always
-        # created, but has its visibility controlled by foo.Show(True/False)
-
-        #if not(self.show_debug_info):
-        #    return
-
-        panel = self.panel
-        vbox = vbox_arg
-        myform = self.myform
-
-        #panel = wx.Panel(self.panel, -1)
-        #vbox = wx.BoxSizer(wx.VERTICAL)
-
-        hbox = wx.BoxSizer(wx.HORIZONTAL)
-        hbox.Add((5,0), 0)
-        #myform['decim'] = form.static_float_field(
-        #    parent=panel, sizer=hbox, label="Decim")
-
-        #hbox.Add((5,0), 1)
-        #myform['fs@usb'] = form.static_float_field(
-        #    parent=panel, sizer=hbox, label="Fs@USB")
-
-        #hbox.Add((5,0), 1)
-        #myform['dbname'] = form.static_text_field(
-        #    parent=panel, sizer=hbox)
-
-        hbox.Add((5,0), 0)
-        vbox.Add(hbox, 0, wx.EXPAND)
-
-
-    def _set_status_msg(self, msg, which=0):
-        self.frame.GetStatusBar().SetStatusText(msg, which)
-
-    def _on_key_down(self, evt):
-        # print "key_down:", evt.m_keyCode
-        if evt.m_keyCode == wx.WXK_SPACE and not(self.space_bar_pressed):
-            self.space_bar_pressed = True
-            self.set_transmit(True)
-
-    def _on_key_up(self, evt):
-        # print "key_up", evt.m_keyCode
-        if evt.m_keyCode == wx.WXK_SPACE:
-            self.space_bar_pressed = False
-            self.set_transmit(False)
-
-    def _on_kill_focus(self, evt):
-        # if we lose the keyboard focus, turn off the transmitter
-        self.space_bar_pressed = False
-        self.set_transmit(False)
-
-
-# ////////////////////////////////////////////////////////////////////////
-#                           Transmit Path
-# ////////////////////////////////////////////////////////////////////////
-
-class transmit_path(gr.hier_block2):
-    def __init__(self, args, spec, antenna, gain, audio_input):
-	gr.hier_block2.__init__(self, "transmit_path",
-				gr.io_signature(0, 0, 0), # Input signature
-				gr.io_signature(0, 0, 0)) # Output signature
-
-        self.u = uhd.usrp_sink(device_addr=args, stream_args=uhd.stream_args('fc32'))
-
-        # Set the subdevice spec
-        if(spec):
-            self.u.set_subdev_spec(spec, 0)
-
-        # Set the antenna
-        if(antenna):
-            self.u.set_antenna(antenna, 0)
-
-        self.if_rate = 320e3
-        self.audio_rate = 32e3
-
-        self.u.set_samp_rate(self.if_rate)
-        dev_rate = self.u.get_samp_rate()
-
-        self.audio_gain = 10
-        self.normal_gain = 32000
-
-        self.audio = audio.source(int(self.audio_rate), audio_input)
-        self.audio_amp = blocks.multiply_const_ff(self.audio_gain)
-
-        lpf = filter.firdes.low_pass(1,                  # gain
-                                     self.audio_rate,    # sampling rate
-                                     3800,               # low pass cutoff freq
-                                     300,                # width of trans. band
-                                     filter.firdes.WIN_HANN) # filter type
-
-        hpf = filter.firdes.high_pass(1,                  # gain
-                                      self.audio_rate,    # sampling rate
-                                      325,                # low pass cutoff freq
-                                      50,                 # width of trans. band
-                                      filter.firdes.WIN_HANN) # filter type
-
-        audio_taps = convolve(array(lpf),array(hpf))
-        self.audio_filt = filter.fir_filter_fff(1,audio_taps)
-
-        self.pl = analog.ctcss_gen_f(self.audio_rate,123.0)
-        self.add_pl = blocks.add_ff()
-        self.connect(self.pl,(self.add_pl,1))
-
-        self.fmtx = analog.nbfm_tx(self.audio_rate, self.if_rate)
-        self.amp = blocks.multiply_const_cc (self.normal_gain)
-
-        rrate = dev_rate / self.if_rate
-        self.resamp = filter.pfb.arb_resampler_ccf(rrate)
-
-        self.connect(self.audio, self.audio_amp, self.audio_filt,
-                     (self.add_pl,0), self.fmtx, self.amp,
-                     self.resamp, self.u)
-
-        if gain is None:
-            # if no gain was specified, use the mid-point in dB
-            g = self.u.get_gain_range()
-            gain = float(g.start() + g.stop())/2.0
-
-        self.set_gain(gain)
-
-        self.set_enable(False)
-
-    def set_freq(self, target_freq):
-        """
-        Set the center frequency we're interested in.
-
-        Args:
-            target_freq: frequency in Hz
-        @rypte: bool
-        """
-        r = self.u.set_center_freq(target_freq)
-        if r:
-            return True
-        return False
-
-    def set_gain(self, gain):
-        self.gain = gain
-        self.u.set_gain(gain)
-
-    def set_enable(self, enable):
-        if enable:
-            self.amp.set_k (self.normal_gain)
-        else:
-            self.amp.set_k (0)
-
-
-
-# ////////////////////////////////////////////////////////////////////////
-#                           Receive Path
-# ////////////////////////////////////////////////////////////////////////
-
-class receive_path(gr.hier_block2):
-    def __init__(self, args, spec, antenna, gain, audio_output):
-	gr.hier_block2.__init__(self, "receive_path",
-				gr.io_signature(0, 0, 0), # Input signature
-				gr.io_signature(0, 0, 0)) # Output signature
-
-        self.u = uhd.usrp_source(device_addr=args,
-                                 io_type=uhd.io_type.COMPLEX_FLOAT32,
-                                 num_channels=1)
-
-        self.if_rate    = 256e3
-        self.quad_rate  = 64e3
-        self.audio_rate = 32e3
-
-        self.u.set_samp_rate(self.if_rate)
-        dev_rate = self.u.get_samp_rate()
-
-        # Create filter to get actual channel we want
-        nfilts = 32
-        chan_coeffs = filter.firdes.low_pass(nfilts,             # gain
-                                             nfilts*dev_rate,    # sampling rate
-                                             13e3,               # low pass cutoff freq
-                                             4e3,                # width of trans. band
-                                             filter.firdes.WIN_HANN) # filter type
-
-        rrate = self.quad_rate / dev_rate
-        self.resamp = filter.pfb.arb_resampler_ccf(rrate, chan_coeffs, nfilts)
-
-        # instantiate the guts of the single channel receiver
-        self.fmrx = analog.nbfm_rx(self.audio_rate, self.quad_rate)
-
-        # standard squelch block
-        self.squelch = analog.standard_squelch(self.audio_rate)
-
-        # audio gain / mute block
-        self._audio_gain = blocks.multiply_const_ff(1.0)
-
-        # sound card as final sink
-        audio_sink = audio.sink(int(self.audio_rate), audio_output)
-
-        # now wire it all together
-        self.connect(self.u, self.resamp, self.fmrx, self.squelch,
-                     self._audio_gain, audio_sink)
-
-        if gain is None:
-            # if no gain was specified, use the mid-point in dB
-            g = self.u.get_gain_range()
-            gain = float(g.start() + g.stop())/2.0
-
-        self.enabled = True
-        self.set_gain(gain)
-        v = self.volume_range()
-        self.set_volume((v[0]+v[1])/2)
-        s = self.squelch_range()
-        self.set_squelch((s[0]+s[1])/2)
-
-        # Set the subdevice spec
-        if(spec):
-            self.u.set_subdev_spec(spec, 0)
-
-        # Set the antenna
-        if(antenna):
-            self.u.set_antenna(antenna, 0)
-
-    def volume_range(self):
-        return (-20.0, 0.0, 0.5)
-
-    def set_volume (self, vol):
-        g = self.volume_range()
-        self.volume = max(g[0], min(g[1], vol))
-        self._update_audio_gain()
-
-    def set_enable(self, enable):
-        self.enabled = enable
-        self._update_audio_gain()
-
-    def _update_audio_gain(self):
-        if self.enabled:
-            self._audio_gain.set_k(10**(self.volume/10))
-        else:
-            self._audio_gain.set_k(0)
-
-    def squelch_range(self):
-        return self.squelch.squelch_range()
-
-    def set_squelch(self, threshold):
-        print "SQL =", threshold
-        self.squelch.set_threshold(threshold)
-
-    def threshold(self):
-        return self.squelch.threshold()
-
-    def set_freq(self, target_freq):
-        """
-        Set the center frequency we're interested in.
-
-        Args:
-            target_freq: frequency in Hz
-        @rypte: bool
-        """
-        r = self.u.set_center_freq(target_freq)
-        if r:
-            return True
-        return False
-
-    def set_gain(self, gain):
-        self.gain = gain
-        self.u.set_gain(gain)
-
-
-# ////////////////////////////////////////////////////////////////////////
-#                                Main
-# ////////////////////////////////////////////////////////////////////////
-
-def main():
-    app = stdgui2.stdapp(ptt_block, "NBFM Push to Talk")
-    app.MainLoop()
-
-if __name__ == '__main__':
-    main()
diff --git a/gr-uhd/examples/python/usrp_nbfm_rcv.py b/gr-uhd/examples/python/usrp_nbfm_rcv.py
deleted file mode 100755
index e3dc7eac6b..0000000000
--- a/gr-uhd/examples/python/usrp_nbfm_rcv.py
+++ /dev/null
@@ -1,384 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2005,2007,2011,2012 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-from gnuradio import gr, audio, uhd
-from gnuradio import blocks
-from gnuradio import filter
-from gnuradio import analog
-from gnuradio.eng_option import eng_option
-from gnuradio.wxgui import slider, powermate
-from gnuradio.wxgui import stdgui2, fftsink2, form
-from optparse import OptionParser
-import sys
-import math
-import wx
-
-#////////////////////////////////////////////////////////////////////////
-#                           Control Stuff
-#////////////////////////////////////////////////////////////////////////
-
-class my_top_block (stdgui2.std_top_block):
-    def __init__(self,frame,panel,vbox,argv):
-        stdgui2.std_top_block.__init__ (self,frame,panel,vbox,argv)
-
-        parser=OptionParser(option_class=eng_option)
-        parser.add_option("-a", "--args", type="string", default="",
-                          help="UHD device address args [default=%default]")
-        parser.add_option("", "--spec", type="string", default=None,
-	                  help="Subdevice of UHD device where appropriate")
-        parser.add_option("-A", "--antenna", type="string", default=None,
-                          help="select Rx Antenna where appropriate")
-        parser.add_option("-f", "--freq", type="eng_float", default=146.585e6,
-                          help="set frequency to FREQ", metavar="FREQ")
-        parser.add_option("-g", "--gain", type="eng_float", default=None,
-                          help="set gain in dB (default is midpoint)")
-        parser.add_option("-V", "--volume", type="eng_float", default=None,
-                          help="set volume (default is midpoint)")
-        parser.add_option("-O", "--audio-output", type="string", default="default",
-                          help="pcm device name.  E.g., hw:0,0 or surround51 or /dev/dsp")
-        parser.add_option("-N", "--no-gui", action="store_true", default=False)
-
-        (options, args) = parser.parse_args()
-        if len(args) != 0:
-            parser.print_help()
-            sys.exit(1)
-
-        if options.freq < 1e6:
-            options.freq *= 1e6
-
-        self.frame = frame
-        self.panel = panel
-
-        self.state = "FREQ"
-        self.freq = 0
-        self.freq_step = 25e3
-
-        self.rxpath = receive_path(options.args, options.spec, options.antenna,
-                                   options.gain, options.audio_output)
-	self.connect(self.rxpath)
-
-        self._build_gui(vbox, options.no_gui)
-
-        # set initial values
-
-        if options.volume is not None:
-            self.set_volume(options.volume)
-
-        if not(self.set_freq(options.freq)):
-            self._set_status_msg("Failed to set initial frequency")
-
-        self.set_gain(self.rxpath.gain)               # update gui
-        self.set_volume(self.rxpath.volume)           # update gui
-        self.set_squelch(self.rxpath.threshold())     # update gui
-
-
-    def _set_status_msg(self, msg, which=0):
-        self.frame.GetStatusBar().SetStatusText(msg, which)
-
-
-    def _build_gui(self, vbox, no_gui):
-
-        def _form_set_freq(kv):
-            return self.set_freq(kv['freq'])
-
-
-        self.src_fft = None
-        if 0 and not(no_gui):
-            self.src_fft = fftsink2.fft_sink_c(self.panel,
-                                               title="Data from USRP",
-                                               fft_size=512,
-                                               sample_rate=self.rxpath.if_rate,
-                                               ref_scale=32768.0,
-                                               ref_level=0,
-                                               y_per_div=10,
-                                               y_divs=12)
-            self.connect (self.rxpath.u, self.src_fft)
-            vbox.Add (self.src_fft.win, 4, wx.EXPAND)
-        if 1 and not(no_gui):
-            rx_fft = fftsink2.fft_sink_c(self.panel,
-                                         title="Post s/w Resampling",
-                                         fft_size=512,
-                                         sample_rate=self.rxpath.quad_rate,
-                                         ref_level=80,
-                                         y_per_div=20)
-            self.connect (self.rxpath.resamp, rx_fft)
-            vbox.Add (rx_fft.win, 4, wx.EXPAND)
-
-        if 1 and not(no_gui):
-            post_deemph_fft = fftsink2.fft_sink_f(self.panel,
-                                                  title="Post Deemph",
-                                                  fft_size=512,
-                                                  sample_rate=self.rxpath.audio_rate,
-                                                  y_per_div=10,
-                                                  ref_level=-40)
-            self.connect (self.rxpath.fmrx.deemph, post_deemph_fft)
-            vbox.Add (post_deemph_fft.win, 4, wx.EXPAND)
-
-        if 0:
-            post_filt_fft = fftsink2.fft_sink_f(self.panel,
-                                                title="Post Filter",
-                                                fft_size=512,
-                                                sample_rate=audio_rate,
-                                                y_per_div=10,
-                                                ref_level=-40)
-            self.connect (self.guts.audio_filter, post_filt)
-            vbox.Add (fft_win4, 4, wx.EXPAND)
-
-        # control area form at bottom
-        self.myform = myform = form.form()
-
-        hbox = wx.BoxSizer(wx.HORIZONTAL)
-        hbox.Add((5,0), 0)
-        myform['freq'] = form.float_field(
-            parent=self.panel, sizer=hbox, label="Freq", weight=1,
-            callback=myform.check_input_and_call(_form_set_freq,
-                                                 self._set_status_msg))
-
-        #hbox.Add((5,0), 0)
-        #myform['freq_slider'] = \
-        #    form.quantized_slider_field(parent=self.panel, sizer=hbox, weight=3,
-        #                                range=(87.9e6, 108.1e6, 0.1e6),
-        #                                callback=self.set_freq)
-
-        hbox.Add((5,0), 0)
-        vbox.Add(hbox, 0, wx.EXPAND)
-
-        hbox = wx.BoxSizer(wx.HORIZONTAL)
-        hbox.Add((5,0), 0)
-
-        myform['volume'] = \
-            form.quantized_slider_field(parent=self.panel, sizer=hbox, label="Volume",
-                                        weight=3, range=self.volume_range(),
-                                        callback=self.set_volume)
-        hbox.Add((5,0), 0)
-        myform['squelch'] = \
-            form.quantized_slider_field(parent=self.panel, sizer=hbox, label="Squelch",
-                                        weight=3, range=self.rxpath.squelch_range(),
-                                        callback=self.set_squelch)
-        g = self.rxpath.u.get_gain_range()
-        hbox.Add((5,0), 0)
-        myform['gain'] = \
-            form.quantized_slider_field(parent=self.panel, sizer=hbox, label="Gain",
-                                        weight=3, range=(g.start(), g.stop(), g.step()),
-                                        callback=self.set_gain)
-        hbox.Add((5,0), 0)
-        vbox.Add(hbox, 0, wx.EXPAND)
-
-        try:
-            self.knob = powermate.powermate(self.frame)
-            self.rot = 0
-            powermate.EVT_POWERMATE_ROTATE (self.frame, self.on_rotate)
-            powermate.EVT_POWERMATE_BUTTON (self.frame, self.on_button)
-        except:
-            print "FYI: No Powermate or Contour Knob found"
-
-
-    def on_rotate (self, event):
-        self.rot += event.delta
-        if (self.state == "FREQ"):
-            if self.rot >= 3:
-                self.set_freq(self.freq + self.freq_step)
-                self.rot -= 3
-            elif self.rot <=-3:
-                self.set_freq(self.freq - self.freq_step)
-                self.rot += 3
-        else:
-            step = self.volume_range()[2]
-            if self.rot >= 3:
-                self.set_volume(self.rxpath.volume + step)
-                self.rot -= 3
-            elif self.rot <=-3:
-                self.set_volume(self.rxpath.volume - step)
-                self.rot += 3
-
-    def on_button (self, event):
-        if event.value == 0:        # button up
-            return
-        self.rot = 0
-        if self.state == "FREQ":
-            self.state = "VOL"
-        else:
-            self.state = "FREQ"
-        self.update_status_bar ()
-
-
-    def set_squelch(self, threshold_in_db):
-        self.rxpath.set_squelch(threshold_in_db)
-        self.myform['squelch'].set_value(self.rxpath.threshold())
-
-    def set_volume (self, vol):
-        self.rxpath.set_volume(vol)
-        self.myform['volume'].set_value(self.rxpath.volume)
-        self.update_status_bar ()
-
-    def set_freq(self, target_freq):
-        r = self.rxpath.set_freq(target_freq)
-        if r:
-            self.freq = target_freq
-            self.myform['freq'].set_value(target_freq)         # update displayed value
-            #self.myform['freq_slider'].set_value(target_freq)  # update displayed value
-            self.update_status_bar()
-            self._set_status_msg("OK", 0)
-            return True
-
-        self._set_status_msg("Failed", 0)
-        return False
-
-    def set_gain(self, gain):
-        self.myform['gain'].set_value(gain)     # update displayed value
-        self.rxpath.set_gain(gain)
-
-    def update_status_bar (self):
-        msg = "Volume:%r  Setting:%s" % (self.rxpath.volume, self.state)
-        self._set_status_msg(msg, 1)
-        if self.src_fft:
-            self.src_fft.set_baseband_freq(self.freq)
-
-    def volume_range(self):
-        return (-20.0, 0.0, 0.5)
-
-
-#////////////////////////////////////////////////////////////////////////
-#                           Receive Path
-#////////////////////////////////////////////////////////////////////////
-
-USE_SIMPLE_SQUELCH = False
-
-class receive_path(gr.hier_block2):
-    def __init__(self, args, spec, antenna, gain, audio_output):
-	gr.hier_block2.__init__(self, "receive_path",
-				gr.io_signature(0, 0, 0), # Input signature
-				gr.io_signature(0, 0, 0)) # Output signature
-
-        self.u = uhd.usrp_source(device_addr=args, stream_args=uhd.stream_args('fc32'))
-
-        # Set the subdevice spec
-        if(spec):
-            self.u.set_subdev_spec(spec, 0)
-
-        # Set the antenna
-        if(antenna):
-            self.u.set_antenna(antenna, 0)
-
-        self.if_rate    = 256e3
-        self.quad_rate  = 64e3
-        self.audio_rate = 32e3
-
-        self.u.set_samp_rate(self.if_rate)
-        dev_rate = self.u.get_samp_rate()
-
-        # Create filter to get actual channel we want
-        nfilts = 32
-        chan_coeffs = filter.firdes.low_pass(nfilts,              # gain
-                                             nfilts*dev_rate,     # sampling rate
-                                             8e3,                 # low pass cutoff freq
-                                             2e3,                 # width of trans. band
-                                             filter.firdes.WIN_HANN)  # filter type
-        rrate = self.quad_rate / dev_rate
-        self.resamp = filter.pfb.arb_resampler_ccf(rrate, chan_coeffs, nfilts)
-
-        if USE_SIMPLE_SQUELCH:
-            self.squelch = analog.simple_squelch_cc(20)
-        else:
-            self.squelch = analog.standard_squelch(self.audio_rate)
-
-        # instantiate the guts of the single channel receiver
-        self.fmrx = analog.nbfm_rx(self.audio_rate, self.quad_rate)
-
-        # audio gain / mute block
-        self._audio_gain = blocks.multiply_const_ff(1.0)
-
-        # sound card as final sink
-        audio_sink = audio.sink (int(self.audio_rate), audio_output)
-
-        # now wire it all together
-        if USE_SIMPLE_SQUELCH:
-            self.connect (self.u, self.resamp, self.squelch, self.fmrx,
-                          self._audio_gain, audio_sink)
-        else:
-            self.connect (self.u, self.resamp, self.fmrx, self.squelch,
-                          self._audio_gain, audio_sink)
-
-        if gain is None:
-            # if no gain was specified, use the mid-point in dB
-            g = self.u.get_gain_range()
-            gain = float(g.start()+g.stop())/2
-
-        self.set_gain(gain)
-
-        v = self.volume_range()
-        self.set_volume((v[0]+v[1])/2)
-
-        s = self.squelch_range()
-        self.set_squelch((s[0]+s[1])/2)
-
-    def volume_range(self):
-        return (-20.0, 0.0, 0.5)
-
-    def set_volume (self, vol):
-        g = self.volume_range()
-        self.volume = max(g[0], min(g[1], vol))
-        self._update_audio_gain()
-
-    def _update_audio_gain(self):
-        self._audio_gain.set_k(10**(self.volume/10))
-
-    def squelch_range(self):
-        r = self.squelch.squelch_range()
-        #print "squelch_range: ", r
-        return r
-
-    def set_squelch(self, threshold):
-        #print "SQL =", threshold
-        self.squelch.set_threshold(threshold)
-
-    def threshold(self):
-        t = self.squelch.threshold()
-        #print "t =", t
-        return t
-
-    def set_freq(self, target_freq):
-        """
-        Set the center frequency we're interested in.
-
-        Args:
-            target_freq: frequency in Hz
-        @rypte: bool
-        """
-
-        r = self.u.set_center_freq(target_freq)
-        if r:
-            return True
-        return False
-
-    def set_gain(self, gain):
-        self.gain = gain
-        self.u.set_gain(gain)
-
-
-# ////////////////////////////////////////////////////////////////////////
-#                                Main
-# ////////////////////////////////////////////////////////////////////////
-
-if __name__ == '__main__':
-    app = stdgui2.stdapp (my_top_block, "USRP NBFM RX")
-    app.MainLoop ()
diff --git a/gr-uhd/examples/python/usrp_spectrum_sense.py b/gr-uhd/examples/python/usrp_spectrum_sense.py
deleted file mode 100755
index b1ea6b44d8..0000000000
--- a/gr-uhd/examples/python/usrp_spectrum_sense.py
+++ /dev/null
@@ -1,318 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2005,2007,2011 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-from gnuradio import gr, eng_notation
-from gnuradio import blocks
-from gnuradio import audio
-from gnuradio import filter
-from gnuradio import fft
-from gnuradio import uhd
-from gnuradio.eng_option import eng_option
-from optparse import OptionParser
-import sys
-import math
-import struct
-import threading
-from datetime import datetime
-import time
-
-sys.stderr.write("Warning: this may have issues on some machines+Python version combinations to seg fault due to the callback in bin_statitics.\n\n")
-
-class ThreadClass(threading.Thread):
-    def run(self):
-        return
-
-class tune(gr.feval_dd):
-    """
-    This class allows C++ code to callback into python.
-    """
-    def __init__(self, tb):
-        gr.feval_dd.__init__(self)
-        self.tb = tb
-
-    def eval(self, ignore):
-        """
-        This method is called from blocks.bin_statistics_f when it wants
-        to change the center frequency.  This method tunes the front
-        end to the new center frequency, and returns the new frequency
-        as its result.
-        """
-
-        try:
-            # We use this try block so that if something goes wrong
-            # from here down, at least we'll have a prayer of knowing
-            # what went wrong.  Without this, you get a very
-            # mysterious:
-            #
-            #   terminate called after throwing an instance of
-            #   'Swig::DirectorMethodException' Aborted
-            #
-            # message on stderr.  Not exactly helpful ;)
-
-            new_freq = self.tb.set_next_freq()
-
-            # wait until msgq is empty before continuing
-            while(self.tb.msgq.full_p()):
-                #print "msgq full, holding.."
-                time.sleep(0.1)
-
-            return new_freq
-
-        except Exception, e:
-            print "tune: Exception: ", e
-
-
-class parse_msg(object):
-    def __init__(self, msg):
-        self.center_freq = msg.arg1()
-        self.vlen = int(msg.arg2())
-        assert(msg.length() == self.vlen * gr.sizeof_float)
-
-        # FIXME consider using NumPy array
-        t = msg.to_string()
-        self.raw_data = t
-        self.data = struct.unpack('%df' % (self.vlen,), t)
-
-
-class my_top_block(gr.top_block):
-
-    def __init__(self):
-        gr.top_block.__init__(self)
-
-        usage = "usage: %prog [options] min_freq max_freq"
-        parser = OptionParser(option_class=eng_option, usage=usage)
-        parser.add_option("-a", "--args", type="string", default="",
-                          help="UHD device device address args [default=%default]")
-        parser.add_option("", "--spec", type="string", default=None,
-	                  help="Subdevice of UHD device where appropriate")
-        parser.add_option("-A", "--antenna", type="string", default=None,
-                          help="select Rx Antenna where appropriate")
-        parser.add_option("-s", "--samp-rate", type="eng_float", default=1e6,
-                          help="set sample rate [default=%default]")
-        parser.add_option("-g", "--gain", type="eng_float", default=None,
-                          help="set gain in dB (default is midpoint)")
-        parser.add_option("", "--tune-delay", type="eng_float",
-                          default=0.25, metavar="SECS",
-                          help="time to delay (in seconds) after changing frequency [default=%default]")
-        parser.add_option("", "--dwell-delay", type="eng_float",
-                          default=0.25, metavar="SECS",
-                          help="time to dwell (in seconds) at a given frequency [default=%default]")
-        parser.add_option("-b", "--channel-bandwidth", type="eng_float",
-                          default=6.25e3, metavar="Hz",
-                          help="channel bandwidth of fft bins in Hz [default=%default]")
-        parser.add_option("-l", "--lo-offset", type="eng_float",
-                          default=0, metavar="Hz",
-                          help="lo_offset in Hz [default=%default]")
-        parser.add_option("-q", "--squelch-threshold", type="eng_float",
-                          default=None, metavar="dB",
-                          help="squelch threshold in dB [default=%default]")
-        parser.add_option("-F", "--fft-size", type="int", default=None,
-                          help="specify number of FFT bins [default=samp_rate/channel_bw]")
-        parser.add_option("", "--real-time", action="store_true", default=False,
-                          help="Attempt to enable real-time scheduling")
-
-        (options, args) = parser.parse_args()
-        if len(args) != 2:
-            parser.print_help()
-            sys.exit(1)
-
-        self.channel_bandwidth = options.channel_bandwidth
-
-        self.min_freq = eng_notation.str_to_num(args[0])
-        self.max_freq = eng_notation.str_to_num(args[1])
-
-        if self.min_freq > self.max_freq:
-            # swap them
-            self.min_freq, self.max_freq = self.max_freq, self.min_freq
-
-        if not options.real_time:
-            realtime = False
-        else:
-            # Attempt to enable realtime scheduling
-            r = gr.enable_realtime_scheduling()
-            if r == gr.RT_OK:
-                realtime = True
-            else:
-                realtime = False
-                print "Note: failed to enable realtime scheduling"
-
-        # build graph
-        self.u = uhd.usrp_source(device_addr=options.args,
-                                 stream_args=uhd.stream_args('fc32'))
-
-        # Set the subdevice spec
-        if(options.spec):
-            self.u.set_subdev_spec(options.spec, 0)
-
-        # Set the antenna
-        if(options.antenna):
-            self.u.set_antenna(options.antenna, 0)
-
-        self.u.set_samp_rate(options.samp_rate)
-        self.usrp_rate = usrp_rate = self.u.get_samp_rate()
-
-        self.lo_offset = options.lo_offset
-
-        if options.fft_size is None:
-            self.fft_size = int(self.usrp_rate/self.channel_bandwidth)
-        else:
-            self.fft_size = options.fft_size
-
-        self.squelch_threshold = options.squelch_threshold
-
-        s2v = blocks.stream_to_vector(gr.sizeof_gr_complex, self.fft_size)
-
-        mywindow = filter.window.blackmanharris(self.fft_size)
-        ffter = fft.fft_vcc(self.fft_size, True, mywindow, True)
-        power = 0
-        for tap in mywindow:
-            power += tap*tap
-
-        c2mag = blocks.complex_to_mag_squared(self.fft_size)
-
-        # FIXME the log10 primitive is dog slow
-        #log = blocks.nlog10_ff(10, self.fft_size,
-        #                       -20*math.log10(self.fft_size)-10*math.log10(power/self.fft_size))
-
-        # Set the freq_step to 75% of the actual data throughput.
-        # This allows us to discard the bins on both ends of the spectrum.
-
-        self.freq_step = self.nearest_freq((0.75 * self.usrp_rate), self.channel_bandwidth)
-        self.min_center_freq = self.min_freq + (self.freq_step/2)
-        nsteps = math.ceil((self.max_freq - self.min_freq) / self.freq_step)
-        self.max_center_freq = self.min_center_freq + (nsteps * self.freq_step)
-
-        self.next_freq = self.min_center_freq
-
-        tune_delay  = max(0, int(round(options.tune_delay * usrp_rate / self.fft_size)))  # in fft_frames
-        dwell_delay = max(1, int(round(options.dwell_delay * usrp_rate / self.fft_size))) # in fft_frames
-
-        self.msgq = gr.msg_queue(1)
-        self._tune_callback = tune(self)        # hang on to this to keep it from being GC'd
-        stats = blocks.bin_statistics_f(self.fft_size, self.msgq,
-                                        self._tune_callback, tune_delay,
-                                        dwell_delay)
-
-        # FIXME leave out the log10 until we speed it up
-	#self.connect(self.u, s2v, ffter, c2mag, log, stats)
-	self.connect(self.u, s2v, ffter, c2mag, stats)
-
-        if options.gain is None:
-            # if no gain was specified, use the mid-point in dB
-            g = self.u.get_gain_range()
-            options.gain = float(g.start()+g.stop())/2.0
-
-        self.set_gain(options.gain)
-        print "gain =", options.gain
-
-    def set_next_freq(self):
-        target_freq = self.next_freq
-        self.next_freq = self.next_freq + self.freq_step
-        if self.next_freq >= self.max_center_freq:
-            self.next_freq = self.min_center_freq
-
-        if not self.set_freq(target_freq):
-            print "Failed to set frequency to", target_freq
-            sys.exit(1)
-
-        return target_freq
-
-
-    def set_freq(self, target_freq):
-        """
-        Set the center frequency we're interested in.
-
-        Args:
-            target_freq: frequency in Hz
-        @rypte: bool
-        """
-
-        r = self.u.set_center_freq(uhd.tune_request(target_freq, rf_freq=(target_freq + self.lo_offset),rf_freq_policy=uhd.tune_request.POLICY_MANUAL))
-        if r:
-            return True
-
-        return False
-
-    def set_gain(self, gain):
-        self.u.set_gain(gain)
-
-    def nearest_freq(self, freq, channel_bandwidth):
-        freq = round(freq / channel_bandwidth, 0) * channel_bandwidth
-        return freq
-
-def main_loop(tb):
-
-    def bin_freq(i_bin, center_freq):
-        #hz_per_bin = tb.usrp_rate / tb.fft_size
-        freq = center_freq - (tb.usrp_rate / 2) + (tb.channel_bandwidth * i_bin)
-        #print "freq original:",freq
-        #freq = nearest_freq(freq, tb.channel_bandwidth)
-        #print "freq rounded:",freq
-        return freq
-
-    bin_start = int(tb.fft_size * ((1 - 0.75) / 2))
-    bin_stop = int(tb.fft_size - bin_start)
-
-    timestamp = 0
-    centerfreq = 0
-    while 1:
-
-        # Get the next message sent from the C++ code (blocking call).
-        # It contains the center frequency and the mag squared of the fft
-        m = parse_msg(tb.msgq.delete_head())
-
-        # m.center_freq is the center frequency at the time of capture
-        # m.data are the mag_squared of the fft output
-        # m.raw_data is a string that contains the binary floats.
-        # You could write this as binary to a file.
-
-        # Scanning rate
-        if timestamp == 0:
-            timestamp = time.time()
-            centerfreq = m.center_freq
-        if m.center_freq < centerfreq:
-            sys.stderr.write("scanned %.1fMHz in %.1fs\n" % ((centerfreq - m.center_freq)/1.0e6, time.time() - timestamp))
-            timestamp = time.time()
-        centerfreq = m.center_freq
-
-        for i_bin in range(bin_start, bin_stop):
-
-            center_freq = m.center_freq
-            freq = bin_freq(i_bin, center_freq)
-            #noise_floor_db = -174 + 10*math.log10(tb.channel_bandwidth)
-            noise_floor_db = 10*math.log10(min(m.data)/tb.usrp_rate)
-            power_db = 10*math.log10(m.data[i_bin]/tb.usrp_rate) - noise_floor_db
-
-            if (power_db > tb.squelch_threshold) and (freq >= tb.min_freq) and (freq <= tb.max_freq):
-                print datetime.now(), "center_freq", center_freq, "freq", freq, "power_db", power_db, "noise_floor_db", noise_floor_db
-
-if __name__ == '__main__':
-    t = ThreadClass()
-    t.start()
-
-    tb = my_top_block()
-    try:
-        tb.start()
-        main_loop(tb)
-
-    except KeyboardInterrupt:
-        pass
diff --git a/gr-uhd/examples/python/usrp_tv_rcv.py b/gr-uhd/examples/python/usrp_tv_rcv.py
deleted file mode 100755
index 301840f41d..0000000000
--- a/gr-uhd/examples/python/usrp_tv_rcv.py
+++ /dev/null
@@ -1,446 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2005-2007,2011-2013 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-"""
-Realtime capture and display of analog Tv stations.
-
-Can also use a file as source or sink
-
-When you use an output file you can show the results frame-by-frame
-using ImageMagick
-
-When you want to use the realtime sdl display window you must first
-install gr-video-sdl.
-
-When you use a file source, instead of the usrp, make sure you
-capture interleaved shorts.  (Use usrp_rx_file.py, or use
-usrp_rx_cfile.py --output-shorts if you have a recent enough
-usrp_rx_cfile.py)
-
-There is no synchronisation yet. The sync blocks are in development
-but not yet in cvs.
-"""
-
-from gnuradio import gr
-try:
-  from gnuradio import video_sdl
-except:
-  print "FYI: gr-video-sdl is not installed"
-  print "realtime SDL video output window will not be available"
-from gnuradio import uhd
-from gnuradio import analog
-from gnuradio import blocks
-from gnuradio.eng_option import eng_option
-from gnuradio.wxgui import slider, powermate
-from gnuradio.wxgui import stdgui2, fftsink2, form
-from optparse import OptionParser
-import sys
-import wx
-
-
-class tv_rx_block (stdgui2.std_top_block):
-    def __init__(self,frame,panel,vbox,argv):
-        stdgui2.std_top_block.__init__ (self,frame,panel,vbox,argv)
-
-        usage="%prog: [options] [input_filename]. \n If you don't specify an input filename the usrp will be used as source\n " \
-              "Make sure your input capture file containes interleaved shorts not complex floats"
-        parser=OptionParser(option_class=eng_option, usage=usage)
-        parser.add_option("-a", "--args", type="string", default="",
-                          help="UHD device address args [default=%default]")
-        parser.add_option("", "--spec", type="string", default=None,
-	                  help="Subdevice of UHD device where appropriate")
-        parser.add_option("-A", "--antenna", type="string", default=None,
-                          help="select Rx Antenna where appropriate")
-        parser.add_option("-s", "--samp-rate", type="eng_float", default=1e6,
-                          help="set sample rate")
-        parser.add_option("-f", "--freq", type="eng_float", default=519.25e6,
-                          help="set frequency to FREQ", metavar="FREQ")
-        parser.add_option("-g", "--gain", type="eng_float", default=None,
-                          help="set gain in dB (default is midpoint)")
-        parser.add_option("-c", "--contrast", type="eng_float", default=1.0,
-                          help="set contrast (default is 1.0)")
-        parser.add_option("-b", "--brightness", type="eng_float", default=0.0,
-                          help="set brightness (default is 0)")
-        parser.add_option("-p", "--pal", action="store_true", default=False,
-                          help="PAL video format (this is the default)")
-        parser.add_option("-n", "--ntsc", action="store_true", default=False,
-                          help="NTSC video format")
-        parser.add_option("-o", "--out-filename", type="string", default="sdl",
-                          help="For example out_raw_uchar.gray. If you don't specify an output filename you will get a video_sink_sdl realtime output window. You then need to have gr-video-sdl installed)")
-        parser.add_option("-r", "--repeat", action="store_false", default=True,
-                          help="repeat file in a loop")
-        parser.add_option("", "--freq-min", type="eng_float", default=50.25e6,
-                          help="Set a minimum frequency [default=%default]")
-        parser.add_option("", "--freq-max", type="eng_float", default=900.25e6,
-                          help="Set a maximum frequency [default=%default]")
-
-        (options, args) = parser.parse_args()
-        if not ((len(args) == 1) or (len(args) == 0)):
-            parser.print_help()
-            sys.exit(1)
-
-        if len(args) == 1:
-          filename = args[0]
-        else:
-          filename = None
-
-        self.frame = frame
-        self.panel = panel
-
-        self.contrast = options.contrast
-        self.brightness = options.brightness
-        self.state = "FREQ"
-        self.freq = 0
-
-        self.tv_freq_min = options.freq_min
-        self.tv_freq_max = options.freq_max
-
-        # build graph
-        self.u=None
-
-        if not (options.out_filename=="sdl"):
-          options.repeat=False
-
-        usrp_rate = options.samp_rate
-
-        if not ((filename is None) or (filename=="usrp")):
-          # file is data source
-          self.filesource = blocks.file_source(gr.sizeof_short,filename,options.repeat)
-          self.istoc = blocks.interleaved_short_to_complex()
-          self.connect(self.filesource,self.istoc)
-          self.src=self.istoc
-
-          options.gain=0.0
-          self.gain=0.0
-
-        else: # use a UHD device
-          self.u = uhd.usrp_source(device_addr=options.args, stream_args=uhd.stream_args('fc32'))
-
-          # Set the subdevice spec
-          if(options.spec):
-            self.u.set_subdev_spec(options.spec, 0)
-
-          # Set the antenna
-          if(options.antenna):
-            self.u.set_antenna(options.antenna, 0)
-
-          self.u.set_samp_rate(usrp_rate)
-          dev_rate = self.u.get_samp_rate()
-
-          if options.gain is None:
-            # if no gain was specified, use the mid-point in dB
-            g = self.u.get_gain_range()
-            options.gain = float(g.start()+g.stop())/2.0
-
-          self.src=self.u
-
-        self.gain = options.gain
-
-        f2uc = blocks.float_to_uchar()
-
-        # sdl window as final sink
-        if not (options.pal or options.ntsc):
-          options.pal=True #set default to PAL
-
-        if options.pal:
-          lines_per_frame=625.0
-          frames_per_sec=25.0
-          show_width=768
-
-        elif options.ntsc:
-          lines_per_frame=525.0
-          frames_per_sec=29.97002997
-          show_width=640
-
-        width=int(usrp_rate/(lines_per_frame*frames_per_sec))
-        height=int(lines_per_frame)
-
-        if (options.out_filename=="sdl"):
-          #Here comes the tv screen, you have to build and install
-          #gr-video-sdl for this (subproject of gnuradio, only in cvs
-          #for now)
-          try:
-            video_sink = video_sdl.sink_uc ( frames_per_sec, width, height, 0,
-                                             show_width, height)
-          except:
-            print "gr-video-sdl is not installed"
-            print "realtime \"sdl\" video output window is not available"
-            raise SystemExit, 1
-          self.dst=video_sink
-        else:
-          print "You can use the imagemagick display tool to show the resulting imagesequence"
-          print "use the following line to show the demodulated TV-signal:"
-          print "display -depth 8 -size " +str(width)+ "x" + str(height) \
-              + " gray:" + options.out_filename
-          print "(Use the spacebar to advance to next frames)"
-          options.repeat=False
-          file_sink = blocks.file_sink(gr.sizeof_char, options.out_filename)
-          self.dst =file_sink
-
-        self.agc = analog.agc_cc(1e-7,1.0,1.0) #1e-7
-        self.am_demod = blocks.complex_to_mag ()
-        self.set_blacklevel = blocks.add_const_ff(0.0)
-        self.invert_and_scale = blocks.multiply_const_ff (0.0) #-self.contrast *128.0*255.0/(200.0)
-
-        # now wire it all together
-        #sample_rate=options.width*options.height*options.framerate
-
-        process_type='do_no_sync'
-        if process_type=='do_no_sync':
-          self.connect (self.src, self.agc,self.am_demod,
-                        self.invert_and_scale, self.set_blacklevel,
-                        f2uc,self.dst)
-        elif process_type=='do_tv_sync_adv':
-          #defaults: gr.tv_sync_adv (double sampling_freq, unsigned
-          #int tv_format,bool output_active_video_only=false, bool
-          #do_invert=false, double wanted_black_level=0.0, double
-          #wanted_white_level=255.0, double avg_alpha=0.1, double
-          #initial_gain=1.0, double initial_offset=0.0,bool
-          #debug=false)
-
-          #note, this block is not yet in cvs
-          self.tv_sync_adv=gr.tv_sync_adv(usrp_rate, 0, False, False,
-                                          0.0, 255.0, 0.01, 1.0, 0.0, False)
-          self.connect (self.src, self.am_demod, self.invert_and_scale,
-                        self.tv_sync_adv, s2f, f2uc, self.dst)
-
-        elif process_type=='do_nullsink':
-          #self.connect (self.src, self.am_demod,self.invert_and_scale,f2uc,video_sink)
-          c2r=blocks.complex_to_real()
-          nullsink=blocks.null_sink(gr.sizeof_float)
-          self.connect (self.src, c2r,nullsink) #video_sink)
-        elif process_type=='do_tv_sync_corr':
-          frame_size=width*height #int(usrp_rate/25.0)
-          nframes=10# 32
-          search_window=20*nframes
-          debug=False
-          video_alpha=0.3 #0.1
-          corr_alpha=0.3
-
-          #Note: this block is not yet in cvs
-          tv_corr=gr.tv_correlator_ff(frame_size,nframes, search_window,
-                                      video_alpha, corr_alpha,debug)
-          shift = blocks.add_const_ff(-0.7)
-
-          self.connect (self.src, self.agc, self.am_demod, tv_corr,
-                        self.invert_and_scale, self.set_blacklevel,
-                        f2uc, self.dst)
-        else: # process_type=='do_test_image':
-          src_vertical_bars = analog.sig_source_f(usrp_rate, analog.GR_SIN_WAVE,
-                                                  10.0 *usrp_rate/320, 255,128)
-          self.connect(src_vertical_bars, f2uc, self.dst)
-
-        self._build_gui(vbox, usrp_rate, usrp_rate, usrp_rate)
-
-
-        frange = self.u.get_freq_range()
-        if(frange.start() > self.tv_freq_max or frange.stop() <  self.tv_freq_min):
-            sys.stderr.write("Radio does not support required frequency range.\n")
-            sys.exit(1)
-        if(options.freq < self.tv_freq_min or options.freq > self.tv_freq_max):
-            sys.stderr.write("Requested frequency is outside of required frequency range.\n")
-            sys.exit(1)
-
-        # set initial values
-        self.set_gain(options.gain)
-        self.set_contrast(self.contrast)
-        self.set_brightness(options.brightness)
-        if not(self.set_freq(options.freq)):
-            self._set_status_msg("Failed to set initial frequency")
-
-
-    def _set_status_msg(self, msg, which=0):
-        self.frame.GetStatusBar().SetStatusText(msg, which)
-
-
-    def _build_gui(self, vbox, usrp_rate, demod_rate, audio_rate):
-
-        def _form_set_freq(kv):
-            return self.set_freq(kv['freq'])
-
-
-        if 0:
-            self.src_fft = fftsink.fft_sink_c (self, self.panel, title="Data from USRP",
-                                               fft_size=512, sample_rate=usrp_rate)
-            self.connect (self.src, self.src_fft)
-            vbox.Add (self.src_fft.win, 4, wx.EXPAND)
-
-        if 0:
-            post_demod_fft = fftsink.fft_sink_f (self, self.panel, title="Post Demod",
-                                                  fft_size=512, sample_rate=demod_rate,
-                                                  y_per_div=10, ref_level=-40)
-            self.connect (self.am_demod, post_demod_fft)
-            vbox.Add (post_demod_fft.win, 4, wx.EXPAND)
-
-        if 0:
-            post_filt_fft = fftsink.fft_sink_f (self, self.panel, title="Post Filter",
-                                                fft_size=512, sample_rate=audio_rate,
-                                                y_per_div=10, ref_level=-40)
-            self.connect (self.set_blacklevel, post_filt)
-            vbox.Add (fft_win4, 4, wx.EXPAND)
-
-
-        # control area form at bottom
-        self.myform = myform = form.form()
-
-        if not (self.u is None):
-          hbox = wx.BoxSizer(wx.HORIZONTAL)
-          hbox.Add((5,0), 0)
-          myform['freq'] = form.float_field(
-            parent=self.panel, sizer=hbox, label="Freq", weight=1,
-            callback=myform.check_input_and_call(_form_set_freq, self._set_status_msg))
-
-          hbox.Add((5,0), 0)
-          myform['freq_slider'] = \
-              form.quantized_slider_field(parent=self.panel, sizer=hbox, weight=3,
-                                        range=(self.tv_freq_min, self.tv_freq_max, 0.25e6),
-                                        callback=self.set_freq)
-          hbox.Add((5,0), 0)
-          vbox.Add(hbox, 0, wx.EXPAND)
-
-        hbox = wx.BoxSizer(wx.HORIZONTAL)
-        hbox.Add((5,0), 0)
-
-        myform['contrast'] = \
-            form.quantized_slider_field(parent=self.panel, sizer=hbox, label="Contrast",
-                                        weight=3, range=(-2.0, 2.0, 0.1),
-                                        callback=self.set_contrast)
-        hbox.Add((5,0), 1)
-
-        myform['brightness'] = \
-            form.quantized_slider_field(parent=self.panel, sizer=hbox, label="Brightness",
-                                        weight=3, range=(-255.0, 255.0, 1.0),
-                                        callback=self.set_brightness)
-        hbox.Add((5,0), 0)
-
-        if not (self.u is None):
-          g = self.u.get_gain_range()
-          myform['gain'] = \
-              form.quantized_slider_field(parent=self.panel, sizer=hbox, label="Gain",
-                                        weight=3, range=(g.start(), g.stop(), g.step()),
-                                        callback=self.set_gain)
-          hbox.Add((5,0), 0)
-        vbox.Add(hbox, 0, wx.EXPAND)
-
-        try:
-            self.knob = powermate.powermate(self.frame)
-            self.rot = 0
-            powermate.EVT_POWERMATE_ROTATE (self.frame, self.on_rotate)
-            powermate.EVT_POWERMATE_BUTTON (self.frame, self.on_button)
-        except:
-            print "FYI: No Powermate or Contour Knob found"
-
-
-    def on_rotate (self, event):
-        self.rot += event.delta
-        if (self.state == "FREQ"):
-            if self.rot >= 3:
-                self.set_freq(self.freq + .1e6)
-                self.rot -= 3
-            elif self.rot <=-3:
-                self.set_freq(self.freq - .1e6)
-                self.rot += 3
-        elif (self.state == "CONTRAST"):
-            step = 0.1
-            if self.rot >= 3:
-                self.set_contrast(self.contrast + step)
-                self.rot -= 3
-            elif self.rot <=-3:
-                self.set_contrast(self.contrast - step)
-                self.rot += 3
-        else:
-            step = 1
-            if self.rot >= 3:
-                self.set_brightness(self.brightness + step)
-                self.rot -= 3
-            elif self.rot <=-3:
-                self.set_brightness(self.brightness - step)
-                self.rot += 3
-
-    def on_button (self, event):
-        if event.value == 0:        # button up
-            return
-        self.rot = 0
-        if self.state == "FREQ":
-            self.state = "CONTRAST"
-        elif self.state == "CONTRAST":
-            self.state = "BRIGHTNESS"
-        else:
-            self.state = "FREQ"
-        self.update_status_bar ()
-
-
-    def set_contrast (self, contrast):
-        self.contrast = contrast
-        self.invert_and_scale.set_k(-self.contrast *128.0*255.0/(200.0))
-        self.myform['contrast'].set_value(self.contrast)
-        self.update_status_bar ()
-
-    def set_brightness (self, brightness):
-        self.brightness = brightness
-        self.set_blacklevel.set_k(self.brightness +255.0)
-        self.myform['brightness'].set_value(self.brightness)
-        self.update_status_bar ()
-
-    def set_freq(self, target_freq):
-        """
-        Set the center frequency we're interested in.
-
-        Args:
-            target_freq: frequency in Hz
-        @rypte: bool
-
-        Tuning is a two step process.  First we ask the front-end to
-        tune as close to the desired frequency as it can.  Then we use
-        the result of that operation and our target_frequency to
-        determine the value for the digital down converter.
-        """
-        if not (self.u is None):
-          r = self.u.set_center_freq(target_freq)
-          if r:
-              self.freq = target_freq
-              self.myform['freq'].set_value(target_freq)         # update displayed value
-              self.myform['freq_slider'].set_value(target_freq)  # update displayed value
-              self.update_status_bar()
-              self._set_status_msg("OK", 0)
-              return True
-
-        self._set_status_msg("Failed", 0)
-        return False
-
-    def set_gain(self, gain):
-      if not (self.u is None):
-        self.gain=gain
-        self.myform['gain'].set_value(gain)     # update displayed value
-        self.u.set_gain(gain)
-        self.update_status_bar()
-
-    def update_status_bar (self):
-      msg = "Setting:%s Contrast:%r Brightness:%r Gain: %r" % \
-          (self.state, self.contrast,self.brightness,self.gain)
-      self._set_status_msg(msg, 1)
-        #self.src_fft.set_baseband_freq(self.freq)
-
-
-if __name__ == '__main__':
-    app = stdgui2.stdapp (tv_rx_block, "USRP TV RX black-and-white")
-    app.MainLoop ()
diff --git a/gr-uhd/examples/python/usrp_tv_rcv_nogui.py b/gr-uhd/examples/python/usrp_tv_rcv_nogui.py
deleted file mode 100755
index 80e2e1c17a..0000000000
--- a/gr-uhd/examples/python/usrp_tv_rcv_nogui.py
+++ /dev/null
@@ -1,215 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2005-2007,2011,2013 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-"""
-Reads from a file and generates PAL TV pictures in black and white
-which can be displayed using ImageMagick or realtime using
-gr-video-sdl (To capture the input file Use usrp_rx_file.py, or use
-usrp_rx_cfile.py --output-shorts if you have a recent enough
-usrp_rx_cfile.py)
-
-Can also use usrp directly as capture source, but then you need a
-higher decimation factor (64) and thus get a lower horizontal
-resulution.  There is no synchronisation yet. The sync blocks are in
-development but not yet in cvs.
-
-"""
-
-from gnuradio import gr, eng_notation
-from gnuradio import analog
-from gnuradio import blocks
-from gnuradio import audio
-from gnuradio import uhd
-from gnuradio.eng_option import eng_option
-from optparse import OptionParser
-import sys
-
-try:
-  from gnuradio import video_sdl
-except:
-  print "FYI: gr-video-sdl is not installed"
-  print "realtime \"sdl\" video output window will not be available"
-
-
-class my_top_block(gr.top_block):
-
-    def __init__(self):
-        gr.top_block.__init__(self)
-
-        usage=("%prog: [options] output_filename.\nSpecial output_filename" + \
-            "\"sdl\" will use video_sink_sdl as realtime output window. " + \
-            "You then need to have gr-video-sdl installed.\n" +\
-            "Make sure your input capture file containes interleaved " + \
-            "shorts not complex floats")
-        parser = OptionParser(option_class=eng_option, usage=usage)
-        parser.add_option("-a", "--args", type="string", default="",
-                          help="UHD device address args [default=%default]")
-        parser.add_option("", "--spec", type="string", default=None,
-	                  help="Subdevice of UHD device where appropriate")
-        parser.add_option("-A", "--antenna", type="string", default=None,
-                          help="select Rx Antenna where appropriate")
-        parser.add_option("-s", "--samp-rate", type="eng_float", default=1e6,
-                          help="set sample rate")
-        parser.add_option("-c", "--contrast", type="eng_float", default=1.0,
-                          help="set contrast (default is 1.0)")
-        parser.add_option("-b", "--brightness", type="eng_float", default=0.0,
-                          help="set brightness (default is 0)")
-        parser.add_option("-i", "--in-filename", type="string", default=None,
-                          help="Use input file as source. samples must be " + \
-                            "interleaved shorts \n Use usrp_rx_file.py or " + \
-                            "usrp_rx_cfile.py --output-shorts.\n Special " + \
-                            "name \"usrp\" results in realtime capturing " + \
-                            "and processing using usrp.\n" + \
-                            "You then probably need a decimation factor of 64 or higher.")
-        parser.add_option("-f", "--freq", type="eng_float", default=519.25e6,
-                          help="set frequency to FREQ.\nNote that the frequency of the video carrier is not at the middle of the TV channel", metavar="FREQ")
-        parser.add_option("-g", "--gain", type="eng_float", default=None,
-                          help="set gain in dB (default is midpoint)")
-        parser.add_option("-p", "--pal", action="store_true", default=False,
-                          help="PAL video format (this is the default)")
-        parser.add_option("-n", "--ntsc", action="store_true", default=False,
-                          help="NTSC video format")
-        parser.add_option("-r", "--repeat", action="store_false", default=True,
-                          help="repeat in_file in a loop")
-        parser.add_option("-N", "--nframes", type="eng_float", default=None,
-                          help="number of frames to collect [default=+inf]")
-        parser.add_option("", "--freq-min", type="eng_float", default=50.25e6,
-                          help="Set a minimum frequency [default=%default]")
-        parser.add_option("", "--freq-max", type="eng_float", default=900.25e6,
-                          help="Set a maximum frequency [default=%default]")
-        (options, args) = parser.parse_args ()
-        if not (len(args) == 1):
-            parser.print_help()
-            sys.stderr.write('You must specify the output. FILENAME or sdl \n');
-            sys.exit(1)
-
-        filename = args[0]
-
-        self.tv_freq_min = options.freq_min
-        self.tv_freq_max = options.freq_max
-
-        if options.in_filename is None:
-            parser.print_help()
-            sys.stderr.write('You must specify the input -i FILENAME or -i usrp\n');
-            raise SystemExit, 1
-
-        if not (filename=="sdl"):
-          options.repeat=False
-
-        input_rate = options.samp_rate
-        print "video sample rate %s" % (eng_notation.num_to_str(input_rate))
-
-        if not (options.in_filename=="usrp"):
-          # file is data source, capture with usr_rx_csfile.py
-          self.filesource = blocks.file_source(gr.sizeof_short,
-                                               options.in_filename,
-                                               options.repeat)
-          self.istoc = blocks.interleaved_short_to_complex()
-          self.connect(self.filesource,self.istoc)
-          self.src=self.istoc
-        else:
-          if options.freq is None:
-            parser.print_help()
-            sys.stderr.write('You must specify the frequency with -f FREQ\n');
-            raise SystemExit, 1
-
-          # build the graph
-          self.u = uhd.usrp_source(device_addr=options.args, stream_args=uhd.stream_args('fc32'))
-
-          # Set the subdevice spec
-          if(options.spec):
-            self.u.set_subdev_spec(options.spec, 0)
-
-          # Set the antenna
-          if(options.antenna):
-            self.u.set_antenna(options.antenna, 0)
-
-          self.u.set_samp_rate(input_rate)
-          dev_rate = self.u.get_samp_rate()
-
-          self.src=self.u
-
-          if options.gain is None:
-              # if no gain was specified, use the mid-point in dB
-              g = self.u.get_gain_range()
-              options.gain = float(g.start()+g.stop())/2.0
-          self.u.set_gain(options.gain)
-
-          r = self.u.set_center_freq(options.freq)
-          if not r:
-              sys.stderr.write('Failed to set frequency\n')
-              raise SystemExit, 1
-
-
-        self.agc = analog.agc_cc(1e-7,1.0,1.0) #1e-7
-        self.am_demod = blocks.complex_to_mag ()
-        self.set_blacklevel = blocks.add_const_ff(options.brightness +255.0)
-        self.invert_and_scale = blocks.multiply_const_ff(-options.contrast *128.0*255.0/(200.0))
-        self.f2uc = blocks.float_to_uchar()
-
-        # sdl window as final sink
-        if not (options.pal or options.ntsc):
-          options.pal=True #set default to PAL
-        if options.pal:
-          lines_per_frame=625.0
-          frames_per_sec=25.0
-          show_width=768
-        elif options.ntsc:
-          lines_per_frame=525.0
-          frames_per_sec=29.97002997
-          show_width=640
-        width=int(input_rate/(lines_per_frame*frames_per_sec))
-        height=int(lines_per_frame)
-
-        if filename=="sdl":
-          #Here comes the tv screen, you have to build and install
-          #gr-video-sdl for this (subproject of gnuradio)
-          try:
-            video_sink = video_sdl.sink_uc(frames_per_sec, width, height, 0,
-                                           show_width,height)
-          except:
-            print "gr-video-sdl is not installed"
-            print "realtime \"sdl\" video output window is not available"
-            raise SystemExit, 1
-          self.dst=video_sink
-        else:
-          print "You can use the imagemagick display tool to show the resulting imagesequence"
-          print "use the following line to show the demodulated TV-signal:"
-          print "display -depth 8 -size " +str(width)+ "x" + str(height) + " gray:" +filename
-          print "(Use the spacebar to advance to next frames)"
-          file_sink = blocks.file_sink(gr.sizeof_char, filename)
-          self.dst =file_sink
-
-        if options.nframes is None:
-            self.connect(self.src, self.agc)
-        else:
-            self.head = blocks.head(gr.sizeof_gr_complex, int(options.nframes*width*height))
-            self.connect(self.src, self.head, self.agc)
-
-        self.connect (self.agc, self.am_demod, self.invert_and_scale,
-                      self.set_blacklevel, self.f2uc, self.dst)
-
-if __name__ == '__main__':
-    try:
-        my_top_block().run()
-    except KeyboardInterrupt:
-        pass
diff --git a/gr-uhd/examples/python/usrp_wfm_rcv.py b/gr-uhd/examples/python/usrp_wfm_rcv.py
deleted file mode 100755
index c11c18980c..0000000000
--- a/gr-uhd/examples/python/usrp_wfm_rcv.py
+++ /dev/null
@@ -1,290 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2005-2007,2009,2011,2012 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-from gnuradio import gr, audio, uhd
-from gnuradio import blocks
-from gnuradio import filter
-from gnuradio import analog
-from gnuradio.eng_option import eng_option
-from gnuradio.wxgui import slider, powermate
-from gnuradio.wxgui import stdgui2, fftsink2, form
-from optparse import OptionParser
-import sys
-import wx
-
-
-class wfm_rx_block (stdgui2.std_top_block):
-    def __init__(self,frame,panel,vbox,argv):
-        stdgui2.std_top_block.__init__ (self,frame,panel,vbox,argv)
-
-        parser=OptionParser(option_class=eng_option)
-        parser.add_option("-a", "--args", type="string", default="",
-                          help="UHD device address args [default=%default]")
-        parser.add_option("", "--spec", type="string", default=None,
-	                  help="Subdevice of UHD device where appropriate")
-        parser.add_option("-A", "--antenna", type="string", default=None,
-                          help="select Rx Antenna where appropriate")
-        parser.add_option("-f", "--freq", type="eng_float", default=100.1e6,
-                          help="set frequency to FREQ", metavar="FREQ")
-        parser.add_option("-g", "--gain", type="eng_float", default=None,
-                          help="set gain in dB (default is midpoint)")
-        parser.add_option("-V", "--volume", type="eng_float", default=None,
-                          help="set volume (default is midpoint)")
-        parser.add_option("-O", "--audio-output", type="string", default="default",
-                          help="pcm device name.  E.g., hw:0,0 or surround51 or /dev/dsp")
-        parser.add_option("", "--freq-min", type="eng_float", default=87.9e6,
-                          help="Set a minimum frequency [default=%default]")
-        parser.add_option("", "--freq-max", type="eng_float", default=108.1e6,
-                          help="Set a maximum frequency [default=%default]")
-
-        (options, args) = parser.parse_args()
-        if len(args) != 0:
-            parser.print_help()
-            sys.exit(1)
-
-        self.frame = frame
-        self.panel = panel
-
-        self.vol = 0
-        self.state = "FREQ"
-        self.freq = 0
-
-        self.fm_freq_min = options.freq_min
-        self.fm_freq_max = options.freq_max
-
-        # build graph
-        self.u = uhd.usrp_source(device_addr=options.args, stream_args=uhd.stream_args('fc32'))
-
-        # Set the subdevice spec
-        if(options.spec):
-            self.u.set_subdev_spec(options.spec, 0)
-
-        # Set the antenna
-        if(options.antenna):
-            self.u.set_antenna(options.antenna, 0)
-
-        usrp_rate  = 320e3
-        demod_rate = 320e3
-        audio_rate = 32e3
-        audio_decim = int(demod_rate / audio_rate)
-
-        self.u.set_samp_rate(usrp_rate)
-        dev_rate = self.u.get_samp_rate()
-
-        nfilts = 32
-        chan_coeffs = filter.optfir.low_pass(nfilts,           # gain
-                                             nfilts*usrp_rate, # sampling rate
-                                             80e3,             # passband cutoff
-                                             115e3,            # stopband cutoff
-                                             0.1,              # passband ripple
-                                             60)               # stopband attenuation
-        rrate = usrp_rate / dev_rate
-        self.chan_filt = filter.pfb.arb_resampler_ccf(rrate, chan_coeffs, nfilts)
-
-        self.guts = analog.wfm_rcv(demod_rate, audio_decim)
-
-        self.volume_control = blocks.multiply_const_ff(self.vol)
-
-        # sound card as final sink
-        self.audio_sink = audio.sink(int (audio_rate),
-                                     options.audio_output,
-                                     False)  # ok_to_block
-
-        # now wire it all together
-        self.connect(self.u, self.chan_filt, self.guts,
-                     self.volume_control, self.audio_sink)
-
-        self._build_gui(vbox, usrp_rate, demod_rate, audio_rate)
-
-        if options.gain is None:
-            # if no gain was specified, use the mid-point in dB
-            g = self.u.get_gain_range()
-            options.gain = float(g.start()+g.stop())/2
-
-        if options.volume is None:
-            g = self.volume_range()
-            options.volume = float(g[0]+g[1])/2
-
-        frange = self.u.get_freq_range()
-        if(frange.start() > self.fm_freq_max or frange.stop() <  self.fm_freq_min):
-            sys.stderr.write("Radio does not support required frequency range.\n")
-            sys.exit(1)
-        if(options.freq < self.fm_freq_min or options.freq > self.fm_freq_max):
-            sys.stderr.write("Requested frequency is outside of required frequency range.\n")
-            sys.exit(1)
-
-
-        # set initial values
-
-        self.set_gain(options.gain)
-        self.set_vol(options.volume)
-        if not(self.set_freq(options.freq)):
-            self._set_status_msg("Failed to set initial frequency")
-
-    def _set_status_msg(self, msg, which=0):
-        self.frame.GetStatusBar().SetStatusText(msg, which)
-
-
-    def _build_gui(self, vbox, usrp_rate, demod_rate, audio_rate):
-
-        def _form_set_freq(kv):
-            return self.set_freq(kv['freq'])
-
-
-        if 1:
-            self.src_fft = fftsink2.fft_sink_c(self.panel, title="Data from USRP",
-                                               fft_size=512, sample_rate=usrp_rate,
-					       ref_scale=32768.0, ref_level=0, y_divs=12)
-            self.connect (self.u, self.src_fft)
-            vbox.Add (self.src_fft.win, 4, wx.EXPAND)
-
-        if 1:
-            post_filt_fft = fftsink2.fft_sink_f(self.panel, title="Post Demod",
-                                                fft_size=1024, sample_rate=usrp_rate,
-                                                y_per_div=10, ref_level=0)
-            self.connect (self.guts.fm_demod, post_filt_fft)
-            vbox.Add (post_filt_fft.win, 4, wx.EXPAND)
-
-        if 0:
-            post_deemph_fft = fftsink2.fft_sink_f(self.panel, title="Post Deemph",
-                                                  fft_size=512, sample_rate=audio_rate,
-                                                  y_per_div=10, ref_level=-20)
-            self.connect (self.guts.deemph, post_deemph_fft)
-            vbox.Add (post_deemph_fft.win, 4, wx.EXPAND)
-
-
-        # control area form at bottom
-        self.myform = myform = form.form()
-
-        hbox = wx.BoxSizer(wx.HORIZONTAL)
-        hbox.Add((5,0), 0)
-        myform['freq'] = form.float_field(
-            parent=self.panel, sizer=hbox, label="Freq", weight=1,
-            callback=myform.check_input_and_call(_form_set_freq, self._set_status_msg))
-
-        hbox.Add((5,0), 0)
-        myform['freq_slider'] = \
-            form.quantized_slider_field(parent=self.panel, sizer=hbox, weight=3,
-                                        range=(self.fm_freq_min, self.fm_freq_max, 0.1e6),
-                                        callback=self.set_freq)
-        hbox.Add((5,0), 0)
-        vbox.Add(hbox, 0, wx.EXPAND)
-
-        hbox = wx.BoxSizer(wx.HORIZONTAL)
-        hbox.Add((5,0), 0)
-
-        myform['volume'] = \
-            form.quantized_slider_field(parent=self.panel, sizer=hbox, label="Volume",
-                                        weight=3, range=self.volume_range(),
-                                        callback=self.set_vol)
-        hbox.Add((5,0), 1)
-
-        g = self.u.get_gain_range()
-        myform['gain'] = \
-            form.quantized_slider_field(parent=self.panel, sizer=hbox, label="Gain",
-                                        weight=3, range=(g.start(), g.stop(), g.step()),
-                                        callback=self.set_gain)
-        hbox.Add((5,0), 0)
-        vbox.Add(hbox, 0, wx.EXPAND)
-
-        try:
-            self.knob = powermate.powermate(self.frame)
-            self.rot = 0
-            powermate.EVT_POWERMATE_ROTATE (self.frame, self.on_rotate)
-            powermate.EVT_POWERMATE_BUTTON (self.frame, self.on_button)
-        except:
-            print "FYI: No Powermate or Contour Knob found"
-
-
-    def on_rotate (self, event):
-        self.rot += event.delta
-        if (self.state == "FREQ"):
-            if self.rot >= 3:
-                self.set_freq(self.freq + .1e6)
-                self.rot -= 3
-            elif self.rot <=-3:
-                self.set_freq(self.freq - .1e6)
-                self.rot += 3
-        else:
-            step = self.volume_range()[2]
-            if self.rot >= 3:
-                self.set_vol(self.vol + step)
-                self.rot -= 3
-            elif self.rot <=-3:
-                self.set_vol(self.vol - step)
-                self.rot += 3
-
-    def on_button (self, event):
-        if event.value == 0:        # button up
-            return
-        self.rot = 0
-        if self.state == "FREQ":
-            self.state = "VOL"
-        else:
-            self.state = "FREQ"
-        self.update_status_bar ()
-
-
-    def set_vol (self, vol):
-        g = self.volume_range()
-        self.vol = max(g[0], min(g[1], vol))
-        self.volume_control.set_k(10**(self.vol/10))
-        self.myform['volume'].set_value(self.vol)
-        self.update_status_bar ()
-
-    def set_freq(self, target_freq):
-        """
-        Set the center frequency we're interested in.
-
-        Args:
-            target_freq: frequency in Hz
-        @rypte: bool
-        """
-
-        r = self.u.set_center_freq(target_freq)
-        if r:
-            self.freq = target_freq
-            self.myform['freq'].set_value(target_freq)         # update displayed value
-            self.myform['freq_slider'].set_value(target_freq)  # update displayed value
-            self.update_status_bar()
-            self._set_status_msg("OK", 0)
-            return True
-
-        self._set_status_msg("Failed", 0)
-        return False
-
-    def set_gain(self, gain):
-        self.myform['gain'].set_value(gain)     # update displayed value
-        self.u.set_gain(gain)
-
-    def update_status_bar (self):
-        msg = "Volume:%r  Setting:%s" % (self.vol, self.state)
-        self._set_status_msg(msg, 1)
-        self.src_fft.set_baseband_freq(self.freq)
-
-    def volume_range(self):
-        return (-20.0, 0.0, 0.5)
-
-
-if __name__ == '__main__':
-    app = stdgui2.stdapp (wfm_rx_block, "USRP WFM RX")
-    app.MainLoop ()
diff --git a/gr-uhd/examples/python/usrp_wfm_rcv2_nogui.py b/gr-uhd/examples/python/usrp_wfm_rcv2_nogui.py
deleted file mode 100755
index c5b42cbf08..0000000000
--- a/gr-uhd/examples/python/usrp_wfm_rcv2_nogui.py
+++ /dev/null
@@ -1,157 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2005-2007,2011,2012 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-from gnuradio import gr, audio, uhd
-from gnuradio import blocks
-from gnuradio import filter
-from gnuradio import analog
-from gnuradio.eng_option import eng_option
-from optparse import OptionParser
-import sys
-import math
-
-class wfm_rx_block (gr.top_block):
-
-    def __init__(self):
-        gr.top_block.__init__(self)
-
-        parser=OptionParser(option_class=eng_option)
-        parser.add_option("-a", "--args", type="string", default="",
-                          help="UHD device address args [default=%default]")
-        parser.add_option("", "--spec", type="string", default="A:0 A:0",
-	                  help="Subdevice of UHD device where appropriate")
-        parser.add_option("-A", "--antenna", type="string", default=None,
-                          help="select Rx Antenna where appropriate")
-        parser.add_option("", "--f1", type="eng_float", default=100.7e6,
-                          help="set 1st station frequency to FREQ", metavar="FREQ")
-        parser.add_option("", "--f2", type="eng_float", default=102.5e6,
-                          help="set 2nd station freq to FREQ", metavar="FREQ")
-        parser.add_option("-g", "--gain", type="eng_float", default=None,
-                          help="set gain in dB (default is midpoint)")
-        parser.add_option("-O", "--audio-output", type="string", default="default",
-                          help="pcm device name.  E.g., hw:0,0 or surround51 or /dev/dsp")
-        parser.add_option("", "--freq-min", type="eng_float", default=87.9e6,
-                          help="Set a minimum frequency [default=%default]")
-        parser.add_option("", "--freq-max", type="eng_float", default=108.1e6,
-                          help="Set a maximum frequency [default=%default]")
-
-        (options, args) = parser.parse_args()
-        if len(args) != 0:
-            parser.print_help()
-            sys.exit(1)
-
-        if abs(options.f1 - options.f2) > 5.5e6:
-            print "Sorry, two stations must be within 5.5MHz of each other"
-            raise SystemExit
-
-        f = (options.f1, options.f2)
-
-        self.vol = .1
-        self.state = "FREQ"
-
-        self.fm_freq_min = options.freq_min
-        self.fm_freq_max = options.freq_max
-
-        # build graph
-        stream_args = uhd.stream_args('fc32', channels=range(2))
-        self.u = uhd.usrp_source(device_addr=options.args, stream_args=stream_args)
-
-        # Set front end channel mapping
-        self.u.set_subdev_spec(options.spec)
-
-        usrp_rate  = 320e3
-        demod_rate = 320e3
-        audio_rate = 32e3
-        audio_decim = int(demod_rate / audio_rate)
-
-        self.u.set_samp_rate(usrp_rate)
-        dev_rate = self.u.get_samp_rate()
-
-        # Make sure dboard can suppor the required frequencies
-        frange = self.u.get_freq_range()
-        if(frange.start() > self.fm_freq_max or frange.stop() <  self.fm_freq_min):
-            sys.stderr.write("Radio does not support required frequency range.\n")
-            sys.exit(1)
-
-        # sound card as final sink
-        self.audio_sink = audio.sink(int(audio_rate), options.audio_output)
-
-        # taps for channel filter
-        nfilts = 32
-        chan_coeffs = filter.optfir.low_pass(nfilts,           # gain
-                                             nfilts*usrp_rate, # sampling rate
-                                             80e3,             # passband cutoff
-                                             115e3,            # stopband cutoff
-                                             0.1,              # passband ripple
-                                             60)               # stopband attenuation
-        rrate = usrp_rate / dev_rate
-
-        # set front end PLL to middle frequency
-        mid_freq = (f[0] + f[1]) / 2.0
-
-        if options.gain is None:
-            # if no gain was specified, use the mid-point in dB
-            g = self.u.get_gain_range()
-            options.gain = float(g.start()+g.stop())/2.0
-
-        for n in range(2):
-           chan_filt = filter.pfb.arb_resampler_ccf(rrate, chan_coeffs, nfilts)
-           guts = analog.wfm_rcv(demod_rate, audio_decim)
-           volume_control = blocks.multiply_const_ff(self.vol)
-
-           #self.connect((self.di, n), chan_filt)
-           self.connect((self.u, n), chan_filt)
-           self.connect(chan_filt, guts, volume_control)
-           self.connect(volume_control, (self.audio_sink, n))
-
-           # Test the the requested frequencies are in range
-           if(f[n] < self.fm_freq_min or f[n] > self.fm_freq_max):
-              sys.stderr.write("Requested frequency is outside of required frequency range.\n")
-              sys.exit(1)
-
-           # Tune each channel by setting the RF freq to mid_freq and the
-           # DDC freq to f[n].
-           tr = uhd.tune_request(f[n], rf_freq=mid_freq,
-                                 rf_freq_policy=uhd.tune_request.POLICY_MANUAL)
-           self.u.set_center_freq(tr, n)
-
-           # Set gain for each channel
-           self.set_gain(options.gain, n)
-
-           # Set the antenna
-           if(options.antenna):
-               self.u.set_antenna(options.antenna, n)
-
-    def set_vol (self, vol):
-        self.vol = vol
-        self.volume_control.set_k(self.vol)
-
-
-    def set_gain(self, gain, n):
-        self.u.set_gain(gain, n)
-
-if __name__ == '__main__':
-    tb = wfm_rx_block()
-    try:
-        tb.run()
-    except KeyboardInterrupt:
-        pass
diff --git a/gr-uhd/examples/python/usrp_wfm_rcv_fmdet.py b/gr-uhd/examples/python/usrp_wfm_rcv_fmdet.py
deleted file mode 100755
index 599f0bc460..0000000000
--- a/gr-uhd/examples/python/usrp_wfm_rcv_fmdet.py
+++ /dev/null
@@ -1,353 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2005-2007,2011,2012 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-from gnuradio import gr, audio, uhd
-from gnuradio import blocks
-from gnuradio import filter
-from gnuradio import analog
-from gnuradio.eng_option import eng_option
-from gnuradio.wxgui import slider, powermate
-from gnuradio.wxgui import stdgui2, fftsink2, form, scopesink2
-from optparse import OptionParser
-import sys
-import wx
-
-class wfm_rx_block (stdgui2.std_top_block):
-    def __init__(self,frame,panel,vbox,argv):
-        stdgui2.std_top_block.__init__ (self,frame,panel,vbox,argv)
-
-        parser=OptionParser(option_class=eng_option)
-        parser.add_option("-a", "--args", type="string", default="",
-                          help="UHD device address args [default=%default]")
-        parser.add_option("", "--spec", type="string", default=None,
-	                  help="Subdevice of UHD device where appropriate")
-        parser.add_option("-A", "--antenna", type="string", default=None,
-                          help="select Rx Antenna where appropriate")
-        parser.add_option("-f", "--freq", type="eng_float", default=100.1e6,
-                          help="set frequency to FREQ", metavar="FREQ")
-        parser.add_option("-g", "--gain", type="eng_float", default=None,
-                          help="set gain in dB (default is midpoint)")
-        parser.add_option("-s", "--squelch", type="eng_float", default=0,
-                          help="set squelch level (default is 0)")
-        parser.add_option("-V", "--volume", type="eng_float", default=None,
-                          help="set volume (default is midpoint)")
-        parser.add_option("-O", "--audio-output", type="string", default="default",
-                          help="pcm device name.  E.g., hw:0,0 or surround51 or /dev/dsp")
-        parser.add_option("", "--freq-min", type="eng_float", default=87.9e6,
-                          help="Set a minimum frequency [default=%default]")
-        parser.add_option("", "--freq-max", type="eng_float", default=108.1e6,
-                          help="Set a maximum frequency [default=%default]")
-
-
-        (options, args) = parser.parse_args()
-        if len(args) != 0:
-            parser.print_help()
-            sys.exit(1)
-
-        self.frame = frame
-        self.panel = panel
-
-        self.vol = 0
-        self.state = "FREQ"
-        self.freq = 0
-
-        self.fm_freq_min = options.freq_min
-        self.fm_freq_max = options.freq_max
-
-        # build graph
-        self.u = uhd.usrp_source(device_addr=options.args, stream_args=uhd.stream_args('fc32'))
-
-        # Set the subdevice spec
-        if(options.spec):
-            self.u.set_subdev_spec(options.spec, 0)
-
-        # Set the antenna
-        if(options.antenna):
-            self.u.set_antenna(options.antenna, 0)
-
-        usrp_rate  = 320e3
-        demod_rate = 320e3
-        audio_rate = 48e3
-        audio_decim = 10
-
-        self.u.set_samp_rate(usrp_rate)
-        dev_rate = self.u.get_samp_rate()
-
-        nfilts = 32
-        chan_coeffs = filter.firdes.low_pass_2(10*nfilts,           # gain
-                                               nfilts*usrp_rate, # sampling rate
-                                               90e3,             # passband cutoff
-                                               30e3,             # transition bw
-                                               70)               # stopband attenuation
-        rrate = usrp_rate / dev_rate
-        self.chan_filt = filter.pfb.arb_resampler_ccf(rrate, chan_coeffs, nfilts)
-
-        self.guts = analog.wfm_rcv_fmdet (demod_rate, audio_decim)
-
-        chan_rate = audio_rate / (demod_rate/audio_decim)
-        self.rchan_filt = filter.pfb.arb_resampler_fff(chan_rate)
-        self.lchan_filt = filter.pfb.arb_resampler_fff(chan_rate)
-
-        # FIXME rework {add,multiply}_const_* to handle multiple streams
-        self.volume_control_l = blocks.multiply_const_ff(self.vol)
-        self.volume_control_r = blocks.multiply_const_ff(self.vol)
-
-        # sound card as final sink
-        self.audio_sink = audio.sink(int (audio_rate),
-                                     options.audio_output,
-                                     False)   # ok_to_block
-
-        # now wire it all together
-        self.connect(self.u, self.chan_filt, self.guts)
-        self.connect((self.guts, 0), self.lchan_filt,
-                     self.volume_control_l, (self.audio_sink,0))
-        self.connect((self.guts, 1), self.rchan_filt,
-                     self.volume_control_r, (self.audio_sink,1))
-
-        try:
-          self.guts.stereo_carrier_pll_recovery.squelch_enable(True)
-        except:
-          print "FYI: This implementation of the stereo_carrier_pll_recovery has no squelch implementation yet"
-
-
-        self._build_gui(vbox, usrp_rate, demod_rate, audio_rate)
-
-        if options.gain is None:
-            # if no gain was specified, use the mid-point in dB
-            g = self.u.get_gain_range()
-            options.gain = float(g.start()+g.stop())/2.0
-
-        if options.volume is None:
-            g = self.volume_range()
-            options.volume = float(g[0]+g[1])/2
-
-        if abs(options.freq) < 1e6:
-            options.freq *= 1e6
-
-        frange = self.u.get_freq_range()
-        if(frange.start() > self.fm_freq_max or frange.stop() <  self.fm_freq_min):
-            sys.stderr.write("Radio does not support required frequency range.\n")
-            sys.exit(1)
-        if(options.freq < self.fm_freq_min or options.freq > self.fm_freq_max):
-            sys.stderr.write("Requested frequency is outside of required frequency range.\n")
-            sys.exit(1)
-
-        # set initial values
-        self.set_gain(options.gain)
-        self.set_vol(options.volume)
-        try:
-          self.guts.stereo_carrier_pll_recovery.set_lock_threshold(options.squelch)
-        except:
-          print "FYI: This implementation of the stereo_carrier_pll_recovery has no squelch implementation yet"
-
-        if not(self.set_freq(options.freq)):
-            self._set_status_msg("Failed to set initial frequency")
-
-    def _set_status_msg(self, msg, which=0):
-        self.frame.GetStatusBar().SetStatusText(msg, which)
-
-
-    def _build_gui(self, vbox, usrp_rate, demod_rate, audio_rate):
-
-        def _form_set_freq(kv):
-            return self.set_freq(kv['freq'])
-
-
-        if 1:
-            self.src_fft = fftsink2.fft_sink_c(self.panel, title="Data from USRP",
-                                               fft_size=512, sample_rate=usrp_rate,
-					       ref_scale=32768.0, ref_level=0, y_divs=12)
-            self.connect (self.u, self.src_fft)
-            vbox.Add (self.src_fft.win, 4, wx.EXPAND)
-
-        if 1:
-            post_fm_demod_fft = fftsink2.fft_sink_f(self.panel, title="Post FM Demod",
-                                                    fft_size=512, sample_rate=demod_rate,
-                                                    y_per_div=10, ref_level=0)
-            self.connect (self.guts.fm_demod, post_fm_demod_fft)
-            vbox.Add (post_fm_demod_fft.win, 4, wx.EXPAND)
-
-        if 0:
-            post_stereo_carrier_generator_fft = fftsink2.fft_sink_c (self.panel, title="Post Stereo_carrier_generator",
-                                                  fft_size=512, sample_rate=audio_rate,
-                                                  y_per_div=10, ref_level=0)
-            self.connect (self.guts.stereo_carrier_generator, post_stereo_carrier_generator_fft)
-            vbox.Add (post_stereo_carrier_generator_fft.win, 4, wx.EXPAND)
-
-        if 0:
-            post_deemphasis_left = fftsink2.fft_sink_f (self.panel, title="Post_Deemphasis_Left",
-                                                  fft_size=512, sample_rate=audio_rate,
-                                                  y_per_div=10, ref_level=0)
-            self.connect (self.guts.deemph_Left, post_deemphasis_left)
-            vbox.Add (post_deemphasis_left.win, 4, wx.EXPAND)
-
-        if 0:
-            post_deemphasis_right = fftsink2.fft_sink_f(self.panel, title="Post_Deemphasis_Right",
-                                                  fft_size=512, sample_rate=audio_rate,
-                                                  y_per_div=10, ref_level=-20)
-            self.connect (self.guts.deemph_Left, post_deemphasis_right)
-            vbox.Add (post_deemphasis_right.win, 4, wx.EXPAND)
-
-
-        if 0:
-            LmR_fft = fftsink2.fft_sink_f(self.panel, title="LmR",
-                                          fft_size=512, sample_rate=audio_rate,
-                                          y_per_div=10, ref_level=-20)
-            self.connect (self.guts.LmR_real,LmR_fft)
-            vbox.Add (LmR_fft.win, 4, wx.EXPAND)
-
-        if 0:
-            self.scope = scopesink2.scope_sink_f(self.panel, sample_rate=demod_rate)
-            self.connect (self.guts.fm_demod,self.scope)
-            vbox.Add (self.scope.win,4,wx.EXPAND)
-
-        # control area form at bottom
-        self.myform = myform = form.form()
-
-        hbox = wx.BoxSizer(wx.HORIZONTAL)
-        hbox.Add((5,0), 0)
-        myform['freq'] = form.float_field(
-            parent=self.panel, sizer=hbox, label="Freq", weight=1,
-            callback=myform.check_input_and_call(_form_set_freq, self._set_status_msg))
-
-        hbox.Add((5,0), 0)
-        myform['freq_slider'] = \
-            form.quantized_slider_field(parent=self.panel, sizer=hbox, weight=3,
-                                        range=(self.fm_freq_min, self.fm_freq_max, 0.1e6),
-                                        callback=self.set_freq)
-        hbox.Add((5,0), 0)
-        vbox.Add(hbox, 0, wx.EXPAND)
-
-        hbox = wx.BoxSizer(wx.HORIZONTAL)
-        hbox.Add((5,0), 0)
-
-        myform['volume'] = \
-            form.quantized_slider_field(parent=self.panel, sizer=hbox, label="Volume",
-                                        weight=3, range=self.volume_range(),
-                                        callback=self.set_vol)
-        hbox.Add((5,0), 1)
-
-        g = self.u.get_gain_range()
-        myform['gain'] = \
-            form.quantized_slider_field(parent=self.panel, sizer=hbox, label="Gain",
-                                        weight=3, range=(g.start(), g.stop(), g.step()),
-                                        callback=self.set_gain)
-        hbox.Add((5,0), 0)
-
-        myform['sqlch_thrsh'] = \
-            form.quantized_slider_field(parent=self.panel, sizer=hbox, label="Stereo Squelch Threshold",
-                                        weight=3, range=(0.0,1.0,0.01),
-                                        callback=self.set_squelch)
-        hbox.Add((5,0), 0)
-        vbox.Add(hbox, 0, wx.EXPAND)
-
-        try:
-            self.knob = powermate.powermate(self.frame)
-            self.rot = 0
-            powermate.EVT_POWERMATE_ROTATE (self.frame, self.on_rotate)
-            powermate.EVT_POWERMATE_BUTTON (self.frame, self.on_button)
-        except:
-            print "FYI: No Powermate or Contour Knob found"
-
-
-    def on_rotate (self, event):
-        self.rot += event.delta
-        if (self.state == "FREQ"):
-            if self.rot >= 3:
-                self.set_freq(self.freq + .1e6)
-                self.rot -= 3
-            elif self.rot <=-3:
-                self.set_freq(self.freq - .1e6)
-                self.rot += 3
-        else:
-            step = self.volume_range()[2]
-            if self.rot >= 3:
-                self.set_vol(self.vol + step)
-                self.rot -= 3
-            elif self.rot <=-3:
-                self.set_vol(self.vol - step)
-                self.rot += 3
-
-    def on_button (self, event):
-        if event.value == 0:        # button up
-            return
-        self.rot = 0
-        if self.state == "FREQ":
-            self.state = "VOL"
-        else:
-            self.state = "FREQ"
-        self.update_status_bar ()
-
-
-    def set_vol (self, vol):
-        g = self.volume_range()
-        self.vol = max(g[0], min(g[1], vol))
-        self.volume_control_l.set_k(10**(self.vol/10))
-        self.volume_control_r.set_k(10**(self.vol/10))
-        self.myform['volume'].set_value(self.vol)
-        self.update_status_bar ()
-
-    def set_squelch(self,squelch_threshold):
-        try:
-          self.guts.stereo_carrier_pll_recovery.set_lock_threshold(squelch_threshold);
-        except:
-          print "FYI: This implementation of the stereo_carrier_pll_recovery has no squelch implementation yet"
-
-
-    def set_freq(self, target_freq):
-        """
-        Set the center frequency we're interested in.
-
-        Args:
-            target_freq: frequency in Hz
-        @rypte: bool
-        """
-
-        r = self.u.set_center_freq(target_freq)
-
-        if r:
-            self.freq = target_freq
-            self.myform['freq'].set_value(target_freq)         # update displayed value
-            self.myform['freq_slider'].set_value(target_freq)  # update displayed value
-            self.update_status_bar()
-            self._set_status_msg("OK", 0)
-            return True
-
-        self._set_status_msg("Failed", 0)
-        return False
-
-    def set_gain(self, gain):
-        self.myform['gain'].set_value(gain)     # update displayed value
-        self.u.set_gain(gain)
-
-    def update_status_bar (self):
-        msg = "Volume:%r  Setting:%s" % (self.vol, self.state)
-        self._set_status_msg(msg, 1)
-        self.src_fft.set_baseband_freq(self.freq)
-
-    def volume_range(self):
-        return (-20.0, 0.0, 0.5)
-
-
-if __name__ == '__main__':
-    app = stdgui2.stdapp (wfm_rx_block, "USRP WFM RX")
-    app.MainLoop ()
diff --git a/gr-uhd/examples/python/usrp_wfm_rcv_nogui.py b/gr-uhd/examples/python/usrp_wfm_rcv_nogui.py
deleted file mode 100755
index 134df3b39e..0000000000
--- a/gr-uhd/examples/python/usrp_wfm_rcv_nogui.py
+++ /dev/null
@@ -1,179 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2005-2007,2011,2012 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-from gnuradio import gr, audio, uhd
-from gnuradio import blocks
-from gnuradio import filter
-from gnuradio import analog
-from gnuradio import eng_notation
-from gnuradio.eng_option import eng_option
-from optparse import OptionParser
-import sys
-
-class wfm_rx_block (gr.top_block):
-
-    def __init__(self):
-        gr.top_block.__init__(self)
-
-        parser=OptionParser(option_class=eng_option)
-        parser.add_option("-a", "--args", type="string", default="",
-                          help="UHD device address args [default=%default]")
-        parser.add_option("", "--spec", type="string", default=None,
-	                  help="Subdevice of UHD device where appropriate")
-        parser.add_option("-A", "--antenna", type="string", default=None,
-                          help="select Rx Antenna where appropriate")
-        parser.add_option("-f", "--freq", type="eng_float", default=100.1e6,
-                          help="set frequency to FREQ", metavar="FREQ")
-        parser.add_option("-g", "--gain", type="eng_float", default=None,
-                          help="set gain in dB (default is midpoint)")
-        parser.add_option("-V", "--volume", type="eng_float", default=None,
-                          help="set volume (default is midpoint)")
-        parser.add_option("-O", "--audio-output", type="string", default="default",
-                          help="pcm device name.  E.g., hw:0,0 or surround51 or /dev/dsp")
-        parser.add_option("", "--freq-min", type="eng_float", default=87.9e6,
-                          help="Set a minimum frequency [default=%default]")
-        parser.add_option("", "--freq-max", type="eng_float", default=108.1e6,
-                          help="Set a maximum frequency [default=%default]")
-
-        (options, args) = parser.parse_args()
-        if len(args) != 0:
-            parser.print_help()
-            sys.exit(1)
-
-        self.state = "FREQ"
-        self.freq = 0
-
-        self.fm_freq_min = options.freq_min
-        self.fm_freq_max = options.freq_max
-
-        # build graph
-        self.u = uhd.usrp_source(device_addr=options.args, stream_args=uhd.stream_args('fc32'))
-
-        # Set the subdevice spec
-        if(options.spec):
-            self.u.set_subdev_spec(options.spec, 0)
-
-        # Set the antenna
-        if(options.antenna):
-            self.u.set_antenna(options.antenna, 0)
-
-        usrp_rate  = 320e3
-        demod_rate = 320e3
-        audio_rate = 32e3
-        audio_decim = int(demod_rate / audio_rate)
-
-        self.u.set_samp_rate(usrp_rate)
-        dev_rate = self.u.get_samp_rate()
-
-        nfilts = 32
-        chan_coeffs = filter.optfir.low_pass(nfilts,           # gain
-                                             nfilts*usrp_rate, # sampling rate
-                                             80e3,             # passband cutoff
-                                             115e3,            # stopband cutoff
-                                             0.1,              # passband ripple
-                                             60)               # stopband attenuation
-        rrate = usrp_rate / dev_rate
-        self.chan_filt = filter.pfb.arb_resampler_ccf(rrate, chan_coeffs, nfilts)
-
-        self.guts = analog.wfm_rcv(demod_rate, audio_decim)
-
-        self.volume_control = blocks.multiply_const_ff(1)
-
-        # sound card as final sink
-        self.audio_sink = audio.sink(int(audio_rate),
-                                     options.audio_output,
-                                     False)  # ok_to_block
-
-        # now wire it all together
-        self.connect(self.u, self.chan_filt, self.guts,
-                     self.volume_control, self.audio_sink)
-
-        if options.gain is None:
-            # if no gain was specified, use the mid-point in dB
-            g = self.u.get_gain_range()
-            options.gain = float(g.start()+g.stop())/2.0
-
-        if options.volume is None:
-            g = self.volume_range()
-            options.volume = float(g[0]+g[1])/2
-
-        frange = self.u.get_freq_range()
-        if(frange.start() > self.fm_freq_max or frange.stop() <  self.fm_freq_min):
-            sys.stderr.write("Radio does not support required frequency range.\n")
-            sys.exit(1)
-        if(options.freq < self.fm_freq_min or options.freq > self.fm_freq_max):
-            sys.stderr.write("Requested frequency is outside of required frequency range.\n")
-            sys.exit(1)
-
-        # set initial values
-        self.set_gain(options.gain)
-        self.set_vol(options.volume)
-        if not(self.set_freq(options.freq)):
-            self._set_status_msg("Failed to set initial frequency")
-
-    def set_vol (self, vol):
-        g = self.volume_range()
-        self.vol = max(g[0], min(g[1], vol))
-        self.volume_control.set_k(10**(self.vol/10))
-        self.update_status_bar ()
-
-    def set_freq(self, target_freq):
-        """
-        Set the center frequency we're interested in.
-
-        Args:
-            target_freq: frequency in Hz
-        @rypte: bool
-        """
-
-        r = self.u.set_center_freq(target_freq)
-
-        if r:
-            self.freq = target_freq
-            self.update_status_bar()
-            self._set_status_msg("OK", 0)
-            return True
-
-        self._set_status_msg("Failed", 0)
-        return False
-
-    def set_gain(self, gain):
-        self.u.set_gain(gain)
-
-    def update_status_bar (self):
-        msg = "Freq: %s  Volume:%f  Setting:%s" % (
-            eng_notation.num_to_str(self.freq), self.vol, self.state)
-        self._set_status_msg(msg, 1)
-
-    def _set_status_msg(self, msg, which=0):
-        print msg
-
-    def volume_range(self):
-        return (-20.0, 0.0, 0.5)
-
-
-if __name__ == '__main__':
-    tb = wfm_rx_block()
-    try:
-        tb.run()
-    except KeyboardInterrupt:
-        pass
diff --git a/gr-uhd/examples/python/usrp_wfm_rcv_pll.py b/gr-uhd/examples/python/usrp_wfm_rcv_pll.py
deleted file mode 100755
index 4b33cdcbb3..0000000000
--- a/gr-uhd/examples/python/usrp_wfm_rcv_pll.py
+++ /dev/null
@@ -1,350 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2005-2007,2011,2012 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-from gnuradio import gr, audio, uhd
-from gnuradio import blocks
-from gnuradio import filter
-from gnuradio import analog
-from gnuradio import eng_notation
-from gnuradio.eng_option import eng_option
-from gnuradio.wxgui import slider, powermate
-from gnuradio.wxgui import stdgui2, fftsink2, form, scopesink2
-from optparse import OptionParser
-import sys
-import wx
-
-class wfm_rx_block (stdgui2.std_top_block):
-    def __init__(self,frame,panel,vbox,argv):
-        stdgui2.std_top_block.__init__ (self,frame,panel,vbox,argv)
-
-        parser=OptionParser(option_class=eng_option)
-        parser.add_option("-a", "--args", type="string", default="",
-                          help="UHD device address args [default=%default]")
-        parser.add_option("", "--spec", type="string", default=None,
-	                  help="Subdevice of UHD device where appropriate")
-        parser.add_option("-A", "--antenna", type="string", default=None,
-                          help="select Rx Antenna where appropriate")
-        parser.add_option("-f", "--freq", type="eng_float", default=100.1e6,
-                          help="set frequency to FREQ", metavar="FREQ")
-        parser.add_option("-g", "--gain", type="eng_float", default=None,
-                          help="set gain in dB (default is midpoint)")
-        parser.add_option("-s", "--squelch", type="eng_float", default=0,
-                          help="set squelch level (default is 0)")
-        parser.add_option("-V", "--volume", type="eng_float", default=None,
-                          help="set volume (default is midpoint)")
-        parser.add_option("-O", "--audio-output", type="string", default="default",
-                          help="pcm device name.  E.g., hw:0,0 or surround51 or /dev/dsp")
-        parser.add_option("", "--freq-min", type="eng_float", default=87.9e6,
-                          help="Set a minimum frequency [default=%default]")
-        parser.add_option("", "--freq-max", type="eng_float", default=108.1e6,
-                          help="Set a maximum frequency [default=%default]")
-
-        (options, args) = parser.parse_args()
-        if len(args) != 0:
-            parser.print_help()
-            sys.exit(1)
-
-        self.frame = frame
-        self.panel = panel
-
-        self.vol = 0
-        self.state = "FREQ"
-        self.freq = 0
-
-        self.fm_freq_min = options.freq_min
-        self.fm_freq_max = options.freq_max
-
-        # build graph
-        self.u = uhd.usrp_source(device_addr=options.args, stream_args=uhd.stream_args('fc32'))
-
-        # Set the subdevice spec
-        if(options.spec):
-            self.u.set_subdev_spec(options.spec, 0)
-
-        # Set the antenna
-        if(options.antenna):
-            self.u.set_antenna(options.antenna, 0)
-
-        usrp_rate  = 320e3
-        demod_rate = 320e3
-        audio_rate = 48e3
-        audio_decim = 10
-
-        self.u.set_samp_rate(usrp_rate)
-        dev_rate = self.u.get_samp_rate()
-
-        nfilts = 32
-        chan_coeffs = filter.firdes.low_pass_2(nfilts,           # gain
-                                               nfilts*usrp_rate, # sampling rate
-                                               90e3,             # passband cutoff
-                                               30e3,             # stopband cutoff
-                                               70)               # stopband attenuation
-        rrate = usrp_rate / dev_rate
-        self.chan_filt = filter.pfb.arb_resampler_ccf(rrate, chan_coeffs, nfilts)
-
-
-        self.guts = analog.wfm_rcv_pll(demod_rate, audio_decim)
-
-        chan_rate = audio_rate / (demod_rate/audio_decim)
-        self.rchan_filt = filter.pfb.arb_resampler_fff(chan_rate)
-        self.lchan_filt = filter.pfb.arb_resampler_fff(chan_rate)
-
-        # FIXME rework {add,multiply}_const_* to handle multiple streams
-        self.volume_control_l = blocks.multiply_const_ff(self.vol)
-        self.volume_control_r = blocks.multiply_const_ff(self.vol)
-
-        # sound card as final sink
-        self.audio_sink = audio.sink (int (audio_rate),
-                                      options.audio_output,
-                                      False)   # ok_to_block
-
-        # now wire it all together
-        self.connect (self.u, self.chan_filt, self.guts)
-        self.connect((self.guts, 0), self.lchan_filt,
-                     self.volume_control_l, (self.audio_sink,0))
-        self.connect((self.guts, 1), self.rchan_filt,
-                     self.volume_control_r, (self.audio_sink,1))
-
-        try:
-          self.guts.stereo_carrier_pll_recovery.squelch_enable(True)
-        except:
-          print "FYI: This implementation of the stereo_carrier_pll_recovery has no squelch implementation yet"
-
-
-        self._build_gui(vbox, usrp_rate, demod_rate, audio_rate)
-
-        if options.gain is None:
-            # if no gain was specified, use the mid-point in dB
-            g = self.u.get_gain_range()
-            options.gain = float(g.start()+g.stop())/2.0
-
-        if options.volume is None:
-            g = self.volume_range()
-            options.volume = float(g[0]+g[1])/2
-
-        frange = self.u.get_freq_range()
-        if(frange.start() > self.fm_freq_max or frange.stop() <  self.fm_freq_min):
-            sys.stderr.write("Radio does not support required frequency range.\n")
-            sys.exit(1)
-        if(options.freq < self.fm_freq_min or options.freq > self.fm_freq_max):
-            sys.stderr.write("Requested frequency is outside of required frequency range.\n")
-            sys.exit(1)
-
-        # set initial values
-        self.set_gain(options.gain)
-        self.set_vol(options.volume)
-        try:
-          self.guts.stereo_carrier_pll_recovery.set_lock_threshold(options.squelch)
-        except:
-          print "FYI: This implementation of the stereo_carrier_pll_recovery has no squelch implementation yet"
-
-        if not(self.set_freq(options.freq)):
-            self._set_status_msg("Failed to set initial frequency")
-
-    def _set_status_msg(self, msg, which=0):
-        self.frame.GetStatusBar().SetStatusText(msg, which)
-
-
-    def _build_gui(self, vbox, usrp_rate, demod_rate, audio_rate):
-
-        def _form_set_freq(kv):
-            return self.set_freq(kv['freq'])
-
-
-        if 1:
-            self.src_fft = fftsink2.fft_sink_c(self.panel, title="Data from USRP",
-                                               fft_size=512, sample_rate=usrp_rate,
-					       ref_scale=32768.0, ref_level=0, y_divs=12)
-            self.connect (self.u, self.src_fft)
-            vbox.Add (self.src_fft.win, 4, wx.EXPAND)
-
-        if 1:
-            post_fm_demod_fft = fftsink2.fft_sink_f(self.panel, title="Post FM Demod",
-                                                    fft_size=512, sample_rate=demod_rate,
-                                                    y_per_div=10, ref_level=0)
-            self.connect (self.guts.fm_demod, post_fm_demod_fft)
-            vbox.Add (post_fm_demod_fft.win, 4, wx.EXPAND)
-
-        if 0:
-            post_stereo_carrier_generator_fft = fftsink2.fft_sink_c (self.panel, title="Post Stereo_carrier_generator",
-                                                  fft_size=512, sample_rate=audio_rate,
-                                                  y_per_div=10, ref_level=0)
-            self.connect (self.guts.stereo_carrier_generator, post_stereo_carrier_generator_fft)
-            vbox.Add (post_stereo_carrier_generator_fft.win, 4, wx.EXPAND)
-
-        if 0:
-            post_deemphasis_left = fftsink2.fft_sink_f (self.panel, title="Post_Deemphasis_Left",
-                                                  fft_size=512, sample_rate=audio_rate,
-                                                  y_per_div=10, ref_level=0)
-            self.connect (self.guts.deemph_Left, post_deemphasis_left)
-            vbox.Add (post_deemphasis_left.win, 4, wx.EXPAND)
-
-        if 0:
-            post_deemphasis_right = fftsink2.fft_sink_f(self.panel, title="Post_Deemphasis_Right",
-                                                  fft_size=512, sample_rate=audio_rate,
-                                                  y_per_div=10, ref_level=-20)
-            self.connect (self.guts.deemph_Left, post_deemphasis_right)
-            vbox.Add (post_deemphasis_right.win, 4, wx.EXPAND)
-
-
-        if 0:
-            LmR_fft = fftsink2.fft_sink_f(self.panel, title="LmR",
-                                          fft_size=512, sample_rate=audio_rate,
-                                          y_per_div=10, ref_level=-20)
-            self.connect (self.guts.LmR_real,LmR_fft)
-            vbox.Add (LmR_fft.win, 4, wx.EXPAND)
-
-        if 0:
-            self.scope = scopesink2.scope_sink_f(self.panel, sample_rate=demod_rate)
-            self.connect (self.guts.fm_demod,self.scope)
-            vbox.Add (self.scope.win,4,wx.EXPAND)
-
-        # control area form at bottom
-        self.myform = myform = form.form()
-
-        hbox = wx.BoxSizer(wx.HORIZONTAL)
-        hbox.Add((5,0), 0)
-        myform['freq'] = form.float_field(
-            parent=self.panel, sizer=hbox, label="Freq", weight=1,
-            callback=myform.check_input_and_call(_form_set_freq, self._set_status_msg))
-
-        hbox.Add((5,0), 0)
-        myform['freq_slider'] = \
-            form.quantized_slider_field(parent=self.panel, sizer=hbox, weight=3,
-                                        range=(self.fm_freq_min, self.fm_freq_max, 0.1e6),
-                                        callback=self.set_freq)
-        hbox.Add((5,0), 0)
-        vbox.Add(hbox, 0, wx.EXPAND)
-
-        hbox = wx.BoxSizer(wx.HORIZONTAL)
-        hbox.Add((5,0), 0)
-
-        myform['volume'] = \
-            form.quantized_slider_field(parent=self.panel, sizer=hbox, label="Volume",
-                                        weight=3, range=self.volume_range(),
-                                        callback=self.set_vol)
-        hbox.Add((5,0), 1)
-
-        g = self.u.get_gain_range()
-        myform['gain'] = \
-            form.quantized_slider_field(parent=self.panel, sizer=hbox, label="Gain",
-                                        weight=3, range=(g.start(), g.stop(), g.step()),
-                                        callback=self.set_gain)
-        hbox.Add((5,0), 0)
-
-        myform['sqlch_thrsh'] = \
-            form.quantized_slider_field(parent=self.panel, sizer=hbox, label="Stereo Squelch Threshold",
-                                        weight=3, range=(0.0,1.0,0.01),
-                                        callback=self.set_squelch)
-        hbox.Add((5,0), 0)
-        vbox.Add(hbox, 0, wx.EXPAND)
-
-        try:
-            self.knob = powermate.powermate(self.frame)
-            self.rot = 0
-            powermate.EVT_POWERMATE_ROTATE (self.frame, self.on_rotate)
-            powermate.EVT_POWERMATE_BUTTON (self.frame, self.on_button)
-        except:
-            print "FYI: No Powermate or Contour Knob found"
-
-
-    def on_rotate (self, event):
-        self.rot += event.delta
-        if (self.state == "FREQ"):
-            if self.rot >= 3:
-                self.set_freq(self.freq + .1e6)
-                self.rot -= 3
-            elif self.rot <=-3:
-                self.set_freq(self.freq - .1e6)
-                self.rot += 3
-        else:
-            step = self.volume_range()[2]
-            if self.rot >= 3:
-                self.set_vol(self.vol + step)
-                self.rot -= 3
-            elif self.rot <=-3:
-                self.set_vol(self.vol - step)
-                self.rot += 3
-
-    def on_button (self, event):
-        if event.value == 0:        # button up
-            return
-        self.rot = 0
-        if self.state == "FREQ":
-            self.state = "VOL"
-        else:
-            self.state = "FREQ"
-        self.update_status_bar ()
-
-
-    def set_vol (self, vol):
-        g = self.volume_range()
-        self.vol = max(g[0], min(g[1], vol))
-        self.volume_control_l.set_k(10**(self.vol/10))
-        self.volume_control_r.set_k(10**(self.vol/10))
-        self.myform['volume'].set_value(self.vol)
-        self.update_status_bar ()
-
-    def set_squelch(self,squelch_threshold):
-        try:
-          self.guts.stereo_carrier_pll_recovery.set_lock_threshold(squelch_threshold);
-        except:
-          print "FYI: This implementation of the stereo_carrier_pll_recovery has no squelch implementation yet"
-
-    def set_freq(self, target_freq):
-        """
-        Set the center frequency we're interested in.
-
-        Args:
-            target_freq: frequency in Hz
-        @rypte: bool
-        """
-
-        r = self.u.set_center_freq(target_freq)
-
-        if r:
-            self.freq = target_freq
-            self.myform['freq'].set_value(target_freq)         # update displayed value
-            self.myform['freq_slider'].set_value(target_freq)  # update displayed value
-            self.update_status_bar()
-            self._set_status_msg("OK", 0)
-            return True
-
-        self._set_status_msg("Failed", 0)
-        return False
-
-    def set_gain(self, gain):
-        self.myform['gain'].set_value(gain)     # update displayed value
-        self.u.set_gain(gain)
-
-    def update_status_bar (self):
-        msg = "Volume:%r  Setting:%s" % (self.vol, self.state)
-        self._set_status_msg(msg, 1)
-        self.src_fft.set_baseband_freq(self.freq)
-
-    def volume_range(self):
-        return (-20.0, 0.0, 0.5)
-
-
-if __name__ == '__main__':
-    app = stdgui2.stdapp (wfm_rx_block, "USRP WFM RX")
-    app.MainLoop ()
diff --git a/gr-uhd/examples/python/usrp_wfm_rcv_sca.py b/gr-uhd/examples/python/usrp_wfm_rcv_sca.py
deleted file mode 100755
index 9069a745f9..0000000000
--- a/gr-uhd/examples/python/usrp_wfm_rcv_sca.py
+++ /dev/null
@@ -1,407 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2006,2007,2011,2012 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-
-"""
-Here is a bit of code that will receive SCA analog subcarriers of FM
-Broadcast Stations using the USRP.  It is a modified version of
-usrp_wfm_rcv.py.
-
-Common SCA frequencies are 67 kHz and 92 kHz.  SCA is used for Reading
-Services for the Blind, Background Music, Foreign Language Services, and
-other services.  Remember you may hear static when tuned to a FM station
-because this code only outputs SCA audio.
-
-The USRP gain is critical for good decoding.  Adjust for minimum noise.
- I use the Post FM Demod FFT to check for SCA subcarriers and to adjust
-the USRP gain for the lowest noise floor.  The stereo pilot at 19 KHz,
-the stereo difference signal around 38 KHz, and RDS at 57 KHz are also
-displayed on the Post FM Demod FFT if present.
-
-The range below 67 kHz is used for SCA only when Stereo is not used.
-
-The SCA recieve range is not as far as the main FM carrier receive range
-so tune in strong local stations first.
-
-I tried to comment the code with the various parameters.  There seems to
-be several choices for a couple of them.  I coded the common ones I see
-here.
-
-In the local area there are a couple of stations using digital SCA.
-These look similar to narrow DRM signals and I wonder if they are using
-OFDM.
-"""
-
-
-from gnuradio import gr, audio, uhd
-from gnuradio import blocks
-from gnuradio import filter
-from gnuradio import analog
-from gnuradio.eng_option import eng_option
-from gnuradio.wxgui import slider, powermate
-from gnuradio.wxgui import stdgui2, fftsink2, form
-from optparse import OptionParser
-import sys
-import math
-import wx
-
-class wfm_rx_sca_block (stdgui2.std_top_block):
-    def __init__(self,frame,panel,vbox,argv):
-        stdgui2.std_top_block.__init__ (self,frame,panel,vbox,argv)
-
-        parser=OptionParser(option_class=eng_option)
-        parser.add_option("-a", "--args", type="string", default="",
-                          help="UHD device address args [default=%default]")
-        parser.add_option("", "--spec", type="string", default=None,
-	                  help="Subdevice of UHD device where appropriate")
-        parser.add_option("-A", "--antenna", type="string", default=None,
-                          help="select Rx Antenna where appropriate")
-        parser.add_option("-f", "--freq", type="eng_float", default=100.1e6,
-                          help="set frequency to FREQ", metavar="FREQ")
-        parser.add_option("-g", "--gain", type="eng_float", default=None,
-                          help="set gain in dB (default is midpoint)")
-        parser.add_option("-V", "--volume", type="eng_float", default=None,
-                          help="set volume (default is midpoint)")
-        parser.add_option("-O", "--audio-output", type="string", default="default",
-                          help="pcm device name.  E.g., hw:0,0 or surround51 or /dev/dsp")
-        parser.add_option("", "--freq-min", type="eng_float", default=87.9e6,
-                          help="Set a minimum frequency [default=%default]")
-        parser.add_option("", "--freq-max", type="eng_float", default=108.1e6,
-                          help="Set a maximum frequency [default=%default]")
-
-        (options, args) = parser.parse_args()
-        if len(args) != 0:
-            parser.print_help()
-            sys.exit(1)
-
-        self.frame = frame
-        self.panel = panel
-
-        self.vol = 0
-        self.state = "FREQ"
-        self.freq = 0
-
-        self.fm_freq_min = options.freq_min
-        self.fm_freq_max = options.freq_max
-
-        # build graph
-
-        self.u = uhd.usrp_source(device_addr=options.args, stream_args=uhd.stream_args('fc32'))
-
-        # Set the subdevice spec
-        if(options.spec):
-            self.u.set_subdev_spec(options.spec, 0)
-
-        # Set the antenna
-        if(options.antenna):
-            self.u.set_antenna(options.antenna, 0)
-
-        usrp_rate  = 320e3
-        demod_rate = 320e3
-        audio_rate = 32e3
-        sca_demod_rate = 64e3
-        audio_decim = int(demod_rate / audio_rate)
-        sca_chanfilt_decim = int(demod_rate / sca_demod_rate)
-
-        self.u.set_samp_rate(usrp_rate)
-        dev_rate = self.u.get_samp_rate()
-
-        nfilts = 32
-        chan_coeffs = filter.optfir.low_pass(nfilts,           # gain
-                                             nfilts*usrp_rate, # sampling rate
-                                             100e3,            # passband cutoff
-                                             140e3,            # stopband cutoff
-                                             0.1,              # passband ripple
-                                             60)               # stopband attenuation
-        rrate = usrp_rate / dev_rate
-        self.chan_filt = filter.pfb.arb_resampler_ccf(rrate, chan_coeffs, nfilts)
-
-        #Create demodulator block for Main FM Channel
-	max_dev = 75e3
-        fm_demod_gain = demod_rate/(2*math.pi*max_dev)
-        self.fm_demod = analog.quadrature_demod_cf(fm_demod_gain)
-
-        # Note - deemphasis is not applied to the Main FM Channel as
-        # main audio is not decoded
-
-        # SCA Devation is 10% of carrier but some references say 20%
-        # if mono with one SCA (6 KHz seems typical)
-        max_sca_dev = 6e3
-
-	# Create filter to get SCA channel we want
-        sca_chan_coeffs = filter.firdes.low_pass(1.0,                # gain
-                                                 demod_rate,         # sampling rate
-                                                 max_sca_dev,        # cutoff freq
-                                                 max_sca_dev/3,      # trans. band
-                                                 filter.firdes.WIN_HANN) # filter type
-
-        self.ddc = filter.freq_xlating_fir_filter_fcf(sca_chanfilt_decim, # decim rate
-                                                      sca_chan_coeffs,    # taps
-                                                      0,                  # freq translation amount (Gets set by the UI)
-                                                      demod_rate)   # input sample rate
-
-        #Create demodulator block for SCA Channel
-        sca_demod_gain = sca_demod_rate/(2*math.pi*max_sca_dev)
-        self.fm_demod_sca = analog.quadrature_demod_cf(sca_demod_gain)
-
-
-        # SCA analog audio is bandwidth limited to 5 KHz
-        max_sca_audio_freq = 5.0e3
-
-        # SCA analog deephasis is 150 uS (75 uS may be used)
-        sca_tau = 150e-6
-
-        # compute FIR filter taps for SCA audio filter
-        audio_coeffs = filter.firdes.low_pass(1.0,                    # gain
-                                              sca_demod_rate,         # sampling rate
-                                              max_sca_audio_freq,     # cutoff freq
-                                              max_sca_audio_freq/2.5, # trans. band
-                                              filter.firdes.WIN_HAMMING)
-
-        # input: float; output: float
-        self.audio_filter = filter.fir_filter_fff(audio_decim, audio_coeffs)
-
-	# Create deemphasis block that is applied after SCA demodulation
-        self.deemph = analog.fm_deemph(audio_rate, sca_tau)
-
-        self.volume_control = blocks.multiply_const_ff(self.vol)
-
-        # sound card as final sink
-        self.audio_sink = audio.sink(int (audio_rate),
-                                     options.audio_output,
-                                     False)  # ok_to_block
-
-        # now wire it all together
-        self.connect(self.u, self.chan_filt, self.fm_demod,
-                     self.ddc, self.fm_demod_sca)
-        self.connect(self.fm_demod_sca, self.audio_filter,
-                     self.deemph, self.volume_control,
-                     self.audio_sink)
-
-        self._build_gui(vbox, usrp_rate, demod_rate, sca_demod_rate, audio_rate)
-
-        if options.gain is None:
-            # if no gain was specified, use the mid-point in dB
-            g = self.u.get_gain_range()
-            options.gain = float(g.start()+g.stop())/2
-
-        if options.volume is None:
-            g = self.volume_range()
-            options.volume = float(g[0]+g[1])/2
-
-        frange = self.u.get_freq_range()
-        if(frange.start() > self.fm_freq_max or frange.stop() <  self.fm_freq_min):
-            sys.stderr.write("Radio does not support required frequency range.\n")
-            sys.exit(1)
-        if(options.freq < self.fm_freq_min or options.freq > self.fm_freq_max):
-            sys.stderr.write("Requested frequency is outside of required frequency range.\n")
-            sys.exit(1)
-
-        # set initial values
-
-        self.set_gain(options.gain)
-        self.set_vol(options.volume)
-        if not(self.set_freq(options.freq)):
-            self._set_status_msg("Failed to set initial frequency")
-        self.set_sca_freq(67000)  # A common SCA Frequency
-
-    def _set_status_msg(self, msg, which=0):
-        self.frame.GetStatusBar().SetStatusText(msg, which)
-
-
-    def _build_gui(self, vbox, usrp_rate, demod_rate, sca_demod_rate, audio_rate):
-
-        def _form_set_freq(kv):
-            return self.set_freq(kv['freq'])
-
-        def _form_set_sca_freq(kv):
-            return self.set_sca_freq(kv['sca_freq'])
-
-        if 1:
-            self.src_fft = fftsink2.fft_sink_c(self.panel, title="Data from USRP",
-                                               fft_size=512, sample_rate=usrp_rate,
-					       ref_scale=32768.0, ref_level=0, y_divs=12)
-            self.connect (self.u, self.src_fft)
-            vbox.Add (self.src_fft.win, 4, wx.EXPAND)
-
-        if 1:
-            post_demod_fft = fftsink2.fft_sink_f(self.panel, title="Post FM Demod",
-                                                 fft_size=2048, sample_rate=demod_rate,
-                                                 y_per_div=10, ref_level=0)
-            self.connect (self.fm_demod, post_demod_fft)
-            vbox.Add (post_demod_fft.win, 4, wx.EXPAND)
-
-        if 0:
-            post_demod_sca_fft = fftsink2.fft_sink_f(self.panel, title="Post SCA Demod",
-                                                fft_size=1024, sample_rate=sca_demod_rate,
-                                                y_per_div=10, ref_level=0)
-            self.connect (self.fm_demod_sca, post_demod_sca_fft)
-            vbox.Add (post_demod_sca_fft.win, 4, wx.EXPAND)
-
-        if 0:
-            post_deemph_fft = fftsink2.fft_sink_f (self.panel, title="Post SCA Deemph",
-                                                  fft_size=512, sample_rate=audio_rate,
-                                                  y_per_div=10, ref_level=-20)
-            self.connect (self.deemph, post_deemph_fft)
-            vbox.Add (post_deemph_fft.win, 4, wx.EXPAND)
-
-
-        # control area form at bottom
-        self.myform = myform = form.form()
-
-        hbox = wx.BoxSizer(wx.HORIZONTAL)
-        hbox.Add((5,0), 0)
-        myform['freq'] = form.float_field(
-            parent=self.panel, sizer=hbox, label="Freq", weight=1,
-            callback=myform.check_input_and_call(_form_set_freq, self._set_status_msg))
-
-        hbox.Add((5,0), 0)
-        myform['freq_slider'] = \
-            form.quantized_slider_field(parent=self.panel, sizer=hbox, weight=3,
-                                        range=(self.fm_freq_min, self.fm_freq_max, 0.1e6),
-                                        callback=self.set_freq)
-        hbox.Add((5,0), 0)
-        vbox.Add(hbox, 0, wx.EXPAND)
-
-        hbox = wx.BoxSizer(wx.HORIZONTAL)
-        hbox.Add((5,0), 0)
-        myform['sca_freq'] = form.float_field(
-            parent=self.panel, sizer=hbox, label="SCA", weight=1,
-            callback=myform.check_input_and_call(_form_set_sca_freq, self._set_status_msg))
-
-        hbox.Add((5,0), 0)
-        myform['sca_freq_slider'] = \
-            form.quantized_slider_field(parent=self.panel, sizer=hbox, weight=3,
-                                        range=(38e3, 100e3, 1.0e3),
-                                        callback=self.set_sca_freq)
-        hbox.Add((5,0), 0)
-        vbox.Add(hbox, 0, wx.EXPAND)
-
-        hbox = wx.BoxSizer(wx.HORIZONTAL)
-        hbox.Add((5,0), 0)
-
-        myform['volume'] = \
-            form.quantized_slider_field(parent=self.panel, sizer=hbox, label="Volume",
-                                        weight=3, range=self.volume_range(),
-                                        callback=self.set_vol)
-        hbox.Add((5,0), 1)
-
-        g = self.u.get_gain_range()
-        myform['gain'] = \
-            form.quantized_slider_field(parent=self.panel, sizer=hbox, label="Gain",
-                                        weight=3, range=(g.start(), g.stop(), g.step()),
-                                        callback=self.set_gain)
-        hbox.Add((5,0), 0)
-        vbox.Add(hbox, 0, wx.EXPAND)
-
-        try:
-            self.knob = powermate.powermate(self.frame)
-            self.rot = 0
-            powermate.EVT_POWERMATE_ROTATE (self.frame, self.on_rotate)
-            powermate.EVT_POWERMATE_BUTTON (self.frame, self.on_button)
-        except:
-            print "FYI: No Powermate or Contour Knob found"
-
-
-    def on_rotate (self, event):
-        self.rot += event.delta
-        if (self.state == "FREQ"):
-            if self.rot >= 3:
-                self.set_freq(self.freq + .1e6)
-                self.rot -= 3
-            elif self.rot <=-3:
-                self.set_freq(self.freq - .1e6)
-                self.rot += 3
-        else:
-            step = self.volume_range()[2]
-            if self.rot >= 3:
-                self.set_vol(self.vol + step)
-                self.rot -= 3
-            elif self.rot <=-3:
-                self.set_vol(self.vol - step)
-                self.rot += 3
-
-    def on_button (self, event):
-        if event.value == 0:        # button up
-            return
-        self.rot = 0
-        if self.state == "FREQ":
-            self.state = "VOL"
-        else:
-            self.state = "FREQ"
-        self.update_status_bar ()
-
-
-    def set_vol (self, vol):
-        g = self.volume_range()
-        self.vol = max(g[0], min(g[1], vol))
-        self.volume_control.set_k(10**(self.vol/10))
-        self.myform['volume'].set_value(self.vol)
-        self.update_status_bar ()
-
-    def set_freq(self, target_freq):
-        """
-        Set the center frequency we're interested in.
-
-        Args:
-            target_freq: frequency in Hz
-        @rypte: bool
-
-        Tuning is a two step process.  First we ask the front-end to
-        tune as close to the desired frequency as it can.  Then we use
-        the result of that operation and our target_frequency to
-        determine the value for the digital down converter.
-        """
-        r = self.u.set_center_freq(target_freq)
-        if r:
-            self.freq = target_freq
-            self.myform['freq'].set_value(target_freq)         # update displayed value
-            self.myform['freq_slider'].set_value(target_freq)  # update displayed value
-            self.update_status_bar()
-            self._set_status_msg("OK", 0)
-            return True
-        self._set_status_msg("Failed", 0)
-        return False
-
-    def set_sca_freq(self, target_sca_freq):
-
-        self.ddc.set_center_freq(-target_sca_freq)
-        self.myform['sca_freq'].set_value(target_sca_freq)         # update displayed value
-        self.myform['sca_freq_slider'].set_value(target_sca_freq)  # update displayed value
-        self.update_status_bar()
-        self._set_status_msg("OK", 0)
-        return True
-
-    def set_gain(self, gain):
-        self.myform['gain'].set_value(gain)     # update displayed value
-        self.u.set_gain(gain)
-
-    def update_status_bar (self):
-        msg = "Volume:%r  Setting:%s" % (self.vol, self.state)
-        self._set_status_msg(msg, 1)
-        self.src_fft.set_baseband_freq(self.freq)
-
-    def volume_range(self):
-        return (-20.0, 0.0, 0.5)
-
-
-if __name__ == '__main__':
-    app = stdgui2.stdapp (wfm_rx_sca_block, "USRP WFM SCA RX")
-    app.MainLoop ()
diff --git a/gr-uhd/examples/python/usrp_wxapt_rcv.py b/gr-uhd/examples/python/usrp_wxapt_rcv.py
deleted file mode 100755
index 305149b682..0000000000
--- a/gr-uhd/examples/python/usrp_wxapt_rcv.py
+++ /dev/null
@@ -1,286 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2005-2007,2011,2012 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-from gnuradio import gr, audio, uhd
-from gnuradio import blocks
-from gnuradio import filter
-from gnuradio import analog
-from gnuradio.eng_option import eng_option
-from gnuradio.wxgui import slider, powermate
-from gnuradio.wxgui import stdgui2, fftsink2, form
-from optparse import OptionParser
-import sys
-import wx
-
-
-class wxapt_rx_block (stdgui2.std_top_block):
-    def __init__(self,frame,panel,vbox,argv):
-        stdgui2.std_top_block.__init__ (self,frame,panel,vbox,argv)
-
-        parser=OptionParser(option_class=eng_option)
-        parser.add_option("-a", "--args", type="string", default="",
-                          help="UHD device address args, [default=%default]")
-        parser.add_option("", "--spec", type="string", default=None,
-	                  help="Subdevice of UHD device where appropriate")
-        parser.add_option("-A", "--antenna", type="string", default=None,
-                          help="select Rx Antenna where appropriate")
-        parser.add_option("-f", "--freq", type="eng_float", default=137.5e6,
-                          help="set frequency to FREQ", metavar="FREQ")
-        parser.add_option("-g", "--gain", type="eng_float", default=None,
-                          help="set gain in dB (default is midpoint)")
-        parser.add_option("-V", "--volume", type="eng_float", default=None,
-                          help="set volume (default is midpoint)")
-        parser.add_option("-O", "--audio-output", type="string", default="default",
-                          help="pcm device name.  E.g., hw:0,0 or surround51 or /dev/dsp")
-        parser.add_option("", "--freq-min", type="eng_float", default=137e6,
-                          help="Set a minimum frequency [default=%default]")
-        parser.add_option("", "--freq-max", type="eng_float", default=138e6,
-                          help="Set a maximum frequency [default=%default]")
-
-        (options, args) = parser.parse_args()
-        if len(args) != 0:
-            parser.print_help()
-            sys.exit(1)
-
-        self.frame = frame
-        self.panel = panel
-
-        self.vol = 0
-        self.state = "FREQ"
-        self.freq = 0
-
-        self.freq_min = options.freq_min
-        self.freq_max = options.freq_max
-
-        # build graph
-        self.u = uhd.usrp_source(device_addr=options.args, stream_args=uhd.stream_args('fc32'))
-
-        # Set the subdevice spec
-        if(options.spec):
-            self.u.set_subdev_spec(options.spec, 0)
-
-        # Set the antenna
-        if(options.antenna):
-            self.u.set_antenna(options.antenna, 0)
-
-        usrp_rate  = 320e3
-        demod_rate = 320e3
-        audio_rate = 32e3
-        audio_decim = int(demod_rate / audio_rate)
-
-        self.u.set_samp_rate(usrp_rate)
-        dev_rate = self.u.get_samp_rate()
-
-        nfilts = 32
-        chan_coeffs = filter.firdes.low_pass_2(nfilts,           # gain
-                                               nfilts*usrp_rate, # sampling rate
-                                               40e3,             # passband cutoff
-                                               20e3,             # transition bw
-                                               60)               # stopband attenuation
-        rrate = usrp_rate / dev_rate
-        self.chan_filt = filter.pfb.arb_resampler_ccf(rrate, chan_coeffs, nfilts)
-
-        self.guts = analog.wfm_rcv(demod_rate, audio_decim)
-
-        self.volume_control = blocks.multiply_const_ff(self.vol)
-
-        # sound card as final sink
-        self.audio_sink = audio.sink(int (audio_rate), options.audio_output)
-
-        # now wire it all together
-        self.connect(self.u, self.chan_filt, self.guts,
-                     self.volume_control, self.audio_sink)
-
-        self._build_gui(vbox, usrp_rate, demod_rate, audio_rate)
-
-        if options.gain is None:
-            # if no gain was specified, use the mid-point in dB
-            g = self.u.get_gain_range()
-            options.gain = float(g.start()+g.stop())/2.0
-
-        if options.volume is None:
-            g = self.volume_range()
-            options.volume = float(g[0]+g[1])/2
-
-        frange = self.u.get_freq_range()
-        if(frange.start() > self.freq_max or frange.stop() <  self.freq_min):
-            sys.stderr.write("Radio does not support required frequency range.\n")
-            sys.exit(1)
-        if(options.freq < self.freq_min or options.freq > self.freq_max):
-            sys.stderr.write("Requested frequency is outside of required frequency range.\n")
-            sys.exit(1)
-
-        # set initial values
-        self.set_gain(options.gain)
-        self.set_vol(options.volume)
-        if not(self.set_freq(options.freq)):
-            self._set_status_msg("Failed to set initial frequency")
-
-    def _set_status_msg(self, msg, which=0):
-        self.frame.GetStatusBar().SetStatusText(msg, which)
-
-
-    def _build_gui(self, vbox, usrp_rate, demod_rate, audio_rate):
-
-        def _form_set_freq(kv):
-            return self.set_freq(kv['freq'])
-
-
-        if 1:
-            self.src_fft = fftsink2.fft_sink_c (self.panel, title="Data from USRP",
-                                               fft_size=512, sample_rate=usrp_rate,
-					       ref_scale=32768.0, ref_level=0, y_divs=12)
-            self.connect (self.u, self.src_fft)
-            vbox.Add (self.src_fft.win, 4, wx.EXPAND)
-
-        if 1:
-            post_deemph_fft = fftsink2.fft_sink_f (self.panel, title="Post Deemph",
-                                                  fft_size=512, sample_rate=demod_rate,
-                                                  y_per_div=10, ref_level=-20)
-            self.connect (self.guts.deemph, post_deemph_fft)
-            vbox.Add (post_deemph_fft.win, 4, wx.EXPAND)
-
-        if 1:
-            post_filt_fft = fftsink2.fft_sink_f (self.panel, title="Post Filter",
-                                                fft_size=512, sample_rate=audio_rate,
-                                                y_per_div=10, ref_level=0)
-            self.connect (self.guts.audio_filter, post_filt_fft)
-            vbox.Add (post_filt_fft.win, 4, wx.EXPAND)
-
-
-        # control area form at bottom
-        self.myform = myform = form.form()
-
-        hbox = wx.BoxSizer(wx.HORIZONTAL)
-        hbox.Add((5,0), 0)
-        myform['freq'] = form.float_field(
-            parent=self.panel, sizer=hbox, label="Freq", weight=1,
-            callback=myform.check_input_and_call(_form_set_freq, self._set_status_msg))
-
-        hbox.Add((5,0), 0)
-        myform['freq_slider'] = \
-            form.quantized_slider_field(parent=self.panel, sizer=hbox, weight=3,
-                                        range=(self.freq_min, self.freq_max, 0.0005e6),
-                                        callback=self.set_freq)
-        hbox.Add((5,0), 0)
-        vbox.Add(hbox, 0, wx.EXPAND)
-
-        hbox = wx.BoxSizer(wx.HORIZONTAL)
-        hbox.Add((5,0), 0)
-
-        myform['volume'] = \
-            form.quantized_slider_field(parent=self.panel, sizer=hbox, label="Volume",
-                                        weight=3, range=self.volume_range(),
-                                        callback=self.set_vol)
-        hbox.Add((5,0), 1)
-
-        g = self.u.get_gain_range()
-        myform['gain'] = \
-            form.quantized_slider_field(parent=self.panel, sizer=hbox, label="Gain",
-                                        weight=3, range=(g.start(), g.start(), g.step()),
-                                        callback=self.set_gain)
-        hbox.Add((5,0), 0)
-        vbox.Add(hbox, 0, wx.EXPAND)
-
-        try:
-            self.knob = powermate.powermate(self.frame)
-            self.rot = 0
-            powermate.EVT_POWERMATE_ROTATE (self.frame, self.on_rotate)
-            powermate.EVT_POWERMATE_BUTTON (self.frame, self.on_button)
-        except:
-            print "FYI: No Powermate or Contour Knob found"
-
-
-    def on_rotate (self, event):
-        self.rot += event.delta
-        if (self.state == "FREQ"):
-            if self.rot >= 3:
-                self.set_freq(self.freq + .1e6)
-                self.rot -= 3
-            elif self.rot <=-3:
-                self.set_freq(self.freq - .1e6)
-                self.rot += 3
-        else:
-            step = self.volume_range()[2]
-            if self.rot >= 3:
-                self.set_vol(self.vol + step)
-                self.rot -= 3
-            elif self.rot <=-3:
-                self.set_vol(self.vol - step)
-                self.rot += 3
-
-    def on_button (self, event):
-        if event.value == 0:        # button up
-            return
-        self.rot = 0
-        if self.state == "FREQ":
-            self.state = "VOL"
-        else:
-            self.state = "FREQ"
-        self.update_status_bar ()
-
-
-    def set_vol (self, vol):
-        g = self.volume_range()
-        self.vol = max(g[0], min(g[1], vol))
-        self.volume_control.set_k(10**(self.vol/10))
-        self.myform['volume'].set_value(self.vol)
-        self.update_status_bar ()
-
-    def set_freq(self, target_freq):
-        """
-        Set the center frequency we're interested in.
-
-        Args:
-            target_freq: frequency in Hz
-        @rypte: bool
-        """
-
-        r = self.u.set_center_freq(target_freq)
-
-        if r:
-            self.freq = target_freq
-            self.myform['freq'].set_value(target_freq)         # update displayed value
-            self.myform['freq_slider'].set_value(target_freq)  # update displayed value
-            self.update_status_bar()
-            self._set_status_msg("OK", 0)
-            return True
-
-        self._set_status_msg("Failed", 0)
-        return False
-
-    def set_gain(self, gain):
-        self.myform['gain'].set_value(gain)     # update displayed value
-        self.u.set_gain(gain)
-
-    def update_status_bar (self):
-        msg = "Volume:%r  Setting:%s" % (self.vol, self.state)
-        self._set_status_msg(msg, 1)
-        self.src_fft.set_baseband_freq(self.freq)
-
-    def volume_range(self):
-        return (-20.0, 0.0, 0.5)
-
-
-if __name__ == '__main__':
-    app = stdgui2.stdapp (wxapt_rx_block, "USRP WXAPT RX")
-    app.MainLoop ()
diff --git a/gr-wxgui/CMakeLists.txt b/gr-wxgui/CMakeLists.txt
deleted file mode 100644
index d77e36ad4a..0000000000
--- a/gr-wxgui/CMakeLists.txt
+++ /dev/null
@@ -1,91 +0,0 @@
-# Copyright 2011,2013 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-
-########################################################################
-# Setup dependencies
-########################################################################
-include(GrBoost)
-include(GrPython)
-
-GR_PYTHON_CHECK_MODULE("wx >= 2.8" wx "wx.version().split()[0] >= '2.8'" WX_FOUND)
-GR_PYTHON_CHECK_MODULE("numpy" numpy True NUMPY_FOUND)
-
-########################################################################
-# Register component
-########################################################################
-include(GrComponent)
-if(NOT CMAKE_CROSSCOMPILING)
-    set(wxgui_python_deps
-        NUMPY_FOUND
-        WX_FOUND
-    )
-endif(NOT CMAKE_CROSSCOMPILING)
-
-GR_REGISTER_COMPONENT("gr-wxgui" ENABLE_GR_WXGUI
-    ENABLE_GNURADIO_RUNTIME
-    ENABLE_GR_FFT
-    ENABLE_GR_FILTER
-    ENABLE_GR_ANALOG
-    ENABLE_PYTHON
-    ${wxgui_python_deps}
-)
-
-########################################################################
-# Begin conditional configuration
-########################################################################
-if(ENABLE_GR_WXGUI)
-
-GR_SET_GLOBAL(GR_WXGUI_INCLUDE_DIRS
-    ${CMAKE_CURRENT_SOURCE_DIR}/lib
-    ${CMAKE_CURRENT_SOURCE_DIR}/include
-    ${CMAKE_CURRENT_BINARY_DIR}/lib
-    ${CMAKE_CURRENT_BINARY_DIR}/include
-)
-
-########################################################################
-# Create Pkg Config File
-########################################################################
-configure_file(
-    ${CMAKE_CURRENT_SOURCE_DIR}/gr-wxgui.pc.in
-    ${CMAKE_CURRENT_BINARY_DIR}/gr-wxgui.pc
-@ONLY)
-
-install(
-    FILES ${CMAKE_CURRENT_BINARY_DIR}/gr-wxgui.pc
-    DESTINATION ${GR_LIBRARY_DIR}/pkgconfig
-)
-
-########################################################################
-# Install the conf file
-########################################################################
-install(
-    FILES ${CMAKE_CURRENT_SOURCE_DIR}/gr-wxgui.conf
-    DESTINATION ${GR_PREFSDIR}
-)
-
-########################################################################
-# Add subdirectories
-########################################################################
-add_subdirectory(include/gnuradio/wxgui)
-add_subdirectory(lib)
-add_subdirectory(grc)
-add_subdirectory(python/wxgui)
-add_subdirectory(swig)
-
-endif(ENABLE_GR_WXGUI)
diff --git a/gr-wxgui/README b/gr-wxgui/README
deleted file mode 100644
index ebd0d23977..0000000000
--- a/gr-wxgui/README
+++ /dev/null
@@ -1 +0,0 @@
-This requires wxPython 2.5.2.7 or later.  See http://www.wxpython.org
diff --git a/gr-wxgui/README.gl b/gr-wxgui/README.gl
deleted file mode 100644
index 1d3eec60be..0000000000
--- a/gr-wxgui/README.gl
+++ /dev/null
@@ -1,29 +0,0 @@
-To use the OpenGL versions of the graphical display sinks, you must ensure
-that you have Python wrappers for OpenGL installed and are using a version
-of wxPython that supports it.  Then you must enable this mode by creating or
-editing an entry in the GNU Radio preferences file at:
-
-~/.gnuradio/config.conf
-
-[wxgui]
-style=gl
-fft_rate=30
-waterfall_rate=30
-scope_rate=30
-number_rate=5
-const_rate=5
-const_size=2048
-
->>>The style parameter accepts 'nongl', 'gl', and 'auto', and defaults to 'auto'.
-
-'nongl' forces the use of the non-GL (current) sinks.
-
-'gl' forces the use of the new GL based sinks, and will raise an exception if the
-appropriate GL support does not exist.
-
-'auto' currently equates to 'nongl'; however, in release 3.2, this will change to
-use GL if possible and if not, fallback to the non-GL versions.
-
->>>The *_rate parameter sets the frame rate for various gl sinks.
-
->>>The const_size parameter sets the number of constellation points per frame.
diff --git a/gr-wxgui/gr-wxgui.conf b/gr-wxgui/gr-wxgui.conf
deleted file mode 100644
index da458238fd..0000000000
--- a/gr-wxgui/gr-wxgui.conf
+++ /dev/null
@@ -1,13 +0,0 @@
-# This file contains system wide configuration data for GNU Radio.
-# You may override any setting on a per-user basis by editing
-# ~/.gnuradio/config.conf
-
-[wxgui]
-# 'gl', 'nongl', or 'auto'
-style = auto
-
-# fftsink and waterfallsink
-fft_rate = 15
-
-# scopesink
-frame_decim = 1
diff --git a/gr-wxgui/gr-wxgui.pc.in b/gr-wxgui/gr-wxgui.pc.in
deleted file mode 100644
index ec4d66c9fc..0000000000
--- a/gr-wxgui/gr-wxgui.pc.in
+++ /dev/null
@@ -1,11 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: gr-wxgui
-Description: A simple wx gui for GNU Radio applications
-Requires: gnuradio-runtime
-Version: @LIBVER@
-Libs:
-Cflags:
diff --git a/gr-wxgui/grc/CMakeLists.txt b/gr-wxgui/grc/CMakeLists.txt
deleted file mode 100644
index 52c9bbda43..0000000000
--- a/gr-wxgui/grc/CMakeLists.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-# Copyright 2011 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-
-########################################################################
-file(GLOB xml_files "*.xml")
-install(FILES ${xml_files} DESTINATION ${GRC_BLOCKS_DIR})
-
-########################################################################
-#The wxgui module contains a top_block + wxgui frame.
-########################################################################
-include(GrPython)
-
-GR_PYTHON_INSTALL(
-    FILES
-    __init__.py
-    panel.py
-    top_block_gui.py
-    DESTINATION ${GR_PYTHON_DIR}/grc_gnuradio/wxgui
-)
diff --git a/gr-wxgui/grc/__init__.py b/gr-wxgui/grc/__init__.py
deleted file mode 100644
index 81427253b6..0000000000
--- a/gr-wxgui/grc/__init__.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# Copyright 2008, 2009 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-from top_block_gui import top_block_gui
-from panel import Panel
diff --git a/gr-wxgui/grc/notebook.xml b/gr-wxgui/grc/notebook.xml
deleted file mode 100644
index 1e4b0d0679..0000000000
--- a/gr-wxgui/grc/notebook.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0"?>
-<!--
-###################################################
-##WX GUI Notebook
-###################################################
- -->
-<block>
-	<name>WX GUI Notebook</name>
-	<key>notebook</key>
-	<category>[Core]/GUI Widgets/WX</category>
-	<import>from grc_gnuradio import wxgui as grc_wxgui</import>
-	<make>#set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self'
-self.$(id) = wx.Notebook($(parent).GetWin(), style=$style)
-#for $label in $labels()
-self.$(id).AddPage(grc_wxgui.Panel(self.$(id)), "$label")
-#end for
-#if not $grid_pos()
-$(parent).Add(self.$(id))
-#else
-$(parent).GridAdd(self.$(id), $(', '.join(map(str, $grid_pos()))))
-#end if</make>
-	<param>
-		<name>Tab Orientation</name>
-		<key>style</key>
-		<value>wx.NB_TOP</value>
-		<type>enum</type>
-		<option>
-			<name>Top</name>
-			<key>wx.NB_TOP</key>
-		</option>
-		<option>
-			<name>Right</name>
-			<key>wx.NB_RIGHT</key>
-		</option>
-		<option>
-			<name>Bottom</name>
-			<key>wx.NB_BOTTOM</key>
-		</option>
-		<option>
-			<name>Left</name>
-			<key>wx.NB_LEFT</key>
-		</option>
-	</param>
-	<param>
-		<name>Labels</name>
-		<key>labels</key>
-		<value>['tab1', 'tab2', 'tab3']</value>
-		<type>raw</type>
-	</param>
-	<param>
-		<name>Grid Position</name>
-		<key>grid_pos</key>
-		<value></value>
-		<type>grid_pos</type>
-	</param>
-	<param>
-		<name>Notebook</name>
-		<key>notebook</key>
-		<value></value>
-		<type>notebook</type>
-	</param>
-	<check>isinstance($labels, (list, tuple))</check>
-	<check>all(map(lambda x: isinstance(x, str), $labels))</check>
-	<check>len($labels) &gt; 0</check>
-	<doc>
-Use the Grid Position (row, column, row span, column span) to position the graphical element in the window.
-
-Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page.
-	</doc>
-</block>
diff --git a/gr-wxgui/grc/panel.py b/gr-wxgui/grc/panel.py
deleted file mode 100644
index 8ca426e098..0000000000
--- a/gr-wxgui/grc/panel.py
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright 2009 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-import wx
-
-class Panel(wx.Panel):
-	def __init__(self, parent, orient=wx.VERTICAL):
-		wx.Panel.__init__(self, parent)
-		self._box = wx.BoxSizer(orient)
-		self._grid = wx.GridBagSizer(5, 5)
-		self.Add(self._grid)
-		self.SetSizer(self._box)
-
-	def GetWin(self): return self
-
-	def Add(self, win):
-		"""
-		Add a window to the wx vbox.
-
-		Args:
-		    win: the wx window
-		"""
-		self._box.Add(win, 0, wx.EXPAND)
-
-	def GridAdd(self, win, row, col, row_span=1, col_span=1):
-		"""
-		Add a window to the wx grid at the given position.
-
-		Args:
-		    win: the wx window
-		    row: the row specification (integer >= 0)
-		    col: the column specification (integer >= 0)
-		    row_span: the row span specification (integer >= 1)
-		    col_span: the column span specification (integer >= 1)
-		"""
-		self._grid.Add(win, wx.GBPosition(row, col), wx.GBSpan(row_span, col_span), wx.EXPAND)
diff --git a/gr-wxgui/grc/top_block_gui.py b/gr-wxgui/grc/top_block_gui.py
deleted file mode 100644
index 24b462d7ad..0000000000
--- a/gr-wxgui/grc/top_block_gui.py
+++ /dev/null
@@ -1,87 +0,0 @@
-# Copyright 2008, 2009 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-import wx
-from gnuradio import gr
-import panel
-
-default_gui_size = (200, 100)
-
-class top_block_gui(gr.top_block):
-	"""gr top block with wx gui app and grid sizer."""
-
-	def __init__(self, title='', size=default_gui_size):
-		"""
-		Initialize the gr top block.
-		Create the wx gui elements.
-
-		Args:
-		    title: the main window title
-		    size: the main window size tuple in pixels
-		    icon: the file path to an icon or None
-		"""
-		#initialize
-		gr.top_block.__init__(self)
-		self._size = size
-		#create gui elements
-		self._app = wx.App()
-		self._frame = wx.Frame(None, title=title)
-		self._panel = panel.Panel(self._frame)
-		self.Add = self._panel.Add
-		self.GridAdd = self._panel.GridAdd
-		self.GetWin = self._panel.GetWin
-                self.Start(False)
-
-	def SetIcon(self, *args, **kwargs): self._frame.SetIcon(*args, **kwargs)
-
-        def Start(self, start=True, max_nouts=0):
-		#set minimal window size
-		self._frame.SetSizeHints(*self._size)
-		#create callback for quit
-		def _quit(event):
-			self.stop(); self.wait()
-			self._frame.Destroy()
-		#setup app
-		self._frame.Bind(wx.EVT_CLOSE, _quit)
-		self._sizer = wx.BoxSizer(wx.VERTICAL)
-		self._sizer.Add(self._panel, 0, wx.EXPAND)
-		self._frame.SetSizerAndFit(self._sizer)
-		self._frame.SetAutoLayout(True)
-		self._frame.Show(True)
-		self._app.SetTopWindow(self._frame)
-		#start flow graph
-		if start:
-			if max_nouts != 0:
-				self.start(max_nouts)
-			else:
-				self.start()
-
-	def Run(self, start=True, max_nouts=0):
-		"""
-		Setup the wx gui elements.
-		Start the gr top block.
-		Block with the wx main loop.
-		"""
-		#blocking main loop
-                self.Start(start, max_nouts)
-		self._app.MainLoop()
-
-        def Wait(self):
-		self._app.MainLoop()
diff --git a/gr-wxgui/grc/variable_check_box.xml b/gr-wxgui/grc/variable_check_box.xml
deleted file mode 100644
index da8bb8b8d5..0000000000
--- a/gr-wxgui/grc/variable_check_box.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0"?>
-<!--
-###################################################
-##Variable Check Box:
-##	a gui check box form
-###################################################
- -->
-<block>
-	<name>WX GUI Check Box</name>
-	<key>variable_check_box</key>
-	<category>[Core]/GUI Widgets/WX</category>
-	<import>from gnuradio.wxgui import forms</import>
-	<var_make>self.$(id) = $(id) = $value</var_make>
-	<make>#set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self'
-#set $win = 'self._%s_check_box'%$id
-$win = forms.check_box(
-	parent=$(parent).GetWin(),
-	value=self.$id,
-	callback=self.set_$(id),
-	#if $label()
-	label=$label,
-	#else
-	label='$id',
-	#end if
-	true=$true,
-	false=$false,
-)
-#if not $grid_pos()
-$(parent).Add($win)
-#else
-$(parent).GridAdd($win, $(', '.join(map(str, $grid_pos()))))
-#end if</make>
-	<callback>self.set_$(id)($value)</callback>
-	<callback>self._$(id)_check_box.set_value($id)</callback>
-	<param>
-		<name>Label</name>
-		<key>label</key>
-		<value></value>
-		<type>string</type>
-		<hide>#if $label() then 'none' else 'part'#</hide>
-	</param>
-	<param>
-		<name>Default Value</name>
-		<key>value</key>
-		<value>True</value>
-		<type>raw</type>
-	</param>
-	<param>
-		<name>True</name>
-		<key>true</key>
-		<value>True</value>
-		<type>raw</type>
-	</param>
-	<param>
-		<name>False</name>
-		<key>false</key>
-		<value>False</value>
-		<type>raw</type>
-	</param>
-	<param>
-		<name>Grid Position</name>
-		<key>grid_pos</key>
-		<value></value>
-		<type>grid_pos</type>
-	</param>
-	<param>
-		<name>Notebook</name>
-		<key>notebook</key>
-		<value></value>
-		<type>notebook</type>
-	</param>
-	<check>$value in ($true, $false)</check>
-	<doc>
-This block creates a variable with a check box form. \
-Leave the label blank to use the variable id as the label.
-
-A check box form can switch between two states; \
-the default being True and False. \
-Override True and False to use alternative states.
-
-Use the Grid Position (row, column, row span, column span) to position the graphical element in the window.
-
-Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page.
-	</doc>
-</block>
diff --git a/gr-wxgui/grc/variable_chooser.xml b/gr-wxgui/grc/variable_chooser.xml
deleted file mode 100644
index 216be01e08..0000000000
--- a/gr-wxgui/grc/variable_chooser.xml
+++ /dev/null
@@ -1,123 +0,0 @@
-<?xml version="1.0"?>
-<!--
-###################################################
-##Variable Chooser:
-##	a gui form with enumerated choices
-##	radio buttons, drop down, or button
-###################################################
- -->
-<block>
-	<name>WX GUI Chooser</name>
-	<key>variable_chooser</key>
-	<category>[Core]/GUI Widgets/WX</category>
-	<import>from gnuradio.wxgui import forms</import>
-	<var_make>self.$(id) = $(id) = $value</var_make>
-	<make>#set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self'
-#set $win = 'self._%s_chooser'%$id
-$win = forms.$(type)(
-	parent=$(parent).GetWin(),
-	value=self.$id,
-	callback=self.set_$(id),
-	#if $label()
-	label=$label,
-	#else
-	label='$id',
-	#end if
-	choices=$choices,
-	labels=$labels,
-#if $type() == 'radio_buttons'
-	style=$style,
-#end if
-)
-#if not $grid_pos()
-$(parent).Add($win)
-#else
-$(parent).GridAdd($win, $(', '.join(map(str, $grid_pos()))))
-#end if</make>
-	<callback>self.set_$(id)($value)</callback>
-	<callback>self._$(id)_chooser.set_value($id)</callback>
-	<param>
-		<name>Label</name>
-		<key>label</key>
-		<value></value>
-		<type>string</type>
-		<hide>#if $label() then 'none' else 'part'#</hide>
-	</param>
-	<param>
-		<name>Default Value</name>
-		<key>value</key>
-		<value>1</value>
-		<type>raw</type>
-	</param>
-	<param>
-		<name>Choices</name>
-		<key>choices</key>
-		<value>[1, 2, 3]</value>
-		<type>raw</type>
-	</param>
-	<param>
-		<name>Labels</name>
-		<key>labels</key>
-		<value>[]</value>
-		<type>raw</type>
-	</param>
-	<param>
-		<name>Type</name>
-		<key>type</key>
-		<value>drop_down</value>
-		<type>enum</type>
-		<option>
-			<name>Drop Down</name>
-			<key>drop_down</key>
-		</option>
-		<option>
-			<name>Radio Buttons</name>
-			<key>radio_buttons</key>
-		</option>
-		<option>
-			<name>Button</name>
-			<key>button</key>
-		</option>
-	</param>
-	<param>
-		<name>Style</name>
-		<key>style</key>
-		<value>wx.RA_HORIZONTAL</value>
-		<type>enum</type>
-		<hide>#if $type() == 'radio_buttons' then 'part' else 'all'#</hide>
-		<option>
-			<name>Horizontal</name>
-			<key>wx.RA_HORIZONTAL</key>
-		</option>
-		<option>
-			<name>Vertical</name>
-			<key>wx.RA_VERTICAL</key>
-		</option>
-	</param>
-	<param>
-		<name>Grid Position</name>
-		<key>grid_pos</key>
-		<value></value>
-		<type>grid_pos</type>
-	</param>
-	<param>
-		<name>Notebook</name>
-		<key>notebook</key>
-		<value></value>
-		<type>notebook</type>
-	</param>
-	<check>$value in $choices</check>
-	<check>not $labels or len($labels) == len($choices)</check>
-	<doc>
-This block creates a variable with a drop down, radio buttons, or a button. \
-Leave the label blank to use the variable id as the label. \
-The value index is the index of a particular choice, \
-which defines the default choice when the flow graph starts. \
-The choices must be a list of possible values. \
-Leave labels empty to use the choices as the labels.
-
-Use the Grid Position (row, column, row span, column span) to position the graphical element in the window.
-
-Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page.
-	</doc>
-</block>
diff --git a/gr-wxgui/grc/variable_slider.xml b/gr-wxgui/grc/variable_slider.xml
deleted file mode 100644
index 29f3182d0a..0000000000
--- a/gr-wxgui/grc/variable_slider.xml
+++ /dev/null
@@ -1,139 +0,0 @@
-<?xml version="1.0"?>
-<!--
-###################################################
-##Variable Slider:
-##	a combined slider and text box form
-###################################################
- -->
-<block>
-	<name>WX GUI Slider</name>
-	<key>variable_slider</key>
-	<category>[Core]/GUI Widgets/WX</category>
-	<import>from gnuradio.wxgui import forms</import>
-	<var_make>self.$(id) = $(id) = $value</var_make>
-	<make>#set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self'
-#set $win = '_%s_sizer'%$id
-$win = wx.BoxSizer(wx.VERTICAL)
-self._$(id)_text_box = forms.text_box(
-	parent=$(parent).GetWin(),
-	sizer=$win,
-	value=self.$id,
-	callback=self.set_$(id),
-	#if $label()
-	label=$label,
-	#else
-	label='$id',
-	#end if
-	converter=forms.$(converver)(),
-	proportion=0,
-)
-self._$(id)_slider = forms.slider(
-	parent=$(parent).GetWin(),
-	sizer=$win,
-	value=self.$id,
-	callback=self.set_$(id),
-	minimum=$min,
-	maximum=$max,
-	num_steps=$num_steps,
-	style=$style,
-	cast=$(converver.slider_cast),
-	proportion=1,
-)
-#if not $grid_pos()
-$(parent).Add($win)
-#else
-$(parent).GridAdd($win, $(', '.join(map(str, $grid_pos()))))
-#end if</make>
-	<callback>self.set_$(id)($value)</callback>
-	<callback>self._$(id)_slider.set_value($id)</callback>
-	<callback>self._$(id)_text_box.set_value($id)</callback>
-	<param>
-		<name>Label</name>
-		<key>label</key>
-		<value></value>
-		<type>string</type>
-		<hide>#if $label() then 'none' else 'part'#</hide>
-	</param>
-	<param>
-		<name>Default Value</name>
-		<key>value</key>
-		<value>50</value>
-		<type>real</type>
-	</param>
-	<param>
-		<name>Minimum</name>
-		<key>min</key>
-		<value>0</value>
-		<type>real</type>
-	</param>
-	<param>
-		<name>Maximum</name>
-		<key>max</key>
-		<value>100</value>
-		<type>real</type>
-	</param>
-	<param>
-		<name>Num Steps</name>
-		<key>num_steps</key>
-		<value>100</value>
-		<type>int</type>
-		<hide>part</hide>
-	</param>
-	<param>
-		<name>Style</name>
-		<key>style</key>
-		<value>wx.SL_HORIZONTAL</value>
-		<type>enum</type>
-		<hide>part</hide>
-		<option>
-			<name>Horizontal</name>
-			<key>wx.SL_HORIZONTAL</key>
-		</option>
-		<option>
-			<name>Vertical</name>
-			<key>wx.SL_VERTICAL</key>
-		</option>
-	</param>
-	<param>
-		<name>Converter</name>
-		<key>converver</key>
-		<value>float_converter</value>
-		<type>enum</type>
-		<option>
-			<name>Float</name>
-			<key>float_converter</key>
-			<opt>slider_cast:float</opt>
-		</option>
-		<option>
-			<name>Integer</name>
-			<key>int_converter</key>
-			<opt>slider_cast:int</opt>
-		</option>
-	</param>
-	<param>
-		<name>Grid Position</name>
-		<key>grid_pos</key>
-		<value></value>
-		<type>grid_pos</type>
-	</param>
-	<param>
-		<name>Notebook</name>
-		<key>notebook</key>
-		<value></value>
-		<type>notebook</type>
-	</param>
-	<check>$min &lt;= $value &lt;= $max</check>
-	<check>$min &lt; $max</check>
-	<check>0 &lt; $num_steps &lt;= 1000</check>
-	<doc>
-This block creates a variable with a slider. \
-Leave the label blank to use the variable id as the label. \
-The value must be a real number. \
-The value must be between the minimum and the maximum. \
-The number of steps must be between 0 and 1000.
-
-Use the Grid Position (row, column, row span, column span) to position the graphical element in the window.
-
-Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page.
-	</doc>
-</block>
diff --git a/gr-wxgui/grc/variable_static_text.xml b/gr-wxgui/grc/variable_static_text.xml
deleted file mode 100644
index e47f5c3731..0000000000
--- a/gr-wxgui/grc/variable_static_text.xml
+++ /dev/null
@@ -1,98 +0,0 @@
-<?xml version="1.0"?>
-<!--
-###################################################
-##Variable Static Text:
-##	a gui static text form
-###################################################
- -->
-<block>
-	<name>WX GUI Static Text</name>
-	<key>variable_static_text</key>
-	<category>[Core]/GUI Widgets/WX</category>
-	<import>from gnuradio.wxgui import forms</import>
-	<var_make>self.$(id) = $(id) = $value</var_make>
-	<make>#set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self'
-#set $win = 'self._%s_static_text'%$id
-$win = forms.static_text(
-	parent=$(parent).GetWin(),
-	value=self.$id,
-	callback=self.set_$(id),
-	#if $label()
-	label=$label,
-	#else
-	label='$id',
-	#end if
-	#if $formatter()
-	converter=forms.$(converver)(formatter=$formatter),
-	#else
-	converter=forms.$(converver)(),
-	#end if
-)
-#if not $grid_pos()
-$(parent).Add($win)
-#else
-$(parent).GridAdd($win, $(', '.join(map(str, $grid_pos()))))
-#end if</make>
-	<callback>self.set_$(id)($value)</callback>
-	<callback>self._$(id)_static_text.set_value($id)</callback>
-	<param>
-		<name>Label</name>
-		<key>label</key>
-		<value></value>
-		<type>string</type>
-		<hide>#if $label() then 'none' else 'part'#</hide>
-	</param>
-	<param>
-		<name>Default Value</name>
-		<key>value</key>
-		<value>0</value>
-		<type>raw</type>
-	</param>
-	<param>
-		<name>Converter</name>
-		<key>converver</key>
-		<value>float_converter</value>
-		<type>enum</type>
-		<option>
-			<name>Float</name>
-			<key>float_converter</key>
-		</option>
-		<option>
-			<name>Integer</name>
-			<key>int_converter</key>
-		</option>
-		<option>
-			<name>String</name>
-			<key>str_converter</key>
-		</option>
-	</param>
-	<param>
-		<name>Formatter</name>
-		<key>formatter</key>
-		<value>None</value>
-		<type>raw</type>
-		<hide>part</hide>
-	</param>
-	<param>
-		<name>Grid Position</name>
-		<key>grid_pos</key>
-		<value></value>
-		<type>grid_pos</type>
-	</param>
-	<param>
-		<name>Notebook</name>
-		<key>notebook</key>
-		<value></value>
-		<type>notebook</type>
-	</param>
-	<doc>
-This block creates a variable with a static text form. \
-Leave the label blank to use the variable id as the label.
-
-Format should be a function/lambda that converts a value into a string or None for the default formatter.
-
-Use the Grid Position (row, column, row span, column span) to position the graphical element in the window.
-
-Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page.
-	</doc>
-</block>
diff --git a/gr-wxgui/grc/variable_text_box.xml b/gr-wxgui/grc/variable_text_box.xml
deleted file mode 100644
index 8c8119433a..0000000000
--- a/gr-wxgui/grc/variable_text_box.xml
+++ /dev/null
@@ -1,102 +0,0 @@
-<?xml version="1.0"?>
-<!--
-###################################################
-##Variable Text Box:
-##	a gui text box form
-###################################################
- -->
-<block>
-	<name>WX GUI Text Box</name>
-	<key>variable_text_box</key>
-	<category>[Core]/GUI Widgets/WX</category>
-	<import>from gnuradio.wxgui import forms</import>
-	<var_make>self.$(id) = $(id) = $value</var_make>
-	<make>#set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self'
-#set $win = 'self._%s_text_box'%$id
-$win = forms.text_box(
-	parent=$(parent).GetWin(),
-	value=self.$id,
-	callback=self.set_$(id),
-	#if $label()
-	label=$label,
-	#else
-	label='$id',
-	#end if
-	#if $formatter()
-	converter=forms.$(converver)(formatter=$formatter),
-	#else
-	converter=forms.$(converver)(),
-	#end if
-)
-#if not $grid_pos()
-$(parent).Add($win)
-#else
-$(parent).GridAdd($win, $(', '.join(map(str, $grid_pos()))))
-#end if</make>
-	<callback>self.set_$(id)($value)</callback>
-	<callback>self._$(id)_text_box.set_value($id)</callback>
-	<param>
-		<name>Label</name>
-		<key>label</key>
-		<value></value>
-		<type>string</type>
-		<hide>#if $label() then 'none' else 'part'#</hide>
-	</param>
-	<param>
-		<name>Default Value</name>
-		<key>value</key>
-		<value>0</value>
-		<type>raw</type>
-	</param>
-	<param>
-		<name>Converter</name>
-		<key>converver</key>
-		<value>float_converter</value>
-		<type>enum</type>
-		<option>
-			<name>Float</name>
-			<key>float_converter</key>
-		</option>
-		<option>
-			<name>Integer</name>
-			<key>int_converter</key>
-		</option>
-		<option>
-			<name>String</name>
-			<key>str_converter</key>
-		</option>
-		<option>
-			<name>Evaluate</name>
-			<key>eval_converter</key>
-		</option>
-	</param>
-	<param>
-		<name>Formatter</name>
-		<key>formatter</key>
-		<value>None</value>
-		<type>raw</type>
-		<hide>part</hide>
-	</param>
-	<param>
-		<name>Grid Position</name>
-		<key>grid_pos</key>
-		<value></value>
-		<type>grid_pos</type>
-	</param>
-	<param>
-		<name>Notebook</name>
-		<key>notebook</key>
-		<value></value>
-		<type>notebook</type>
-	</param>
-	<doc>
-This block creates a variable with a text box. \
-Leave the label blank to use the variable id as the label.
-
-Format should be a function/lambda that converts a value into a string or None for the default formatter.
-
-Use the Grid Position (row, column, row span, column span) to position the graphical element in the window.
-
-Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page.
-	</doc>
-</block>
diff --git a/gr-wxgui/grc/wxgui_constellationsink2.xml b/gr-wxgui/grc/wxgui_constellationsink2.xml
deleted file mode 100644
index 999ebbe2cf..0000000000
--- a/gr-wxgui/grc/wxgui_constellationsink2.xml
+++ /dev/null
@@ -1,141 +0,0 @@
-<?xml version="1.0"?>
-<!--
-###################################################
-##Constellation Sink
-###################################################
- -->
-<block>
-	<name>WX GUI Constellation Sink</name>
-	<key>wxgui_constellationsink2</key>
-	<category>[Core]/Instrumentation/WX</category>
-	<import>from gnuradio.wxgui import constsink_gl</import>
-        <import>from gnuradio import wxgui</import>
-	<make>#set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self'
-constsink_gl.const_sink_c(
-	$(parent).GetWin(),
-	title=$title,
-	sample_rate=$samp_rate,
-	frame_rate=$frame_rate,
-	const_size=$const_size,
-	M=$M,
-	theta=$theta,
-	loop_bw=$loop_bw,
-	fmax=$fmax,
-	mu=$mu,
-	gain_mu=$gain_mu,
-	symbol_rate=$symbol_rate,
-	omega_limit=$omega_limit,
-#if $win_size()
-	size=$win_size,
-#end if
-)
-#if not $grid_pos()
-$(parent).Add(self.$(id).win)
-#else
-$(parent).GridAdd(self.$(id).win, $(', '.join(map(str, $grid_pos()))))
-#end if</make>
-	<callback>set_sample_rate($samp_rate)</callback>
-	<param>
-		<name>Title</name>
-		<key>title</key>
-		<value>Constellation Plot</value>
-		<type>string</type>
-	</param>
-	<param>
-		<name>Sample Rate</name>
-		<key>samp_rate</key>
-		<value>samp_rate</value>
-		<type>real</type>
-	</param>
-	<param>
-		<name>Frame Rate</name>
-		<key>frame_rate</key>
-		<value>5</value>
-		<type>real</type>
-	</param>
-	<param>
-		<name>Constellation Size</name>
-		<key>const_size</key>
-		<value>2048</value>
-		<type>real</type>
-	</param>
-	<param>
-		<name>M</name>
-		<key>M</key>
-		<value>4</value>
-		<type>int</type>
-	</param>
-	<param>
-		<name>Theta</name>
-		<key>theta</key>
-		<value>0</value>
-		<type>real</type>
-	</param>
-	<param>
-		<name>Loop Bandwidth</name>
-		<key>loop_bw</key>
-		<value>6.28/100.0</value>
-		<type>real</type>
-	</param>
-	<param>
-		<name>Max Freq</name>
-		<key>fmax</key>
-		<value>0.06</value>
-		<type>real</type>
-	</param>
-	<param>
-		<name>Mu</name>
-		<key>mu</key>
-		<value>0.5</value>
-		<type>real</type>
-	</param>
-	<param>
-		<name>Gain Mu</name>
-		<key>gain_mu</key>
-		<value>0.005</value>
-		<type>real</type>
-	</param>
-	<param>
-		<name>Symbol Rate</name>
-		<key>symbol_rate</key>
-		<value>samp_rate/4.</value>
-		<type>real</type>
-	</param>
-	<param>
-		<name>Omega Limit</name>
-		<key>omega_limit</key>
-		<value>0.005</value>
-		<type>real</type>
-	</param>
-	<param>
-		<name>Window Size</name>
-		<key>win_size</key>
-		<value></value>
-		<type>int_vector</type>
-		<hide>#if $win_size() then 'none' else 'part'#</hide>
-	</param>
-	<param>
-		<name>Grid Position</name>
-		<key>grid_pos</key>
-		<value></value>
-		<type>grid_pos</type>
-	</param>
-	<param>
-		<name>Notebook</name>
-		<key>notebook</key>
-		<value></value>
-		<type>notebook</type>
-	</param>
-	<check>not $win_size or len($win_size) == 2</check>
-	<sink>
-		<name>in</name>
-		<type>complex</type>
-	</sink>
-	<doc>
-Leave the window blank for the default size, otherwise enter a tuple of (width, height) pixels.
-
-Use the Grid Position (row, column, row span, column span) to position the graphical element in the window.
-
-Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page.
-	</doc>
-</block>
diff --git a/gr-wxgui/grc/wxgui_fftsink2.xml b/gr-wxgui/grc/wxgui_fftsink2.xml
deleted file mode 100644
index 11e9c7255e..0000000000
--- a/gr-wxgui/grc/wxgui_fftsink2.xml
+++ /dev/null
@@ -1,246 +0,0 @@
-<?xml version="1.0"?>
-<!--
-###################################################
-##FFT Sink
-###################################################
- -->
-<block>
-	<name>WX GUI FFT Sink</name>
-	<key>wxgui_fftsink2</key>
-	<category>[Core]/Instrumentation/WX</category>
-	<import>from gnuradio.fft import window</import>
-	<import>from gnuradio.wxgui import fftsink2</import>
-        <import>from gnuradio import wxgui</import>
-	<make>#set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self'
-fftsink2.$(type.fcn)(
-	$(parent).GetWin(),
-	baseband_freq=$baseband_freq,
-	y_per_div=$y_per_div,
-	y_divs=$y_divs,
-	ref_level=$ref_level,
-	ref_scale=$ref_scale,
-	sample_rate=$samp_rate,
-	fft_size=$fft_size,
-	fft_rate=$fft_rate,
-	average=$average,
-	avg_alpha=#if $avg_alpha() then $avg_alpha else 'None'#,
-	title=$title,
-	peak_hold=$peak_hold,
-#if $win()
-	win=$win,
-#end if
-#if $win_size()
-	size=$win_size,
-#end if
-)
-#if not $grid_pos()
-$(parent).Add(self.$(id).win)
-#else
-$(parent).GridAdd(self.$(id).win, $(', '.join(map(str, $grid_pos()))))
-#end if
-#if $freqvar() is not None
-def $(id)_callback(x, y):
-	self.set_$(freqvar)(x)
-
-self.$(id).set_callback($(id)_callback)
-#end if</make>
-	<callback>set_baseband_freq($baseband_freq)</callback>
-	<callback>set_sample_rate($samp_rate)</callback>
-	<param>
-		<name>Type</name>
-		<key>type</key>
-		<value>complex</value>
-		<type>enum</type>
-		<option>
-			<name>Complex</name>
-			<key>complex</key>
-			<opt>fcn:fft_sink_c</opt>
-		</option>
-		<option>
-			<name>Float</name>
-			<key>float</key>
-			<opt>fcn:fft_sink_f</opt>
-		</option>
-	</param>
-	<param>
-		<name>Title</name>
-		<key>title</key>
-		<value>FFT Plot</value>
-		<type>string</type>
-	</param>
-	<param>
-		<name>Sample Rate</name>
-		<key>samp_rate</key>
-		<value>samp_rate</value>
-		<type>real</type>
-	</param>
-	<param>
-		<name>Baseband Freq</name>
-		<key>baseband_freq</key>
-		<value>0</value>
-		<type>real</type>
-	</param>
-	<param>
-		<name>Y per Div</name>
-		<key>y_per_div</key>
-		<value>10</value>
-		<type>enum</type>
-		<option>
-			<name>1 dB</name>
-			<key>1</key>
-		</option>
-		<option>
-			<name>2 dB</name>
-			<key>2</key>
-		</option>
-		<option>
-			<name>5 dB</name>
-			<key>5</key>
-		</option>
-		<option>
-			<name>10 dB</name>
-			<key>10</key>
-		</option>
-		<option>
-			<name>20 dB</name>
-			<key>20</key>
-		</option>
-	</param>
-	<param>
-		<name>Y Divs</name>
-		<key>y_divs</key>
-		<value>10</value>
-		<type>int</type>
-	</param>
-	<param>
-		<name>Ref Level (dB)</name>
-		<key>ref_level</key>
-		<value>0</value>
-		<type>real</type>
-	</param>
-	<param>
-		<name>Ref Scale (p2p)</name>
-		<key>ref_scale</key>
-		<value>2.0</value>
-		<type>real</type>
-	</param>
-	<param>
-		<name>FFT Size</name>
-		<key>fft_size</key>
-		<value>1024</value>
-		<type>int</type>
-	</param>
-	<param>
-		<name>Refresh Rate</name>
-		<key>fft_rate</key>
-		<value>15</value>
-		<type>int</type>
-	</param>
-	<param>
-		<name>Peak Hold</name>
-		<key>peak_hold</key>
-		<value>False</value>
-		<type>enum</type>
-		<hide>#if $peak_hold() == 'True' then 'none' else 'part'#</hide>
-		<option>
-			<name>On</name>
-			<key>True</key>
-		</option>
-		<option>
-			<name>Off</name>
-			<key>False</key>
-		</option>
-	</param>
-	<param>
-		<name>Average</name>
-		<key>average</key>
-		<value>False</value>
-		<type>enum</type>
-		<hide>part</hide>
-		<option>
-			<name>On</name>
-			<key>True</key>
-		</option>
-		<option>
-			<name>Off</name>
-			<key>False</key>
-		</option>
-	</param>
-	<param>
-		<name>Average Alpha</name>
-		<key>avg_alpha</key>
-		<value>0</value>
-		<type>real</type>
-		<hide>#if $average() == 'True' then 'none' else 'all'#</hide>
-	</param>
-	<param>
-		<name>Window</name>
-		<key>win</key>
-		<value>None</value>
-		<type>raw</type>
-		<hide>#if $win() is None then 'part' else 'none'#</hide>
-		<option>
-			<name>Automatic</name>
-			<key>None</key>
-		</option>
-		<option>
-			<name>Blackman-Harris</name>
-			<key>window.blackmanharris</key>
-		</option>
-		<option>
-			<name>Hamming</name>
-			<key>window.hamming</key>
-		</option>
-		<option>
-			<name>Hanning</name>
-			<key>window.hanning</key>
-		</option>
-		<option>
-			<name>Rectangular</name>
-			<key>window.rectangular</key>
-		</option>
-		<option>
-			<name>Flattop</name>
-			<key>window.flattop</key>
-		</option>
-	</param>
-	<param>
-		<name>Window Size</name>
-		<key>win_size</key>
-		<value></value>
-		<type>int_vector</type>
-		<hide>#if $win_size() then 'none' else 'part'#</hide>
-	</param>
-	<param>
-		<name>Grid Position</name>
-		<key>grid_pos</key>
-		<value></value>
-		<type>grid_pos</type>
-	</param>
-	<param>
-		<name>Notebook</name>
-		<key>notebook</key>
-		<value></value>
-		<type>notebook</type>
-	</param>
-	<param>
-		<name>Freq Set Varname</name>
-		<key>freqvar</key>
-		<value>None</value>
-		<type>raw</type>
-	</param>
-	<check>not $win_size or len($win_size) == 2</check>
-	<sink>
-		<name>in</name>
-		<type>$type</type>
-	</sink>
-	<doc>
-Set Average Alpha to 0 for automatic setting.
-
-Leave the window blank for the default size, otherwise enter a tuple of (width, height) pixels.
-
-Use the Grid Position (row, column, row span, column span) to position the graphical element in the window.
-
-Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page.
-	</doc>
-</block>
diff --git a/gr-wxgui/grc/wxgui_histosink2.xml b/gr-wxgui/grc/wxgui_histosink2.xml
deleted file mode 100644
index 63bfc000ae..0000000000
--- a/gr-wxgui/grc/wxgui_histosink2.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0"?>
-<!--
-###################################################
-##Histogram Sink
-###################################################
- -->
-<block>
-	<name>WX GUI Histo Sink</name>
-	<key>wxgui_histosink2</key>
-	<category>[Core]/Instrumentation/WX</category>
-	<import>from gnuradio.wxgui import histosink_gl</import>
-        <import>from gnuradio import wxgui</import>
-	<make>#set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self'
-histosink_gl.histo_sink_f(
-	$(parent).GetWin(),
-	title=$title,
-	num_bins=$num_bins,
-	frame_size=$frame_size,
-#if $win_size()
-	size=$win_size,
-#end if
-)
-#if not $grid_pos()
-$(parent).Add(self.$(id).win)
-#else
-$(parent).GridAdd(self.$(id).win, $(', '.join(map(str, $grid_pos()))))
-#end if</make>
-	<callback>set_num_bins($num_bins)</callback>
-	<callback>set_frame_size($frame_size)</callback>
-	<param>
-		<name>Title</name>
-		<key>title</key>
-		<value>Histogram Plot</value>
-		<type>string</type>
-	</param>
-	<param>
-		<name>Num Bins</name>
-		<key>num_bins</key>
-		<value>27</value>
-		<type>int</type>
-	</param>
-	<param>
-		<name>Frame Size</name>
-		<key>frame_size</key>
-		<value>1000</value>
-		<type>int</type>
-	</param>
-	<param>
-		<name>Window Size</name>
-		<key>win_size</key>
-		<value></value>
-		<type>int_vector</type>
-		<hide>#if $win_size() then 'none' else 'part'#</hide>
-	</param>
-	<param>
-		<name>Grid Position</name>
-		<key>grid_pos</key>
-		<value></value>
-		<type>grid_pos</type>
-	</param>
-	<param>
-		<name>Notebook</name>
-		<key>notebook</key>
-		<value></value>
-		<type>notebook</type>
-	</param>
-	<check>not $win_size or len($win_size) == 2</check>
-	<sink>
-		<name>in</name>
-		<type>float</type>
-	</sink>
-	<doc>
-Leave the window blank for the default size, otherwise enter a tuple of (width, height) pixels.
-
-Use the Grid Position (row, column, row span, column span) to position the graphical element in the window.
-
-Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page.
-	</doc>
-</block>
diff --git a/gr-wxgui/grc/wxgui_numbersink2.xml b/gr-wxgui/grc/wxgui_numbersink2.xml
deleted file mode 100644
index 6f4d4a574a..0000000000
--- a/gr-wxgui/grc/wxgui_numbersink2.xml
+++ /dev/null
@@ -1,194 +0,0 @@
-<?xml version="1.0"?>
-<!--
-###################################################
-##Number Sink
-###################################################
- -->
-<block>
-	<name>WX GUI Number Sink</name>
-	<key>wxgui_numbersink2</key>
-	<category>[Core]/Instrumentation/WX</category>
-	<import>from gnuradio.wxgui import numbersink2</import>
-        <import>from gnuradio import wxgui</import>
-	<make>#set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self'
-numbersink2.$(type.fcn)(
-	$(parent).GetWin(),
-	unit=$units,
-	minval=$min_value,
-	maxval=$max_value,
-	factor=$factor,
-	decimal_places=$decimal_places,
-	ref_level=$ref_level,
-	sample_rate=$samp_rate,
-	number_rate=$number_rate,
-	average=$average,
-	avg_alpha=#if $avg_alpha() then $avg_alpha else 'None'#,
-	label=$title,
-	peak_hold=$peak_hold,
-	show_gauge=$show_gauge,
-#if $win_size()
-	size=$win_size,
-#end if
-)
-#if not $grid_pos()
-$(parent).Add(self.$(id).win)
-#else
-$(parent).GridAdd(self.$(id).win, $(', '.join(map(str, $grid_pos()))))
-#end if</make>
-	<param>
-		<name>Type</name>
-		<key>type</key>
-		<value>complex</value>
-		<type>enum</type>
-		<option>
-			<name>Complex</name>
-			<key>complex</key>
-			<opt>fcn:number_sink_c</opt>
-		</option>
-		<option>
-			<name>Float</name>
-			<key>float</key>
-			<opt>fcn:number_sink_f</opt>
-		</option>
-	</param>
-	<param>
-		<name>Title</name>
-		<key>title</key>
-		<value>Number Plot</value>
-		<type>string</type>
-	</param>
-	<param>
-		<name>Units</name>
-		<key>units</key>
-		<value>Units</value>
-		<type>string</type>
-	</param>
-	<param>
-		<name>Sample Rate</name>
-		<key>samp_rate</key>
-		<value>samp_rate</value>
-		<type>real</type>
-	</param>
-	<param>
-		<name>Min Value</name>
-		<key>min_value</key>
-		<value>-100</value>
-		<type>real</type>
-	</param>
-	<param>
-		<name>Max Value</name>
-		<key>max_value</key>
-		<value>100</value>
-		<type>real</type>
-	</param>
-	<param>
-		<name>Factor</name>
-		<key>factor</key>
-		<value>1.0</value>
-		<type>real</type>
-	</param>
-	<param>
-		<name>Decimal Places</name>
-		<key>decimal_places</key>
-		<value>10</value>
-		<type>int</type>
-	</param>
-	<param>
-		<name>Reference Level</name>
-		<key>ref_level</key>
-		<value>0</value>
-		<type>real</type>
-	</param>
-	<param>
-		<name>Number Rate</name>
-		<key>number_rate</key>
-		<value>15</value>
-		<type>int</type>
-	</param>
-	<param>
-		<name>Peak Hold</name>
-		<key>peak_hold</key>
-		<value>False</value>
-		<type>enum</type>
-		<hide>#if $peak_hold() == 'True' then 'none' else 'part'#</hide>
-		<option>
-			<name>On</name>
-			<key>True</key>
-		</option>
-		<option>
-			<name>Off</name>
-			<key>False</key>
-		</option>
-	</param>
-	<param>
-		<name>Average</name>
-		<key>average</key>
-		<value>False</value>
-		<type>enum</type>
-		<hide>part</hide>
-		<option>
-			<name>On</name>
-			<key>True</key>
-		</option>
-		<option>
-			<name>Off</name>
-			<key>False</key>
-		</option>
-	</param>
-	<param>
-		<name>Average Alpha</name>
-		<key>avg_alpha</key>
-		<value>0</value>
-		<type>real</type>
-		<hide>#if $average() == 'True' then 'none' else 'all'#</hide>
-	</param>
-	<param>
-		<name>Show Gauge</name>
-		<key>show_gauge</key>
-		<value>True</value>
-		<type>enum</type>
-		<option>
-			<name>Show</name>
-			<key>True</key>
-		</option>
-		<option>
-			<name>Hide</name>
-			<key>False</key>
-		</option>
-	</param>
-	<param>
-		<name>Window Size</name>
-		<key>win_size</key>
-		<value></value>
-		<type>int_vector</type>
-		<hide>#if $win_size() then 'none' else 'part'#</hide>
-	</param>
-	<param>
-		<name>Grid Position</name>
-		<key>grid_pos</key>
-		<value></value>
-		<type>grid_pos</type>
-	</param>
-	<param>
-		<name>Notebook</name>
-		<key>notebook</key>
-		<value></value>
-		<type>notebook</type>
-	</param>
-	<check>not $win_size or len($win_size) == 2</check>
-	<sink>
-		<name>in</name>
-		<type>$type</type>
-	</sink>
-	<doc>
-Set Average Alpha to 0 for automatic setting.
-
-Leave the window blank for the default size, otherwise enter a tuple of (width, height) pixels.
-
-Use the Grid Position (row, column, row span, column span) to position the graphical element in the window.
-
-Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page.
-
-Incoming numbers are multiplied by the factor, and then added-to by the reference level.
-	</doc>
-</block>
diff --git a/gr-wxgui/grc/wxgui_scopesink2.xml b/gr-wxgui/grc/wxgui_scopesink2.xml
deleted file mode 100644
index 7e896897d6..0000000000
--- a/gr-wxgui/grc/wxgui_scopesink2.xml
+++ /dev/null
@@ -1,187 +0,0 @@
-<?xml version="1.0"?>
-<!--
-###################################################
-##Scope Sink
-###################################################
- -->
-<block>
-	<name>WX GUI Scope Sink</name>
-	<key>wxgui_scopesink2</key>
-	<category>[Core]/Instrumentation/WX</category>
-	<import>from gnuradio.wxgui import scopesink2</import>
-	<import>from gnuradio import wxgui</import>
-	<make>#set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self'
-scopesink2.$(type.fcn)(
-	$(parent).GetWin(),
-	title=$title,
-	sample_rate=$samp_rate,
-	v_scale=$v_scale,
-	v_offset=$v_offset,
-	t_scale=$t_scale,
-	ac_couple=$ac_couple,
-	xy_mode=$xy_mode,
-	num_inputs=$num_inputs,
-	trig_mode=$trig_mode,
-	y_axis_label=$y_axis_label,
-#if $win_size()
-	size=$win_size,
-#end if
-)
-#if not $grid_pos()
-$(parent).Add(self.$(id).win)
-#else
-$(parent).GridAdd(self.$(id).win, $(', '.join(map(str, $grid_pos()))))
-#end if</make>
-	<callback>set_sample_rate($samp_rate)</callback>
-	<param>
-		<name>Type</name>
-		<key>type</key>
-		<value>complex</value>
-		<type>enum</type>
-		<option>
-			<name>Complex</name>
-			<key>complex</key>
-			<opt>fcn:scope_sink_c</opt>
-		</option>
-		<option>
-			<name>Float</name>
-			<key>float</key>
-			<opt>fcn:scope_sink_f</opt>
-		</option>
-	</param>
-	<param>
-		<name>Title</name>
-		<key>title</key>
-		<value>Scope Plot</value>
-		<type>string</type>
-	</param>
-	<param>
-		<name>Sample Rate</name>
-		<key>samp_rate</key>
-		<value>samp_rate</value>
-		<type>real</type>
-	</param>
-	<param>
-		<name>V Scale</name>
-		<key>v_scale</key>
-		<value>0</value>
-		<type>real</type>
-		<hide>#if $v_scale() then 'none' else 'part'#</hide>
-	</param>
-	<param>
-		<name>V Offset</name>
-		<key>v_offset</key>
-		<value>0</value>
-		<type>real</type>
-		<hide>#if $v_offset() then 'none' else 'part'#</hide>
-	</param>
-	<param>
-		<name>T Scale</name>
-		<key>t_scale</key>
-		<value>0</value>
-		<type>real</type>
-		<hide>#if $t_scale() then 'none' else 'part'#</hide>
-	</param>
-	<param>
-		<name>AC Couple</name>
-		<key>ac_couple</key>
-		<value>False</value>
-		<type>bool</type>
-		<hide>#if $ac_couple() then 'none' else 'part'#</hide>
-		<option>
-			<name>Off</name>
-			<key>False</key>
-		</option>
-		<option>
-			<name>On</name>
-			<key>True</key>
-		</option>
-	</param>
-	<param>
-		<name>XY Mode</name>
-		<key>xy_mode</key>
-		<value>False</value>
-		<type>enum</type>
-		<hide>#if $xy_mode() == 'True' then 'none' else 'part'#</hide>
-		<option>
-			<name>Off</name>
-			<key>False</key>
-		</option>
-		<option>
-			<name>On</name>
-			<key>True</key>
-		</option>
-	</param>
-	<param>
-		<name>Num Inputs</name>
-		<key>num_inputs</key>
-		<value>1</value>
-		<type>int</type>
-	</param>
-	<param>
-		<name>Window Size</name>
-		<key>win_size</key>
-		<value></value>
-		<type>int_vector</type>
-		<hide>#if $win_size() then 'none' else 'part'#</hide>
-	</param>
-	<param>
-		<name>Grid Position</name>
-		<key>grid_pos</key>
-		<value></value>
-		<type>grid_pos</type>
-	</param>
-	<param>
-		<name>Notebook</name>
-		<key>notebook</key>
-		<value></value>
-		<type>notebook</type>
-	</param>
-	<param>
-		<name>Trigger Mode</name>
-		<key>trig_mode</key>
-		<type>enum</type>
-		<option>
-			<name>Auto</name>
-			<key>wxgui.TRIG_MODE_AUTO</key>
-		</option>
-		<option>
-			<name>Normal</name>
-			<key>wxgui.TRIG_MODE_NORM</key>
-		</option>
-		<option>
-			<name>Freerun</name>
-			<key>wxgui.TRIG_MODE_FREE</key>
-		</option>
-		<option>
-			<name>Stripchart</name>
-			<key>wxgui.TRIG_MODE_STRIPCHART</key>
-		</option>
-	</param>
-	<param>
-		<name>Y Axis Label</name>
-		<key>y_axis_label</key>
-		<value>Counts</value>
-		<type>string</type>
-	</param>
-	<check>not $win_size or len($win_size) == 2</check>
-	<check>not $xy_mode or '$type' == 'complex' or $num_inputs != 1</check>
-	<sink>
-		<name>in</name>
-		<type>$type</type>
-		<nports>$num_inputs</nports>
-	</sink>
-	<doc>
-Set the V Scale to 0 for the scope to auto-scale.
-
-Set the T Scale to 0 for automatic setting.
-
-XY Mode allows the scope to initialize as an XY plotter.
-
-Leave the window blank for the default size, otherwise enter a tuple of (width, height) pixels.
-
-Use the Grid Position (row, column, row span, column span) to position the graphical element in the window.
-
-Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page.
-	</doc>
-</block>
diff --git a/gr-wxgui/grc/wxgui_termsink.xml b/gr-wxgui/grc/wxgui_termsink.xml
deleted file mode 100644
index 54fedde081..0000000000
--- a/gr-wxgui/grc/wxgui_termsink.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0"?>
-<!--
-###################################################
-##Terminal window
-###################################################
- -->
-<block>
-	<name>WX GUI Terminal Sink</name>
-	<key>wxgui_termsink</key>
-	<category>[Core]/Instrumentation/WX</category>
-
-	<import>from gnuradio.wxgui import termsink</import>
-        <import>from gnuradio import wxgui</import>
-
-	<make>#set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self'
-termsink.termsink(
-	parent=$(parent).GetWin(),
-#if $win_size()
-	size=$win_size,
-#end if
-	msgq=$(id)_msgq_in,
-)
-#if not $grid_pos()
-$(parent).Add(self.$(id))
-#else
-$(parent).GridAdd(self.$(id), $(', '.join(map(str, $grid_pos()))))
-#end if</make>
-
-	<param>
-		<name>Window Size</name>
-		<key>win_size</key>
-		<value></value>
-		<type>int_vector</type>
-		<hide>#if $win_size() then 'none' else 'part'#</hide>
-	</param>
-	<param>
-		<name>Grid Position</name>
-		<key>grid_pos</key>
-		<value></value>
-		<type>grid_pos</type>
-	</param>
-
-	<param>
-		<name>Notebook</name>
-		<key>notebook</key>
-		<value></value>
-		<type>notebook</type>
-	</param>
-
-	<check>not $win_size or len($win_size) == 2</check>
-
-	<sink>
-		<name>in</name>
-		<type>msg</type>
-	</sink>
-
-</block>
diff --git a/gr-wxgui/grc/wxgui_waterfallsink2.xml b/gr-wxgui/grc/wxgui_waterfallsink2.xml
deleted file mode 100644
index 5b56f98ebe..0000000000
--- a/gr-wxgui/grc/wxgui_waterfallsink2.xml
+++ /dev/null
@@ -1,203 +0,0 @@
-<?xml version="1.0"?>
-<!--
-###################################################
-##Waterfall Sink
-###################################################
- -->
-<block>
-	<name>WX GUI Waterfall Sink</name>
-	<key>wxgui_waterfallsink2</key>
-	<category>[Core]/Instrumentation/WX</category>
-	<import>from gnuradio.fft import window</import>
-	<import>from gnuradio.wxgui import waterfallsink2</import>
-        <import>from gnuradio import wxgui</import>
-	<make>#set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self'
-waterfallsink2.$(type.fcn)(
-	$(parent).GetWin(),
-	baseband_freq=$baseband_freq,
-	dynamic_range=$dynamic_range,
-	ref_level=$ref_level,
-	ref_scale=$ref_scale,
-	sample_rate=$samp_rate,
-	fft_size=$fft_size,
-	fft_rate=$fft_rate,
-	average=$average,
-	avg_alpha=#if $avg_alpha() then $avg_alpha else 'None'#,
-	title=$title,
-#if $win()
-	win=$win,
-#end if
-#if $win_size()
-	size=$win_size,
-#end if
-)
-#if not $grid_pos()
-$(parent).Add(self.$(id).win)
-#else
-$(parent).GridAdd(self.$(id).win, $(', '.join(map(str, $grid_pos()))))
-#end if
-#if $freqvar() is not None
-def $(id)_callback(x, y):
-	self.set_$(freqvar)(x)
-
-self.$(id).set_callback($(id)_callback)
-#end if</make>
-	<callback>set_baseband_freq($baseband_freq)</callback>
-	<callback>set_sample_rate($samp_rate)</callback>
-	<param>
-		<name>Type</name>
-		<key>type</key>
-		<value>complex</value>
-		<type>enum</type>
-		<option>
-			<name>Complex</name>
-			<key>complex</key>
-			<opt>fcn:waterfall_sink_c</opt>
-		</option>
-		<option>
-			<name>Float</name>
-			<key>float</key>
-			<opt>fcn:waterfall_sink_f</opt>
-		</option>
-	</param>
-	<param>
-		<name>Title</name>
-		<key>title</key>
-		<value>Waterfall Plot</value>
-		<type>string</type>
-	</param>
-	<param>
-		<name>Sample Rate</name>
-		<key>samp_rate</key>
-		<value>samp_rate</value>
-		<type>real</type>
-	</param>
-	<param>
-		<name>Baseband Freq</name>
-		<key>baseband_freq</key>
-		<value>0</value>
-		<type>real</type>
-	</param>
-	<param>
-		<name>Dynamic Range</name>
-		<key>dynamic_range</key>
-		<value>100</value>
-		<type>real</type>
-	</param>
-	<param>
-		<name>Reference Level</name>
-		<key>ref_level</key>
-		<value>0</value>
-		<type>real</type>
-	</param>
-	<param>
-		<name>Ref Scale (p2p)</name>
-		<key>ref_scale</key>
-		<value>2.0</value>
-		<type>real</type>
-	</param>
-	<param>
-		<name>FFT Size</name>
-		<key>fft_size</key>
-		<value>512</value>
-		<type>int</type>
-	</param>
-	<param>
-		<name>FFT Rate</name>
-		<key>fft_rate</key>
-		<value>15</value>
-		<type>int</type>
-	</param>
-	<param>
-		<name>Average</name>
-		<key>average</key>
-		<value>False</value>
-		<type>enum</type>
-		<hide>part</hide>
-		<option>
-			<name>On</name>
-			<key>True</key>
-		</option>
-		<option>
-			<name>Off</name>
-			<key>False</key>
-		</option>
-	</param>
-	<param>
-		<name>Average Alpha</name>
-		<key>avg_alpha</key>
-		<value>0</value>
-		<type>real</type>
-		<hide>#if $average() == 'True' then 'none' else 'all'#</hide>
-	</param>
-	<param>
-		<name>Window</name>
-		<key>win</key>
-		<value>None</value>
-		<type>raw</type>
-		<hide>#if $win() is None then 'part' else 'none'#</hide>
-		<option>
-			<name>Automatic</name>
-			<key>None</key>
-		</option>
-		<option>
-			<name>Blackman-Harris</name>
-			<key>window.blackmanharris</key>
-		</option>
-		<option>
-			<name>Hamming</name>
-			<key>window.hamming</key>
-		</option>
-		<option>
-			<name>Hanning</name>
-			<key>window.hanning</key>
-		</option>
-		<option>
-			<name>Rectangular</name>
-			<key>window.rectangular</key>
-		</option>
-		<option>
-			<name>Flattop</name>
-			<key>window.flattop</key>
-		</option>
-	</param>
-	<param>
-		<name>Window Size</name>
-		<key>win_size</key>
-		<value></value>
-		<type>int_vector</type>
-		<hide>#if $win_size() then 'none' else 'part'#</hide>
-	</param>
-	<param>
-		<name>Grid Position</name>
-		<key>grid_pos</key>
-		<value></value>
-		<type>grid_pos</type>
-	</param>
-	<param>
-		<name>Notebook</name>
-		<key>notebook</key>
-		<value></value>
-		<type>notebook</type>
-	</param>
-	<param>
-		<name>Freq Set Varname</name>
-		<key>freqvar</key>
-		<value>None</value>
-		<type>raw</type>
-	</param>
-	<check>not $win_size or len($win_size) == 2</check>
-	<sink>
-		<name>in</name>
-		<type>$type</type>
-	</sink>
-	<doc>
-Set Average Alpha to 0 for automatic setting.
-
-Leave the window blank for the default size, otherwise enter a tuple of (width, height) pixels.
-
-Use the Grid Position (row, column, row span, column span) to position the graphical element in the window.
-
-Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page.
-	</doc>
-</block>
diff --git a/gr-wxgui/include/gnuradio/wxgui/CMakeLists.txt b/gr-wxgui/include/gnuradio/wxgui/CMakeLists.txt
deleted file mode 100644
index 468d9b7992..0000000000
--- a/gr-wxgui/include/gnuradio/wxgui/CMakeLists.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 2013 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-
-########################################################################
-# Install header files
-########################################################################
-install(FILES
-    api.h
-    histo_sink_f.h
-    oscope_guts.h
-    oscope_sink_f.h
-    oscope_sink_x.h
-    trigger_mode.h
-    DESTINATION ${GR_INCLUDE_DIR}/gnuradio/wxgui
-)
diff --git a/gr-wxgui/include/gnuradio/wxgui/api.h b/gr-wxgui/include/gnuradio/wxgui/api.h
deleted file mode 100644
index 6439c8e591..0000000000
--- a/gr-wxgui/include/gnuradio/wxgui/api.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_WXGUI_API_H
-#define INCLUDED_WXGUI_API_H
-
-#include <gnuradio/attributes.h>
-
-#ifdef gnuradio_wxgui_EXPORTS
-#  define WXGUI_API __GR_ATTR_EXPORT
-#else
-#  define WXGUI_API __GR_ATTR_IMPORT
-#endif
-
-#endif /* INCLUDED_WXGUI_API_H */
diff --git a/gr-wxgui/include/gnuradio/wxgui/histo_sink_f.h b/gr-wxgui/include/gnuradio/wxgui/histo_sink_f.h
deleted file mode 100644
index 30f0bc7c0d..0000000000
--- a/gr-wxgui/include/gnuradio/wxgui/histo_sink_f.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2009,2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_GR_HISTO_SINK_F_H
-#define INCLUDED_GR_HISTO_SINK_F_H
-
-#include <gnuradio/wxgui/api.h>
-#include <gnuradio/sync_block.h>
-#include <gnuradio/msg_queue.h>
-
-namespace gr {
-  namespace wxgui {
-
-    /*!
-     * \brief Histogram module.
-     * \ingroup sink_blk
-     */
-    class WXGUI_API histo_sink_f : virtual public sync_block
-    {
-    public:
-      // gr::blocks::histo_sink_f::sptr
-      typedef boost::shared_ptr<histo_sink_f> sptr;
-
-      static sptr make(msg_queue::sptr msgq);
-
-      virtual unsigned int get_frame_size(void) = 0;
-      virtual unsigned int get_num_bins(void) = 0;
-
-      virtual void set_frame_size(unsigned int frame_size) = 0;
-      virtual void set_num_bins(unsigned int num_bins) = 0;
-    };
-
-  } /* namespace wxgui */
-} /* namespace gr */
-
-#endif /* INCLUDED_GR_HISTO_SINK_F_H */
diff --git a/gr-wxgui/include/gnuradio/wxgui/oscope_guts.h b/gr-wxgui/include/gnuradio/wxgui/oscope_guts.h
deleted file mode 100644
index 2870d219f6..0000000000
--- a/gr-wxgui/include/gnuradio/wxgui/oscope_guts.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2003,2005,2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-
-#ifndef INCLUDED_GR_OSCOPE_GUTS_H
-#define INCLUDED_GR_OSCOPE_GUTS_H
-
-#include <gnuradio/wxgui/api.h>
-#include <gnuradio/wxgui/trigger_mode.h>
-#include <gnuradio/msg_queue.h>
-
-namespace gr {
-  namespace wxgui {
-
-    /*!
-     * \brief guts of oscilloscope trigger and buffer module
-     *
-     * This module processes sets of samples provided the \p
-     * process_sample method. When appropriate given the updateRate,
-     * sampleRate and trigger conditions, process_sample will
-     * periodically write output records of captured data to
-     * output_fd. For each trigger event, nchannels records will be
-     * written. Each record consists of get_samples_per_output_record
-     * binary floats. The trigger instant occurs at the 1/2 way point
-     * in the buffer. Thus, output records consist of 50% pre-trigger
-     * data and 50% post-trigger data.
-     */
-
-    class WXGUI_API oscope_guts
-    {
-    public:
-      static const int MAX_CHANNELS = 8;
-
-    private:
-      enum scope_state  { HOLD_OFF, LOOK_FOR_TRIGGER, POST_TRIGGER };
-
-      int d_nchannels;		     // how many channels
-      msg_queue::sptr d_msgq;      // message queue we stuff output records into
-      trigger_mode  d_trigger_mode;
-      trigger_slope d_trigger_slope;
-      int d_trigger_channel;         // which channel to watch for trigger condition
-      double d_sample_rate;          // input sample rate in Hz
-      double d_update_rate;          // approx freq to produce an output record (Hz)
-      double d_trigger_level;
-
-      int d_obi;                     // output buffer index
-      float *d_buffer[MAX_CHANNELS];
-
-      scope_state d_state;
-      int d_decimator_count;
-      int d_decimator_count_init;
-      int d_hold_off_count;
-      int d_hold_off_count_init;
-      int d_pre_trigger_count;
-      int d_post_trigger_count;
-      int d_post_trigger_count_init;
-      float d_trigger_off;          //%sample trigger is off
-
-      // NOT IMPLEMENTED
-      oscope_guts(const oscope_guts &rhs);              // no copy constructor
-      oscope_guts &operator= (const oscope_guts &rhs);  // no assignment operator
-
-      void trigger_changed();
-      void update_rate_or_decimation_changed();
-      bool found_trigger();          // returns true if found
-      void write_output_records();
-
-      void enter_hold_off();         // called on state entry
-      void enter_look_for_trigger();
-      void enter_post_trigger();
-
-    public:
-      // CREATORS
-      oscope_guts(double sample_rate, msg_queue::sptr msgq);
-      ~oscope_guts();
-
-      // MANIPULATORS
-
-      /*!
-       * \param channel_data points to nchannels float values. These
-       * are the values for each channel at this sample time.
-       */
-      void process_sample(const float *channel_data);
-
-      bool set_update_rate(double update_rate);
-      bool set_decimation_count(int decimation_count);
-      bool set_trigger_channel(int channel);
-      bool set_trigger_mode(trigger_mode mode);
-      bool set_trigger_slope(trigger_slope slope);
-      bool set_trigger_level(double trigger_level);
-      bool set_trigger_level_auto();                // set to 50% level
-      bool set_sample_rate(double sample_rate);
-      bool set_num_channels(int nchannels);
-
-      // ACCESSORS
-      int num_channels() const;
-      double sample_rate() const;
-      double update_rate() const;
-      int get_decimation_count() const;
-      int get_trigger_channel() const;
-      trigger_mode get_trigger_mode() const;
-      trigger_slope get_trigger_slope() const;
-      double get_trigger_level() const;
-
-      // # of samples written to each output record.
-      int get_samples_per_output_record() const;
-    };
-
-  } /* namespace wxgui */
-} /* namespace gr */
-
-#endif /* INCLUDED_GR_OSCOPE_GUTS_H */
diff --git a/gr-wxgui/include/gnuradio/wxgui/oscope_sink_f.h b/gr-wxgui/include/gnuradio/wxgui/oscope_sink_f.h
deleted file mode 100644
index 9e86442055..0000000000
--- a/gr-wxgui/include/gnuradio/wxgui/oscope_sink_f.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2003-2005,2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_GR_OSCOPE_SINK_F_H
-#define INCLUDED_GR_OSCOPE_SINK_F_H
-
-#include <gnuradio/wxgui/api.h>
-#include <gnuradio/wxgui/oscope_sink_x.h>
-#include <gnuradio/msg_queue.h>
-
-namespace gr {
-  namespace wxgui {
-
-    /*!
-     * \brief Building block for python oscilloscope module.
-     * \ingroup sink_blk
-     *
-     * Accepts multiple float streams.
-     */
-    class WXGUI_API oscope_sink_f
-      : virtual public oscope_sink_x
-    {
-    public:
-      // gr::blocks::oscope_sink_f::sptr
-      typedef boost::shared_ptr<oscope_sink_f> sptr;
-
-      static sptr make(double sampling_rate, msg_queue::sptr msgq);
-    };
-
-  } /* namespace wxgui */
-} /* namespace gr */
-
-#endif /* INCLUDED_GR_OSCOPE_SINK_F_H */
-
diff --git a/gr-wxgui/include/gnuradio/wxgui/oscope_sink_x.h b/gr-wxgui/include/gnuradio/wxgui/oscope_sink_x.h
deleted file mode 100644
index b72c1dd370..0000000000
--- a/gr-wxgui/include/gnuradio/wxgui/oscope_sink_x.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2003,2004,2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_GR_OSCOPE_SINK_X_H
-#define INCLUDED_GR_OSCOPE_SINK_X_H
-
-#include <gnuradio/wxgui/api.h>
-#include <gnuradio/wxgui/trigger_mode.h>
-#include <gnuradio/wxgui/oscope_guts.h>
-#include <gnuradio/sync_block.h>
-
-namespace gr {
-  namespace wxgui {
-
-    /*!
-     * \brief Abstract class for python oscilloscope module.
-     * \ingroup sink_blk
-     *
-     * Don't instantiate this. Use gr::blocks::oscope_sink_f instead.
-     */
-    class WXGUI_API oscope_sink_x : public sync_block
-    {
-    protected:
-      double d_sampling_rate;
-      oscope_guts *d_guts;
-
-      oscope_sink_x() {};
-      oscope_sink_x(const std::string name,
-                    gr::io_signature::sptr input_sig,
-                    double sampling_rate);
-    public:
-      virtual ~oscope_sink_x();
-
-      //// gr::blocks::oscope_sink_x::sptr
-      //typedef boost::shared_ptr<oscope_sink_x> sptr;
-      //
-      //static sptr make(const std::string name,
-      //                 gnuradio/io_signature.h_sptr input_sig,
-      //                 double sampling_rate);
-
-      bool set_update_rate(double update_rate);
-      bool set_decimation_count(int decimation_count);
-      bool set_trigger_channel(int channel);
-      bool set_trigger_mode(trigger_mode mode);
-      bool set_trigger_slope(trigger_slope slope);
-      bool set_trigger_level(double trigger_level);
-      bool set_trigger_level_auto();
-      bool set_sample_rate(double sample_rate);
-      bool set_num_channels(int nchannels);
-
-      // ACCESSORS
-      int num_channels() const;
-      double sample_rate() const;
-      double update_rate() const;
-      int get_decimation_count() const;
-      int get_trigger_channel() const;
-      trigger_mode get_trigger_mode() const;
-      trigger_slope get_trigger_slope() const;
-      double get_trigger_level() const;
-
-      // # of samples written to each output record.
-      int get_samples_per_output_record() const;
-
-      virtual int work(int noutput_items,
-                       gr_vector_const_void_star &input_items,
-                       gr_vector_void_star &output_items) = 0;
-    };
-
-  } /* namespace wxgui */
-} /* namespace gr */
-
-#endif /* INCLUDED_GR_OSCOPE_SINK_X_H */
diff --git a/gr-wxgui/include/gnuradio/wxgui/trigger_mode.h b/gr-wxgui/include/gnuradio/wxgui/trigger_mode.h
deleted file mode 100644
index 11654ef6c5..0000000000
--- a/gr-wxgui/include/gnuradio/wxgui/trigger_mode.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2003,2004,2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_GR_TRIGGER_MODE_H
-#define INCLUDED_GR_TRIGGER_MODE_H
-
-namespace gr {
-  namespace wxgui {
-
-    enum trigger_mode {
-      TRIG_MODE_FREE,
-      TRIG_MODE_AUTO,
-      TRIG_MODE_NORM,
-      TRIG_MODE_STRIPCHART,
-    };
-
-    enum trigger_slope {
-      TRIG_SLOPE_POS,
-      TRIG_SLOPE_NEG,
-    };
-
-  } /* namespace wxgui */
-} /* namespace gr */
-
-#endif /* INCLUDED_GR_TRIGGER_MODE_H */
diff --git a/gr-wxgui/lib/CMakeLists.txt b/gr-wxgui/lib/CMakeLists.txt
deleted file mode 100644
index 2f1f6135f3..0000000000
--- a/gr-wxgui/lib/CMakeLists.txt
+++ /dev/null
@@ -1,98 +0,0 @@
-# Copyright 2012-2013 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-
-########################################################################
-# Setup the include and linker paths
-########################################################################
-include_directories(
-    ${CMAKE_CURRENT_SOURCE_DIR}
-    ${CMAKE_CURRENT_BINARY_DIR}
-    ${CMAKE_CURRENT_BINARY_DIR}/../include
-    ${GR_WXGUI_INCLUDE_DIRS}
-    ${GNURADIO_RUNTIME_INCLUDE_DIRS}
-    ${VOLK_INCLUDE_DIRS}
-    ${Boost_INCLUDE_DIRS}
-)
-
-link_directories(${Boost_LIBRARY_DIRS})
-
-if(ENABLE_GR_CTRLPORT)
-  ADD_DEFINITIONS(-DGR_CTRLPORT)
-endif(ENABLE_GR_CTRLPORT)
-
-########################################################################
-# Setup library
-########################################################################
-list(APPEND gr_wxgui_sources
-  histo_sink_f_impl.cc
-  oscope_guts.cc
-  oscope_sink_x.cc
-  oscope_sink_f_impl.cc
-)
-
-#Add Windows DLL resource file if using MSVC
-IF(MSVC)
-    include(${CMAKE_SOURCE_DIR}/cmake/Modules/GrVersion.cmake)
-
-    configure_file(
-        ${CMAKE_CURRENT_SOURCE_DIR}/gnuradio-wxgui.rc.in
-        ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-wxgui.rc
-    @ONLY)
-
-    list(APPEND gr_wxgui_sources
-        ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-wxgui.rc
-    )
-ENDIF(MSVC)
-
-list(APPEND wxgui_libs
-    gnuradio-runtime
-    ${VOLK_LIBRARIES}
-    ${Boost_LIBRARIES}
-    ${BLOCKS_LIBRARIES}
-    ${LOG4CPP_LIBRARIES}
-)
-
-add_library(gnuradio-wxgui SHARED ${gr_wxgui_sources})
-
-target_link_libraries(gnuradio-wxgui ${wxgui_libs})
-GR_LIBRARY_FOO(gnuradio-wxgui)
-
-if(ENABLE_STATIC_LIBS)
-  if(ENABLE_GR_CTRLPORT)
-    # Remove GR_CTRLPORT set this target's definitions.
-    # Makes sure we don't try to use ControlPort stuff in source files
-    GET_DIRECTORY_PROPERTY(STATIC_DEFS COMPILE_DEFINITIONS)
-    list(REMOVE_ITEM STATIC_DEFS "GR_CTRLPORT")
-    SET_PROPERTY(DIRECTORY PROPERTY COMPILE_DEFINITIONS "${STATIC_DEFS}")
-
-    # readd it to the target since we removed it from the directory-wide list.
-    SET_PROPERTY(TARGET gnuradio-wxgui APPEND PROPERTY COMPILE_DEFINITIONS "GR_CTRLPORT")
-  endif(ENABLE_GR_CTRLPORT)
-
-  add_library(gnuradio-wxgui_static STATIC ${gr_wxgui_sources})
-
-  if(NOT WIN32)
-    set_target_properties(gnuradio-wxgui_static
-      PROPERTIES OUTPUT_NAME gnuradio-wxgui)
-  endif(NOT WIN32)
-
-  install(TARGETS gnuradio-wxgui_static
-    ARCHIVE DESTINATION lib${LIB_SUFFIX} # .lib file
-    )
-endif(ENABLE_STATIC_LIBS)
diff --git a/gr-wxgui/lib/gnuradio-wxgui.rc.in b/gr-wxgui/lib/gnuradio-wxgui.rc.in
deleted file mode 100644
index 126db75091..0000000000
--- a/gr-wxgui/lib/gnuradio-wxgui.rc.in
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-#include <afxres.h>
-
-VS_VERSION_INFO VERSIONINFO
-  FILEVERSION @MAJOR_VERSION@,@API_COMPAT@,@RC_MINOR_VERSION@,@RC_MAINT_VERSION@
-  PRODUCTVERSION @MAJOR_VERSION@,@API_COMPAT@,@RC_MINOR_VERSION@,@RC_MAINT_VERSION@
-  FILEFLAGSMASK 0x3fL
-#ifndef NDEBUG
-  FILEFLAGS 0x0L
-#else
-  FILEFLAGS 0x1L
-#endif
-  FILEOS VOS__WINDOWS32
-  FILETYPE VFT_DLL
-  FILESUBTYPE VFT2_DRV_INSTALLABLE
-  BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-      BLOCK "040904b0"
-      BEGIN
-        VALUE "FileDescription", "gnuradio-blocks"
-        VALUE "FileVersion", "@VERSION@"
-        VALUE "InternalName", "gnuradio-blocks.dll"
-        VALUE "LegalCopyright", "Licensed under GPLv3 or any later version"
-        VALUE "OriginalFilename", "gnuradio-blocks.dll"
-        VALUE "ProductName", "gnuradio-blocks"
-        VALUE "ProductVersion", "@VERSION@"
-      END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-      VALUE "Translation", 0x409, 1200
-    END
-  END
diff --git a/gr-wxgui/lib/histo_sink_f_impl.cc b/gr-wxgui/lib/histo_sink_f_impl.cc
deleted file mode 100644
index f10540fa36..0000000000
--- a/gr-wxgui/lib/histo_sink_f_impl.cc
+++ /dev/null
@@ -1,186 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2009-2011,2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "histo_sink_f_impl.h"
-#include <gnuradio/io_signature.h>
-#include <boost/math/special_functions/round.hpp>
-
-namespace gr {
-  namespace wxgui {
-
-    static float get_clean_num(float num)
-    {
-      if(num == 0)
-        return 0;
-      /* extract sign and exponent from num */
-      int sign = (num < 0) ? -1 : 1; num = fabs(num);
-      float exponent = floor(log10(num));
-      /* search for closest number with base 1, 2, 5, 10 */
-      float closest_num = 10*pow(10, exponent);
-      if(fabs(num - 1*pow(10, exponent)) < fabs(num - closest_num))
-        closest_num = 1*pow(10, exponent);
-      if(fabs(num - 2*pow(10, exponent)) < fabs(num - closest_num))
-        closest_num = 2*pow(10, exponent);
-      if(fabs(num - 5*pow(10, exponent)) < fabs(num - closest_num))
-        closest_num = 5*pow(10, exponent);
-      return sign*closest_num;
-    }
-
-    histo_sink_f::sptr
-    histo_sink_f::make(msg_queue::sptr msgq)
-    {
-      return gnuradio::get_initial_sptr
-        (new histo_sink_f_impl(msgq));
-    }
-
-    histo_sink_f_impl::histo_sink_f_impl(msg_queue::sptr msgq)
-      : sync_block("histo_sink_f",
-                      io_signature::make(1, 1, sizeof(float)),
-                      io_signature::make(0, 0, 0)),
-        d_msgq(msgq), d_num_bins(11), d_frame_size(1000),
-        d_sample_count(0), d_bins(NULL), d_samps(NULL)
-    {
-      //allocate arrays and clear
-      set_num_bins(d_num_bins);
-      set_frame_size(d_frame_size);
-    }
-
-    histo_sink_f_impl::~histo_sink_f_impl(void)
-    {
-      delete [] d_samps;
-      delete [] d_bins;
-    }
-
-    int
-    histo_sink_f_impl::work(int noutput_items,
-                            gr_vector_const_void_star &input_items,
-                            gr_vector_void_star &output_items)
-    {
-      const float *in = (const float*)input_items[0];
-      gr::thread::scoped_lock guard(d_mutex);  // hold mutex for duration of this function
-      for(unsigned int i = 0; i < (unsigned int)noutput_items; i++) {
-        d_samps[d_sample_count] = in[i];
-        d_sample_count++;
-        /* processed a frame? */
-        if(d_sample_count == d_frame_size) {
-          send_frame();
-          clear();
-        }
-      }
-      return noutput_items;
-    }
-
-    void
-    histo_sink_f_impl::send_frame(void)
-    {
-      /* output queue full, drop the data */
-      if(d_msgq->full_p())
-        return;
-      /* find the minimum and maximum */
-      float minimum = d_samps[0];
-      float maximum = d_samps[0];
-      for(unsigned int i = 0; i < d_frame_size; i++) {
-        if(d_samps[i] < minimum) minimum = d_samps[i];
-        if(d_samps[i] > maximum) maximum = d_samps[i];
-      }
-      minimum = get_clean_num(minimum);
-      maximum = get_clean_num(maximum);
-      if(minimum == maximum || minimum > maximum)
-        return; //useless data or screw up?
-      /* load the bins */
-      int index;
-      float bin_width = (maximum - minimum)/(d_num_bins-1);
-      for(unsigned int i = 0; i < d_sample_count; i++) {
-        index = boost::math::iround((d_samps[i] - minimum)/bin_width);
-        /* ensure the index range in case a small floating point error is involed */
-        if(index < 0)
-          index = 0;
-        if(index >= (int)d_num_bins)
-          index = d_num_bins-1;
-        d_bins[index]++;
-      }
-      /* Build a message to hold the output records */
-      message::sptr msg = message::make(0, minimum, maximum, d_num_bins*sizeof(float));
-      float *out = (float *)msg->msg(); // get pointer to raw message buffer
-      /* normalize the bins and put into message */
-      for(unsigned int i = 0; i < d_num_bins; i++) {
-        out[i] = ((float)d_bins[i])/d_frame_size;
-      }
-      /* send the message */
-      d_msgq->handle(msg);
-    }
-
-    void
-    histo_sink_f_impl::clear(void)
-    {
-      d_sample_count = 0;
-      /* zero the bins */
-      for(unsigned int i = 0; i < d_num_bins; i++) {
-        d_bins[i] = 0;
-      }
-    }
-
-    /**************************************************
-     * Getters
-     **************************************************/
-    unsigned int
-    histo_sink_f_impl::get_frame_size(void)
-    {
-      return d_frame_size;
-    }
-
-    unsigned int
-    histo_sink_f_impl::get_num_bins(void)
-    {
-      return d_num_bins;
-    }
-
-    /**************************************************
-     * Setters
-     **************************************************/
-    void
-    histo_sink_f_impl::set_frame_size(unsigned int frame_size)
-    {
-      gr::thread::scoped_lock guard(d_mutex);    // hold mutex for duration of this function
-      d_frame_size = frame_size;
-      /* allocate a new sample array */
-      delete [] d_samps;
-      d_samps = new float[d_frame_size];
-      clear();
-    }
-
-    void
-    histo_sink_f_impl::set_num_bins(unsigned int num_bins) {
-      gr::thread::scoped_lock guard(d_mutex);    // hold mutex for duration of this function
-      d_num_bins = num_bins;
-      /* allocate a new bin array */
-      delete [] d_bins;
-      d_bins = new unsigned int[d_num_bins];
-      clear();
-    }
-
-  } /* namespace wxgui */
-} /* namespace gr */
diff --git a/gr-wxgui/lib/histo_sink_f_impl.h b/gr-wxgui/lib/histo_sink_f_impl.h
deleted file mode 100644
index 6c16a8a465..0000000000
--- a/gr-wxgui/lib/histo_sink_f_impl.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2009,2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_GR_HISTO_SINK_F_IMPL_H
-#define INCLUDED_GR_HISTO_SINK_F_IMPL_H
-
-#include <gnuradio/wxgui/histo_sink_f.h>
-
-namespace gr {
-  namespace wxgui {
-
-    class histo_sink_f_impl : public histo_sink_f
-    {
-    private:
-      msg_queue::sptr d_msgq;
-      unsigned int d_num_bins;
-      unsigned int d_frame_size;
-      unsigned int d_sample_count;
-      unsigned int *d_bins;
-      float *d_samps;
-      gr::thread::mutex d_mutex;
-
-      void send_frame(void);
-      void clear(void);
-
-    public:
-      histo_sink_f_impl(msg_queue::sptr msgq);
-      ~histo_sink_f_impl(void);
-
-      int work(int noutput_items,
-               gr_vector_const_void_star &input_items,
-               gr_vector_void_star &output_items);
-
-      unsigned int get_frame_size(void);
-      unsigned int get_num_bins(void);
-
-      void set_frame_size(unsigned int frame_size);
-      void set_num_bins(unsigned int num_bins);
-    };
-
-  } /* namespace wxgui */
-} /* namespace gr */
-
-#endif /* INCLUDED_GR_HISTO_SINK_F_IMPL_H */
diff --git a/gr-wxgui/lib/oscope_guts.cc b/gr-wxgui/lib/oscope_guts.cc
deleted file mode 100644
index 3e826ff386..0000000000
--- a/gr-wxgui/lib/oscope_guts.cc
+++ /dev/null
@@ -1,439 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2003,2005,2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gnuradio/wxgui/oscope_guts.h>
-#include <stdexcept>
-#include <stdio.h>
-#include <algorithm>
-#include <unistd.h>
-#include <math.h>
-#include <assert.h>
-
-namespace gr {
-  namespace wxgui {
-
-    /*
-     * Bad performance if it's large, and flaky triggering if it's too small
-     */
-    static const int OUTPUT_RECORD_SIZE = 1024;  // Must be power of 2
-
-    /*
-     * For (slow-updated) STRIPCHART triggering, we make the record
-     * size larger, since we potentially want to be able to "see"
-     * hours of data. This works as long as the update rates to a
-     * STRIPCHART are low, which they generally are--that's rather
-     * what a stripchart is all about!
-     */
-    static const int SCHART_MULT = 8;
-
-
-    static inline int
-    wrap_bi(int buffer_index, int mx)                // wrap buffer index
-    {
-      return buffer_index & (mx - 1);
-    }
-
-    static inline int
-    incr_bi(int buffer_index, int mx)                // increment buffer index
-    {
-      return wrap_bi(buffer_index + 1, mx);
-    }
-
-    static inline int
-    decr_bi(int buffer_index, int mx)                // decrement buffer index
-    {
-      return wrap_bi(buffer_index - 1, mx);
-    }
-
-    oscope_guts::oscope_guts(double sample_rate, msg_queue::sptr msgq)
-      : d_nchannels(1),
-    d_msgq(msgq),
-    d_trigger_mode(TRIG_MODE_AUTO),
-    d_trigger_slope(TRIG_SLOPE_POS),
-    d_trigger_channel(0),
-    d_sample_rate(sample_rate),
-    d_update_rate(20),
-    d_trigger_level(0),
-    d_obi(0),
-    d_state(HOLD_OFF),
-    d_decimator_count(0),
-    d_decimator_count_init(1),
-    d_hold_off_count(0),
-    d_hold_off_count_init(OUTPUT_RECORD_SIZE/2-1),
-    d_pre_trigger_count(0),
-    d_post_trigger_count(0),
-    d_post_trigger_count_init(OUTPUT_RECORD_SIZE/2)
-    {
-      for(int i = 0; i < MAX_CHANNELS; i++)
-        d_buffer[i] = 0;
-
-      for(int i = 0; i < MAX_CHANNELS; i++) {
-        d_buffer[i] = new float[OUTPUT_RECORD_SIZE*SCHART_MULT];
-        for(int j = 0; j < OUTPUT_RECORD_SIZE*SCHART_MULT; j++)
-          d_buffer[i][j] = 0.0;
-      }
-
-      // be sure buffer is full before first write
-      enter_hold_off();
-      update_rate_or_decimation_changed();
-    }
-
-    oscope_guts::~oscope_guts()
-    {
-      for(int i = 0; i < MAX_CHANNELS; i++)
-        delete [] d_buffer[i];
-    }
-
-    // MANIPULATORS
-    void
-    oscope_guts::process_sample(const float *channel_data)
-    {
-      d_decimator_count--;
-      if(d_decimator_count > 0)
-        return;
-
-      d_decimator_count = d_decimator_count_init;
-
-      if(d_trigger_mode != TRIG_MODE_STRIPCHART) {
-        for(int i = 0; i < d_nchannels; i++)
-          d_buffer[i][d_obi] = channel_data[i];  // copy data into buffer
-
-        switch(d_state) {
-        case HOLD_OFF:
-          d_hold_off_count--;
-          if(d_hold_off_count <= 0)
-            enter_look_for_trigger ();
-          break;
-
-        case LOOK_FOR_TRIGGER:
-          if(found_trigger())
-            enter_post_trigger();
-          break;
-
-        case POST_TRIGGER:
-          d_post_trigger_count--;
-          if(d_post_trigger_count <= 0) {
-            write_output_records();
-            enter_hold_off();
-          }
-          break;
-
-        default:
-          assert(0);
-        }
-
-        d_obi = incr_bi(d_obi, OUTPUT_RECORD_SIZE);
-      }
-      else {
-        for(int i = 0; i < d_nchannels; i++) {
-          for(int j = (OUTPUT_RECORD_SIZE*SCHART_MULT)-1; j > 0; j--) {
-            d_buffer[i][j] = d_buffer[i][j-1];
-          }
-          d_buffer[i][0] = channel_data[i];
-        }
-        d_trigger_off = 0;
-        write_output_records();
-      }
-    }
-
-    /*
-     * Functions called on state entry
-     */
-
-    void
-    oscope_guts::enter_hold_off()
-    {
-      d_state = HOLD_OFF;
-      d_hold_off_count = d_hold_off_count_init;
-    }
-
-    void
-    oscope_guts::enter_look_for_trigger()
-    {
-      d_pre_trigger_count = 0;
-      d_state = LOOK_FOR_TRIGGER;
-    }
-
-    void
-    oscope_guts::enter_post_trigger()
-    {
-      d_state = POST_TRIGGER;
-      d_post_trigger_count = d_post_trigger_count_init;
-      //ensure that the trigger offset is no more than than half a sample
-      if(d_trigger_off > .5)
-        d_trigger_off -= 1;
-      else
-        d_post_trigger_count--;
-    }
-
-    // ----------------------------------------------------------------
-    // returns true if trigger found
-
-    bool
-    oscope_guts::found_trigger()
-    {
-      int mx = d_trigger_mode == TRIG_MODE_STRIPCHART ? OUTPUT_RECORD_SIZE*SCHART_MULT :
-        OUTPUT_RECORD_SIZE;
-
-      float prev_sample = d_buffer[d_trigger_channel][decr_bi(d_obi, mx)];
-      float new_sample = d_buffer[d_trigger_channel][d_obi];
-
-      switch(d_trigger_mode) {
-
-      case TRIG_MODE_AUTO: //too many samples without a trigger
-        d_pre_trigger_count++;
-        if(d_pre_trigger_count > OUTPUT_RECORD_SIZE/2)
-          return true;
-
-      case TRIG_MODE_NORM: //look for trigger
-        switch(d_trigger_slope) {
-
-        case TRIG_SLOPE_POS: //trigger point in pos slope?
-          if(new_sample < d_trigger_level || prev_sample >= d_trigger_level)
-            return false;
-          break;
-
-        case TRIG_SLOPE_NEG: //trigger point in neg slope?
-          if(new_sample > d_trigger_level || prev_sample <= d_trigger_level)
-            return false;
-          break;
-        }
-
-        //calculate the trigger offset in % sample
-        d_trigger_off = (d_trigger_level - prev_sample)/(new_sample - prev_sample);
-        return true;
-
-      case TRIG_MODE_FREE: //free run mode, always trigger
-        d_trigger_off = 0;
-        return true;
-
-      default:
-        assert(0);
-        return false;
-      }
-    }
-
-    // ----------------------------------------------------------------
-    // write output records (duh!)
-
-    void
-    oscope_guts::write_output_records()
-    {
-      int mx;
-
-      mx = d_trigger_mode == TRIG_MODE_STRIPCHART ?
-        OUTPUT_RECORD_SIZE*SCHART_MULT : OUTPUT_RECORD_SIZE;
-
-      // if the output queue if full, drop the data like its hot.
-      if(d_msgq->full_p())
-        return;
-      // Build a message to hold the output records
-      message::sptr msg =
-        message::make(0,                           // msg type
-                        d_nchannels,                 // arg1 for other side
-                        mx,                          // arg2 for other side
-                        ((d_nchannels * mx) + 1) * sizeof(float)); // sizeof payload
-
-      float *out = (float *)msg->msg();        // get pointer to raw message buffer
-
-      for(int ch = 0; ch < d_nchannels; ch++) {
-        // note that d_obi + 1 points at the oldest sample in the buffer
-        for(int i = 0; i < mx; i++) {
-          out[i] = d_buffer[ch][wrap_bi(d_obi + 1 + i, mx)];
-        }
-        out += mx;
-      }
-      //Set the last sample as the trigger offset:
-      //  The non gl scope sink will not look at this last sample.
-      //  The gl scope sink will use this last sample as an offset.
-      out[0] = d_trigger_off;
-      d_msgq->handle(msg);                // send the msg
-    }
-
-    // ----------------------------------------------------------------
-
-    bool
-    oscope_guts::set_update_rate(double update_rate)
-    {
-      d_update_rate = std::min(std::max (1./10., update_rate), d_sample_rate);
-      update_rate_or_decimation_changed();
-      return true;
-    }
-
-    bool
-    oscope_guts::set_decimation_count(int decimator_count)
-    {
-      decimator_count = std::max(1, decimator_count);
-      d_decimator_count_init = decimator_count;
-      update_rate_or_decimation_changed();
-      return true;
-    }
-
-    bool
-    oscope_guts::set_sample_rate(double sample_rate)
-    {
-      d_sample_rate = sample_rate;
-      return set_update_rate(update_rate());
-    }
-
-    void
-    oscope_guts::update_rate_or_decimation_changed()
-    {
-      d_hold_off_count_init =
-        (int)rint(d_sample_rate / d_update_rate / d_decimator_count_init);
-    }
-
-    bool
-    oscope_guts::set_trigger_channel(int channel)
-    {
-      if(channel >= 0 && channel < d_nchannels) {
-        d_trigger_channel = channel;
-        trigger_changed ();
-        return true;
-      }
-
-      return false;
-    }
-
-    bool
-    oscope_guts::set_trigger_mode(trigger_mode mode)
-    {
-      d_trigger_mode = mode;
-      trigger_changed();
-      return true;
-    }
-
-    bool
-    oscope_guts::set_trigger_slope(trigger_slope slope)
-    {
-      d_trigger_slope = slope;
-      trigger_changed();
-      return true;
-    }
-
-    bool
-    oscope_guts::set_trigger_level(double trigger_level)
-    {
-      d_trigger_level = trigger_level;
-      trigger_changed();
-      return true;
-    }
-
-    bool
-    oscope_guts::set_trigger_level_auto()
-    {
-      // find the level 1/2 way between the min and the max
-
-      float min_v = d_buffer[d_trigger_channel][0];
-      float max_v = d_buffer[d_trigger_channel][0];
-
-      for(int i = 1; i < OUTPUT_RECORD_SIZE; i++) {
-        min_v = std::min (min_v, d_buffer[d_trigger_channel][i]);
-        max_v = std::max (max_v, d_buffer[d_trigger_channel][i]);
-      }
-      return set_trigger_level((min_v + max_v) * 0.5);
-    }
-
-    bool
-    oscope_guts::set_num_channels(int nchannels)
-    {
-      if(nchannels > 0 && nchannels <= MAX_CHANNELS) {
-        d_nchannels = nchannels;
-        return true;
-      }
-      return false;
-    }
-
-    void
-    oscope_guts::trigger_changed()
-    {
-      enter_look_for_trigger();
-    }
-
-    // ACCESSORS
-
-    int
-    oscope_guts::num_channels() const
-    {
-      return d_nchannels;
-    }
-
-    double
-    oscope_guts::sample_rate() const
-    {
-      return d_sample_rate;
-    }
-
-    double
-    oscope_guts::update_rate() const
-    {
-      return d_update_rate;
-    }
-
-    int
-    oscope_guts::get_decimation_count() const
-    {
-      return d_decimator_count_init;
-    }
-
-    int
-    oscope_guts::get_trigger_channel() const
-    {
-      return d_trigger_channel;
-    }
-
-    trigger_mode
-    oscope_guts::get_trigger_mode() const
-    {
-      return d_trigger_mode;
-    }
-
-    trigger_slope
-    oscope_guts::get_trigger_slope() const
-    {
-      return d_trigger_slope;
-    }
-
-    double
-    oscope_guts::get_trigger_level() const
-    {
-      return d_trigger_level;
-    }
-
-    int
-    oscope_guts::get_samples_per_output_record() const
-    {
-      int mx;
-
-      mx = OUTPUT_RECORD_SIZE;
-      if(d_trigger_mode == TRIG_MODE_STRIPCHART) {
-        mx = OUTPUT_RECORD_SIZE*SCHART_MULT;
-      }
-      return mx;
-    }
-
-  } /* namespace wxgui */
-} /* namespace gr */
diff --git a/gr-wxgui/lib/oscope_sink_f_impl.cc b/gr-wxgui/lib/oscope_sink_f_impl.cc
deleted file mode 100644
index 9993040ffd..0000000000
--- a/gr-wxgui/lib/oscope_sink_f_impl.cc
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2003-2005,2010,2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "oscope_sink_f_impl.h"
-#include <gnuradio/wxgui/oscope_sink_x.h>
-#include <gnuradio/wxgui/oscope_guts.h>
-#include <gnuradio/io_signature.h>
-
-namespace gr {
-  namespace wxgui {
-
-    oscope_sink_f::sptr
-    oscope_sink_f::make(double sampling_rate, msg_queue::sptr msgq)
-    {
-      return gnuradio::get_initial_sptr
-        (new oscope_sink_f_impl(sampling_rate, msgq));
-    }
-
-    oscope_sink_f_impl::oscope_sink_f_impl(double sampling_rate, msg_queue::sptr msgq)
-      : oscope_sink_x("oscope_sink_f",
-                      io_signature::make(1, oscope_guts::MAX_CHANNELS,
-                                           sizeof(float)),
-                      sampling_rate),
-        d_msgq(msgq)
-    {
-      d_guts = new oscope_guts(d_sampling_rate, d_msgq);
-    }
-
-    oscope_sink_f_impl::~oscope_sink_f_impl()
-    {
-    }
-
-    bool
-    oscope_sink_f_impl::check_topology(int ninputs, int noutputs)
-    {
-      return d_guts->set_num_channels(ninputs);
-    }
-
-    int
-    oscope_sink_f_impl::work(int noutput_items,
-                             gr_vector_const_void_star &input_items,
-                             gr_vector_void_star &output_items)
-    {
-      int ni = input_items.size();
-      float tmp[oscope_guts::MAX_CHANNELS];
-
-      for(int i = 0; i < noutput_items; i++) {
-
-        // FIXME for now, copy the data.  Fix later if reqd
-        for(int ch = 0; ch < ni; ch++)
-          tmp[ch] = ((const float*)input_items[ch])[i];
-
-        d_guts->process_sample(tmp);
-      }
-
-      return noutput_items;
-    }
-
-  } /* namespace wxgui */
-} /* namespace gr */
diff --git a/gr-wxgui/lib/oscope_sink_f_impl.h b/gr-wxgui/lib/oscope_sink_f_impl.h
deleted file mode 100644
index 81688f53a5..0000000000
--- a/gr-wxgui/lib/oscope_sink_f_impl.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2003-2005,2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_GR_OSCOPE_SINK_F_IMPL_H
-#define INCLUDED_GR_OSCOPE_SINK_F_IMPL_H
-
-#include <gnuradio/wxgui/oscope_sink_f.h>
-
-namespace gr {
-  namespace wxgui {
-
-    class oscope_sink_f_impl : public oscope_sink_f
-    {
-    private:
-      msg_queue::sptr d_msgq;
-
-    public:
-      oscope_sink_f_impl(double sampling_rate, msg_queue::sptr msgq);
-      ~oscope_sink_f_impl();
-
-      bool check_topology(int ninputs, int noutputs);
-
-      int work(int noutput_items,
-               gr_vector_const_void_star &input_items,
-               gr_vector_void_star &output_items);
-    };
-
-  } /* namespace wxgui */
-} /* namespace gr */
-
-#endif /* INCLUDED_GR_OSCOPE_SINK_F_IMPL_H */
-
diff --git a/gr-wxgui/lib/oscope_sink_x.cc b/gr-wxgui/lib/oscope_sink_x.cc
deleted file mode 100644
index ac865318ec..0000000000
--- a/gr-wxgui/lib/oscope_sink_x.cc
+++ /dev/null
@@ -1,161 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2003,2004,2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <gnuradio/wxgui/oscope_sink_x.h>
-#include <gnuradio/wxgui/oscope_guts.h>
-#include <gnuradio/io_signature.h>
-
-namespace gr {
-  namespace wxgui {
-
-    oscope_sink_x::oscope_sink_x(const std::string name,
-                                 gr::io_signature::sptr input_sig,
-                                 double sampling_rate)
-      : sync_block(name, input_sig,
-                      io_signature::make(0, 0, 0)),
-        d_sampling_rate(sampling_rate), d_guts(0)
-    {
-    }
-
-    oscope_sink_x::~oscope_sink_x()
-    {
-      delete d_guts;
-    }
-
-    // ----------------------------------------------------------------
-
-    bool
-    oscope_sink_x::set_update_rate(double update_rate)
-    {
-      return d_guts->set_update_rate(update_rate);
-    }
-
-    bool
-    oscope_sink_x::set_decimation_count(int decimation_count)
-    {
-      return d_guts->set_decimation_count(decimation_count);
-    }
-
-    bool
-    oscope_sink_x::set_trigger_channel(int channel)
-    {
-      return d_guts->set_trigger_channel(channel);
-    }
-
-    bool
-    oscope_sink_x::set_trigger_mode(trigger_mode mode)
-    {
-      return d_guts->set_trigger_mode(mode);
-    }
-
-    bool
-    oscope_sink_x::set_trigger_slope(trigger_slope slope)
-    {
-      return d_guts->set_trigger_slope(slope);
-    }
-
-    bool
-    oscope_sink_x::set_trigger_level(double trigger_level)
-    {
-      return d_guts->set_trigger_level(trigger_level);
-    }
-
-    bool
-    oscope_sink_x::set_trigger_level_auto()
-    {
-      return d_guts->set_trigger_level_auto();
-    }
-
-    bool
-    oscope_sink_x::set_sample_rate(double sample_rate)
-    {
-      return d_guts->set_sample_rate(sample_rate);
-    }
-
-    bool
-    oscope_sink_x::set_num_channels(int nchannels)
-    {
-      return d_guts->set_num_channels(nchannels);
-    }
-
-    // ACCESSORS
-
-    int
-    oscope_sink_x::num_channels() const
-    {
-      return d_guts->num_channels();
-    }
-
-    double
-    oscope_sink_x::sample_rate() const
-    {
-      return d_guts->sample_rate();
-    }
-
-    double
-    oscope_sink_x::update_rate() const
-    {
-      return d_guts->update_rate();
-    }
-
-    int
-    oscope_sink_x::get_decimation_count() const
-    {
-      return d_guts->get_decimation_count();
-    }
-
-    int
-    oscope_sink_x::get_trigger_channel() const
-    {
-      return d_guts->get_trigger_channel();
-    }
-
-    trigger_mode
-    oscope_sink_x::get_trigger_mode() const
-    {
-      return d_guts->get_trigger_mode();
-    }
-
-    trigger_slope
-    oscope_sink_x::get_trigger_slope() const
-    {
-      return d_guts->get_trigger_slope();
-    }
-
-    double
-    oscope_sink_x::get_trigger_level() const
-    {
-      return d_guts->get_trigger_level();
-    }
-
-    int
-    oscope_sink_x::get_samples_per_output_record() const
-    {
-      return d_guts->get_samples_per_output_record();
-    }
-
-  } /* namespace wxgui */
-} /* namespace gr */
diff --git a/gr-wxgui/python/wxgui/CMakeLists.txt b/gr-wxgui/python/wxgui/CMakeLists.txt
deleted file mode 100644
index a06cba70b7..0000000000
--- a/gr-wxgui/python/wxgui/CMakeLists.txt
+++ /dev/null
@@ -1,85 +0,0 @@
-# Copyright 2011 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-
-########################################################################
-include(GrPython)
-
-########################################################################
-# Install python files into wxgui module
-########################################################################
-GR_PYTHON_INSTALL(
-    FILES
-    __init__.py
-    common.py
-    constants.py
-    constsink_gl.py
-    const_window.py
-    form.py
-    fftsink2.py
-    fftsink_nongl.py
-    fftsink_gl.py
-    fft_window.py
-    gui.py
-    histosink_gl.py
-    histo_window.py
-    numbersink2.py
-    number_window.py
-    plot.py
-    powermate.py
-    pubsub.py
-    scopesink2.py
-    scopesink_nongl.py
-    scopesink_gl.py
-    scope_window.py
-    termsink.py
-    waterfallsink2.py
-    waterfallsink_nongl.py
-    waterfallsink_gl.py
-    waterfall_window.py
-    slider.py
-    stdgui2.py
-    DESTINATION ${GR_PYTHON_DIR}/gnuradio/wxgui
-)
-
-########################################################################
-# Install python files into wxgui forms sub-module
-########################################################################
-GR_PYTHON_INSTALL(
-    FILES
-    forms/__init__.py
-    forms/forms.py
-    forms/converters.py
-    DESTINATION ${GR_PYTHON_DIR}/gnuradio/wxgui/forms
-)
-
-########################################################################
-# Install python files into wxgui plotter sub-module
-########################################################################
-GR_PYTHON_INSTALL(
-    FILES
-    plotter/__init__.py
-    plotter/bar_plotter.py
-    plotter/channel_plotter.py
-    plotter/common.py
-    plotter/gltext.py
-    plotter/grid_plotter_base.py
-    plotter/plotter_base.py
-    plotter/waterfall_plotter.py
-    DESTINATION ${GR_PYTHON_DIR}/gnuradio/wxgui/plotter
-)
diff --git a/gr-wxgui/python/wxgui/__init__.py b/gr-wxgui/python/wxgui/__init__.py
deleted file mode 100644
index 1c707434c0..0000000000
--- a/gr-wxgui/python/wxgui/__init__.py
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# Copyright 2011 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-'''
-Provides a GUI interface using the Wx backend.
-'''
-
-try:
-    from wxgui_swig import *
-except ImportError:
-    import os
-    dirname, filename = os.path.split(os.path.abspath(__file__))
-    __path__.append(os.path.join(dirname, "..", "..", "swig"))
-    from wxgui_swig import *
diff --git a/gr-wxgui/python/wxgui/common.py b/gr-wxgui/python/wxgui/common.py
deleted file mode 100644
index de2648466b..0000000000
--- a/gr-wxgui/python/wxgui/common.py
+++ /dev/null
@@ -1,296 +0,0 @@
-#
-# Copyright 2008, 2009 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-##################################################
-# conditional disconnections of wx flow graph
-##################################################
-import wx
-from gnuradio import gr
-from gnuradio import blocks
-
-RUN_ALWAYS = gr.prefs().get_bool('wxgui', 'run_always', False)
-
-
-class wxgui_hb(object):
-    """
-    The wxgui hier block helper/wrapper class:
-    A hier block should inherit from this class to make use of the wxgui connect method.
-    To use, call wxgui_connect in place of regular connect; self.win must be defined.
-    The implementation will conditionally enable the copy block after the source (self).
-    This condition depends on weather or not the window is visible with the parent notebooks.
-    This condition will be re-checked on every ui update event.
-    """
-
-    def wxgui_connect(self, *points):
-        """
-        Use wxgui connect when the first point is the self source of the hb.
-        The win property of this object should be set to the wx window.
-        When this method tries to connect self to the next point,
-        it will conditionally make this connection based on the visibility state.
-        All other points will be connected normally.
-        """
-        try:
-            assert points[0] == self or points[0][0] == self
-            copy = blocks.copy(self.input_signature().sizeof_stream_item(0))
-            handler = self._handler_factory(copy.set_enabled)
-            if not RUN_ALWAYS:
-                handler(False)  # initially disable the copy block
-            else:
-                handler(True)  # initially enable the copy block
-            self._bind_to_visible_event(win=self.win, handler=handler)
-            points = list(points)
-            points.insert(1, copy) # insert the copy block into the chain
-        except (AssertionError, IndexError): pass
-        self.connect(*points)  # actually connect the blocks
-
-    @staticmethod
-    def _handler_factory(handler):
-        """
-        Create a function that will cache the visibility flag,
-        and only call the handler when that flag changes.
-
-        Args:
-            handler: the function to call on a change
-
-        Returns:
-            a function of 1 argument
-        """
-        cache = [None]
-
-        def callback(visible):
-            if cache[0] == visible: return
-            cache[0] = visible
-            # print visible, handler
-            if not RUN_ALWAYS:
-                handler(visible)
-            else:
-                handler(True)
-        return callback
-
-    @staticmethod
-    def _bind_to_visible_event(win, handler):
-        """
-        Bind a handler to a window when its visibility changes.
-        Specifically, call the handler when the window visibility changes.
-        This condition is checked on every update ui event.
-
-        Args:
-            win: the wx window
-            handler: a function of 1 param
-        """
-        # is the window visible in the hierarchy
-        def is_wx_window_visible(my_win):
-            while True:
-                parent = my_win.GetParent()
-                if not parent: return True  # reached the top of the hierarchy
-                # if we are hidden, then finish, otherwise keep traversing up
-                if isinstance(parent, wx.Notebook) and parent.GetCurrentPage() != my_win: return False
-                my_win = parent
-        # call the handler, the arg is shown or not
-        def handler_factory(my_win, my_handler):
-            def callback(evt):
-                my_handler(is_wx_window_visible(my_win))
-                evt.Skip()  # skip so all bound handlers are called
-            return callback
-        handler = handler_factory(win, handler)
-        # bind the handler to all the parent notebooks
-        win.Bind(wx.EVT_UPDATE_UI, handler)
-
-##################################################
-# Helpful Functions
-##################################################
-
-# A macro to apply an index to a key
-index_key = lambda key, i: "%s_%d" % (key, i+1)
-
-
-def _register_access_method(destination, controller, key):
-    """
-    Helper function for register access methods.
-    This helper creates distinct set and get methods for each key
-    and adds them to the destination object.
-    """
-    def set(value): controller[key] = value
-    setattr(destination, 'set_'+key, set)
-    def get(): return controller[key]
-    setattr(destination, 'get_'+key, get)
-
-
-def register_access_methods(destination, controller):
-    """
-    Register setter and getter functions in the destination object for all keys in the controller.
-
-    Args:
-        destination: the object to get new setter and getter methods
-        controller: the pubsub controller
-    """
-    for key in controller.keys(): _register_access_method(destination, controller, key)
-
-##################################################
-# Input Watcher Thread
-##################################################
-from gnuradio import gru
-
-
-class input_watcher(gru.msgq_runner):
-    """
-    Input watcher thread runs forever.
-    Read messages from the message queue.
-    Forward messages to the message handler.
-    """
-    def __init__ (self, msgq, controller, msg_key, arg1_key='', arg2_key=''):
-        self._controller = controller
-        self._msg_key = msg_key
-        self._arg1_key = arg1_key
-        self._arg2_key = arg2_key
-        gru.msgq_runner.__init__(self, msgq, self.handle_msg)
-
-    def handle_msg(self, msg):
-        if self._arg1_key: self._controller[self._arg1_key] = msg.arg1()
-        if self._arg2_key: self._controller[self._arg2_key] = msg.arg2()
-        self._controller[self._msg_key] = msg.to_string()
-
-
-##################################################
-# Shared Functions
-##################################################
-import numpy
-import math
-
-
-def get_exp(num):
-    """
-    Get the exponent of the number in base 10.
-
-    Args:
-        num: the floating point number
-
-    Returns:
-        the exponent as an integer
-    """
-    if num == 0: return 0
-    return int(math.floor(math.log10(abs(num))))
-
-
-def get_clean_num(num):
-    """
-    Get the closest clean number match to num with bases 1, 2, 5.
-
-    Args:
-        num: the number
-
-    Returns:
-        the closest number
-    """
-    if num == 0: return 0
-    sign = num > 0 and 1 or -1
-    exp = get_exp(num)
-    nums = numpy.array((1, 2, 5, 10))*(10**exp)
-    return sign*nums[numpy.argmin(numpy.abs(nums - abs(num)))]
-
-
-def get_clean_incr(num):
-    """
-    Get the next higher clean number with bases 1, 2, 5.
-
-    Args:
-        num: the number
-
-    Returns:
-        the next higher number
-    """
-    num = get_clean_num(num)
-    exp = get_exp(num)
-    coeff = int(round(num/10**exp))
-    return {
-        -5: -2,
-        -2: -1,
-        -1: -.5,
-        1: 2,
-        2: 5,
-        5: 10,
-    }[coeff]*(10**exp)
-
-
-def get_clean_decr(num):
-    """
-    Get the next lower clean number with bases 1, 2, 5.
-
-    Args:
-        num: the number
-
-    Returns:
-        the next lower number
-    """
-    num = get_clean_num(num)
-    exp = get_exp(num)
-    coeff = int(round(num/10**exp))
-    return {
-        -5: -10,
-        -2: -5,
-        -1: -2,
-        1: .5,
-        2: 1,
-        5: 2,
-    }[coeff]*(10**exp)
-
-
-def get_min_max(samples):
-    """
-    Get the minimum and maximum bounds for an array of samples.
-
-    Args:
-        samples: the array of real values
-
-    Returns:
-        a tuple of min, max
-    """
-    factor = 2.0
-    mean = numpy.average(samples)
-    std = numpy.std(samples)
-    fft = numpy.abs(numpy.fft.fft(samples - mean))
-    envelope = 2*numpy.max(fft)/len(samples)
-    ampl = max(std, envelope) or 0.1
-    return mean - factor*ampl, mean + factor*ampl
-
-
-def get_min_max_fft(fft_samps):
-    """
-    Get the minimum and maximum bounds for an array of fft samples.
-
-    Args:
-        samples: the array of real values
-
-    Returns:
-        a tuple of min, max
-    """
-    # get the peak level (max of the samples)
-    peak_level = numpy.max(fft_samps)
-    # separate noise samples
-    noise_samps = numpy.sort(fft_samps)[:len(fft_samps)/2]
-    # get the noise floor
-    noise_floor = numpy.average(noise_samps)
-    # get the noise deviation
-    noise_dev = numpy.std(noise_samps)
-    # determine the maximum and minimum levels
-    max_level = peak_level
-    min_level = noise_floor - abs(2*noise_dev)
-    return min_level, max_level
diff --git a/gr-wxgui/python/wxgui/const_window.py b/gr-wxgui/python/wxgui/const_window.py
deleted file mode 100644
index 2c499b54bd..0000000000
--- a/gr-wxgui/python/wxgui/const_window.py
+++ /dev/null
@@ -1,211 +0,0 @@
-#
-# Copyright 2008 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-##################################################
-# Imports
-##################################################
-import plotter
-import common
-import wx
-import numpy
-import math
-import pubsub
-from constants import *
-from gnuradio import gr #for gr.prefs
-import forms
-
-##################################################
-# Constants
-##################################################
-SLIDER_STEPS = 200
-LOOP_BW_MIN_EXP, LOOP_BW_MAX_EXP = -6, 0.0
-GAIN_MU_MIN_EXP, GAIN_MU_MAX_EXP = -6, -0.301
-DEFAULT_FRAME_RATE = gr.prefs().get_long('wxgui', 'const_rate', 5)
-DEFAULT_WIN_SIZE = (500, 400)
-DEFAULT_CONST_SIZE = gr.prefs().get_long('wxgui', 'const_size', 2048)
-CONST_PLOT_COLOR_SPEC = (0, 0, 1)
-MARKER_TYPES = (
-	('Dot Small', 1.0),
-	('Dot Medium', 2.0),
-	('Dot Large', 3.0),
-	('Line Link', None),
-)
-DEFAULT_MARKER_TYPE = 2.0
-
-##################################################
-# Constellation window control panel
-##################################################
-class control_panel(wx.Panel):
-	"""
-	A control panel with wx widgits to control the plotter.
-	"""
-	def __init__(self, parent):
-		"""
-		Create a new control panel.
-
-                Args:
-		    parent: the wx parent window
-		"""
-		self.parent = parent
-		wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
-		parent[SHOW_CONTROL_PANEL_KEY] = True
-		parent.subscribe(SHOW_CONTROL_PANEL_KEY, self.Show)
-		control_box = forms.static_box_sizer(
-			parent=self, label='Options',
-			bold=True, orient=wx.VERTICAL,
-		)
-		#loop_bw
-		control_box.AddStretchSpacer()
-		forms.text_box(
-			sizer=control_box, parent=self, label='Loop Bandwidth',
-			converter=forms.float_converter(),
-			ps=parent, key=LOOP_BW_KEY,
-		)
-		forms.log_slider(
-			sizer=control_box, parent=self,
-			min_exp=LOOP_BW_MIN_EXP,
-			max_exp=LOOP_BW_MAX_EXP,
-			num_steps=SLIDER_STEPS,
-			ps=parent, key=LOOP_BW_KEY,
-		)
-		#gain_mu
-		control_box.AddStretchSpacer()
-		forms.text_box(
-			sizer=control_box, parent=self, label='Gain Mu',
-			converter=forms.float_converter(),
-			ps=parent, key=GAIN_MU_KEY,
-		)
-		forms.log_slider(
-			sizer=control_box, parent=self,
-			min_exp=GAIN_MU_MIN_EXP,
-			max_exp=GAIN_MU_MAX_EXP,
-			num_steps=SLIDER_STEPS,
-			ps=parent, key=GAIN_MU_KEY,
-		)
-		#marker
-		control_box.AddStretchSpacer()
-		forms.drop_down(
-			sizer=control_box, parent=self,
-			ps=parent, key=MARKER_KEY, label='Marker',
-			choices=map(lambda x: x[1], MARKER_TYPES),
-			labels=map(lambda x: x[0], MARKER_TYPES),
-		)
-		#run/stop
-		control_box.AddStretchSpacer()
-		forms.toggle_button(
-			sizer=control_box, parent=self,
-			true_label='Stop', false_label='Run',
-			ps=parent, key=RUNNING_KEY,
-		)
-		#set sizer
-		self.SetSizerAndFit(control_box)
-
-##################################################
-# Constellation window with plotter and control panel
-##################################################
-class const_window(wx.Panel, pubsub.pubsub):
-	def __init__(
-		self,
-		parent,
-		controller,
-		size,
-		title,
-		msg_key,
-		loop_bw_key,
-		gain_mu_key,
-		gain_omega_key,
-		omega_key,
-		sample_rate_key,
-	):
-		pubsub.pubsub.__init__(self)
-		#proxy the keys
-		self.proxy(MSG_KEY, controller, msg_key)
-		self.proxy(LOOP_BW_KEY, controller, loop_bw_key)
-		self.proxy(GAIN_MU_KEY, controller, gain_mu_key)
-		self.proxy(GAIN_OMEGA_KEY, controller, gain_omega_key)
-		self.proxy(OMEGA_KEY, controller, omega_key)
-		self.proxy(SAMPLE_RATE_KEY, controller, sample_rate_key)
-		#initialize values
-		self[RUNNING_KEY] = True
-		self[X_DIVS_KEY] = 8
-		self[Y_DIVS_KEY] = 8
-		self[MARKER_KEY] = DEFAULT_MARKER_TYPE
-		#init panel and plot
-		wx.Panel.__init__(self, parent, style=wx.SIMPLE_BORDER)
-		self.plotter = plotter.channel_plotter(self)
-		self.plotter.SetSize(wx.Size(*size))
-		self.plotter.SetSizeHints(*size)
-		self.plotter.set_title(title)
-		self.plotter.set_x_label('Inphase')
-		self.plotter.set_y_label('Quadrature')
-		self.plotter.enable_point_label(True)
-		self.plotter.enable_grid_lines(True)
-		#setup the box with plot and controls
-		self.control_panel = control_panel(self)
-		main_box = wx.BoxSizer(wx.HORIZONTAL)
-		main_box.Add(self.plotter, 1, wx.EXPAND)
-		main_box.Add(self.control_panel, 0, wx.EXPAND)
-		self.SetSizerAndFit(main_box)
-		#alpha and gain mu 2nd orders
-		def set_gain_omega(gain_mu): self[GAIN_OMEGA_KEY] = .25*gain_mu**2
-		self.subscribe(GAIN_MU_KEY, set_gain_omega)
-		#register events
-		self.subscribe(MSG_KEY, self.handle_msg)
-		self.subscribe(X_DIVS_KEY, self.update_grid)
-		self.subscribe(Y_DIVS_KEY, self.update_grid)
-		#initial update
-		self.update_grid()
-
-	def handle_msg(self, msg):
-		"""
-		Plot the samples onto the complex grid.
-
-                Args:
-		    msg: the array of complex samples
-		"""
-		if not self[RUNNING_KEY]: return
-		#convert to complex floating point numbers
-		samples = numpy.fromstring(msg, numpy.complex64)
-		real = numpy.real(samples)
-		imag = numpy.imag(samples)
-		#plot
-		self.plotter.set_waveform(
-			channel=0,
-			samples=(real, imag),
-			color_spec=CONST_PLOT_COLOR_SPEC,
-			marker=self[MARKER_KEY],
-		)
-		#update the plotter
-		self.plotter.update()
-
-	def update_grid(self):
-		#update the x axis
-		x_max = 2.0
-		self.plotter.set_x_grid(-x_max, x_max, common.get_clean_num(2.0*x_max/self[X_DIVS_KEY]))
-		#update the y axis
-		y_max = 2.0
-		self.plotter.set_y_grid(-y_max, y_max, common.get_clean_num(2.0*y_max/self[Y_DIVS_KEY]))
-		#update plotter
-		self.plotter.update()
-
-
-
-
diff --git a/gr-wxgui/python/wxgui/constants.py b/gr-wxgui/python/wxgui/constants.py
deleted file mode 100644
index 08cc6a6343..0000000000
--- a/gr-wxgui/python/wxgui/constants.py
+++ /dev/null
@@ -1,76 +0,0 @@
-#
-# Copyright 2008,2010 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-##################################################
-# Controller Keys
-##################################################
-AC_COUPLE_KEY = 'ac_couple'
-ALPHA_KEY = 'alpha'
-AUTORANGE_KEY = 'autorange'
-AVERAGE_KEY = 'average'
-AVG_ALPHA_KEY = 'avg_alpha'
-USE_PERSISTENCE_KEY = 'use_persistence'
-PERSIST_ALPHA_KEY = 'persist_alpha'
-BASEBAND_FREQ_KEY = 'baseband_freq'
-BETA_KEY = 'beta'
-COLOR_MODE_KEY = 'color_mode'
-DECIMATION_KEY = 'decimation'
-DYNAMIC_RANGE_KEY = 'dynamic_range'
-FRAME_RATE_KEY = 'frame_rate'
-GAIN_MU_KEY = 'gain_mu'
-GAIN_OMEGA_KEY = 'gain_omega'
-MARKER_KEY = 'marker'
-XY_MARKER_KEY = 'xy_marker'
-MSG_KEY = 'msg'
-NUM_LINES_KEY = 'num_lines'
-OMEGA_KEY = 'omega'
-PEAK_HOLD_KEY = 'peak_hold'
-TRACE_STORE_KEY = 'trace_store'
-TRACE_SHOW_KEY = 'trace_show'
-REF_LEVEL_KEY = 'ref_level'
-RUNNING_KEY = 'running'
-SAMPLE_RATE_KEY = 'sample_rate'
-TRIGGER_CHANNEL_KEY = 'trigger_channel'
-TRIGGER_LEVEL_KEY = 'trigger_level'
-TRIGGER_MODE_KEY = 'trigger_mode'
-TRIGGER_SLOPE_KEY = 'trigger_slope'
-TRIGGER_SHOW_KEY = 'trigger_show'
-XY_MODE_KEY = 'xy_mode'
-X_CHANNEL_KEY = 'x_channel'
-Y_CHANNEL_KEY = 'y_channel'
-T_FRAC_OFF_KEY = 't_frac_off'
-T_DIVS_KEY = 't_divs'
-T_OFF_KEY = 't_off'
-T_PER_DIV_KEY = 't_per_div'
-X_DIVS_KEY = 'x_divs'
-X_OFF_KEY = 'x_off'
-X_PER_DIV_KEY = 'x_per_div'
-Y_DIVS_KEY = 'y_divs'
-Y_OFF_KEY = 'y_off'
-Y_PER_DIV_KEY = 'y_per_div'
-Y_AXIS_LABEL = 'y_axis_label'
-MAXIMUM_KEY = 'maximum'
-MINIMUM_KEY = 'minimum'
-NUM_BINS_KEY = 'num_bins'
-FRAME_SIZE_KEY = 'frame_size'
-CHANNEL_OPTIONS_KEY = 'channel_options'
-SHOW_CONTROL_PANEL_KEY = 'show_control_panel'
-LOOP_BW_KEY = 'loop_bw'
diff --git a/gr-wxgui/python/wxgui/constsink_gl.py b/gr-wxgui/python/wxgui/constsink_gl.py
deleted file mode 100644
index dea76ea753..0000000000
--- a/gr-wxgui/python/wxgui/constsink_gl.py
+++ /dev/null
@@ -1,142 +0,0 @@
-#
-# Copyright 2008 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-##################################################
-# Imports
-##################################################
-import const_window
-import common
-from gnuradio import gr
-from gnuradio import blocks
-from gnuradio import analog
-from pubsub import pubsub
-from constants import *
-import sys
-try:
-	from gnuradio import digital
-except ImportError:
-	sys.stderr.write("Error: could not import gnuradio.digital, please install gr-digitial.\n")
-	sys.exit(1)
-
-##################################################
-# Constellation sink block (wrapper for old wxgui)
-##################################################
-class const_sink_c(gr.hier_block2, common.wxgui_hb):
-	"""
-	A constellation block with a gui window.
-	"""
-
-	def __init__(
-		self,
-		parent,
-		title='',
-		sample_rate=1,
-		size=const_window.DEFAULT_WIN_SIZE,
-		frame_rate=const_window.DEFAULT_FRAME_RATE,
-		const_size=const_window.DEFAULT_CONST_SIZE,
-		#mpsk recv params
-		M=4,
-		theta=0,
-		loop_bw=6.28/100.0,
-		fmax=0.06,
-		mu=0.5,
-		gain_mu=0.005,
-		symbol_rate=1,
-		omega_limit=0.005,
-	):
-		#init
-		gr.hier_block2.__init__(
-			self,
-			"const_sink",
-			gr.io_signature(1, 1, gr.sizeof_gr_complex),
-			gr.io_signature(0, 0, 0),
-		)
-		#blocks
-		sd = blocks.stream_to_vector_decimator(
-			item_size=gr.sizeof_gr_complex,
-			sample_rate=sample_rate,
-			vec_rate=frame_rate,
-			vec_len=const_size,
-		)
-		fmin = -fmax
-		gain_omega = .25*gain_mu**2 #redundant, will be updated
-		omega = 1 #set_sample_rate will update this
-		# Costas frequency/phase recovery loop
-		# Critically damped 2nd order PLL
-		self._costas = digital.costas_loop_cc(loop_bw, M)
-		# Timing recovery loop
-		# Critically damped 2nd order DLL
-		self._retime = digital.clock_recovery_mm_cc(omega,
-							    gain_omega,
-							    mu, gain_mu,
-							    omega_limit)
-		#sync = gr.mpsk_receiver_cc(
-		#	M, #psk order
-		#	theta,
-		#	alpha,
-		#	beta,
-		#	fmin,
-		#	fmax,
-		#	mu,
-		#	gain_mu,
-		#	omega,
-		#	gain_omega,
-		#	omega_limit,
-		#)
-		agc = analog.feedforward_agc_cc(16, 1)
-		msgq = gr.msg_queue(2)
-		sink = blocks.message_sink(gr.sizeof_gr_complex*const_size, msgq, True)
-		#controller
-		def setter(p, k, x): p[k] = x
-		self.controller = pubsub()
-		self.controller.subscribe(LOOP_BW_KEY, self._costas.set_loop_bandwidth)
-		self.controller.publish(LOOP_BW_KEY, self._costas.get_loop_bandwidth)
-		self.controller.subscribe(GAIN_MU_KEY, self._retime.set_gain_mu)
-		self.controller.publish(GAIN_MU_KEY, self._retime.gain_mu)
-		self.controller.subscribe(OMEGA_KEY, self._retime.set_omega)
-		self.controller.publish(OMEGA_KEY, self._retime.omega)
-		self.controller.subscribe(GAIN_OMEGA_KEY, self._retime.set_gain_omega)
-		self.controller.publish(GAIN_OMEGA_KEY, self._retime.gain_omega)
-		self.controller.subscribe(SAMPLE_RATE_KEY, sd.set_sample_rate)
-		self.controller.subscribe(SAMPLE_RATE_KEY, lambda x: setter(self.controller, OMEGA_KEY, float(x)/symbol_rate))
-		self.controller.publish(SAMPLE_RATE_KEY, sd.sample_rate)
-		#initial update
-		self.controller[SAMPLE_RATE_KEY] = sample_rate
-		#start input watcher
-		common.input_watcher(msgq, self.controller, MSG_KEY)
-		#create window
-		self.win = const_window.const_window(
-			parent=parent,
-			controller=self.controller,
-			size=size,
-			title=title,
-			msg_key=MSG_KEY,
-			loop_bw_key=LOOP_BW_KEY,
-			gain_mu_key=GAIN_MU_KEY,
-			gain_omega_key=GAIN_OMEGA_KEY,
-			omega_key=OMEGA_KEY,
-			sample_rate_key=SAMPLE_RATE_KEY,
-		)
-		common.register_access_methods(self, self.win)
-		#connect
-		self.wxgui_connect(self, self._costas, self._retime, agc, sd, sink)
-
-
diff --git a/gr-wxgui/python/wxgui/fft_window.py b/gr-wxgui/python/wxgui/fft_window.py
deleted file mode 100644
index 024200556e..0000000000
--- a/gr-wxgui/python/wxgui/fft_window.py
+++ /dev/null
@@ -1,412 +0,0 @@
-#
-# Copyright 2008, 2009, 2010 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-##################################################
-# Imports
-##################################################
-import plotter
-import common
-import wx
-import numpy
-import math
-import pubsub
-from constants import *
-from gnuradio import gr #for gr.prefs
-import forms
-
-##################################################
-# Constants
-##################################################
-SLIDER_STEPS = 100
-AVG_ALPHA_MIN_EXP, AVG_ALPHA_MAX_EXP = -3, 0
-PERSIST_ALPHA_MIN_EXP, PERSIST_ALPHA_MAX_EXP = -2, 0
-DEFAULT_WIN_SIZE = (600, 300)
-DEFAULT_FRAME_RATE = gr.prefs().get_long('wxgui', 'fft_rate', 30)
-DB_DIV_MIN, DB_DIV_MAX = 1, 20
-FFT_PLOT_COLOR_SPEC = (0.3, 0.3, 1.0)
-PEAK_VALS_COLOR_SPEC = (0.0, 0.8, 0.0)
-EMPTY_TRACE = list()
-TRACES = ('A', 'B')
-TRACES_COLOR_SPEC = {
-	'A': (1.0, 0.0, 0.0),
-	'B': (0.8, 0.0, 0.8),
-}
-
-##################################################
-# FFT window control panel
-##################################################
-class control_panel(wx.Panel):
-	"""
-	A control panel with wx widgits to control the plotter and fft block chain.
-	"""
-
-	def __init__(self, parent):
-		"""
-		Create a new control panel.
-
-		Args:
-		    parent: the wx parent window
-		"""
-		self.parent = parent
-		wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
-		parent[SHOW_CONTROL_PANEL_KEY] = True
-		parent.subscribe(SHOW_CONTROL_PANEL_KEY, self.Show)
-		control_box = wx.BoxSizer(wx.VERTICAL)
-		control_box.AddStretchSpacer()
-		#checkboxes for average and peak hold
-		options_box = forms.static_box_sizer(
-			parent=self, sizer=control_box, label='Trace Options',
-			bold=True, orient=wx.VERTICAL,
-		)
-		forms.check_box(
-			sizer=options_box, parent=self, label='Peak Hold',
-			ps=parent, key=PEAK_HOLD_KEY,
-		)
-		forms.check_box(
-			sizer=options_box, parent=self, label='Average',
-			ps=parent, key=AVERAGE_KEY,
-		)
-		#static text and slider for averaging
-		avg_alpha_text = forms.static_text(
-			sizer=options_box, parent=self, label='Avg Alpha',
-			converter=forms.float_converter(lambda x: '%.4f'%x),
-			ps=parent, key=AVG_ALPHA_KEY, width=50,
-		)
-		avg_alpha_slider = forms.log_slider(
-			sizer=options_box, parent=self,
-			min_exp=AVG_ALPHA_MIN_EXP,
-			max_exp=AVG_ALPHA_MAX_EXP,
-			num_steps=SLIDER_STEPS,
-			ps=parent, key=AVG_ALPHA_KEY,
-		)
-		for widget in (avg_alpha_text, avg_alpha_slider):
-			parent.subscribe(AVERAGE_KEY, widget.Enable)
-			widget.Enable(parent[AVERAGE_KEY])
-			parent.subscribe(AVERAGE_KEY, widget.ShowItems)
-                        #allways show initially, so room is reserved for them
-			widget.ShowItems(True) # (parent[AVERAGE_KEY])
-
-                parent.subscribe(AVERAGE_KEY, self._update_layout)
-
-		forms.check_box(
-			sizer=options_box, parent=self, label='Persistence',
-			ps=parent, key=USE_PERSISTENCE_KEY,
-		)
-		#static text and slider for persist alpha
-		persist_alpha_text = forms.static_text(
-			sizer=options_box, parent=self, label='Persist Alpha',
-			converter=forms.float_converter(lambda x: '%.4f'%x),
-			ps=parent, key=PERSIST_ALPHA_KEY, width=50,
-		)
-		persist_alpha_slider = forms.log_slider(
-			sizer=options_box, parent=self,
-			min_exp=PERSIST_ALPHA_MIN_EXP,
-			max_exp=PERSIST_ALPHA_MAX_EXP,
-			num_steps=SLIDER_STEPS,
-			ps=parent, key=PERSIST_ALPHA_KEY,
-		)
-		for widget in (persist_alpha_text, persist_alpha_slider):
-			parent.subscribe(USE_PERSISTENCE_KEY, widget.Enable)
-			widget.Enable(parent[USE_PERSISTENCE_KEY])
-			parent.subscribe(USE_PERSISTENCE_KEY, widget.ShowItems)
-                        #allways show initially, so room is reserved for them
-			widget.ShowItems(True) # (parent[USE_PERSISTENCE_KEY])
-
-                parent.subscribe(USE_PERSISTENCE_KEY, self._update_layout)
-
-		#trace menu
-		for trace in TRACES:
-			trace_box = wx.BoxSizer(wx.HORIZONTAL)
-			options_box.Add(trace_box, 0, wx.EXPAND)
-			forms.check_box(
-				sizer=trace_box, parent=self,
-				ps=parent, key=TRACE_SHOW_KEY+trace,
-				label='Trace %s'%trace,
-			)
-			trace_box.AddSpacer(10)
-			forms.single_button(
-				sizer=trace_box, parent=self,
-				ps=parent, key=TRACE_STORE_KEY+trace,
-				label='Store', style=wx.BU_EXACTFIT,
-			)
-			trace_box.AddSpacer(10)
-		#radio buttons for div size
-		control_box.AddStretchSpacer()
-		y_ctrl_box = forms.static_box_sizer(
-			parent=self, sizer=control_box, label='Axis Options',
-			bold=True, orient=wx.VERTICAL,
-		)
-		forms.incr_decr_buttons(
-			parent=self, sizer=y_ctrl_box, label='dB/Div',
-			on_incr=self._on_incr_db_div, on_decr=self._on_decr_db_div,
-		)
-		#ref lvl buttons
-		forms.incr_decr_buttons(
-			parent=self, sizer=y_ctrl_box, label='Ref Level',
-			on_incr=self._on_incr_ref_level, on_decr=self._on_decr_ref_level,
-		)
-		y_ctrl_box.AddSpacer(2)
-		#autoscale
-		forms.single_button(
-			sizer=y_ctrl_box, parent=self, label='Autoscale',
-			callback=self.parent.autoscale,
-		)
-		#run/stop
-		control_box.AddStretchSpacer()
-		forms.toggle_button(
-			sizer=control_box, parent=self,
-			true_label='Stop', false_label='Run',
-			ps=parent, key=RUNNING_KEY,
-		)
-		#set sizer
-		self.SetSizerAndFit(control_box)
-
-		#mouse wheel event
-		def on_mouse_wheel(event):
-			if event.GetWheelRotation() < 0: self._on_incr_ref_level(event)
-			else: self._on_decr_ref_level(event)
-		parent.plotter.Bind(wx.EVT_MOUSEWHEEL, on_mouse_wheel)
-
-	##################################################
-	# Event handlers
-	##################################################
-	def _on_incr_ref_level(self, event):
-		self.parent[REF_LEVEL_KEY] = self.parent[REF_LEVEL_KEY] + self.parent[Y_PER_DIV_KEY]
-	def _on_decr_ref_level(self, event):
-		self.parent[REF_LEVEL_KEY] = self.parent[REF_LEVEL_KEY] - self.parent[Y_PER_DIV_KEY]
-	def _on_incr_db_div(self, event):
-		self.parent[Y_PER_DIV_KEY] = min(DB_DIV_MAX, common.get_clean_incr(self.parent[Y_PER_DIV_KEY]))
-	def _on_decr_db_div(self, event):
-		self.parent[Y_PER_DIV_KEY] = max(DB_DIV_MIN, common.get_clean_decr(self.parent[Y_PER_DIV_KEY]))
-	##################################################
-	# subscriber handlers
-	##################################################
-        def _update_layout(self,key):
-          # Just ignore the key value we get
-          # we only need to now that the visability or size of something has changed
-          self.parent.Layout()
-          #self.parent.Fit()
-
-##################################################
-# FFT window with plotter and control panel
-##################################################
-class fft_window(wx.Panel, pubsub.pubsub):
-	def __init__(
-		self,
-		parent,
-		controller,
-		size,
-		title,
-		real,
-		fft_size,
-		baseband_freq,
-		sample_rate_key,
-		y_per_div,
-		y_divs,
-		ref_level,
-		average_key,
-		avg_alpha_key,
-		peak_hold,
-		msg_key,
-                use_persistence,
-                persist_alpha,
-	):
-
-		pubsub.pubsub.__init__(self)
-		#setup
-		self.samples = EMPTY_TRACE
-		self.real = real
-		self.fft_size = fft_size
-		self._reset_peak_vals()
-		self._traces = dict()
-		#proxy the keys
-		self.proxy(MSG_KEY, controller, msg_key)
-		self.proxy(AVERAGE_KEY, controller, average_key)
-		self.proxy(AVG_ALPHA_KEY, controller, avg_alpha_key)
-		self.proxy(SAMPLE_RATE_KEY, controller, sample_rate_key)
-		#initialize values
-		self[PEAK_HOLD_KEY] = peak_hold
-		self[Y_PER_DIV_KEY] = y_per_div
-		self[Y_DIVS_KEY] = y_divs
-		self[X_DIVS_KEY] = 8 #approximate
-		self[REF_LEVEL_KEY] = ref_level
-		self[BASEBAND_FREQ_KEY] = baseband_freq
-		self[RUNNING_KEY] = True
-		self[USE_PERSISTENCE_KEY] = use_persistence
-		self[PERSIST_ALPHA_KEY] = persist_alpha
-		for trace in TRACES:
-			#a function that returns a function
-			#so the function wont use local trace
-			def new_store_trace(my_trace):
-				def store_trace(*args):
-					self._traces[my_trace] = self.samples
-					self.update_grid()
-				return store_trace
-			def new_toggle_trace(my_trace):
-				def toggle_trace(toggle):
-					#do an automatic store if toggled on and empty trace
-					if toggle and not len(self._traces[my_trace]):
-						self._traces[my_trace] = self.samples
-					self.update_grid()
-				return toggle_trace
-			self._traces[trace] = EMPTY_TRACE
-			self[TRACE_STORE_KEY+trace] = False
-			self[TRACE_SHOW_KEY+trace] = False
-			self.subscribe(TRACE_STORE_KEY+trace, new_store_trace(trace))
-			self.subscribe(TRACE_SHOW_KEY+trace, new_toggle_trace(trace))
-		#init panel and plot
-		wx.Panel.__init__(self, parent, style=wx.SIMPLE_BORDER)
-		self.plotter = plotter.channel_plotter(self)
-		self.plotter.SetSize(wx.Size(*size))
-		self.plotter.SetSizeHints(*size)
-		self.plotter.set_title(title)
-		self.plotter.enable_legend(True)
-		self.plotter.enable_point_label(True)
-		self.plotter.enable_grid_lines(True)
-                self.plotter.set_use_persistence(use_persistence)
-                self.plotter.set_persist_alpha(persist_alpha)
-		#setup the box with plot and controls
-		self.control_panel = control_panel(self)
-		main_box = wx.BoxSizer(wx.HORIZONTAL)
-		main_box.Add(self.plotter, 1, wx.EXPAND)
-		main_box.Add(self.control_panel, 0, wx.EXPAND)
-		self.SetSizerAndFit(main_box)
-		#register events
-		self.subscribe(AVERAGE_KEY, self._reset_peak_vals)
-		self.subscribe(MSG_KEY, self.handle_msg)
-		self.subscribe(SAMPLE_RATE_KEY, self.update_grid)
-		for key in (
-			BASEBAND_FREQ_KEY,
-			Y_PER_DIV_KEY, X_DIVS_KEY,
-			Y_DIVS_KEY, REF_LEVEL_KEY,
-		): self.subscribe(key, self.update_grid)
-		self.subscribe(USE_PERSISTENCE_KEY, self.plotter.set_use_persistence)
-		self.subscribe(PERSIST_ALPHA_KEY, self.plotter.set_persist_alpha)
-		#initial update
-		self.update_grid()
-
-	def set_callback(self,callb):
-		self.plotter.set_callback(callb)
-
-	def autoscale(self, *args):
-		"""
-		Autoscale the fft plot to the last frame.
-		Set the dynamic range and reference level.
-		"""
-		if not len(self.samples): return
-		min_level, max_level = common.get_min_max_fft(self.samples)
-		#set the range to a clean number of the dynamic range
-		self[Y_PER_DIV_KEY] = common.get_clean_num(1+(max_level - min_level)/self[Y_DIVS_KEY])
-		#set the reference level to a multiple of y per div
-		self[REF_LEVEL_KEY] = self[Y_PER_DIV_KEY]*round(.5+max_level/self[Y_PER_DIV_KEY])
-
-	def _reset_peak_vals(self, *args): self.peak_vals = EMPTY_TRACE
-
-	def handle_msg(self, msg):
-		"""
-		Handle the message from the fft sink message queue.
-		If complex, reorder the fft samples so the negative bins come first.
-		If real, keep take only the positive bins.
-		Plot the samples onto the grid as channel 1.
-		If peak hold is enabled, plot peak vals as channel 2.
-
-		Args:
-		    msg: the fft array as a character array
-		"""
-		if not self[RUNNING_KEY]: return
-		#convert to floating point numbers
-		samples = numpy.fromstring(msg, numpy.float32)[:self.fft_size] #only take first frame
-		num_samps = len(samples)
-		#reorder fft
-		if self.real: samples = samples[:(num_samps+2)/2]
-		else: samples = numpy.concatenate((samples[(num_samps+1)/2:], samples[:(num_samps+2)/2]))
-		self.samples = samples
-		#peak hold calculation
-		if self[PEAK_HOLD_KEY]:
-			if len(self.peak_vals) != len(samples): self.peak_vals = samples
-			self.peak_vals = numpy.maximum(samples, self.peak_vals)
-			#plot the peak hold
-			self.plotter.set_waveform(
-				channel='Peak',
-				samples=self.peak_vals,
-				color_spec=PEAK_VALS_COLOR_SPEC,
-			)
-		else:
-			self._reset_peak_vals()
-			self.plotter.clear_waveform(channel='Peak')
-		#plot the fft
-		self.plotter.set_waveform(
-			channel='FFT',
-			samples=samples,
-			color_spec=FFT_PLOT_COLOR_SPEC,
-		)
-		#update the plotter
-		self.plotter.update()
-
-	def update_grid(self, *args):
-		"""
-		Update the plotter grid.
-		This update method is dependent on the variables below.
-		Determine the x and y axis grid parameters.
-		The x axis depends on sample rate, baseband freq, and x divs.
-		The y axis depends on y per div, y divs, and ref level.
-		"""
-		for trace in TRACES:
-			channel = '%s'%trace.upper()
-			if self[TRACE_SHOW_KEY+trace]:
-				self.plotter.set_waveform(
-					channel=channel,
-					samples=self._traces[trace],
-					color_spec=TRACES_COLOR_SPEC[trace],
-				)
-			else: self.plotter.clear_waveform(channel=channel)
-		#grid parameters
-		sample_rate = self[SAMPLE_RATE_KEY]
-		baseband_freq = self[BASEBAND_FREQ_KEY]
-		y_per_div = self[Y_PER_DIV_KEY]
-		y_divs = self[Y_DIVS_KEY]
-		x_divs = self[X_DIVS_KEY]
-		ref_level = self[REF_LEVEL_KEY]
-		#determine best fitting x_per_div
-		if self.real: x_width = sample_rate/2.0
-		else: x_width = sample_rate/1.0
-		x_per_div = common.get_clean_num(x_width/x_divs)
-		#update the x grid
-		if self.real:
-			self.plotter.set_x_grid(
-				baseband_freq,
-				baseband_freq + sample_rate/2.0,
-				x_per_div, True,
-			)
-		else:
-			self.plotter.set_x_grid(
-				baseband_freq - sample_rate/2.0,
-				baseband_freq + sample_rate/2.0,
-				x_per_div, True,
-			)
-		#update x units
-		self.plotter.set_x_label('Frequency', 'Hz')
-		#update y grid
-		self.plotter.set_y_grid(ref_level-y_per_div*y_divs, ref_level, y_per_div)
-		#update y units
-		self.plotter.set_y_label('Power', 'dB')
-		#update plotter
-		self.plotter.update()
diff --git a/gr-wxgui/python/wxgui/fftsink2.py b/gr-wxgui/python/wxgui/fftsink2.py
deleted file mode 100644
index 3277cd3ffa..0000000000
--- a/gr-wxgui/python/wxgui/fftsink2.py
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-# Copyright 2008,2009 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-from gnuradio import gr
-
-p = gr.prefs()
-style = p.get_string('wxgui', 'style', 'auto')
-
-if style == 'auto' or style == 'gl':
-    try:
-        import wx.glcanvas
-        from OpenGL.GL import *
-        from fftsink_gl import fft_sink_f, fft_sink_c
-    except ImportError:
-        if style == 'gl':
-            raise RuntimeError("Unable to import OpenGL.  Are Python wrappers for OpenGL installed?")
-        else:
-            # Fall backto non-gl sinks
-            from fftsink_nongl import fft_sink_f, fft_sink_c
-elif style == 'nongl':
-    from fftsink_nongl import fft_sink_f, fft_sink_c
-else:
-    raise RuntimeError("Unknown wxgui style")
diff --git a/gr-wxgui/python/wxgui/fftsink_gl.py b/gr-wxgui/python/wxgui/fftsink_gl.py
deleted file mode 100644
index a0b245c98a..0000000000
--- a/gr-wxgui/python/wxgui/fftsink_gl.py
+++ /dev/null
@@ -1,204 +0,0 @@
-#
-# Copyright 2008-2010,2012 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-from __future__ import division
-
-##################################################
-# Imports
-##################################################
-import fft_window
-import common
-from gnuradio import gr, fft
-from gnuradio import analog
-from gnuradio import blocks
-from gnuradio.fft import logpwrfft
-from pubsub import pubsub
-from constants import *
-import math
-
-##################################################
-# FFT sink block (wrapper for old wxgui)
-##################################################
-class _fft_sink_base(gr.hier_block2, common.wxgui_hb):
-	"""
-	An fft block with real/complex inputs and a gui window.
-	"""
-
-	def __init__(
-		self,
-		parent,
-		baseband_freq=0,
-		ref_scale=2.0,
-		y_per_div=10,
-		y_divs=8,
-		ref_level=50,
-		sample_rate=1,
-		fft_size=512,
-		fft_rate=fft_window.DEFAULT_FRAME_RATE,
-		average=False,
-		avg_alpha=None,
-		title='',
-		size=fft_window.DEFAULT_WIN_SIZE,
-		peak_hold=False,
-		win=None,
-                use_persistence=False,
-                persist_alpha=None,
-		**kwargs #do not end with a comma
-	):
-		#ensure avg alpha
-		if avg_alpha is None: avg_alpha = 2.0/fft_rate
-                #ensure analog alpha
-                if persist_alpha is None:
-                  actual_fft_rate=float(sample_rate/fft_size)/float(max(1,int(float((sample_rate/fft_size)/fft_rate))))
-                  #print "requested_fft_rate ",fft_rate
-                  #print "actual_fft_rate    ",actual_fft_rate
-                  analog_cutoff_freq=0.5 # Hertz
-                  #calculate alpha from wanted cutoff freq
-                  persist_alpha = 1.0 - math.exp(-2.0*math.pi*analog_cutoff_freq/actual_fft_rate)
-
-		#init
-		gr.hier_block2.__init__(
-			self,
-			"fft_sink",
-			gr.io_signature(1, 1, self._item_size),
-			gr.io_signature(0, 0, 0),
-		)
-		#blocks
-		fft = self._fft_chain(
-			sample_rate=sample_rate,
-			fft_size=fft_size,
-			frame_rate=fft_rate,
-			ref_scale=ref_scale,
-			avg_alpha=avg_alpha,
-			average=average,
-			win=win,
-		)
-		msgq = gr.msg_queue(2)
-		sink = blocks.message_sink(gr.sizeof_float*fft_size, msgq, True)
-
-
-		#controller
-		self.controller = pubsub()
-		self.controller.subscribe(AVERAGE_KEY, fft.set_average)
-		self.controller.publish(AVERAGE_KEY, fft.average)
-		self.controller.subscribe(AVG_ALPHA_KEY, fft.set_avg_alpha)
-		self.controller.publish(AVG_ALPHA_KEY, fft.avg_alpha)
-		self.controller.subscribe(SAMPLE_RATE_KEY, fft.set_sample_rate)
-		self.controller.publish(SAMPLE_RATE_KEY, fft.sample_rate)
-		#start input watcher
-		common.input_watcher(msgq, self.controller, MSG_KEY)
-		#create window
-		self.win = fft_window.fft_window(
-			parent=parent,
-			controller=self.controller,
-			size=size,
-			title=title,
-			real=self._real,
-			fft_size=fft_size,
-			baseband_freq=baseband_freq,
-			sample_rate_key=SAMPLE_RATE_KEY,
-			y_per_div=y_per_div,
-			y_divs=y_divs,
-			ref_level=ref_level,
-			average_key=AVERAGE_KEY,
-			avg_alpha_key=AVG_ALPHA_KEY,
-			peak_hold=peak_hold,
-			msg_key=MSG_KEY,
-                        use_persistence=use_persistence,
-                        persist_alpha=persist_alpha,
-		)
-		common.register_access_methods(self, self.win)
-		setattr(self.win, 'set_baseband_freq', getattr(self, 'set_baseband_freq')) #BACKWARDS
-		setattr(self.win, 'set_peak_hold', getattr(self, 'set_peak_hold')) #BACKWARDS
-		#connect
-		self.wxgui_connect(self, fft, sink)
-
-	def set_callback(self,callb):
-		self.win.set_callback(callb)
-
-class fft_sink_f(_fft_sink_base):
-	_fft_chain = logpwrfft.logpwrfft_f
-	_item_size = gr.sizeof_float
-	_real = True
-
-class fft_sink_c(_fft_sink_base):
-	_fft_chain = logpwrfft.logpwrfft_c
-	_item_size = gr.sizeof_gr_complex
-	_real = False
-
-# ----------------------------------------------------------------
-# Standalone test app
-# ----------------------------------------------------------------
-
-import wx
-from gnuradio.wxgui import stdgui2
-
-class test_app_block (stdgui2.std_top_block):
-    def __init__(self, frame, panel, vbox, argv):
-        stdgui2.std_top_block.__init__(self, frame, panel, vbox, argv)
-
-        fft_size = 256
-
-        # build our flow graph
-        input_rate = 2048.0e3
-
-        #Generate some noise
-        noise = analog.noise_source_c(analog.GR_UNIFORM, 1.0/10)
-
-        # Generate a complex sinusoid
-        #src1 = analog.sig_source_c(input_rate, analog.GR_SIN_WAVE, 2e3, 1)
-        src1 = analog.sig_source_c(input_rate, analog.GR_CONST_WAVE, 57.50e3, 1)
-
-        # We add these throttle blocks so that this demo doesn't
-        # suck down all the CPU available.  Normally you wouldn't use these.
-        thr1 = blocks.throttle(gr.sizeof_gr_complex, input_rate)
-
-        sink1 = fft_sink_c(panel, title="Complex Data", fft_size=fft_size,
-			   sample_rate=input_rate, baseband_freq=100e3,
-			   ref_level=0, y_per_div=20, y_divs=10)
-        vbox.Add(sink1.win, 1, wx.EXPAND)
-
-        combine1 = blocks.add_cc()
-        self.connect(src1, (combine1,0))
-        self.connect(noise,(combine1,1))
-        self.connect(combine1,thr1, sink1)
-
-        #src2 = analog.sig_source_f(input_rate, analog.GR_SIN_WAVE, 2e3, 1)
-        src2 = analog.sig_source_f (input_rate, analog.GR_CONST_WAVE, 57.50e3, 1)
-        thr2 = blocks.throttle(gr.sizeof_float, input_rate)
-        sink2 = fft_sink_f(panel, title="Real Data", fft_size=fft_size*2,
-			   sample_rate=input_rate, baseband_freq=100e3,
-			   ref_level=0, y_per_div=20, y_divs=10)
-        vbox.Add(sink2.win, 1, wx.EXPAND)
-
-        combine2 = blocks.add_ff()
-        c2f2 = blocks.complex_to_float()
-
-        self.connect(src2, (combine2,0))
-        self.connect(noise,c2f2,(combine2,1))
-        self.connect(combine2, thr2,sink2)
-
-def main ():
-    app = stdgui2.stdapp(test_app_block, "FFT Sink Test App")
-    app.MainLoop()
-
-if __name__ == '__main__':
-    main()
diff --git a/gr-wxgui/python/wxgui/fftsink_nongl.py b/gr-wxgui/python/wxgui/fftsink_nongl.py
deleted file mode 100644
index c63f0fb268..0000000000
--- a/gr-wxgui/python/wxgui/fftsink_nongl.py
+++ /dev/null
@@ -1,656 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2003-2007,2009,2010,2012 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-from gnuradio import gr, gru, fft
-import gnuradio.filter as grfilter
-from gnuradio import blocks
-from gnuradio import analog
-from gnuradio.wxgui import stdgui2
-from gnuradio.filter import window
-import wx
-import plot
-import numpy
-import math
-
-DIV_LEVELS = (1, 2, 5, 10, 20)
-
-default_fftsink_size = (640,240)
-default_fft_rate = gr.prefs().get_long('wxgui', 'fft_rate', 15)
-
-class fft_sink_base(object):
-    def __init__(self, input_is_real=False, baseband_freq=0, y_per_div=10,
-                 y_divs=8, ref_level=50,
-                 sample_rate=1, fft_size=512,
-                 fft_rate=default_fft_rate,
-                 average=False, avg_alpha=None, title='',
-                 peak_hold=False, use_persistence=False, persist_alpha=0.2):
-
-        # initialize common attributes
-        self.baseband_freq = baseband_freq
-        self.y_per_div=y_per_div
-        self.y_divs = y_divs
-        self.ref_level = ref_level
-        self.sample_rate = sample_rate
-        self.fft_size = fft_size
-        self.fft_rate = fft_rate
-        self.average = average
-        if avg_alpha is None:
-            self.avg_alpha = 2.0 / fft_rate
-        else:
-            self.avg_alpha = avg_alpha
-        self.use_persistence = use_persistence
-        self.persist_alpha = persist_alpha
-
-        self.title = title
-        self.peak_hold = peak_hold
-        self.input_is_real = input_is_real
-        self.msgq = gr.msg_queue(2)         # queue that holds a maximum of 2 messages
-
-    def set_y_per_div(self, y_per_div):
-        self.y_per_div = y_per_div
-
-    def set_ref_level(self, ref_level):
-        self.ref_level = ref_level
-
-    def set_average(self, average):
-        self.average = average
-        if average:
-            self.avg.set_taps(self.avg_alpha)
-        else:
-            self.avg.set_taps(1.0)
-        self.win.peak_vals = None
-
-    def set_peak_hold(self, enable):
-        self.peak_hold = enable
-        self.win.set_peak_hold(enable)
-
-    def set_use_persistence(self, enable):
-        self.use_persistence = enable
-        self.win.set_use_persistence(enable)
-
-    def set_persist_alpha(self, persist_alpha):
-        self.persist_alpha = persist_alpha
-        self.win.set_persist_alpha(persist_alpha)
-
-    def set_avg_alpha(self, avg_alpha):
-        self.avg_alpha = avg_alpha
-
-    def set_baseband_freq(self, baseband_freq):
-        self.baseband_freq = baseband_freq
-
-    def set_sample_rate(self, sample_rate):
-        self.sample_rate = sample_rate
-        self._set_n()
-
-    def _set_n(self):
-        self.one_in_n.set_n(max(1, int(self.sample_rate/self.fft_size/self.fft_rate)))
-
-    def set_callback(self, callb):
-        return
-
-class fft_sink_f(gr.hier_block2, fft_sink_base):
-    def __init__(self, parent, baseband_freq=0, ref_scale=2.0,
-                 y_per_div=10, y_divs=8, ref_level=50, sample_rate=1, fft_size=512,
-                 fft_rate=default_fft_rate, average=False, avg_alpha=None,
-                 title='', size=default_fftsink_size, peak_hold=False,
-                 use_persistence=False, persist_alpha=0.2, **kwargs):
-
-        gr.hier_block2.__init__(self, "fft_sink_f",
-                                gr.io_signature(1, 1, gr.sizeof_float),
-                                gr.io_signature(0,0,0))
-
-        fft_sink_base.__init__(self, input_is_real=True, baseband_freq=baseband_freq,
-                               y_per_div=y_per_div, y_divs=y_divs, ref_level=ref_level,
-                               sample_rate=sample_rate, fft_size=fft_size,
-                               fft_rate=fft_rate,
-                               average=average, avg_alpha=avg_alpha, title=title,
-                               peak_hold=peak_hold, use_persistence=use_persistence,
-                               persist_alpha=persist_alpha)
-
-        self.s2p = blocks.stream_to_vector(gr.sizeof_float, self.fft_size)
-        self.one_in_n = blocks.keep_one_in_n(gr.sizeof_float * self.fft_size,
-                                             max(1, int(self.sample_rate/self.fft_size/self.fft_rate)))
-
-        mywindow = window.blackmanharris(self.fft_size)
-        self.fft = fft.fft_vfc(self.fft_size, True, mywindow)
-        power = 0
-        for tap in mywindow:
-            power += tap*tap
-
-        self.c2magsq = blocks.complex_to_mag_squared(self.fft_size)
-        self.avg = grfilter.single_pole_iir_filter_ff(1.0, self.fft_size)
-
-        # FIXME  We need to add 3dB to all bins but the DC bin
-        self.log = blocks.nlog10_ff(10, self.fft_size,
-                               -20*math.log10(self.fft_size)                # Adjust for number of bins
-                               -10*math.log10(power/self.fft_size)        # Adjust for windowing loss
-                               -20*math.log10(ref_scale/2))                # Adjust for reference scale
-
-        self.sink = blocks.message_sink(gr.sizeof_float * self.fft_size, self.msgq, True)
-        self.connect(self, self.s2p, self.one_in_n, self.fft, self.c2magsq, self.avg, self.log, self.sink)
-
-        self.win = fft_window(self, parent, size=size)
-        self.set_average(self.average)
-        self.set_peak_hold(self.peak_hold)
-        self.set_use_persistence(self.use_persistence)
-        self.set_persist_alpha(self.persist_alpha)
-
-class fft_sink_c(gr.hier_block2, fft_sink_base):
-    def __init__(self, parent, baseband_freq=0, ref_scale=2.0,
-                 y_per_div=10, y_divs=8, ref_level=50, sample_rate=1, fft_size=512,
-                 fft_rate=default_fft_rate, average=False, avg_alpha=None,
-                 title='', size=default_fftsink_size, peak_hold=False,
-                 use_persistence=False, persist_alpha=0.2, **kwargs):
-
-        gr.hier_block2.__init__(self, "fft_sink_c",
-                                gr.io_signature(1, 1, gr.sizeof_gr_complex),
-                                gr.io_signature(0,0,0))
-
-        fft_sink_base.__init__(self, input_is_real=False, baseband_freq=baseband_freq,
-                               y_per_div=y_per_div, y_divs=y_divs, ref_level=ref_level,
-                               sample_rate=sample_rate, fft_size=fft_size,
-                               fft_rate=fft_rate,
-                               average=average, avg_alpha=avg_alpha, title=title,
-                               peak_hold=peak_hold, use_persistence=use_persistence,
-                               persist_alpha=persist_alpha)
-
-        self.s2p = blocks.stream_to_vector(gr.sizeof_gr_complex, self.fft_size)
-        self.one_in_n = blocks.keep_one_in_n(gr.sizeof_gr_complex * self.fft_size,
-                                             max(1, int(self.sample_rate/self.fft_size/self.fft_rate)))
-
-        mywindow = window.blackmanharris(self.fft_size)
-        self.fft = fft.fft_vcc(self.fft_size, True, mywindow)
-        power = 0
-        for tap in mywindow:
-            power += tap*tap
-
-        self.c2magsq = blocks.complex_to_mag_squared(self.fft_size)
-        self.avg = grfilter.single_pole_iir_filter_ff(1.0, self.fft_size)
-
-        # FIXME  We need to add 3dB to all bins but the DC bin
-        self.log = blocks.nlog10_ff(10, self.fft_size,
-                                -20*math.log10(self.fft_size)                # Adjust for number of bins
-                                -10*math.log10(power/self.fft_size)        # Adjust for windowing loss
-                                -20*math.log10(ref_scale/2))                # Adjust for reference scale
-
-        self.sink = blocks.message_sink(gr.sizeof_float * self.fft_size, self.msgq, True)
-        self.connect(self, self.s2p, self.one_in_n, self.fft, self.c2magsq, self.avg, self.log, self.sink)
-
-        self.win = fft_window(self, parent, size=size)
-        self.set_average(self.average)
-        self.set_use_persistence(self.use_persistence)
-        self.set_persist_alpha(self.persist_alpha)
-        self.set_peak_hold(self.peak_hold)
-
-
-# ------------------------------------------------------------------------
-
-myDATA_EVENT = wx.NewEventType()
-EVT_DATA_EVENT = wx.PyEventBinder (myDATA_EVENT, 0)
-
-
-class DataEvent(wx.PyEvent):
-    def __init__(self, data):
-        wx.PyEvent.__init__(self)
-        self.SetEventType (myDATA_EVENT)
-        self.data = data
-
-    def Clone (self):
-        self.__class__ (self.GetId())
-
-
-class input_watcher (gru.msgq_runner):
-    def __init__ (self, msgq, fft_size, event_receiver, **kwds):
-        self.fft_size = fft_size
-        self.event_receiver = event_receiver
-        gru.msgq_runner.__init__(self, msgq, self.handle_msg)
-
-    def handle_msg(self, msg):
-        itemsize = int(msg.arg1())
-        nitems = int(msg.arg2())
-
-        s = msg.to_string() # get the body of the msg as a string
-
-        # There may be more than one FFT frame in the message.
-        # If so, we take only the last one
-        if nitems > 1:
-            start = itemsize * (nitems - 1)
-            s = s[start:start+itemsize]
-
-        complex_data = numpy.fromstring (s, numpy.float32)
-        de = DataEvent (complex_data)
-        wx.PostEvent (self.event_receiver, de)
-        del de
-
-class control_panel(wx.Panel):
-
-    class LabelText(wx.StaticText):
-        def __init__(self, window, label):
-            wx.StaticText.__init__(self, window, -1, label)
-            font = self.GetFont()
-            font.SetWeight(wx.FONTWEIGHT_BOLD)
-            font.SetUnderlined(True)
-            self.SetFont(font)
-
-    def __init__(self, parent):
-        self.parent = parent
-        wx.Panel.__init__(self, parent, -1, style=wx.SIMPLE_BORDER)
-        control_box = wx.BoxSizer(wx.VERTICAL)
-
-        #checkboxes for average and peak hold
-        control_box.AddStretchSpacer()
-        control_box.Add(self.LabelText(self, 'Options'), 0, wx.ALIGN_CENTER)
-        self.average_check_box = wx.CheckBox(parent=self, style=wx.CHK_2STATE, label="Average")
-        self.average_check_box.Bind(wx.EVT_CHECKBOX, parent.on_average)
-        control_box.Add(self.average_check_box, 0, wx.EXPAND)
-        self.use_persistence_check_box = wx.CheckBox(parent=self, style=wx.CHK_2STATE, label="Persistence")
-        self.use_persistence_check_box.Bind(wx.EVT_CHECKBOX, parent.on_use_persistence)
-        control_box.Add(self.use_persistence_check_box, 0, wx.EXPAND)
-        self.peak_hold_check_box = wx.CheckBox(parent=self, style=wx.CHK_2STATE, label="Peak Hold")
-        self.peak_hold_check_box.Bind(wx.EVT_CHECKBOX, parent.on_peak_hold)
-        control_box.Add(self.peak_hold_check_box, 0, wx.EXPAND)
-
-        #radio buttons for div size
-        control_box.AddStretchSpacer()
-        control_box.Add(self.LabelText(self, 'Set dB/div'), 0, wx.ALIGN_CENTER)
-        radio_box = wx.BoxSizer(wx.VERTICAL)
-        self.radio_buttons = list()
-        for y_per_div in DIV_LEVELS:
-            radio_button = wx.RadioButton(self, -1, "%d dB/div"%y_per_div)
-            radio_button.Bind(wx.EVT_RADIOBUTTON, self.on_radio_button_change)
-            self.radio_buttons.append(radio_button)
-            radio_box.Add(radio_button, 0, wx.ALIGN_LEFT)
-        control_box.Add(radio_box, 0, wx.EXPAND)
-
-        #ref lvl buttons
-        control_box.AddStretchSpacer()
-        control_box.Add(self.LabelText(self, 'Adj Ref Lvl'), 0, wx.ALIGN_CENTER)
-        control_box.AddSpacer(2)
-        button_box = wx.BoxSizer(wx.HORIZONTAL)
-        self.ref_plus_button = wx.Button(self, -1, '+', style=wx.BU_EXACTFIT)
-        self.ref_plus_button.Bind(wx.EVT_BUTTON, parent.on_incr_ref_level)
-        button_box.Add(self.ref_plus_button, 0, wx.ALIGN_CENTER)
-        self.ref_minus_button = wx.Button(self, -1, ' - ', style=wx.BU_EXACTFIT)
-        self.ref_minus_button.Bind(wx.EVT_BUTTON, parent.on_decr_ref_level)
-        button_box.Add(self.ref_minus_button, 0, wx.ALIGN_CENTER)
-        control_box.Add(button_box, 0, wx.ALIGN_CENTER)
-        control_box.AddStretchSpacer()
-        #set sizer
-        self.SetSizerAndFit(control_box)
-        #update
-        self.update()
-
-    def update(self):
-        """
-        Read the state of the fft plot settings and update the control panel.
-        """
-        #update checkboxes
-        self.average_check_box.SetValue(self.parent.fftsink.average)
-        self.use_persistence_check_box.SetValue(self.parent.fftsink.use_persistence)
-        self.peak_hold_check_box.SetValue(self.parent.fftsink.peak_hold)
-        #update radio buttons
-        try:
-            index = list(DIV_LEVELS).index(self.parent.fftsink.y_per_div)
-            self.radio_buttons[index].SetValue(True)
-        except: pass
-
-    def on_radio_button_change(self, evt):
-        selected_radio_button = filter(lambda rb: rb.GetValue(), self.radio_buttons)[0]
-        index = self.radio_buttons.index(selected_radio_button)
-        self.parent.fftsink.set_y_per_div(DIV_LEVELS[index])
-
-class fft_window (wx.Panel):
-    def __init__ (self, fftsink, parent, id = -1,
-                  pos = wx.DefaultPosition, size = wx.DefaultSize,
-                  style = wx.DEFAULT_FRAME_STYLE, name = ""):
-
-        self.fftsink = fftsink
-        #init panel and plot
-        wx.Panel.__init__(self, parent, -1)
-        self.plot = plot.PlotCanvas(self, id, pos, size, style, name)
-        #setup the box with plot and controls
-        self.control_panel = control_panel(self)
-        main_box = wx.BoxSizer (wx.HORIZONTAL)
-        main_box.Add (self.plot, 1, wx.EXPAND)
-        main_box.Add (self.control_panel, 0, wx.EXPAND)
-        self.SetSizerAndFit(main_box)
-
-        self.peak_hold = False
-        self.peak_vals = None
-
-        self.use_persistence=False
-        self.persist_alpha=0.2
-
-
-        self.plot.SetEnableGrid (True)
-        # self.SetEnableZoom (True)
-        # self.SetBackgroundColour ('black')
-
-        self.build_popup_menu()
-        self.set_baseband_freq(self.fftsink.baseband_freq)
-
-        EVT_DATA_EVENT (self, self.set_data)
-        wx.EVT_CLOSE (self, self.on_close_window)
-        self.plot.Bind(wx.EVT_RIGHT_UP, self.on_right_click)
-        self.plot.Bind(wx.EVT_MOTION, self.evt_motion)
-
-        self.input_watcher = input_watcher(fftsink.msgq, fftsink.fft_size, self)
-
-    def set_scale(self, freq):
-        x = max(abs(self.fftsink.sample_rate), abs(self.fftsink.baseband_freq))
-        if x >= 1e9:
-            self._scale_factor = 1e-9
-            self._units = "GHz"
-            self._format = "%3.6f"
-        elif x >= 1e6:
-            self._scale_factor = 1e-6
-            self._units = "MHz"
-            self._format = "%3.3f"
-        else:
-            self._scale_factor = 1e-3
-            self._units = "kHz"
-            self._format = "%3.3f"
-
-    def set_baseband_freq(self, baseband_freq):
-        if self.peak_hold:
-            self.peak_vals = None
-        self.set_scale(baseband_freq)
-        self.fftsink.set_baseband_freq(baseband_freq)
-
-    def on_close_window (self, event):
-        print "fft_window:on_close_window"
-        self.keep_running = False
-
-
-    def set_data (self, evt):
-        dB = evt.data
-        L = len (dB)
-
-        if self.peak_hold:
-            if self.peak_vals is None:
-                self.peak_vals = dB
-            else:
-                self.peak_vals = numpy.maximum(dB, self.peak_vals)
-
-        if self.fftsink.input_is_real:     # only plot 1/2 the points
-            x_vals = ((numpy.arange (L/2) * (self.fftsink.sample_rate
-                       * self._scale_factor / L))
-                      + self.fftsink.baseband_freq * self._scale_factor)
-            self._points = numpy.zeros((len(x_vals), 2), numpy.float64)
-            self._points[:,0] = x_vals
-            self._points[:,1] = dB[0:L/2]
-            if self.peak_hold:
-                self._peak_points = numpy.zeros((len(x_vals), 2), numpy.float64)
-                self._peak_points[:,0] = x_vals
-                self._peak_points[:,1] = self.peak_vals[0:L/2]
-        else:
-            # the "negative freqs" are in the second half of the array
-            x_vals = ((numpy.arange (-L/2, L/2)
-                       * (self.fftsink.sample_rate * self._scale_factor / L))
-                      + self.fftsink.baseband_freq * self._scale_factor)
-            self._points = numpy.zeros((len(x_vals), 2), numpy.float64)
-            self._points[:,0] = x_vals
-            self._points[:,1] = numpy.concatenate ((dB[L/2:], dB[0:L/2]))
-            if self.peak_hold:
-                self._peak_points = numpy.zeros((len(x_vals), 2), numpy.float64)
-                self._peak_points[:,0] = x_vals
-                self._peak_points[:,1] = numpy.concatenate ((self.peak_vals[L/2:], self.peak_vals[0:L/2]))
-
-        lines = [plot.PolyLine (self._points, colour='BLUE'),]
-        if self.peak_hold:
-            lines.append(plot.PolyLine (self._peak_points, colour='GREEN'))
-
-        graphics = plot.PlotGraphics (lines,
-                                      title=self.fftsink.title,
-                                      xLabel = self._units, yLabel = "dB")
-        x_range = x_vals[0], x_vals[-1]
-        ymax = self.fftsink.ref_level
-        ymin = self.fftsink.ref_level - self.fftsink.y_per_div * self.fftsink.y_divs
-        y_range = ymin, ymax
-        self.plot.Draw (graphics, xAxis=x_range, yAxis=y_range, step=self.fftsink.y_per_div)
-
-    def set_use_persistence(self, enable):
-        self.use_persistence = enable
-        self.plot.set_use_persistence( enable)
-
-    def set_persist_alpha(self, persist_alpha):
-        self.persist_alpha = persist_alpha
-        self.plot.set_persist_alpha(persist_alpha)
-
-    def set_peak_hold(self, enable):
-        self.peak_hold = enable
-        self.peak_vals = None
-
-    def on_average(self, evt):
-        # print "on_average"
-        self.fftsink.set_average(evt.IsChecked())
-        self.control_panel.update()
-
-    def on_use_persistence(self, evt):
-        # print "on_analog"
-        self.fftsink.set_use_persistence(evt.IsChecked())
-        self.control_panel.update()
-
-    def on_peak_hold(self, evt):
-        # print "on_peak_hold"
-        self.fftsink.set_peak_hold(evt.IsChecked())
-        self.control_panel.update()
-
-    def on_incr_ref_level(self, evt):
-        # print "on_incr_ref_level"
-        self.fftsink.set_ref_level(self.fftsink.ref_level
-                                   + self.fftsink.y_per_div)
-
-    def on_decr_ref_level(self, evt):
-        # print "on_decr_ref_level"
-        self.fftsink.set_ref_level(self.fftsink.ref_level
-                                   - self.fftsink.y_per_div)
-
-    def on_incr_y_per_div(self, evt):
-        # print "on_incr_y_per_div"
-        self.fftsink.set_y_per_div(next_up(self.fftsink.y_per_div, DIV_LEVELS))
-        self.control_panel.update()
-
-    def on_decr_y_per_div(self, evt):
-        # print "on_decr_y_per_div"
-        self.fftsink.set_y_per_div(next_down(self.fftsink.y_per_div, DIV_LEVELS))
-        self.control_panel.update()
-
-    def on_y_per_div(self, evt):
-        # print "on_y_per_div"
-        Id = evt.GetId()
-        if Id == self.id_y_per_div_1:
-            self.fftsink.set_y_per_div(1)
-        elif Id == self.id_y_per_div_2:
-            self.fftsink.set_y_per_div(2)
-        elif Id == self.id_y_per_div_5:
-            self.fftsink.set_y_per_div(5)
-        elif Id == self.id_y_per_div_10:
-            self.fftsink.set_y_per_div(10)
-        elif Id == self.id_y_per_div_20:
-            self.fftsink.set_y_per_div(20)
-        self.control_panel.update()
-
-    def on_right_click(self, event):
-        menu = self.popup_menu
-        for id, pred in self.checkmarks.items():
-            item = menu.FindItemById(id)
-            item.Check(pred())
-        self.plot.PopupMenu(menu, event.GetPosition())
-
-    def evt_motion(self, event):
-        if not hasattr(self, "_points"):
-            return # Got here before first window data update
-
-        # Clip to plotted values
-        (ux, uy) = self.plot.GetXY(event)      # Scaled position
-        x_vals = numpy.array(self._points[:,0])
-        if ux < x_vals[0] or ux > x_vals[-1]:
-            tip = self.GetToolTip()
-            if tip:
-                tip.Enable(False)
-            return
-
-        # Get nearest X value (is there a better way)?
-        ind = numpy.argmin(numpy.abs(x_vals-ux))
-        x_val = x_vals[ind]
-        db_val = self._points[ind, 1]
-        text = (self._format+" %s dB=%3.3f") % (x_val, self._units, db_val)
-
-        # Display the tooltip
-        tip = wx.ToolTip(text)
-        tip.Enable(True)
-        tip.SetDelay(0)
-        self.SetToolTip(tip)
-
-    def build_popup_menu(self):
-        self.id_incr_ref_level = wx.NewId()
-        self.id_decr_ref_level = wx.NewId()
-        self.id_incr_y_per_div = wx.NewId()
-        self.id_decr_y_per_div = wx.NewId()
-        self.id_y_per_div_1 = wx.NewId()
-        self.id_y_per_div_2 = wx.NewId()
-        self.id_y_per_div_5 = wx.NewId()
-        self.id_y_per_div_10 = wx.NewId()
-        self.id_y_per_div_20 = wx.NewId()
-        self.id_average = wx.NewId()
-        self.id_use_persistence = wx.NewId()
-        self.id_peak_hold = wx.NewId()
-
-        self.plot.Bind(wx.EVT_MENU, self.on_average, id=self.id_average)
-        self.plot.Bind(wx.EVT_MENU, self.on_use_persistence, id=self.id_use_persistence)
-        self.plot.Bind(wx.EVT_MENU, self.on_peak_hold, id=self.id_peak_hold)
-        self.plot.Bind(wx.EVT_MENU, self.on_incr_ref_level, id=self.id_incr_ref_level)
-        self.plot.Bind(wx.EVT_MENU, self.on_decr_ref_level, id=self.id_decr_ref_level)
-        self.plot.Bind(wx.EVT_MENU, self.on_incr_y_per_div, id=self.id_incr_y_per_div)
-        self.plot.Bind(wx.EVT_MENU, self.on_decr_y_per_div, id=self.id_decr_y_per_div)
-        self.plot.Bind(wx.EVT_MENU, self.on_y_per_div, id=self.id_y_per_div_1)
-        self.plot.Bind(wx.EVT_MENU, self.on_y_per_div, id=self.id_y_per_div_2)
-        self.plot.Bind(wx.EVT_MENU, self.on_y_per_div, id=self.id_y_per_div_5)
-        self.plot.Bind(wx.EVT_MENU, self.on_y_per_div, id=self.id_y_per_div_10)
-        self.plot.Bind(wx.EVT_MENU, self.on_y_per_div, id=self.id_y_per_div_20)
-
-        # make a menu
-        menu = wx.Menu()
-        self.popup_menu = menu
-        menu.AppendCheckItem(self.id_average, "Average")
-        menu.AppendCheckItem(self.id_use_persistence, "Persistence")
-        menu.AppendCheckItem(self.id_peak_hold, "Peak Hold")
-        menu.Append(self.id_incr_ref_level, "Incr Ref Level")
-        menu.Append(self.id_decr_ref_level, "Decr Ref Level")
-        # menu.Append(self.id_incr_y_per_div, "Incr dB/div")
-        # menu.Append(self.id_decr_y_per_div, "Decr dB/div")
-        menu.AppendSeparator()
-        # we'd use RadioItems for these, but they're not supported on Mac
-        menu.AppendCheckItem(self.id_y_per_div_1, "1 dB/div")
-        menu.AppendCheckItem(self.id_y_per_div_2, "2 dB/div")
-        menu.AppendCheckItem(self.id_y_per_div_5, "5 dB/div")
-        menu.AppendCheckItem(self.id_y_per_div_10, "10 dB/div")
-        menu.AppendCheckItem(self.id_y_per_div_20, "20 dB/div")
-
-        self.checkmarks = {
-            self.id_average : lambda : self.fftsink.average,
-            self.id_use_persistence : lambda : self.fftsink.use_persistence,
-            self.id_peak_hold : lambda : self.fftsink.peak_hold,
-            self.id_y_per_div_1 : lambda : self.fftsink.y_per_div == 1,
-            self.id_y_per_div_2 : lambda : self.fftsink.y_per_div == 2,
-            self.id_y_per_div_5 : lambda : self.fftsink.y_per_div == 5,
-            self.id_y_per_div_10 : lambda : self.fftsink.y_per_div == 10,
-            self.id_y_per_div_20 : lambda : self.fftsink.y_per_div == 20,
-            }
-
-
-def next_up(v, seq):
-    """
-    Return the first item in seq that is > v.
-    """
-    for s in seq:
-        if s > v:
-            return s
-    return v
-
-def next_down(v, seq):
-    """
-    Return the last item in seq that is < v.
-    """
-    rseq = list(seq[:])
-    rseq.reverse()
-
-    for s in rseq:
-        if s < v:
-            return s
-    return v
-
-
-# ----------------------------------------------------------------
-# Standalone test app
-# ----------------------------------------------------------------
-
-class test_app_block (stdgui2.std_top_block):
-    def __init__(self, frame, panel, vbox, argv):
-        stdgui2.std_top_block.__init__ (self, frame, panel, vbox, argv)
-
-        fft_size = 256
-
-        # build our flow graph
-        input_rate = 100*20.48e3
-
-        # Generate a complex sinusoid
-        #src1 = gr.sig_source_c (input_rate, gr.GR_SIN_WAVE, 100*2e3, 1)
-        src1 = gr.sig_source_c (input_rate, gr.GR_CONST_WAVE, 100*5.75e3, 1)
-        noise1 = analog.noise_source_c(analog.GR_UNIFORM, 1.0/10)
-        add1 = blocks.add_cc()
-
-        # We add these throttle blocks so that this demo doesn't
-        # suck down all the CPU available.  Normally you wouldn't use these.
-        thr1 = blocks.throttle(gr.sizeof_gr_complex, input_rate)
-
-        sink1 = fft_sink_c(panel, title="Complex Data", fft_size=fft_size,
-                           sample_rate=input_rate, baseband_freq=100e3,
-                           ref_level=0, y_per_div=20, y_divs=10)
-        vbox.Add(sink1.win, 1, wx.EXPAND)
-
-        self.connect(src1, (add1,0))
-        self.connect(noise1, (add1,1))
-        self.connect(add1, thr1, sink1)
-
-        #src2 = gr.sig_source_f (input_rate, gr.GR_SIN_WAVE, 100*2e3, 1)
-        src2 = gr.sig_source_f (input_rate, gr.GR_CONST_WAVE, 100*5.75e3, 1)
-        noise2 = analog.noise_source_f(analog.GR_UNIFORM, 1.0/10)
-        add2 = blocks.add_ff()
-
-        thr2 = gr.throttle(gr.sizeof_float, input_rate)
-        sink2 = fft_sink_f (panel, title="Real Data", fft_size=fft_size*2,
-                            sample_rate=input_rate, baseband_freq=100e3,
-                            ref_level=0, y_per_div=20, y_divs=10)
-        vbox.Add (sink2.win, 1, wx.EXPAND)
-
-        self.connect(src2, (add2,0))
-        self.connect(noise2, (add2,1))
-        self.connect(add2, thr2, sink2)
-
-def main ():
-    app = stdgui2.stdapp(test_app_block, "FFT Sink Test App")
-    app.MainLoop()
-
-if __name__ == '__main__':
-    main ()
diff --git a/gr-wxgui/python/wxgui/form.py b/gr-wxgui/python/wxgui/form.py
deleted file mode 100644
index 0442e49c84..0000000000
--- a/gr-wxgui/python/wxgui/form.py
+++ /dev/null
@@ -1,391 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2005 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-import wx
-from gnuradio import eng_notation
-
-# ----------------------------------------------------------------
-#                   Wrappers for certain widgets
-# ----------------------------------------------------------------
-
-def button_with_callback(parent, label, callback):
-    new_id = wx.NewId()
-    btn = wx.Button(parent, new_id, label)
-    wx.EVT_BUTTON(parent, new_id, lambda evt: callback())
-    return btn
-
-
-# ----------------------------------------------------------------
-#                        Format converters
-# ----------------------------------------------------------------
-
-class abstract_converter(object):
-    def value_to_prim(self, v):
-        """
-        Convert from user specified value to value acceptable to underlying primitive.
-        The underlying primitive usually expects strings.
-        """
-        raise NotImplementedError
-    def prim_to_value(self, s):
-        """
-        Convert from underlying primitive value to user specified value.
-        The underlying primitive usually expects strings.
-        """
-        raise NotImplementedError
-    def help(self):
-        return "Any string is acceptable"
-
-class identity_converter(abstract_converter):
-    def value_to_prim(self,v):
-        return v
-    def prim_to_value(self, s):
-        return s
-
-class int_converter(abstract_converter):
-    def value_to_prim(self, v):
-        return str(v)
-    def prim_to_value(self, s):
-        return int(s, 0)
-    def help(self):
-        return "Enter an integer.  Leading 0x indicates hex"
-
-class float_converter(abstract_converter):
-    def value_to_prim(self, v):
-        return eng_notation.num_to_str(v)
-    def prim_to_value(self, s):
-        return eng_notation.str_to_num(s)
-    def help(self):
-        return "Enter a float with optional scale suffix.  E.g., 100.1M"
-
-
-# ----------------------------------------------------------------
-#               Various types of data entry fields
-# ----------------------------------------------------------------
-
-class field(object):
-    """
-    A field in a form.
-    """
-    def __init__(self, converter, value):
-        self.converter = converter
-        if value is not None:
-            self.set_value(value)
-
-    def set_value(self, v):
-        self._set_prim_value(self.converter.value_to_prim(v))
-
-    def get_value(self):
-        return self.converter.prim_to_value(self._get_prim_value())
-
-    def get_value_with_check(self):
-        """
-        Returns (value, error_msg), where error_msg is not None if there was problem
-        """
-        try:
-            return (self.get_value(), None)
-        except:
-            return (None, self._error_msg())
-
-    def _set_prim_value(self, v):
-        raise NotImplementedError
-
-    def _get_prim_value(self):
-        raise NotImplementedError
-
-    def _pair_with_label(self, widget, parent=None, sizer=None, label=None, weight=1):
-        self.label = label
-        if label is None:
-            sizer.Add (widget, weight, wx.EXPAND)
-            return widget
-        elif 0:
-            hbox = wx.BoxSizer(wx.HORIZONTAL)
-            label_widget = wx.StaticText(parent, -1, label + ': ')
-            hbox.Add(label_widget, 0, wx.EXPAND)
-            hbox.Add(widget, 1, wx.EXPAND)
-            sizer.Add(hbox, weight, wx.EXPAND)
-            return widget
-        else:
-            label_widget = wx.StaticText(parent, -1, label + ': ')
-            sizer.Add(label_widget, 0, wx.EXPAND)
-            sizer.Add(widget, weight, wx.EXPAND)
-            return widget
-
-    def _error_msg(self):
-        prefix = ''
-        if self.label:
-            prefix = self.label + ': '
-        return "%s%s is invalid. %s" % (prefix, self._get_prim_value(),
-                                        self.converter.help())
-
-# static (display-only) text fields
-
-class static_text_field(field):
-    def __init__(self, parent=None, sizer=None, label=None, value=None,
-                 converter=identity_converter(), weight=0):
-        self.f = self._pair_with_label(wx.StaticText(parent, -1, ""),
-                                       parent=parent, sizer=sizer, label=label, weight=weight)
-        field.__init__(self, converter, value)
-
-    def _get_prim_value(self):
-        return self.f.GetLabel()
-
-    def _set_prim_value(self, v):
-        self.f.SetLabel(v)
-
-
-class static_int_field(static_text_field):
-    def __init__(self, parent=None, sizer=None, label=None, value=None, weight=0):
-        static_text_field.__init__(self, parent, sizer, label, value, int_converter(), weight)
-
-class static_float_field(static_text_field):
-    def __init__(self, parent=None, sizer=None, label=None, value=None, weight=0):
-        static_text_field.__init__(self, parent, sizer, label, value, float_converter(), weight)
-
-
-# editable text fields
-
-class text_field(field):
-    def __init__(self, parent=None, sizer=None, label=None, value=None,
-                 converter=identity_converter(), callback=None, weight=1):
-        style = 0
-        if callback:
-            style = wx.TE_PROCESS_ENTER
-
-        new_id = wx.NewId()
-        w = wx.TextCtrl(parent, new_id, "", style=style)
-        self.f = self._pair_with_label(w, parent=parent, sizer=sizer, label=label, weight=weight)
-        if callback:
-            wx.EVT_TEXT_ENTER(w, new_id, lambda evt: callback())
-        field.__init__(self, converter, value)
-
-    def _get_prim_value(self):
-        return self.f.GetValue()
-
-    def _set_prim_value(self, v):
-        self.f.SetValue(v)
-
-
-class int_field(text_field):
-    def __init__(self, parent=None, sizer=None, label=None, value=None,
-                 callback=None, weight=1):
-        text_field.__init__(self, parent, sizer, label, value, int_converter(), callback, weight)
-
-class float_field(text_field):
-    def __init__(self, parent=None, sizer=None, label=None, value=None,
-                 callback=None, weight=1):
-        text_field.__init__(self, parent, sizer, label, value, float_converter(), callback, weight)
-
-# other fields
-
-class slider_field(field):
-    def __init__(self, parent=None, sizer=None, label=None, value=None,
-                 converter=identity_converter(), callback=None, min=0, max=100, weight=1):
-        new_id = wx.NewId()
-        w = wx.Slider(parent, new_id, (max+min)/2, min, max,
-                      size=wx.Size(250, -1), style=wx.SL_HORIZONTAL | wx.SL_LABELS)
-        self.f = self._pair_with_label(w, parent=parent, sizer=sizer, label=label, weight=weight)
-        if callback:
-            wx.EVT_COMMAND_SCROLL(w, new_id, lambda evt: callback(evt.GetInt()))
-        field.__init__(self, converter, value)
-
-    def _get_prim_value(self):
-        return self.f.GetValue()
-
-    def _set_prim_value(self, v):
-        self.f.SetValue(int(v))
-
-class quantized_slider_field(field):
-    def __init__(self, parent=None, sizer=None, label=None, value=None,
-                 converter=identity_converter(), callback=None, range=None, weight=1):
-        if not isinstance(range, (tuple, list)) or len(range) != 3:
-            raise ValueError, range
-
-        self.min = range[0]
-        self.max = range[1]
-        self.step_size = float(range[2])
-        nsteps = int((self.max-self.min)/self.step_size)
-
-        new_id = wx.NewId()
-        w = wx.Slider(parent, new_id, 0, 0, nsteps,
-                      size=wx.Size(250, -1), style=wx.SL_HORIZONTAL)
-        self.f = self._pair_with_label(w, parent=parent, sizer=sizer, label=label, weight=weight)
-        if callback:
-            wx.EVT_COMMAND_SCROLL(w, new_id,
-                                  lambda evt: callback(self._map_out(evt.GetInt())))
-        field.__init__(self, converter, value)
-
-    def _get_prim_value(self):
-        return self._map_out(self.f.GetValue())
-
-    def _set_prim_value(self, v):
-        self.f.SetValue(self._map_in(v))
-
-    def _map_in(self, x):
-        return int((x-self.min) / self.step_size)
-
-    def _map_out(self, x):
-        return x * self.step_size + self.min
-
-class checkbox_field(field):
-    def __init__(self, parent=None, sizer=None, label=None, value=None,
-                 converter=identity_converter(), callback=None, weight=1):
-        new_id = wx.NewId()
-        w = wx.CheckBox(parent, new_id, label, style=wx.CHK_2STATE)
-        self.f = self._pair_with_label(w, parent=parent, sizer=sizer, label=None, weight=weight)
-        if callback:
-            wx.EVT_CHECKBOX(w, new_id, lambda evt: callback(evt.GetInt()))
-        field.__init__(self, converter, value)
-
-    def _get_prim_value(self):
-        return self.f.GetValue()
-
-    def _set_prim_value(self, v):
-        self.f.SetValue(int(v))
-
-
-class radiobox_field(field):
-    def __init__(self, parent=None, sizer=None, label=None, value=None,
-                 converter=identity_converter(), callback=None, weight=1,
-                 choices=None, major_dimension=1, specify_rows=False):
-        new_id = wx.NewId()
-
-        if specify_rows:
-            style=wx.RA_SPECIFY_ROWS | wx.RA_HORIZONTAL
-        else:
-            style=wx.RA_SPECIFY_COLS | wx.RA_HORIZONTAL
-
-        w = wx.RadioBox(parent, new_id, label=label, style=style, majorDimension=major_dimension,
-                        choices=choices)
-        self.f = self._pair_with_label(w, parent=parent, sizer=sizer, label=None, weight=weight)
-        if callback:
-            wx.EVT_RADIOBOX(w, new_id, lambda evt: callback(evt.GetString()))
-        field.__init__(self, converter, value)
-
-    def _get_prim_value(self):
-        return self.f.GetStringSelection()
-
-    def _set_prim_value(self, v):
-        self.f.SetStringSelection(str(v))
-
-# ----------------------------------------------------------------
-#                         the form class
-# ----------------------------------------------------------------
-
-class form(dict):
-    def __init__(self):
-        dict.__init__(self)
-
-    def check_input_for_errors(self):
-        """
-        Returns list of error messages if there's trouble,
-        else empty list.
-        """
-        vals = [f.get_value_with_check() for f in self.values()]
-        return [t[1] for t in vals if t[1] is not None]
-
-    def get_key_vals(self):
-        d = {}
-        for (key, f) in self.items():
-            d[key] = f.get_value()
-        return d
-
-
-    def _nop(*args): pass
-
-    def check_input_and_call(self, callback, status_handler=_nop):
-        """
-        Return a function that checks the form for errors, and then if it's OK,
-        invokes the user specified callback, passing it the form key/value dictionary.
-        status_handler is called with a string indicating results.
-        """
-        def doit_callback(*ignore):
-            errors = self.check_input_for_errors()
-            if errors:
-                status_handler(errors[0])
-                #print '\n'.join(tuple(errors))
-            else:
-                kv = self.get_key_vals()
-                if callback(kv):
-                    status_handler("OK")
-                else:
-                    status_handler("Failed")
-
-        return doit_callback
-
-
-
-# ----------------------------------------------------------------
-#                    Stand-alone example code
-# ----------------------------------------------------------------
-
-import sys
-from gnuradio.wxgui import stdgui2
-
-class demo_app_flow_graph (stdgui2.std_top_block):
-    def __init__(self, frame, panel, vbox, argv):
-        stdgui2.std_top_block.__init__ (self, frame, panel, vbox, argv)
-
-        self.frame = frame
-        self.panel = panel
-
-        def _print_kv(kv):
-            print "kv =", kv
-            return True
-
-        self.form = form()
-
-        self.form['static1'] = \
-            static_text_field(parent=panel, sizer=vbox,
-                              label="Static Text",
-                              value="The Static Value")
-
-        self.form['text1'] = \
-            text_field(parent=panel, sizer=vbox,
-                       label="TextCtrl",
-                       value="The Editable Value")
-
-        self.form['int1'] = \
-            int_field(parent=panel, sizer=vbox,
-                      label="Int Field",
-                      value=1234)
-
-        self.form['float1'] = \
-            float_field(parent=panel, sizer=vbox,
-                      label="Float Field",
-                      value=3.14159)
-
-        self.doit = button_with_callback(
-            panel, "Do It!",
-            self.form.check_input_and_call(_print_kv, self._set_status_msg))
-
-        vbox.Add(self.doit, 0, wx.CENTER)
-
-    def _set_status_msg(self, msg):
-        self.frame.GetStatusBar().SetStatusText(msg, 0)
-
-
-def main ():
-    app = stdgui2.stdapp(demo_app_flow_graph, "wxgui form demo", nstatus=1)
-    app.MainLoop ()
-
-if __name__ == '__main__':
-    main ()
diff --git a/gr-wxgui/python/wxgui/forms/__init__.py b/gr-wxgui/python/wxgui/forms/__init__.py
deleted file mode 100644
index 058fa2ec28..0000000000
--- a/gr-wxgui/python/wxgui/forms/__init__.py
+++ /dev/null
@@ -1,102 +0,0 @@
-#
-# Copyright 2009 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-"""
-The following classes will be available through gnuradio.wxgui.forms:
-"""
-
-########################################################################
-# External Converters
-########################################################################
-from converters import \
-	eval_converter, str_converter, \
-	float_converter, int_converter
-
-########################################################################
-# External Forms
-########################################################################
-from forms import \
-	radio_buttons, drop_down, notebook, \
-	button, toggle_button, single_button, \
-	check_box, text_box, static_text, \
-	slider, log_slider, gauge, \
-	make_bold, DataEvent, EVT_DATA
-
-########################################################################
-# Helpful widgets
-########################################################################
-import wx
-
-class static_box_sizer(wx.StaticBoxSizer):
-	"""
-	A box sizer with label and border.
-
-        Args:
-	    parent: the parent widget
-            sizer: add this widget to sizer if provided (optional)
-	    proportion: the proportion when added to the sizer (default=0)
-	    flag: the flag argument when added to the sizer (default=wx.EXPAND)
-	    label: title label for this widget (optional)
-	    bold: true to boldify the label
-	    orient: the sizer orientation wx.VERTICAL or wx.HORIZONTAL (default=wx.VERTICAL)
-	"""
-	def __init__(self, parent, label='', bold=False, sizer=None, orient=wx.VERTICAL, proportion=0, flag=wx.EXPAND):
-		box = wx.StaticBox(parent=parent, label=label)
-		if bold: make_bold(box)
-		wx.StaticBoxSizer.__init__(self, box=box, orient=orient)
-		if sizer: sizer.Add(self, proportion, flag)
-
-class incr_decr_buttons(wx.BoxSizer):
-	"""
-	A horizontal box sizer with a increment and a decrement button.
-
-        Args:
-	    parent: the parent widget
-	    on_incr: the callback for pressing the + button
-	    on_decr: the callback for pressing the - button
-	    label: title label for this widget (optional)
-	    sizer: add this widget to sizer if provided (optional)
-	    proportion: the proportion when added to the sizer (default=0)
-	    flag: the flag argument when added to the sizer (default=wx.EXPAND)
-	"""
-	def __init__(self, parent, on_incr, on_decr, label='', sizer=None, proportion=0, flag=wx.EXPAND):
-		wx.BoxSizer.__init__(self, wx.HORIZONTAL)
-		buttons_box = wx.BoxSizer(wx.HORIZONTAL)
-		self._incr_button = wx.Button(parent, label='+', style=wx.BU_EXACTFIT)
-		self._incr_button.Bind(wx.EVT_BUTTON, on_incr)
-		buttons_box.Add(self._incr_button, 0, wx.ALIGN_CENTER_VERTICAL)
-		self._decr_button = wx.Button(parent, label=' - ', style=wx.BU_EXACTFIT)
-		self._decr_button.Bind(wx.EVT_BUTTON, on_decr)
-		buttons_box.Add(self._decr_button, 0, wx.ALIGN_CENTER_VERTICAL)
-		if label: #add label
-			self.Add(wx.StaticText(parent, label='%s: '%label), 1, wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_LEFT)
-			self.Add(buttons_box, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT)
-		else: self.Add(buttons_box, 0, wx.ALIGN_CENTER_VERTICAL)
-		if sizer: sizer.Add(self, proportion, flag)
-
-	def Disable(self, disable=True): self.Enable(not disable)
-	def Enable(self, enable=True):
-		if enable:
-			self._incr_button.Enable()
-			self._decr_button.Enable()
-		else:
-			self._incr_button.Disable()
-			self._decr_button.Disable()
diff --git a/gr-wxgui/python/wxgui/forms/converters.py b/gr-wxgui/python/wxgui/forms/converters.py
deleted file mode 100644
index db14d2752c..0000000000
--- a/gr-wxgui/python/wxgui/forms/converters.py
+++ /dev/null
@@ -1,154 +0,0 @@
-#
-# Copyright 2009 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-from gnuradio import eng_notation
-import math
-
-class abstract_converter(object):
-	def external_to_internal(self, v):
-		"""
-		Convert from user specified value to value acceptable to underlying primitive.
-		The underlying primitive usually expects strings.
-		"""
-		raise NotImplementedError
-	def internal_to_external(self, s):
-		"""
-		Convert from underlying primitive value to user specified value.
-		The underlying primitive usually expects strings.
-		"""
-		raise NotImplementedError
-	def help(self):
-		return "Any string is acceptable"
-
-class identity_converter(abstract_converter):
-	def external_to_internal(self,v):
-		return v
-	def internal_to_external(self, s):
-		return s
-
-########################################################################
-# Commonly used converters
-########################################################################
-class chooser_converter(abstract_converter):
-	"""
-	Convert between a set of possible choices and an index.
-	Used in the chooser base and all sub-classes.
-	"""
-	def __init__(self, choices):
-		#choices must be a list because tuple does not have .index() in python2.5
-		self._choices = list(choices)
-	def external_to_internal(self, choice):
-		return self._choices.index(choice)
-	def internal_to_external(self, index):
-		return self._choices[index]
-	def help(self):
-		return 'Enter a possible value in choices: "%s"'%str(self._choices)
-
-class bool_converter(abstract_converter):
-	"""
-	The internal representation is boolean.
-	The external representation is specified.
-	Used in the check box form.
-	"""
-	def __init__(self, true, false):
-		self._true = true
-		self._false = false
-	def external_to_internal(self, v):
-		if v == self._true: return True
-		if v == self._false: return False
-		raise Exception, 'Value "%s" is not a possible option.'%v
-	def internal_to_external(self, v):
-		if v: return self._true
-		else: return self._false
-	def help(self):
-		return "Value must be in (%s, %s)."%(self._true, self._false)
-
-class eval_converter(abstract_converter):
-	"""
-	A catchall converter when int and float are not enough.
-	Evaluate the internal representation with python's eval().
-	Possible uses, set a complex number, constellation points.
-	Used in text box.
-	"""
-	def __init__(self, formatter=lambda x: '%s'%(x)):
-		self._formatter = formatter
-	def external_to_internal(self, v):
-		return self._formatter(v)
-	def internal_to_external(self, s):
-		return eval(s)
-	def help(self):
-		return "Value must be evaluatable by python's eval."
-
-class str_converter(abstract_converter):
-	def __init__(self, formatter=lambda x: '%s'%(x)):
-		self._formatter = formatter
-	def external_to_internal(self, v):
-		return self._formatter(v)
-	def internal_to_external(self, s):
-		return str(s)
-
-class int_converter(abstract_converter):
-	def __init__(self, formatter=lambda x: '%d'%round(x)):
-		self._formatter = formatter
-	def external_to_internal(self, v):
-		return self._formatter(v)
-	def internal_to_external(self, s):
-		return int(s, 0)
-	def help(self):
-		return "Enter an integer.  Leading 0x indicates hex"
-
-class float_converter(abstract_converter):
-	def __init__(self, formatter=eng_notation.num_to_str):
-		self._formatter = formatter
-	def external_to_internal(self, v):
-		return self._formatter(v)
-	def internal_to_external(self, s):
-		return eng_notation.str_to_num(s)
-	def help(self):
-		return "Enter a float with optional scale suffix.  E.g., 100.1M"
-
-class slider_converter(abstract_converter):
-	"""
-	Scale values to and from the slider.
-	"""
-	def __init__(self, minimum, maximum, num_steps, cast):
-		assert minimum < maximum
-		assert num_steps > 0
-		self._offset = minimum
-		self._scaler = float(maximum - minimum)/num_steps
-		self._cast = cast
-	def external_to_internal(self, v):
-		return (v - self._offset)/self._scaler
-	def internal_to_external(self, v):
-		return self._cast(v*self._scaler + self._offset)
-	def help(self):
-		return "Value should be within slider range"
-
-class log_slider_converter(slider_converter):
-	def __init__(self, min_exp, max_exp, num_steps, base):
-		assert min_exp < max_exp
-		assert num_steps > 0
-		self._base = base
-		slider_converter.__init__(self, minimum=min_exp, maximum=max_exp, num_steps=num_steps, cast=float)
-	def external_to_internal(self, v):
-		return slider_converter.external_to_internal(self, math.log(v, self._base))
-	def internal_to_external(self, v):
-		return self._base**slider_converter.internal_to_external(self, v)
diff --git a/gr-wxgui/python/wxgui/forms/forms.py b/gr-wxgui/python/wxgui/forms/forms.py
deleted file mode 100644
index f819f13397..0000000000
--- a/gr-wxgui/python/wxgui/forms/forms.py
+++ /dev/null
@@ -1,675 +0,0 @@
-#
-# Copyright 2009 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-"""
-The forms module contains general purpose wx-gui forms for gnuradio apps.
-
-The forms follow a layered model:
-  * internal layer
-    * deals with the wxgui objects directly
-    * implemented in event handler and update methods
-  * translation layer
-    * translates the between the external and internal layers
-    * handles parsing errors between layers
-  * external layer
-    * provided external access to the user
-    * set_value, get_value, and optional callback
-    * set and get through optional pubsub and key
-
-Known problems:
-  * An empty label in the radio box still consumes space.
-  * The static text cannot resize the parent at runtime.
-"""
-
-EXT_KEY = 'external'
-INT_KEY = 'internal'
-
-import wx
-import sys
-from gnuradio.gr.pubsub import pubsub
-import converters
-
-EVT_DATA = wx.PyEventBinder(wx.NewEventType())
-class DataEvent(wx.PyEvent):
-	def __init__(self, data):
-		wx.PyEvent.__init__(self, wx.NewId(), EVT_DATA.typeId)
-		self.data = data
-
-def make_bold(widget):
-	font = widget.GetFont()
-	font.SetWeight(wx.FONTWEIGHT_BOLD)
-	widget.SetFont(font)
-
-########################################################################
-# Base Class Form
-########################################################################
-class _form_base(pubsub, wx.BoxSizer):
-	def __init__(self, parent=None, sizer=None, proportion=0, flag=wx.EXPAND, ps=None, key='', value=None, callback=None, converter=converters.identity_converter()):
-		pubsub.__init__(self)
-		wx.BoxSizer.__init__(self, wx.HORIZONTAL)
-		self._parent = parent
-		self._key = key
-		self._converter = converter
-		self._callback = callback
-		self._widgets = list()
-		#add to the sizer if provided
-		if sizer: sizer.Add(self, proportion, flag)
-		#proxy the pubsub and key into this form
-		if ps is not None:
-			assert key
-			self.proxy(EXT_KEY, ps, key)
-		#no pubsub passed, must set initial value
-		else: self.set_value(value)
-
-	def __str__(self):
-		return "Form: %s -> %s"%(self.__class__, self._key)
-
-	def _add_widget(self, widget, label='', flag=0, label_prop=0, widget_prop=1):
-		"""
-		Add the main widget to this object sizer.
-		If label is passed, add a label as well.
-		Register the widget and the label in the widgets list (for enable/disable).
-		Bind the update handler to the widget for data events.
-		This ensures that the gui thread handles updating widgets.
-		Setup the pusub triggers for external and internal.
-
-                Args:
-		    widget: the main widget
-		    label: the optional label
-		    flag: additional flags for widget
-		    label_prop: the proportion for the label
-		    widget_prop: the proportion for the widget
-		"""
-		#setup data event
-		widget.Bind(EVT_DATA, lambda x: self._update(x.data))
-		update = lambda x: wx.PostEvent(widget, DataEvent(x))
-		#register widget
-		self._widgets.append(widget)
-		#create optional label
-		if not label: self.Add(widget, widget_prop, wx.ALIGN_CENTER_VERTICAL | flag)
-		else:
-			label_text = wx.StaticText(self._parent, label='%s: '%label)
-			self._widgets.append(label_text)
-			self.Add(label_text, label_prop, wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_LEFT)
-			self.Add(widget, widget_prop, wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT | flag)
-		#initialize without triggering pubsubs
-		self._translate_external_to_internal(self[EXT_KEY])
-		update(self[INT_KEY])
-		#subscribe all the functions
-		self.subscribe(INT_KEY, update)
-		self.subscribe(INT_KEY, self._translate_internal_to_external)
-		self.subscribe(EXT_KEY, self._translate_external_to_internal)
-
-	def _translate_external_to_internal(self, external):
-		try:
-			internal = self._converter.external_to_internal(external)
-			#prevent infinite loop between internal and external pubsub keys by only setting if changed
-			if self[INT_KEY] != internal: self[INT_KEY] = internal
-		except Exception, e:
-			self._err_msg(external, e)
-			self[INT_KEY] = self[INT_KEY] #reset to last good setting
-
-	def _translate_internal_to_external(self, internal):
-		try:
-			external = self._converter.internal_to_external(internal)
-			#prevent infinite loop between internal and external pubsub keys by only setting if changed
-			if self[EXT_KEY] != external: self[EXT_KEY] = external
-		except Exception, e:
-			self._err_msg(internal, e)
-			self[EXT_KEY] = self[EXT_KEY] #reset to last good setting
-		if self._callback: self._callback(self[EXT_KEY])
-
-	def _err_msg(self, value, e):
-		print >> sys.stderr, self, 'Error translating value: "%s"\n\t%s\n\t%s'%(value, e, self._converter.help())
-
-	#override in subclasses to handle the wxgui object
-	def _update(self, value): raise NotImplementedError
-	def _handle(self, event): raise NotImplementedError
-
-	#provide a set/get interface for this form
-	def get_value(self): return self[EXT_KEY]
-	def set_value(self, value): self[EXT_KEY] = value
-
-	def Disable(self, disable=True): self.Enable(not disable)
-	def Enable(self, enable=True):
-		if enable:
-			for widget in self._widgets: widget.Enable()
-		else:
-			for widget in self._widgets: widget.Disable()
-
-########################################################################
-# Base Class Chooser Form
-########################################################################
-class _chooser_base(_form_base):
-	def __init__(self, choices=[], labels=None, **kwargs):
-		_form_base.__init__(self, converter=converters.chooser_converter(choices), **kwargs)
-		self._choices = choices
-		self._labels = map(str, labels or choices)
-
-########################################################################
-# Base Class Slider Form
-########################################################################
-class _slider_base(_form_base):
-	def __init__(self, label='', length=-1, converter=None, num_steps=100, style=wx.SL_HORIZONTAL, **kwargs):
-		_form_base.__init__(self, converter=converter, **kwargs)
-		if style & wx.SL_HORIZONTAL: slider_size = wx.Size(length, -1)
-		elif style & wx.SL_VERTICAL: slider_size = wx.Size(-1, length)
-		else: raise NotImplementedError
-		self._slider = wx.Slider(self._parent, minValue=0, maxValue=num_steps, size=slider_size, style=style)
-		self._slider.Bind(wx.EVT_SCROLL, self._handle)
-		self._add_widget(self._slider, label, flag=wx.EXPAND)
-
-	def _handle(self, event): self[INT_KEY] = self._slider.GetValue()
-	def _update(self, value): self._slider.SetValue(int(round(value)))
-
-########################################################################
-# Static Text Form
-########################################################################
-class static_text(_form_base):
-	"""
-	A text box form.
-
-        Args:
-	    parent: the parent widget
-	    sizer: add this widget to sizer if provided (optional)
-	    proportion: the proportion when added to the sizer (default=0)
-	    flag: the flag argument when added to the sizer (default=wx.EXPAND)
-	    ps: the pubsub object (optional)
-	    key: the pubsub key (optional)
-	    value: the default value (optional)
-	    label: title label for this widget (optional)
-	    width: the width of the form in px
-	    bold: true to bold-ify the text (default=False)
-	    units: a suffix to add after the text
-	    converter: forms.str_converter(), int_converter(), float_converter()...
-	"""
-	def __init__(self, label='', width=-1, bold=False, units='', converter=converters.str_converter(), **kwargs):
-		self._units = units
-		_form_base.__init__(self, converter=converter, **kwargs)
-		self._static_text = wx.StaticText(self._parent, size=wx.Size(width, -1))
-		if bold: make_bold(self._static_text)
-		self._add_widget(self._static_text, label)
-
-	def _update(self, label):
-			if self._units: label += ' ' + self._units
-			self._static_text.SetLabel(label); self._parent.Layout()
-
-########################################################################
-# Text Box Form
-########################################################################
-class text_box(_form_base):
-	"""
-	A text box form.
-
-        Args:
-	    parent: the parent widget
-	    sizer: add this widget to sizer if provided (optional)
-	    proportion: the proportion when added to the sizer (default=0)
-	    flag: the flag argument when added to the sizer (default=wx.EXPAND)
-	    ps: the pubsub object (optional)
-	    key: the pubsub key (optional)
-	    value: the default value (optional)
-	    label: title label for this widget (optional)
-	    width: the width of the form in px
-	    converter: forms.str_converter(), int_converter(), float_converter()...
-	"""
-	def __init__(self, label='', width=-1, converter=converters.eval_converter(), **kwargs):
-		_form_base.__init__(self, converter=converter, **kwargs)
-		self._text_box = wx.TextCtrl(self._parent, size=wx.Size(width, -1), style=wx.TE_PROCESS_ENTER)
-		self._default_bg_colour = self._text_box.GetBackgroundColour()
-		self._text_box.Bind(wx.EVT_TEXT_ENTER, self._handle)
-		self._text_box.Bind(wx.EVT_TEXT, self._update_color)
-		self._add_widget(self._text_box, label)
-
-	def _update_color(self, *args):
-		if self._text_box.GetValue() == self[INT_KEY]:
-			self._text_box.SetBackgroundColour(self._default_bg_colour)
-		else: self._text_box.SetBackgroundColour('#EEDDDD')
-
-	def _handle(self, event): self[INT_KEY] = self._text_box.GetValue()
-	def _update(self, value): self._text_box.SetValue(value); self._update_color()
-
-########################################################################
-# Slider Form
-#  Linear Slider
-#  Logarithmic Slider
-########################################################################
-class slider(_slider_base):
-	"""
-	A generic linear slider.
-
-        Args:
-	    parent: the parent widget
-	    sizer: add this widget to sizer if provided (optional)
-	    proportion: the proportion when added to the sizer (default=0)
-	    flag: the flag argument when added to the sizer (default=wx.EXPAND)
-	    ps: the pubsub object (optional)
-	    key: the pubsub key (optional)
-	    value: the default value (optional)
-	    label: title label for this widget (optional)
-	    length: the length of the slider in px (optional)
-	    style: wx.SL_HORIZONTAL or wx.SL_VERTICAL (default=horizontal)
-	    minimum: the minimum value
-	    maximum: the maximum value
-	    num_steps: the number of slider steps (or specify step_size)
-	    step_size: the step between slider jumps (or specify num_steps)
-	    cast: a cast function, int, or float (default=float)
-	"""
-	def __init__(self, minimum=-100, maximum=100, num_steps=100, step_size=None, cast=float, **kwargs):
-		assert step_size or num_steps
-		if step_size is not None: num_steps = (maximum - minimum)/step_size
-		converter = converters.slider_converter(minimum=minimum, maximum=maximum, num_steps=num_steps, cast=cast)
-		_slider_base.__init__(self, converter=converter, num_steps=num_steps, **kwargs)
-
-class log_slider(_slider_base):
-	"""
-	A generic logarithmic slider.
-	The sliders min and max values are base**min_exp and base**max_exp.
-
-        Args:
-	    parent: the parent widget
-	    sizer: add this widget to sizer if provided (optional)
-	    proportion: the proportion when added to the sizer (default=0)
-	    flag: the flag argument when added to the sizer (default=wx.EXPAND)
-	    ps: the pubsub object (optional)
-	    key: the pubsub key (optional)
-	    value: the default value (optional)
-	    label: title label for this widget (optional)
-	    length: the length of the slider in px (optional)
-	    style: wx.SL_HORIZONTAL or wx.SL_VERTICAL (default=horizontal)
-	    min_exp: the minimum exponent
-	    max_exp: the maximum exponent
-	    base: the exponent base in base**exp
-	    num_steps: the number of slider steps (or specify step_size)
-	    step_size: the exponent step size (or specify num_steps)
-	"""
-	def __init__(self, min_exp=0, max_exp=1, base=10, num_steps=100, step_size=None, **kwargs):
-		assert step_size or num_steps
-		if step_size is not None: num_steps = (max_exp - min_exp)/step_size
-		converter = converters.log_slider_converter(min_exp=min_exp, max_exp=max_exp, num_steps=num_steps, base=base)
-		_slider_base.__init__(self, converter=converter, num_steps=num_steps, **kwargs)
-
-########################################################################
-# Gauge Form
-########################################################################
-class gauge(_form_base):
-	"""
-	A gauge bar.
-	The gauge displays floating point values between the minimum and maximum.
-
-        Args:
-	    parent: the parent widget
-	    sizer: add this widget to sizer if provided (optional)
-	    proportion: the proportion when added to the sizer (default=0)
-	    flag: the flag argument when added to the sizer (default=wx.EXPAND)
-	    ps: the pubsub object (optional)
-	    key: the pubsub key (optional)
-	    value: the default value (optional)
-	    label: title label for this widget (optional)
-	    length: the length of the slider in px (optional)
-	    style: wx.GA_HORIZONTAL or wx.GA_VERTICAL (default=horizontal)
-	    minimum: the minimum value
-	    maximum: the maximum value
-	    num_steps: the number of slider steps (or specify step_size)
-	    step_size: the step between slider jumps (or specify num_steps)
-	"""
-	def __init__(self, label='', length=-1, minimum=-100, maximum=100, num_steps=100, step_size=None, style=wx.GA_HORIZONTAL, **kwargs):
-		assert step_size or num_steps
-		if step_size is not None: num_steps = (maximum - minimum)/step_size
-		converter = converters.slider_converter(minimum=minimum, maximum=maximum, num_steps=num_steps, cast=float)
-		_form_base.__init__(self, converter=converter, **kwargs)
-		if style & wx.SL_HORIZONTAL: gauge_size = wx.Size(length, -1)
-		elif style & wx.SL_VERTICAL: gauge_size = wx.Size(-1, length)
-		else: raise NotImplementedError
-		self._gauge = wx.Gauge(self._parent, range=num_steps, size=gauge_size, style=style)
-		self._add_widget(self._gauge, label, flag=wx.EXPAND)
-
-	def _update(self, value): self._gauge.SetValue(value)
-
-########################################################################
-# Check Box Form
-########################################################################
-class check_box(_form_base):
-	"""
-	Create a check box form.
-
-        Args:
-	    parent: the parent widget
-	    sizer: add this widget to sizer if provided (optional)
-	    proportion: the proportion when added to the sizer (default=0)
-	    flag: the flag argument when added to the sizer (default=wx.EXPAND)
-	    ps: the pubsub object (optional)
-	    key: the pubsub key (optional)
-	    value: the default value (optional)
-	    true: the value for form when checked (default=True)
-	    false: the value for form when unchecked (default=False)
-	    label: title label for this widget (optional)
-	"""
-	def __init__(self, label='', true=True, false=False, **kwargs):
-		_form_base.__init__(self, converter=converters.bool_converter(true=true, false=false), **kwargs)
-		self._check_box = wx.CheckBox(self._parent, style=wx.CHK_2STATE, label=label)
-		self._check_box.Bind(wx.EVT_CHECKBOX, self._handle)
-		self._add_widget(self._check_box)
-
-	def _handle(self, event): self[INT_KEY] = self._check_box.IsChecked()
-	def _update(self, checked): self._check_box.SetValue(checked)
-
-########################################################################
-# Drop Down Chooser Form
-########################################################################
-class drop_down(_chooser_base):
-	"""
-	Create a drop down menu form.
-
-        Args:
-	    parent: the parent widget
-	    sizer: add this widget to sizer if provided (optional)
-	    proportion: the proportion when added to the sizer (default=0)
-	    flag: the flag argument when added to the sizer (default=wx.EXPAND)
-	    ps: the pubsub object (optional)
-	    key: the pubsub key (optional)
-	    value: the default value (optional)
-	    choices: list of possible values
-	    labels: list of labels for each choice (default=choices)
-	    label: title label for this widget (optional)
-	    width: the form width in px (optional)
-	"""
-	def __init__(self, label='', width=-1, **kwargs):
-		_chooser_base.__init__(self, **kwargs)
-		self._drop_down = wx.Choice(self._parent, choices=self._labels, size=wx.Size(width, -1))
-		self._drop_down.Bind(wx.EVT_CHOICE, self._handle)
-		self._add_widget(self._drop_down, label, widget_prop=0, label_prop=1)
-
-	def _handle(self, event): self[INT_KEY] = self._drop_down.GetSelection()
-	def _update(self, i): self._drop_down.SetSelection(i)
-
-########################################################################
-# Button Chooser Form
-#  Circularly move through the choices with each click.
-#  Can be a single-click button with one choice.
-#  Can be a 2-state button with two choices.
-########################################################################
-class button(_chooser_base):
-	"""
-	Create a multi-state button.
-	    parent the parent widget
-	    sizer add this widget to sizer if provided (optional)
-	    proportion the proportion when added to the sizer (default=0)
-	    flag the flag argument when added to the sizer (default=wx.EXPAND)
-	    ps the pubsub object (optional)
-	    key the pubsub key (optional)
-	    value the default value (optional)
-	    choices list of possible values
-	    labels list of labels for each choice (default=choices)
-	    width the width of the button in pixels (optional)
-	    style style arguments (optional)
-	    label title label for this widget (optional)
-	"""
-	def __init__(self, label='', style=0, width=-1, **kwargs):
-		_chooser_base.__init__(self, **kwargs)
-		self._button = wx.Button(self._parent, size=wx.Size(width, -1), style=style)
-		self._button.Bind(wx.EVT_BUTTON, self._handle)
-		self._add_widget(self._button, label, widget_prop=((not style&wx.BU_EXACTFIT) and 1 or 0))
-
-	def _handle(self, event): self[INT_KEY] = (self[INT_KEY] + 1)%len(self._choices) #circularly increment index
-	def _update(self, i): self._button.SetLabel(self._labels[i]); self.Layout()
-
-class toggle_button(button):
-	"""
-	Create a dual-state button.
-	This button will alternate between True and False when clicked.
-
-        Args:
-	    parent: the parent widget
-	    sizer: add this widget to sizer if provided (optional)
-	    proportion: the proportion when added to the sizer (default=0)
-	    flag: the flag argument when added to the sizer (default=wx.EXPAND)
-	    ps: the pubsub object (optional)
-	    key: the pubsub key (optional)
-	    value: the default value (optional)
-	    width: the width of the button in pixels (optional)
-	    style: style arguments (optional)
-	    true_label: the button's label in the true state
-	    false_label: the button's label in the false state
-	"""
-	def __init__(self, true_label='On (click to stop)', false_label='Off (click to start)', **kwargs):
-		button.__init__(self, choices=[True, False], labels=[true_label, false_label], **kwargs)
-
-class single_button(toggle_button):
-	"""
-	Create a single state button.
-	This button will callback() when clicked.
-	For use when state holding is not important.
-
-        Args:
-	    parent: the parent widget
-	    sizer: add this widget to sizer if provided (optional)
-	    proportion: the proportion when added to the sizer (default=0)
-	    flag: the flag argument when added to the sizer (default=wx.EXPAND)
-	    ps: the pubsub object (optional)
-	    key: the pubsub key (optional)
-	    value: the default value (optional)
-	    width: the width of the button in pixels (optional)
-	    style: style arguments (optional)
-	    label: the button's label
-	"""
-	def __init__(self, label='click for callback', **kwargs):
-		toggle_button.__init__(self, true_label=label, false_label=label, value=True, **kwargs)
-
-########################################################################
-# Radio Buttons Chooser Form
-########################################################################
-class radio_buttons(_chooser_base):
-	"""
-	Create a radio button form.
-
-        Args:
-	    parent: the parent widget
-	    sizer: add this widget to sizer if provided (optional)
-	    proportion: the proportion when added to the sizer (default=0)
-	    flag: the flag argument when added to the sizer (default=wx.EXPAND)
-	    ps: the pubsub object (optional)
-	    key: the pubsub key (optional)
-	    value the default value (optional)
-	    choices: list of possible values
-	    labels: list of labels for each choice (default=choices)
-	    major_dimension: the number of rows/cols (default=auto)
-	    label: title label for this widget (optional)
-	    style: useful style args: wx.RA_HORIZONTAL, wx.RA_VERTICAL, wx.NO_BORDER (default=wx.RA_HORIZONTAL)
-	"""
-	def __init__(self, style=wx.RA_HORIZONTAL, label='', major_dimension=0, **kwargs):
-		_chooser_base.__init__(self, **kwargs)
-		#create radio buttons
-		self._radio_buttons = wx.RadioBox(self._parent, choices=self._labels, style=style, label=label, majorDimension=major_dimension)
-		self._radio_buttons.Bind(wx.EVT_RADIOBOX, self._handle)
-		self._add_widget(self._radio_buttons)
-
-	def _handle(self, event): self[INT_KEY] = self._radio_buttons.GetSelection()
-	def _update(self, i): self._radio_buttons.SetSelection(i)
-
-########################################################################
-# Notebook Chooser Form
-#  The notebook pages/tabs are for selecting between choices.
-#  A page must be added to the notebook for each choice.
-########################################################################
-class notebook(_chooser_base):
-	def __init__(self, pages, notebook, **kwargs):
-		_chooser_base.__init__(self, **kwargs)
-		assert len(pages) == len(self._choices)
-		self._notebook = notebook
-		self._notebook.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGING, self._handle)
-		#add pages, setting the label on each tab
-		for i, page in enumerate(pages):
-			self._notebook.AddPage(page, self._labels[i])
-		self._add_widget(self._notebook)
-
-	def _handle(self, event): self[INT_KEY] = event.GetSelection()
-	# SetSelection triggers a page change event (deprecated, breaks on Windows) and ChangeSelection does not
-	def _update(self, i): self._notebook.ChangeSelection(i)
-
-# ----------------------------------------------------------------
-# Stand-alone test application
-# ----------------------------------------------------------------
-
-import wx
-from gnuradio.wxgui import gui
-
-class app_gui (object):
-    def __init__(self, frame, panel, vbox, top_block, options, args):
-
-        def callback(v): print v
-
-        radio_buttons(
-            sizer=vbox,
-            parent=panel,
-            choices=[2, 4, 8, 16],
-            labels=['two', 'four', 'eight', 'sixteen'],
-            value=4,
-            style=wx.RA_HORIZONTAL,
-            label='test radio long string',
-            callback=callback,
-            #major_dimension = 2,
-        )
-
-        radio_buttons(
-            sizer=vbox,
-            parent=panel,
-            choices=[2, 4, 8, 16],
-            labels=['two', 'four', 'eight', 'sixteen'],
-            value=4,
-            style=wx.RA_VERTICAL,
-            label='test radio long string',
-            callback=callback,
-            #major_dimension = 2,
-        )
-
-        radio_buttons(
-            sizer=vbox,
-            parent=panel,
-            choices=[2, 4, 8, 16],
-            labels=['two', 'four', 'eight', 'sixteen'],
-            value=4,
-            style=wx.RA_VERTICAL | wx.NO_BORDER,
-            callback=callback,
-            #major_dimension = 2,
-        )
-
-        button(
-            sizer=vbox,
-            parent=panel,
-            choices=[2, 4, 8, 16],
-            labels=['two', 'four', 'eight', 'sixteen'],
-            value=2,
-            label='button value',
-            callback=callback,
-            #width=100,
-        )
-
-
-        drop_down(
-            sizer=vbox,
-            parent=panel,
-            choices=[2, 4, 8, 16],
-            value=2,
-            label='Choose One',
-            callback=callback,
-        )
-        check_box(
-            sizer=vbox,
-            parent=panel,
-            value=False,
-            label='check me',
-            callback=callback,
-        )
-        text_box(
-            sizer=vbox,
-            parent=panel,
-            value=3,
-            label='text box',
-            callback=callback,
-            width=200,
-        )
-
-        static_text(
-            sizer=vbox,
-            parent=panel,
-            value='bob',
-            label='static text',
-            width=-1,
-            bold=True,
-        )
-
-        slider(
-            sizer=vbox,
-            parent=panel,
-            value=12,
-            label='slider',
-            callback=callback,
-        )
-
-        log_slider(
-            sizer=vbox,
-            parent=panel,
-            value=12,
-            label='slider',
-            callback=callback,
-        )
-
-        slider(
-            sizer=vbox,
-            parent=panel,
-            value=12,
-            label='slider',
-            callback=callback,
-            style=wx.SL_VERTICAL,
-            length=30,
-        )
-
-        toggle_button(
-            sizer=vbox,
-            parent=panel,
-            value=True,
-            label='toggle it',
-            callback=callback,
-        )
-
-        single_button(
-            sizer=vbox,
-            parent=panel,
-            label='sig test',
-            callback=callback,
-        )
-
-if __name__ == "__main__":
-    try:
-
-        # Create the GUI application
-        app = gui.app(
-                      gui=app_gui,                     # User interface class
-                      title="Test Forms",  # Top window title
-                      )
-
-        # And run it
-        app.MainLoop()
-
-    except RuntimeError, e:
-        print e
-        sys.exit(1)
diff --git a/gr-wxgui/python/wxgui/gui.py b/gr-wxgui/python/wxgui/gui.py
deleted file mode 100644
index ccc773eabf..0000000000
--- a/gr-wxgui/python/wxgui/gui.py
+++ /dev/null
@@ -1,135 +0,0 @@
-#
-# Copyright 2009 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-import wx
-from gnuradio import gr
-
-#
-# Top-level display panel with vertical box sizer.  User does not create or
-# subclass this class; rather, the user supplies his own class constructor
-# that gets invoked with needed parameters.
-#
-class top_panel(wx.Panel):
-    def __init__(self, frame, top_block, gui, options, args):
-        wx.Panel.__init__(self, frame, -1)
-        vbox = wx.BoxSizer(wx.VERTICAL)
-
-        # Create the user's GUI class
-        if gui is not None:
-            self.gui = gui(frame,          # Top-level window frame
-                           self,           # Parent class for user created windows
-                           vbox,           # Sizer for user to add windows to
-                           top_block,      # GUI-unaware flowgraph to manipulate
-                           options,        # Command-line options
-                           args)           # Command-line arguments
-
-        else:
-            # User hasn't made their own GUI, create our default
-            # We don't have a default GUI yet either :)
-            p = wx.Panel(self)
-            p.SetSize((640,480))
-            vbox.Add(p, 1, wx.EXPAND)
-
-        self.SetSizer(vbox)
-        self.SetAutoLayout(True)
-        vbox.Fit(self)
-
-    def shutdown(self):
-        try:
-            self.gui.shutdown()
-        except AttributeError:
-            pass
-
-#
-# Top-level window frame with menu and status bars.
-#
-class top_frame(wx.Frame):
-    def __init__ (self, top_block, gui, options, args,
-                  title, nstatus, start, realtime):
-
-        wx.Frame.__init__(self, None, -1, title)
-        self.top_block = top_block
-
-        self.CreateStatusBar(nstatus)
-        mainmenu = wx.MenuBar()
-        self.SetMenuBar(mainmenu)
-
-        menu = wx.Menu()
-
-        item = menu.Append(200, 'E&xit', 'Exit Application') # FIXME magic ID
-        self.Bind(wx.EVT_MENU, self.OnCloseWindow, item)
-        mainmenu.Append(menu, "&File")
-        self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)
-
-        # Create main panel, creates user GUI class with supplied parameters
-        self.panel = top_panel(self, top_block, gui, options, args)
-
-        vbox = wx.BoxSizer(wx.VERTICAL)
-        vbox.Add(self.panel, 1, wx.EXPAND)
-        self.SetSizer(vbox)
-        self.SetAutoLayout(True)
-        vbox.Fit(self)
-
-        if realtime:
-            if gr.enable_realtime_scheduling() != gr.RT_OK:
-                self.SetStatusText("Failed to enable realtime scheduling")
-
-        if start and self.top_block is not None:
-            self.top_block.start()
-
-    def OnCloseWindow(self, event):
-        # Give user API a chance to do something
-        self.panel.shutdown()
-
-        # Stop flowgraph as a convenience
-        self.SetStatusText("Ensuring flowgraph has completed before exiting...")
-        if self.top_block is not None:
-            self.top_block.stop()
-            self.top_block.wait()
-
-        self.Destroy()
-
-
-#
-# Top-level wxPython application object.  User creates or subclasses this
-# in their GUI script.
-#
-class app(wx.App):
-    def __init__ (self, top_block=None, gui=None, options=None, args=None,
-                  title="GNU Radio", nstatus=1, start=False, realtime=False):
-        self.top_block = top_block
-        self.gui = gui
-        self.options = options
-        self.args = args
-        self.title = title
-        self.nstatus = nstatus
-        self.start = start
-        self.realtime = realtime
-
-        wx.App.__init__ (self, redirect=False)
-
-    def OnInit(self):
-        # Pass user parameters to top window frame
-        frame = top_frame(self.top_block, self.gui, self.options, self.args,
-                          self.title, self.nstatus, self.start, self.realtime)
-        frame.Show(True)
-        self.SetTopWindow(frame)
-        return True
diff --git a/gr-wxgui/python/wxgui/histo_window.py b/gr-wxgui/python/wxgui/histo_window.py
deleted file mode 100644
index 424ee7bbdb..0000000000
--- a/gr-wxgui/python/wxgui/histo_window.py
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Copyright 2009 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-##################################################
-# Imports
-##################################################
-import plotter
-import common
-import wx
-import numpy
-import math
-import pubsub
-from constants import *
-from gnuradio import gr #for gr.prefs
-import forms
-
-##################################################
-# Constants
-##################################################
-DEFAULT_WIN_SIZE = (600, 300)
-
-##################################################
-# histo window control panel
-##################################################
-class control_panel(wx.Panel):
-	"""
-	A control panel with wx widgits to control the plotter and histo sink.
-	"""
-
-	def __init__(self, parent):
-		"""
-		Create a new control panel.
-
-		Args:
-		    parent: the wx parent window
-		"""
-		self.parent = parent
-		wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
-		parent[SHOW_CONTROL_PANEL_KEY] = True
-		parent.subscribe(SHOW_CONTROL_PANEL_KEY, self.Show)
-		control_box = wx.BoxSizer(wx.VERTICAL)
-		SIZE = (100, -1)
-		control_box = forms.static_box_sizer(
-			parent=self, label='Options',
-			bold=True, orient=wx.VERTICAL,
-		)
-		#num bins
-		control_box.AddStretchSpacer()
-		forms.text_box(
-			sizer=control_box, parent=self, label='Num Bins',
-			converter=forms.int_converter(),
-			ps=parent, key=NUM_BINS_KEY,
-		)
-		#frame size
-		control_box.AddStretchSpacer()
-		forms.text_box(
-			sizer=control_box, parent=self, label='Frame Size',
-			converter=forms.int_converter(),
-			ps=parent, key=FRAME_SIZE_KEY,
-		)
-		#run/stop
-		control_box.AddStretchSpacer()
-		forms.toggle_button(
-			sizer=control_box, parent=self,
-			true_label='Stop', false_label='Run',
-			ps=parent, key=RUNNING_KEY,
-		)
-		#set sizer
-		self.SetSizerAndFit(control_box)
-
-##################################################
-# histo window with plotter and control panel
-##################################################
-class histo_window(wx.Panel, pubsub.pubsub):
-	def __init__(
-		self,
-		parent,
-		controller,
-		size,
-		title,
-		maximum_key,
-		minimum_key,
-		num_bins_key,
-		frame_size_key,
-		msg_key,
-	):
-		pubsub.pubsub.__init__(self)
-		#setup
-		self.samples = list()
-		#proxy the keys
-		self.proxy(MAXIMUM_KEY, controller, maximum_key)
-		self.proxy(MINIMUM_KEY, controller, minimum_key)
-		self.proxy(NUM_BINS_KEY, controller, num_bins_key)
-		self.proxy(FRAME_SIZE_KEY, controller, frame_size_key)
-		self.proxy(MSG_KEY, controller, msg_key)
-		#initialize values
-		self[RUNNING_KEY] = True
-		self[X_DIVS_KEY] = 8
-		self[Y_DIVS_KEY] = 4
-		#init panel and plot
-		wx.Panel.__init__(self, parent, style=wx.SIMPLE_BORDER)
-		self.plotter = plotter.bar_plotter(self)
-		self.plotter.SetSize(wx.Size(*size))
-		self.plotter.SetSizeHints(*size)
-		self.plotter.set_title(title)
-		self.plotter.enable_point_label(True)
-		self.plotter.enable_grid_lines(False)
-		#setup the box with plot and controls
-		self.control_panel = control_panel(self)
-		main_box = wx.BoxSizer(wx.HORIZONTAL)
-		main_box.Add(self.plotter, 1, wx.EXPAND)
-		main_box.Add(self.control_panel, 0, wx.EXPAND)
-		self.SetSizerAndFit(main_box)
-		#register events
-		self.subscribe(MSG_KEY, self.handle_msg)
-		self.subscribe(X_DIVS_KEY, self.update_grid)
-		self.subscribe(Y_DIVS_KEY, self.update_grid)
-
-	def handle_msg(self, msg):
-		"""
-		Handle the message from the fft sink message queue.
-
-		Args:
-		    msg: the frame as a character array
-		"""
-		if not self[RUNNING_KEY]: return
-		#convert to floating point numbers
-		self.samples = 100*numpy.fromstring(msg, numpy.float32)[:self[NUM_BINS_KEY]] #only take first frame
-		self.plotter.set_bars(
-			bars=self.samples,
-			bar_width=0.6,
-			color_spec=(0, 0, 1),
-		)
-		self.update_grid()
-
-	def update_grid(self):
-		if not len(self.samples): return
-		#calculate the maximum y value
-		y_off = math.ceil(numpy.max(self.samples))
-		y_off = min(max(y_off, 1.0), 100.0) #between 1% and 100%
-		#update the x grid
-		self.plotter.set_x_grid(
-			self[MINIMUM_KEY], self[MAXIMUM_KEY],
-			common.get_clean_num((self[MAXIMUM_KEY] - self[MINIMUM_KEY])/self[X_DIVS_KEY]),
-		)
-		self.plotter.set_x_label('Counts')
-		#update the y grid
-		self.plotter.set_y_grid(0, y_off, y_off/self[Y_DIVS_KEY])
-		self.plotter.set_y_label('Frequency', '%')
-		self.plotter.update()
diff --git a/gr-wxgui/python/wxgui/histosink_gl.py b/gr-wxgui/python/wxgui/histosink_gl.py
deleted file mode 100644
index 2126d63191..0000000000
--- a/gr-wxgui/python/wxgui/histosink_gl.py
+++ /dev/null
@@ -1,113 +0,0 @@
-#
-# Copyright 2009,2012 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-##################################################
-# Imports
-##################################################
-import histo_window
-import common
-from gnuradio import gr
-from gnuradio import analog
-from gnuradio import blocks
-from gnuradio import wxgui
-from pubsub import pubsub
-from constants import *
-
-##################################################
-# histo sink block (wrapper for old wxgui)
-##################################################
-class histo_sink_f(gr.hier_block2, common.wxgui_hb):
-	"""
-	A histogram block and a gui window.
-	"""
-
-	def __init__(
-		self,
-		parent,
-		size=histo_window.DEFAULT_WIN_SIZE,
-		title='',
-		num_bins=11,
-		frame_size=1000,
-	):
-		#init
-		gr.hier_block2.__init__(
-			self,
-			"histo_sink",
-			gr.io_signature(1, 1, gr.sizeof_float),
-			gr.io_signature(0, 0, 0),
-		)
-		#blocks
-		msgq = gr.msg_queue(2)
-		histo = wxgui.histo_sink_f(msgq)
-		histo.set_num_bins(num_bins)
-		histo.set_frame_size(frame_size)
-		#controller
-		self.controller = pubsub()
-		self.controller.subscribe(NUM_BINS_KEY, histo.set_num_bins)
-		self.controller.publish(NUM_BINS_KEY, histo.get_num_bins)
-		self.controller.subscribe(FRAME_SIZE_KEY, histo.set_frame_size)
-		self.controller.publish(FRAME_SIZE_KEY, histo.get_frame_size)
-		#start input watcher
-		common.input_watcher(msgq, self.controller, MSG_KEY, arg1_key=MINIMUM_KEY, arg2_key=MAXIMUM_KEY)
-		#create window
-		self.win = histo_window.histo_window(
-			parent=parent,
-			controller=self.controller,
-			size=size,
-			title=title,
-			maximum_key=MAXIMUM_KEY,
-			minimum_key=MINIMUM_KEY,
-			num_bins_key=NUM_BINS_KEY,
-			frame_size_key=FRAME_SIZE_KEY,
-			msg_key=MSG_KEY,
-		)
-		common.register_access_methods(self, self.win)
-		#connect
-		self.wxgui_connect(self, histo)
-
-# ----------------------------------------------------------------
-# Standalone test app
-# ----------------------------------------------------------------
-
-import wx
-from gnuradio.wxgui import stdgui2
-
-class test_app_block (stdgui2.std_top_block):
-    def __init__(self, frame, panel, vbox, argv):
-        stdgui2.std_top_block.__init__ (self, frame, panel, vbox, argv)
-
-        # build our flow graph
-        input_rate = 20.48e3
-
-        src2 = analog.sig_source_f(input_rate, analog.GR_SIN_WAVE, 2e3, 1)
-        #src2 = analog.sig_source_f(input_rate, analog.GR_CONST_WAVE, 5.75e3, 1)
-        thr2 = blocks.throttle(gr.sizeof_float, input_rate)
-        sink2 = histo_sink_f(panel, title="Data", num_bins=31, frame_size=1000)
-        vbox.Add(sink2.win, 1, wx.EXPAND)
-
-        self.connect(src2, thr2, sink2)
-
-def main ():
-    app = stdgui2.stdapp(test_app_block, "Histo Sink Test App")
-    app.MainLoop()
-
-if __name__ == '__main__':
-    main()
diff --git a/gr-wxgui/python/wxgui/number_window.py b/gr-wxgui/python/wxgui/number_window.py
deleted file mode 100644
index 2e54f8460f..0000000000
--- a/gr-wxgui/python/wxgui/number_window.py
+++ /dev/null
@@ -1,219 +0,0 @@
-#
-# Copyright 2008 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-##################################################
-# Imports
-##################################################
-import common
-import numpy
-import wx
-import pubsub
-from constants import *
-from gnuradio import gr #for gr.prefs
-import forms
-
-##################################################
-# Constants
-##################################################
-NEG_INF = float('-inf')
-SLIDER_STEPS = 100
-AVG_ALPHA_MIN_EXP, AVG_ALPHA_MAX_EXP = -3, 0
-DEFAULT_NUMBER_RATE = gr.prefs().get_long('wxgui', 'number_rate', 5)
-DEFAULT_WIN_SIZE = (300, 300)
-DEFAULT_GAUGE_RANGE = 1000
-VALUE_REPR_KEY = 'value_repr'
-VALUE_REAL_KEY = 'value_real'
-VALUE_IMAG_KEY = 'value_imag'
-
-##################################################
-# Number window control panel
-##################################################
-class control_panel(wx.Panel):
-	"""
-	A control panel with wx widgits to control the averaging.
-	"""
-
-	def __init__(self, parent):
-		"""
-		Create a new control panel.
-
-		Args:
-		    parent: the wx parent window
-		"""
-		self.parent = parent
-		wx.Panel.__init__(self, parent)
-		parent[SHOW_CONTROL_PANEL_KEY] = True
-		parent.subscribe(SHOW_CONTROL_PANEL_KEY, self.Show)
-		control_box = wx.BoxSizer(wx.VERTICAL)
-		#checkboxes for average and peak hold
-		control_box.AddStretchSpacer()
-		options_box = forms.static_box_sizer(
-			parent=self, sizer=control_box, label='Options',
-			bold=True, orient=wx.VERTICAL,
-		)
-		forms.check_box(
-			sizer=options_box, parent=self, label='Peak Hold',
-			ps=parent, key=PEAK_HOLD_KEY,
-		)
-		forms.check_box(
-			sizer=options_box, parent=self, label='Average',
-			ps=parent, key=AVERAGE_KEY,
-		)
-		#static text and slider for averaging
-		avg_alpha_text = forms.static_text(
-			sizer=options_box, parent=self, label='Avg Alpha',
-			converter=forms.float_converter(lambda x: '%.4f'%x),
-			ps=parent, key=AVG_ALPHA_KEY, width=50,
-		)
-		avg_alpha_slider = forms.log_slider(
-			sizer=options_box, parent=self,
-			min_exp=AVG_ALPHA_MIN_EXP,
-			max_exp=AVG_ALPHA_MAX_EXP,
-			num_steps=SLIDER_STEPS,
-			ps=parent, key=AVG_ALPHA_KEY,
-		)
-		for widget in (avg_alpha_text, avg_alpha_slider):
-			parent.subscribe(AVERAGE_KEY, widget.Enable)
-			widget.Enable(parent[AVERAGE_KEY])
-		#run/stop
-		control_box.AddStretchSpacer()
-		forms.toggle_button(
-			sizer=control_box, parent=self,
-			true_label='Stop', false_label='Run',
-			ps=parent, key=RUNNING_KEY,
-		)
-		#set sizer
-		self.SetSizerAndFit(control_box)
-
-##################################################
-# Numbersink window with label and gauges
-##################################################
-class number_window(wx.Panel, pubsub.pubsub):
-	def __init__(
-		self,
-		parent,
-		controller,
-		size,
-		title,
-		units,
-		show_gauge,
-		real,
-		minval,
-		maxval,
-		decimal_places,
-		average_key,
-		avg_alpha_key,
-		peak_hold,
-		msg_key,
-		sample_rate_key,
-	):
-		pubsub.pubsub.__init__(self)
-		wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
-		#setup
-		self.peak_val_real = NEG_INF
-		self.peak_val_imag = NEG_INF
-		self.real = real
-		self.units = units
-		self.decimal_places = decimal_places
-		#proxy the keys
-		self.proxy(MSG_KEY, controller, msg_key)
-		self.proxy(AVERAGE_KEY, controller, average_key)
-		self.proxy(AVG_ALPHA_KEY, controller, avg_alpha_key)
-		self.proxy(SAMPLE_RATE_KEY, controller, sample_rate_key)
-		#initialize values
-		self[PEAK_HOLD_KEY] = peak_hold
-		self[RUNNING_KEY] = True
-		self[VALUE_REAL_KEY] = minval
-		self[VALUE_IMAG_KEY] = minval
-		#setup the box with display and controls
-		self.control_panel = control_panel(self)
-		main_box = wx.BoxSizer(wx.HORIZONTAL)
-		sizer = forms.static_box_sizer(
-			parent=self, sizer=main_box, label=title,
-			bold=True, orient=wx.VERTICAL, proportion=1,
-		)
-		main_box.Add(self.control_panel, 0, wx.EXPAND)
-		sizer.AddStretchSpacer()
-		forms.static_text(
-			parent=self, sizer=sizer,
-			ps=self, key=VALUE_REPR_KEY, width=size[0],
-			converter=forms.str_converter(),
-		)
-		sizer.AddStretchSpacer()
-		self.gauge_real = forms.gauge(
-			parent=self, sizer=sizer, style=wx.GA_HORIZONTAL,
-			ps=self, key=VALUE_REAL_KEY, length=size[0],
-			minimum=minval, maximum=maxval, num_steps=DEFAULT_GAUGE_RANGE,
-		)
-		self.gauge_imag = forms.gauge(
-			parent=self, sizer=sizer, style=wx.GA_HORIZONTAL,
-			ps=self, key=VALUE_IMAG_KEY, length=size[0],
-			minimum=minval, maximum=maxval, num_steps=DEFAULT_GAUGE_RANGE,
-		)
-		#hide/show gauges
-		self.show_gauges(show_gauge)
-		self.SetSizerAndFit(main_box)
-		#register events
-		self.subscribe(MSG_KEY, self.handle_msg)
-
-	def show_gauges(self, show_gauge):
-		"""
-		Show or hide the gauges.
-		If this is real, never show the imaginary gauge.
-
-		Args:
-		    show_gauge: true to show
-		"""
-		self.gauge_real.ShowItems(show_gauge)
-		self.gauge_imag.ShowItems(show_gauge and not self.real)
-
-	def handle_msg(self, msg):
-		"""
-		Handle a message from the message queue.
-		Convert the string based message into a float or complex.
-		If more than one number was read, only take the last number.
-		Perform peak hold operations, set the gauges and display.
-
-		Args:
-		    event: event.data is the number sample as a character array
-		"""
-		if not self[RUNNING_KEY]: return
-		format_string = "%%.%df"%self.decimal_places
-		if self.real:
-			sample = numpy.fromstring(msg, numpy.float32)[-1]
-			if self[PEAK_HOLD_KEY]: sample = self.peak_val_real = max(self.peak_val_real, sample)
-			label_text = "%s %s"%(format_string%sample, self.units)
-			self[VALUE_REAL_KEY] = sample
-		else:
-			sample = numpy.fromstring(msg, numpy.complex64)[-1]
-			if self[PEAK_HOLD_KEY]:
-				self.peak_val_real = max(self.peak_val_real, sample.real)
-				self.peak_val_imag = max(self.peak_val_imag, sample.imag)
-				sample = self.peak_val_real + self.peak_val_imag*1j
-			label_text = "%s + %sj %s"%(format_string%sample.real, format_string%sample.imag, self.units)
-			self[VALUE_REAL_KEY] = sample.real
-			self[VALUE_IMAG_KEY] = sample.imag
-		#set label text
-		self[VALUE_REPR_KEY] = label_text
-		#clear peak hold
-		if not self[PEAK_HOLD_KEY]:
-			self.peak_val_real = NEG_INF
-			self.peak_val_imag = NEG_INF
diff --git a/gr-wxgui/python/wxgui/numbersink2.py b/gr-wxgui/python/wxgui/numbersink2.py
deleted file mode 100644
index 62a096e112..0000000000
--- a/gr-wxgui/python/wxgui/numbersink2.py
+++ /dev/null
@@ -1,173 +0,0 @@
-#
-# Copyright 2008,2012 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-##################################################
-# Imports
-##################################################
-import number_window
-import common
-from gnuradio import gr, filter
-from gnuradio import analog
-from gnuradio import blocks
-from pubsub import pubsub
-from constants import *
-
-##################################################
-# Number sink block (wrapper for old wxgui)
-##################################################
-class _number_sink_base(gr.hier_block2, common.wxgui_hb):
-	"""
-	An decimator block with a number window display
-	"""
-
-	def __init__(
-		self,
-		parent,
-		unit='units',
-		minval=0,
-		maxval=1,
-		factor=1,
-		decimal_places=3,
-		ref_level=0,
-		sample_rate=1,
-		number_rate=number_window.DEFAULT_NUMBER_RATE,
-		average=False,
-		avg_alpha=None,
-		label='Number Plot',
-		size=number_window.DEFAULT_WIN_SIZE,
-		peak_hold=False,
-		show_gauge=True,
-		**kwargs #catchall for backwards compatibility
-	):
-		#ensure avg alpha
-		if avg_alpha is None: avg_alpha = 2.0/number_rate
-		#init
-		gr.hier_block2.__init__(
-			self,
-			"number_sink",
-			gr.io_signature(1, 1, self._item_size),
-			gr.io_signature(0, 0, 0),
-		)
-		#blocks
-		sd = blocks.stream_to_vector_decimator(
-			item_size=self._item_size,
-			sample_rate=sample_rate,
-			vec_rate=number_rate,
-			vec_len=1,
-		)
-		if self._real:
-			mult = blocks.multiply_const_ff(factor)
-			add = blocks.add_const_ff(ref_level)
-			avg = filter.single_pole_iir_filter_ff(1.0)
-		else:
-			mult = blocks.multiply_const_cc(factor)
-			add = blocks.add_const_cc(ref_level)
-			avg = filter.single_pole_iir_filter_cc(1.0)
-		msgq = gr.msg_queue(2)
-		sink = blocks.message_sink(self._item_size, msgq, True)
-		#controller
-		self.controller = pubsub()
-		self.controller.subscribe(SAMPLE_RATE_KEY, sd.set_sample_rate)
-		self.controller.publish(SAMPLE_RATE_KEY, sd.sample_rate)
-		self.controller[AVERAGE_KEY] = average
-		self.controller[AVG_ALPHA_KEY] = avg_alpha
-		def update_avg(*args):
-			if self.controller[AVERAGE_KEY]: avg.set_taps(self.controller[AVG_ALPHA_KEY])
-			else: avg.set_taps(1.0)
-		update_avg()
-		self.controller.subscribe(AVERAGE_KEY, update_avg)
-		self.controller.subscribe(AVG_ALPHA_KEY, update_avg)
-		#start input watcher
-		common.input_watcher(msgq, self.controller, MSG_KEY)
-		#create window
-		self.win = number_window.number_window(
-			parent=parent,
-			controller=self.controller,
-			size=size,
-			title=label,
-			units=unit,
-			real=self._real,
-			minval=minval,
-			maxval=maxval,
-			decimal_places=decimal_places,
-			show_gauge=show_gauge,
-			average_key=AVERAGE_KEY,
-			avg_alpha_key=AVG_ALPHA_KEY,
-			peak_hold=peak_hold,
-			msg_key=MSG_KEY,
-			sample_rate_key=SAMPLE_RATE_KEY,
-		)
-		common.register_access_methods(self, self.controller)
-		#backwards compadibility
-		self.set_show_gauge = self.win.show_gauges
-		#connect
-		self.wxgui_connect(self, sd, mult, add, avg, sink)
-
-class number_sink_f(_number_sink_base):
-	_item_size = gr.sizeof_float
-	_real = True
-
-class number_sink_c(_number_sink_base):
-	_item_size = gr.sizeof_gr_complex
-	_real = False
-
-# ----------------------------------------------------------------
-# Standalone test app
-# ----------------------------------------------------------------
-
-import wx
-from gnuradio.wxgui import stdgui2
-
-class test_app_flow_graph(stdgui2.std_top_block):
-    def __init__(self, frame, panel, vbox, argv):
-        stdgui2.std_top_block.__init__(self, frame, panel, vbox, argv)
-
-        # build our flow graph
-        input_rate = 20.48e3
-
-        # Generate a real and complex sinusoids
-        src1 = analog.sig_source_f(input_rate, analog.GR_SIN_WAVE, 2.21e3, 1)
-        src2 = analog.sig_source_c(input_rate, analog.GR_SIN_WAVE, 2.21e3, 1)
-
-        # We add these throttle blocks so that this demo doesn't
-        # suck down all the CPU available.  Normally you wouldn't use these.
-        thr1 = blocks.throttle(gr.sizeof_float, input_rate)
-        thr2 = blocks.throttle(gr.sizeof_gr_complex, input_rate)
-
-        sink1 = number_sink_f(panel, unit='V',label="Real Data", avg_alpha=0.001,
-			      sample_rate=input_rate, minval=-1, maxval=1,
-			      ref_level=0, decimal_places=3)
-        vbox.Add(sink1.win, 1, wx.EXPAND)
-        sink2 = number_sink_c(panel, unit='V',label="Complex Data", avg_alpha=0.001,
-			      sample_rate=input_rate, minval=-1, maxval=1,
-			      ref_level=0, decimal_places=3)
-        vbox.Add(sink2.win, 1, wx.EXPAND)
-
-        self.connect(src1, thr1, sink1)
-        self.connect(src2, thr2, sink2)
-
-def main ():
-    app = stdgui2.stdapp(test_app_flow_graph, "Number Sink Test App")
-    app.MainLoop()
-
-if __name__ == '__main__':
-    main()
-
diff --git a/gr-wxgui/python/wxgui/plot.py b/gr-wxgui/python/wxgui/plot.py
deleted file mode 100644
index 041a2a7a50..0000000000
--- a/gr-wxgui/python/wxgui/plot.py
+++ /dev/null
@@ -1,1834 +0,0 @@
-#-----------------------------------------------------------------------------
-# Name:        wx.lib.plot.py
-# Purpose:     Line, Bar and Scatter Graphs
-#
-# Author:      Gordon Williams
-#
-# Created:     2003/11/03
-# RCS-ID:      $Id$
-# Copyright:   (c) 2002,2007,2010
-# Licence:     Use as you wish.
-#-----------------------------------------------------------------------------
-# 12/15/2003 - Jeff Grimmett (grimmtooth@softhome.net)
-#
-# o 2.5 compatability update.
-# o Renamed to plot.py in the wx.lib directory.
-# o Reworked test frame to work with wx demo framework. This saves a bit
-#   of tedious cut and paste, and the test app is excellent.
-#
-# 12/18/2003 - Jeff Grimmett (grimmtooth@softhome.net)
-#
-# o wxScrolledMessageDialog -> ScrolledMessageDialog
-#
-# Oct 6, 2004  Gordon Williams (g_will@cyberus.ca)
-#   - Added bar graph demo
-#   - Modified line end shape from round to square.
-#   - Removed FloatDCWrapper for conversion to ints and ints in arguments
-#
-# Oct 15, 2004  Gordon Williams (g_will@cyberus.ca)
-#   - Imported modules given leading underscore to name.
-#   - Added Cursor Line Tracking and User Point Labels.
-#   - Demo for Cursor Line Tracking and Point Labels.
-#   - Size of plot preview frame adjusted to show page better.
-#   - Added helper functions PositionUserToScreen and PositionScreenToUser in PlotCanvas.
-#   - Added functions GetClosestPoints (all curves) and GetClosestPoint (only closest curve)
-#       can be in either user coords or screen coords.
-#
-# May 27, 2007 Johnathan Corgan (jcorgan@corganenterprises.com)
-#   - Converted from numarray to numpy
-#
-# Apr 23, 2010 Martin Dudok van Heel (http://www.olifantasia.com/gnuradio/contact_olifantasia.gif)
-#   - Added Persistence option (emulate after glow of an analog CRT display using IIR)
-
-"""
-This is a simple light weight plotting module that can be used with
-Boa or easily integrated into your own wxPython application.  The
-emphasis is on small size and fast plotting for large data sets.  It
-has a reasonable number of features to do line and scatter graphs
-easily as well as simple bar graphs.  It is not as sophisticated or
-as powerful as SciPy Plt or Chaco.  Both of these are great packages
-but consume huge amounts of computer resources for simple plots.
-They can be found at http://scipy.com
-
-This file contains two parts; first the re-usable library stuff, then,
-after a "if __name__=='__main__'" test, a simple frame and a few default
-plots for examples and testing.
-
-Based on wxPlotCanvas
-Written by K.Hinsen, R. Srinivasan;
-Ported to wxPython Harm van der Heijden, feb 1999
-
-Major Additions Gordon Williams Feb. 2003 (g_will@cyberus.ca)
-    -More style options
-    -Zooming using mouse 'rubber band'
-    -Scroll left, right
-    -Grid(graticule)
-    -Printing, preview, and page set up (margins)
-    -Axis and title labels
-    -Cursor xy axis values
-    -Doc strings and lots of comments
-    -Optimizations for large number of points
-    -Legends
-
-Did a lot of work here to speed markers up. Only a factor of 4
-improvement though. Lines are much faster than markers, especially
-filled markers.  Stay away from circles and triangles unless you
-only have a few thousand points.
-
-Times for 25,000 points
-Line - 0.078 sec
-Markers
-Square -                   0.22 sec
-dot -                      0.10
-circle -                   0.87
-cross,plus -               0.28
-triangle, triangle_down -  0.90
-
-Thanks to Chris Barker for getting this version working on Linux.
-
-Zooming controls with mouse (when enabled):
-    Left mouse drag - Zoom box.
-    Left mouse double click - reset zoom.
-    Right mouse click - zoom out centred on click location.
-"""
-
-import  string as _string
-import  time as _time
-import  wx
-
-# Needs numpy or numarray
-try:
-    import numpy as _numpy
-except:
-    try:
-        import numarray as _numpy  #if numarray is used it is renamed numpy
-    except:
-        msg= """
-        This module requires the numpy or numarray module,
-        which could not be imported.  It probably is not installed
-        (it's not part of the standard Python distribution). See the
-        Python site (http://www.python.org) for information on
-        downloading source or binaries."""
-        raise ImportError, "numpy or numarray not found. \n" + msg
-
-
-
-#
-# Plotting classes...
-#
-class PolyPoints:
-    """Base Class for lines and markers
-        - All methods are private.
-    """
-
-    def __init__(self, points, attr):
-        self.points = _numpy.array(points)
-        self.currentScale= (1,1)
-        self.currentShift= (0,0)
-        self.scaled = self.points
-        self.attributes = {}
-        self.attributes.update(self._attributes)
-        for name, value in attr.items():
-            if name not in self._attributes.keys():
-                raise KeyError, "Style attribute incorrect. Should be one of %s" % self._attributes.keys()
-            self.attributes[name] = value
-
-    def boundingBox(self):
-        if len(self.points) == 0:
-            # no curves to draw
-            # defaults to (-1,-1) and (1,1) but axis can be set in Draw
-            minXY= _numpy.array([-1,-1])
-            maxXY= _numpy.array([ 1, 1])
-        else:
-            minXY= _numpy.minimum.reduce(self.points)
-            maxXY= _numpy.maximum.reduce(self.points)
-        return minXY, maxXY
-
-    def scaleAndShift(self, scale=(1,1), shift=(0,0)):
-        if len(self.points) == 0:
-            # no curves to draw
-            return
-        if (scale is not self.currentScale) or (shift is not self.currentShift):
-            # update point scaling
-            self.scaled = scale*self.points+shift
-            self.currentScale= scale
-            self.currentShift= shift
-        # else unchanged use the current scaling
-
-    def getLegend(self):
-        return self.attributes['legend']
-
-    def getClosestPoint(self, pntXY, pointScaled= True):
-        """Returns the index of closest point on the curve, pointXY, scaledXY, distance
-            x, y in user coords
-            if pointScaled == True based on screen coords
-            if pointScaled == False based on user coords
-        """
-        if pointScaled == True:
-            #Using screen coords
-            p = self.scaled
-            pxy = self.currentScale * _numpy.array(pntXY)+ self.currentShift
-        else:
-            #Using user coords
-            p = self.points
-            pxy = _numpy.array(pntXY)
-        #determine distance for each point
-        d= _numpy.sqrt(_numpy.add.reduce((p-pxy)**2,1)) #sqrt(dx^2+dy^2)
-        pntIndex = _numpy.argmin(d)
-        dist = d[pntIndex]
-        return [pntIndex, self.points[pntIndex], self.scaled[pntIndex], dist]
-
-
-class PolyLine(PolyPoints):
-    """Class to define line type and style
-        - All methods except __init__ are private.
-    """
-
-    _attributes = {'colour': 'black',
-                   'width': 1,
-                   'style': wx.SOLID,
-                   'legend': ''}
-
-    def __init__(self, points, **attr):
-        """Creates PolyLine object
-            points - sequence (array, tuple or list) of (x,y) points making up line
-            **attr - key word attributes
-                Defaults:
-                    'colour'= 'black',          - wx.Pen Colour any wx.NamedColour
-                    'width'= 1,                 - Pen width
-                    'style'= wx.SOLID,          - wx.Pen style
-                    'legend'= ''                - Line Legend to display
-        """
-        PolyPoints.__init__(self, points, attr)
-
-    def draw(self, dc, printerScale, coord= None):
-        colour = self.attributes['colour']
-        width = self.attributes['width'] * printerScale
-        style= self.attributes['style']
-        pen = wx.Pen(wx.NamedColour(colour), width, style)
-        pen.SetCap(wx.CAP_BUTT)
-        dc.SetPen(pen)
-        if coord == None:
-            dc.DrawLines(self.scaled)
-        else:
-            dc.DrawLines(coord) # draw legend line
-
-    def getSymExtent(self, printerScale):
-        """Width and Height of Marker"""
-        h= self.attributes['width'] * printerScale
-        w= 5 * h
-        return (w,h)
-
-
-class PolyMarker(PolyPoints):
-    """Class to define marker type and style
-        - All methods except __init__ are private.
-    """
-
-    _attributes = {'colour': 'black',
-                   'width': 1,
-                   'size': 2,
-                   'fillcolour': None,
-                   'fillstyle': wx.SOLID,
-                   'marker': 'circle',
-                   'legend': ''}
-
-    def __init__(self, points, **attr):
-        """Creates PolyMarker object
-        points - sequence (array, tuple or list) of (x,y) points
-        **attr - key word attributes
-            Defaults:
-                'colour'= 'black',          - wx.Pen Colour any wx.NamedColour
-                'width'= 1,                 - Pen width
-                'size'= 2,                  - Marker size
-                'fillcolour'= same as colour,      - wx.Brush Colour any wx.NamedColour
-                'fillstyle'= wx.SOLID,      - wx.Brush fill style (use wx.TRANSPARENT for no fill)
-                'marker'= 'circle'          - Marker shape
-                'legend'= ''                - Marker Legend to display
-
-            Marker Shapes:
-                - 'circle'
-                - 'dot'
-                - 'square'
-                - 'triangle'
-                - 'triangle_down'
-                - 'cross'
-                - 'plus'
-        """
-
-        PolyPoints.__init__(self, points, attr)
-
-    def draw(self, dc, printerScale, coord= None):
-        colour = self.attributes['colour']
-        width = self.attributes['width'] * printerScale
-        size = self.attributes['size'] * printerScale
-        fillcolour = self.attributes['fillcolour']
-        fillstyle = self.attributes['fillstyle']
-        marker = self.attributes['marker']
-
-        dc.SetPen(wx.Pen(wx.NamedColour(colour), width))
-        if fillcolour:
-            dc.SetBrush(wx.Brush(wx.NamedColour(fillcolour),fillstyle))
-        else:
-            dc.SetBrush(wx.Brush(wx.NamedColour(colour), fillstyle))
-        if coord == None:
-            self._drawmarkers(dc, self.scaled, marker, size)
-        else:
-            self._drawmarkers(dc, coord, marker, size) # draw legend marker
-
-    def getSymExtent(self, printerScale):
-        """Width and Height of Marker"""
-        s= 5*self.attributes['size'] * printerScale
-        return (s,s)
-
-    def _drawmarkers(self, dc, coords, marker,size=1):
-        f = eval('self._' +marker)
-        f(dc, coords, size)
-
-    def _circle(self, dc, coords, size=1):
-        fact= 2.5*size
-        wh= 5.0*size
-        rect= _numpy.zeros((len(coords),4),_numpy.float)+[0.0,0.0,wh,wh]
-        rect[:,0:2]= coords-[fact,fact]
-        dc.DrawEllipseList(rect.astype(_numpy.int32))
-
-    def _dot(self, dc, coords, size=1):
-        dc.DrawPointList(coords)
-
-    def _square(self, dc, coords, size=1):
-        fact= 2.5*size
-        wh= 5.0*size
-        rect= _numpy.zeros((len(coords),4),_numpy.float)+[0.0,0.0,wh,wh]
-        rect[:,0:2]= coords-[fact,fact]
-        dc.DrawRectangleList(rect.astype(_numpy.int32))
-
-    def _triangle(self, dc, coords, size=1):
-        shape= [(-2.5*size,1.44*size), (2.5*size,1.44*size), (0.0,-2.88*size)]
-        poly= _numpy.repeat(coords,3)
-        poly.shape= (len(coords),3,2)
-        poly += shape
-        dc.DrawPolygonList(poly.astype(_numpy.int32))
-
-    def _triangle_down(self, dc, coords, size=1):
-        shape= [(-2.5*size,-1.44*size), (2.5*size,-1.44*size), (0.0,2.88*size)]
-        poly= _numpy.repeat(coords,3)
-        poly.shape= (len(coords),3,2)
-        poly += shape
-        dc.DrawPolygonList(poly.astype(_numpy.int32))
-
-    def _cross(self, dc, coords, size=1):
-        fact= 2.5*size
-        for f in [[-fact,-fact,fact,fact],[-fact,fact,fact,-fact]]:
-            lines= _numpy.concatenate((coords,coords),axis=1)+f
-            dc.DrawLineList(lines.astype(_numpy.int32))
-
-    def _plus(self, dc, coords, size=1):
-        fact= 2.5*size
-        for f in [[-fact,0,fact,0],[0,-fact,0,fact]]:
-            lines= _numpy.concatenate((coords,coords),axis=1)+f
-            dc.DrawLineList(lines.astype(_numpy.int32))
-
-class PlotGraphics:
-    """Container to hold PolyXXX objects and graph labels
-        - All methods except __init__ are private.
-    """
-
-    def __init__(self, objects, title='', xLabel='', yLabel= ''):
-        """Creates PlotGraphics object
-        objects - list of PolyXXX objects to make graph
-        title - title shown at top of graph
-        xLabel - label shown on x-axis
-        yLabel - label shown on y-axis
-        """
-        if type(objects) not in [list,tuple]:
-            raise TypeError, "objects argument should be list or tuple"
-        self.objects = objects
-        self.title= title
-        self.xLabel= xLabel
-        self.yLabel= yLabel
-
-    def boundingBox(self):
-        p1, p2 = self.objects[0].boundingBox()
-        for o in self.objects[1:]:
-            p1o, p2o = o.boundingBox()
-            p1 = _numpy.minimum(p1, p1o)
-            p2 = _numpy.maximum(p2, p2o)
-        return p1, p2
-
-    def scaleAndShift(self, scale=(1,1), shift=(0,0)):
-        for o in self.objects:
-            o.scaleAndShift(scale, shift)
-
-    def setPrinterScale(self, scale):
-        """Thickens up lines and markers only for printing"""
-        self.printerScale= scale
-
-    def setXLabel(self, xLabel= ''):
-        """Set the X axis label on the graph"""
-        self.xLabel= xLabel
-
-    def setYLabel(self, yLabel= ''):
-        """Set the Y axis label on the graph"""
-        self.yLabel= yLabel
-
-    def setTitle(self, title= ''):
-        """Set the title at the top of graph"""
-        self.title= title
-
-    def getXLabel(self):
-        """Get x axis label string"""
-        return self.xLabel
-
-    def getYLabel(self):
-        """Get y axis label string"""
-        return self.yLabel
-
-    def getTitle(self, title= ''):
-        """Get the title at the top of graph"""
-        return self.title
-
-    def draw(self, dc):
-        for o in self.objects:
-            #t=_time.clock()          # profile info
-            o.draw(dc, self.printerScale)
-            #dt= _time.clock()-t
-            #print o, "time=", dt
-
-    def getSymExtent(self, printerScale):
-        """Get max width and height of lines and markers symbols for legend"""
-        symExt = self.objects[0].getSymExtent(printerScale)
-        for o in self.objects[1:]:
-            oSymExt = o.getSymExtent(printerScale)
-            symExt = _numpy.maximum(symExt, oSymExt)
-        return symExt
-
-    def getLegendNames(self):
-        """Returns list of legend names"""
-        lst = [None]*len(self)
-        for i in range(len(self)):
-            lst[i]= self.objects[i].getLegend()
-        return lst
-
-    def __len__(self):
-        return len(self.objects)
-
-    def __getitem__(self, item):
-        return self.objects[item]
-
-
-#-------------------------------------------------------------------------------
-# Main window that you will want to import into your application.
-
-class PlotCanvas(wx.Window):
-    """Subclass of a wx.Window to allow simple general plotting
-    of data with zoom, labels, and automatic axis scaling."""
-
-    def __init__(self, parent, id = -1, pos=wx.DefaultPosition,
-            size=wx.DefaultSize, style= wx.DEFAULT_FRAME_STYLE, name= ""):
-
-        self.use_persistence=False
-        self.alpha=0.3
-        self.decimation=10
-        self.decim_counter=0
-        """Constucts a window, which can be a child of a frame, dialog or
-        any other non-control window"""
-
-        wx.Window.__init__(self, parent, id, pos, size, style, name)
-        self.border = (1,1)
-
-        self.SetBackgroundColour("white")
-
-        # Create some mouse events for zooming
-        self.Bind(wx.EVT_LEFT_DOWN, self.OnMouseLeftDown)
-        self.Bind(wx.EVT_LEFT_UP, self.OnMouseLeftUp)
-        self.Bind(wx.EVT_MOTION, self.OnMotion)
-        self.Bind(wx.EVT_LEFT_DCLICK, self.OnMouseDoubleClick)
-        self.Bind(wx.EVT_RIGHT_DOWN, self.OnMouseRightDown)
-
-        # set curser as cross-hairs
-        self.SetCursor(wx.CROSS_CURSOR)
-
-        # Things for printing
-        self.print_data = wx.PrintData()
-        self.print_data.SetPaperId(wx.PAPER_LETTER)
-        self.print_data.SetOrientation(wx.LANDSCAPE)
-        self.pageSetupData= wx.PageSetupDialogData()
-        self.pageSetupData.SetMarginBottomRight((25,25))
-        self.pageSetupData.SetMarginTopLeft((25,25))
-        self.pageSetupData.SetPrintData(self.print_data)
-        self.printerScale = 1
-        self.parent= parent
-
-        # Zooming variables
-        self._zoomInFactor =  0.5
-        self._zoomOutFactor = 2
-        self._zoomCorner1= _numpy.array([0.0, 0.0]) # left mouse down corner
-        self._zoomCorner2= _numpy.array([0.0, 0.0])   # left mouse up corner
-        self._zoomEnabled= False
-        self._hasDragged= False
-
-        # Drawing Variables
-        self.last_draw = None
-        self._pointScale= 1
-        self._pointShift= 0
-        self._xSpec= 'auto'
-        self._ySpec= 'auto'
-        self._gridEnabled= False
-        self._legendEnabled= False
-        self._xUseScopeTicks= False
-
-        # Fonts
-        self._fontCache = {}
-        self._fontSizeAxis= 10
-        self._fontSizeTitle= 15
-        self._fontSizeLegend= 7
-
-        # pointLabels
-        self._pointLabelEnabled= False
-        self.last_PointLabel= None
-        self._pointLabelFunc= None
-        self.Bind(wx.EVT_LEAVE_WINDOW, self.OnLeave)
-
-        self.Bind(wx.EVT_PAINT, self.OnPaint)
-        self.Bind(wx.EVT_SIZE, self.OnSize)
-        # OnSize called to make sure the buffer is initialized.
-        # This might result in OnSize getting called twice on some
-        # platforms at initialization, but little harm done.
-        self.OnSize(None) # sets the initial size based on client size
-                          # UNCONDITIONAL, needed to create self._Buffer
-
-
-    def set_use_persistence(self, enable):
-        self.use_persistence = enable
-
-    def set_persist_alpha(self, persist_alpha):
-        self.alpha = persist_alpha
-
-
-    # SaveFile
-    def SaveFile(self, fileName= ''):
-        """Saves the file to the type specified in the extension. If no file
-        name is specified a dialog box is provided.  Returns True if sucessful,
-        otherwise False.
-
-        .bmp  Save a Windows bitmap file.
-        .xbm  Save an X bitmap file.
-        .xpm  Save an XPM bitmap file.
-        .png  Save a Portable Network Graphics file.
-        .jpg  Save a Joint Photographic Experts Group file.
-        """
-        if _string.lower(fileName[-3:]) not in ['bmp','xbm','xpm','png','jpg']:
-            dlg1 = wx.FileDialog(
-                    self,
-                    "Choose a file with extension bmp, gif, xbm, xpm, png, or jpg", ".", "",
-                    "BMP files (*.bmp)|*.bmp|XBM files (*.xbm)|*.xbm|XPM file (*.xpm)|*.xpm|PNG files (*.png)|*.png|JPG files (*.jpg)|*.jpg",
-                    wx.SAVE|wx.OVERWRITE_PROMPT
-                    )
-            try:
-                while 1:
-                    if dlg1.ShowModal() == wx.ID_OK:
-                        fileName = dlg1.GetPath()
-                        # Check for proper exension
-                        if _string.lower(fileName[-3:]) not in ['bmp','xbm','xpm','png','jpg']:
-                            dlg2 = wx.MessageDialog(self, 'File name extension\n'
-                            'must be one of\n'
-                            'bmp, xbm, xpm, png, or jpg',
-                              'File Name Error', wx.OK | wx.ICON_ERROR)
-                            try:
-                                dlg2.ShowModal()
-                            finally:
-                                dlg2.Destroy()
-                        else:
-                            break # now save file
-                    else: # exit without saving
-                        return False
-            finally:
-                dlg1.Destroy()
-
-        # File name has required extension
-        fType = _string.lower(fileName[-3:])
-        if fType == "bmp":
-            tp= wx.BITMAP_TYPE_BMP       # Save a Windows bitmap file.
-        elif fType == "xbm":
-            tp= wx.BITMAP_TYPE_XBM       # Save an X bitmap file.
-        elif fType == "xpm":
-            tp= wx.BITMAP_TYPE_XPM       # Save an XPM bitmap file.
-        elif fType == "jpg":
-            tp= wx.BITMAP_TYPE_JPEG      # Save a JPG file.
-        else:
-            tp= wx.BITMAP_TYPE_PNG       # Save a PNG file.
-        # Save Bitmap
-        res= self._Buffer.SaveFile(fileName, tp)
-        return res
-
-    def PageSetup(self):
-        """Brings up the page setup dialog"""
-        data = self.pageSetupData
-        data.SetPrintData(self.print_data)
-        dlg = wx.PageSetupDialog(self.parent, data)
-        try:
-            if dlg.ShowModal() == wx.ID_OK:
-                data = dlg.GetPageSetupData() # returns wx.PageSetupDialogData
-                # updates page parameters from dialog
-                self.pageSetupData.SetMarginBottomRight(data.GetMarginBottomRight())
-                self.pageSetupData.SetMarginTopLeft(data.GetMarginTopLeft())
-                self.pageSetupData.SetPrintData(data.GetPrintData())
-                self.print_data=data.GetPrintData() # updates print_data
-        finally:
-            dlg.Destroy()
-
-    def Printout(self, paper=None):
-        """Print current plot."""
-        if paper != None:
-            self.print_data.SetPaperId(paper)
-        pdd = wx.PrintDialogData()
-        pdd.SetPrintData(self.print_data)
-        printer = wx.Printer(pdd)
-        out = PlotPrintout(self)
-        print_ok = printer.Print(self.parent, out)
-        if print_ok:
-            self.print_data = printer.GetPrintDialogData().GetPrintData()
-        out.Destroy()
-
-    def PrintPreview(self):
-        """Print-preview current plot."""
-        printout = PlotPrintout(self)
-        printout2 = PlotPrintout(self)
-        self.preview = wx.PrintPreview(printout, printout2, self.print_data)
-        if not self.preview.Ok():
-            wx.MessageDialog(self, "Print Preview failed.\n" \
-                               "Check that default printer is configured\n", \
-                               "Print error", wx.OK|wx.CENTRE).ShowModal()
-        self.preview.SetZoom(40)
-        # search up tree to find frame instance
-        frameInst= self
-        while not isinstance(frameInst, wx.Frame):
-            frameInst= frameInst.GetParent()
-        frame = wx.PreviewFrame(self.preview, frameInst, "Preview")
-        frame.Initialize()
-        frame.SetPosition(self.GetPosition())
-        frame.SetSize((600,550))
-        frame.Centre(wx.BOTH)
-        frame.Show(True)
-
-    def SetFontSizeAxis(self, point= 10):
-        """Set the tick and axis label font size (default is 10 point)"""
-        self._fontSizeAxis= point
-
-    def GetFontSizeAxis(self):
-        """Get current tick and axis label font size in points"""
-        return self._fontSizeAxis
-
-    def SetFontSizeTitle(self, point= 15):
-        """Set Title font size (default is 15 point)"""
-        self._fontSizeTitle= point
-
-    def GetFontSizeTitle(self):
-        """Get current Title font size in points"""
-        return self._fontSizeTitle
-
-    def SetFontSizeLegend(self, point= 7):
-        """Set Legend font size (default is 7 point)"""
-        self._fontSizeLegend= point
-
-    def GetFontSizeLegend(self):
-        """Get current Legend font size in points"""
-        return self._fontSizeLegend
-
-    def SetEnableZoom(self, value):
-        """Set True to enable zooming."""
-        if value not in [True,False]:
-            raise TypeError, "Value should be True or False"
-        self._zoomEnabled= value
-
-    def GetEnableZoom(self):
-        """True if zooming enabled."""
-        return self._zoomEnabled
-
-    def SetEnableGrid(self, value):
-        """Set True to enable grid."""
-        if value not in [True,False]:
-            raise TypeError, "Value should be True or False"
-        self._gridEnabled= value
-        self.Redraw()
-
-    def GetEnableGrid(self):
-        """True if grid enabled."""
-        return self._gridEnabled
-
-    def SetEnableLegend(self, value):
-        """Set True to enable legend."""
-        if value not in [True,False]:
-            raise TypeError, "Value should be True or False"
-        self._legendEnabled= value
-        self.Redraw()
-
-    def GetEnableLegend(self):
-        """True if Legend enabled."""
-        return self._legendEnabled
-
-    def SetEnablePointLabel(self, value):
-        """Set True to enable pointLabel."""
-        if value not in [True,False]:
-            raise TypeError, "Value should be True or False"
-        self._pointLabelEnabled= value
-        self.Redraw()  #will erase existing pointLabel if present
-        self.last_PointLabel = None
-
-    def GetEnablePointLabel(self):
-        """True if pointLabel enabled."""
-        return self._pointLabelEnabled
-
-    def SetPointLabelFunc(self, func):
-        """Sets the function with custom code for pointLabel drawing
-            ******** more info needed ***************
-        """
-        self._pointLabelFunc= func
-
-    def GetPointLabelFunc(self):
-        """Returns pointLabel Drawing Function"""
-        return self._pointLabelFunc
-
-    def Reset(self):
-        """Unzoom the plot."""
-        self.last_PointLabel = None        #reset pointLabel
-        if self.last_draw is not None:
-            self.Draw(self.last_draw[0])
-
-    def ScrollRight(self, units):
-        """Move view right number of axis units."""
-        self.last_PointLabel = None        #reset pointLabel
-        if self.last_draw is not None:
-            graphics, xAxis, yAxis= self.last_draw
-            xAxis= (xAxis[0]+units, xAxis[1]+units)
-            self.Draw(graphics,xAxis,yAxis)
-
-    def ScrollUp(self, units):
-        """Move view up number of axis units."""
-        self.last_PointLabel = None        #reset pointLabel
-        if self.last_draw is not None:
-            graphics, xAxis, yAxis= self.last_draw
-            yAxis= (yAxis[0]+units, yAxis[1]+units)
-            self.Draw(graphics,xAxis,yAxis)
-
-    def GetXY(self,event):
-        """Takes a mouse event and returns the XY user axis values."""
-        x,y= self.PositionScreenToUser(event.GetPosition())
-        return x,y
-
-    def PositionUserToScreen(self, pntXY):
-        """Converts User position to Screen Coordinates"""
-        userPos= _numpy.array(pntXY)
-        x,y= userPos * self._pointScale + self._pointShift
-        return x,y
-
-    def PositionScreenToUser(self, pntXY):
-        """Converts Screen position to User Coordinates"""
-        screenPos= _numpy.array(pntXY)
-        x,y= (screenPos-self._pointShift)/self._pointScale
-        return x,y
-
-    def SetXSpec(self, type= 'auto'):
-        """xSpec- defines x axis type. Can be 'none', 'min' or 'auto'
-        where:
-            'none' - shows no axis or tick mark values
-            'min' - shows min bounding box values
-            'auto' - rounds axis range to sensible values
-        """
-        self._xSpec= type
-
-    def SetYSpec(self, type= 'auto'):
-        """ySpec- defines x axis type. Can be 'none', 'min' or 'auto'
-        where:
-            'none' - shows no axis or tick mark values
-            'min' - shows min bounding box values
-            'auto' - rounds axis range to sensible values
-        """
-        self._ySpec= type
-
-    def GetXSpec(self):
-        """Returns current XSpec for axis"""
-        return self._xSpec
-
-    def GetYSpec(self):
-        """Returns current YSpec for axis"""
-        return self._ySpec
-
-    def GetXMaxRange(self):
-        """Returns (minX, maxX) x-axis range for displayed graph"""
-        graphics= self.last_draw[0]
-        p1, p2 = graphics.boundingBox()     # min, max points of graphics
-        xAxis = self._axisInterval(self._xSpec, p1[0], p2[0]) # in user units
-        return xAxis
-
-    def GetYMaxRange(self):
-        """Returns (minY, maxY) y-axis range for displayed graph"""
-        graphics= self.last_draw[0]
-        p1, p2 = graphics.boundingBox()     # min, max points of graphics
-        yAxis = self._axisInterval(self._ySpec, p1[1], p2[1])
-        return yAxis
-
-    def GetXCurrentRange(self):
-        """Returns (minX, maxX) x-axis for currently displayed portion of graph"""
-        return self.last_draw[1]
-
-    def GetYCurrentRange(self):
-        """Returns (minY, maxY) y-axis for currently displayed portion of graph"""
-        return self.last_draw[2]
-
-    def SetXUseScopeTicks(self, v=False):
-        """Always 10 divisions, no labels"""
-        self._xUseScopeTicks = v
-
-    def GetXUseScopeTicks(self):
-        return self._xUseScopeTicks
-
-    def Draw(self, graphics, xAxis = None, yAxis = None, dc = None, step=None):
-        """Draw objects in graphics with specified x and y axis.
-        graphics- instance of PlotGraphics with list of PolyXXX objects
-        xAxis - tuple with (min, max) axis range to view
-        yAxis - same as xAxis
-        dc - drawing context - doesn't have to be specified.
-        If it's not, the offscreen buffer is used
-        """
-        # check Axis is either tuple or none
-        if type(xAxis) not in [type(None),tuple]:
-            raise TypeError, "xAxis should be None or (minX,maxX)"
-        if type(yAxis) not in [type(None),tuple]:
-            raise TypeError, "yAxis should be None or (minY,maxY)"
-
-        # check case for axis = (a,b) where a==b caused by improper zooms
-        if xAxis != None:
-            if xAxis[0] == xAxis[1]:
-                return
-        if yAxis != None:
-            if yAxis[0] == yAxis[1]:
-                return
-
-        if dc == None:
-            # sets new dc and clears it
-            if self.use_persistence:
-              dc = wx.MemoryDC()
-              dc.SelectObject(self._Buffer)
-              dc.Clear()
-            else:
-              dc = wx.BufferedDC(wx.ClientDC(self), self._Buffer)
-              dc.Clear()
-
-        dc.BeginDrawing()
-        # dc.Clear()
-
-
-
-        # set font size for every thing but title and legend
-        dc.SetFont(self._getFont(self._fontSizeAxis))
-
-        # sizes axis to axis type, create lower left and upper right corners of plot
-        if xAxis == None or yAxis == None:
-            # One or both axis not specified in Draw
-            p1, p2 = graphics.boundingBox()     # min, max points of graphics
-            if xAxis == None:
-                xAxis = self._axisInterval(self._xSpec, p1[0], p2[0]) # in user units
-            if yAxis == None:
-                yAxis = self._axisInterval(self._ySpec, p1[1], p2[1])
-            # Adjust bounding box for axis spec
-            p1[0],p1[1] = xAxis[0], yAxis[0]     # lower left corner user scale (xmin,ymin)
-            p2[0],p2[1] = xAxis[1], yAxis[1]     # upper right corner user scale (xmax,ymax)
-        else:
-            # Both axis specified in Draw
-            p1= _numpy.array([xAxis[0], yAxis[0]])    # lower left corner user scale (xmin,ymin)
-            p2= _numpy.array([xAxis[1], yAxis[1]])     # upper right corner user scale (xmax,ymax)
-
-        self.last_draw = (graphics, xAxis, yAxis)       # saves most recient values
-
-        if False:
-          ptx,pty,rectWidth,rectHeight= self._point2ClientCoord(p1, p2)
-          #dc.SetPen(wx.Pen(wx.BLACK))
-          dc.SetBrush(wx.Brush( wx.BLACK, wx.SOLID ) ) #wx.SOLID wx.TRANSPARENT ) )
-          #dc.SetLogicalFunction(wx.INVERT) #wx.XOR wx.INVERT
-          dc.DrawRectangle( ptx,pty, rectWidth,rectHeight)
-          #dc.SetBrush(wx.Brush( wx.WHITE, wx.SOLID ) )
-          #dc.SetLogicalFunction(wx.COPY)
-
-        # Get ticks and textExtents for axis if required
-        if self._xSpec is not 'none':
-            if self._xUseScopeTicks:
-                xticks = self._scope_ticks(xAxis[0], xAxis[1])
-            else:
-                xticks = self._ticks(xAxis[0], xAxis[1])
-            xTextExtent = dc.GetTextExtent(xticks[-1][1])# w h of x axis text last number on axis
-        else:
-            xticks = None
-            xTextExtent= (0,0) # No text for ticks
-        if self._ySpec is not 'none':
-            yticks = self._ticks(yAxis[0], yAxis[1], step)
-            yTextExtentBottom= dc.GetTextExtent(yticks[0][1])
-            yTextExtentTop   = dc.GetTextExtent(yticks[-1][1])
-            yTextExtent= (max(yTextExtentBottom[0],yTextExtentTop[0]),
-                          max(yTextExtentBottom[1],yTextExtentTop[1]))
-        else:
-            yticks = None
-            yTextExtent= (0,0) # No text for ticks
-
-        # TextExtents for Title and Axis Labels
-        titleWH, xLabelWH, yLabelWH= self._titleLablesWH(dc, graphics)
-
-        # TextExtents for Legend
-        legendBoxWH, legendSymExt, legendTextExt = self._legendWH(dc, graphics)
-
-        # room around graph area
-        rhsW= max(xTextExtent[0], legendBoxWH[0]) # use larger of number width or legend width
-        lhsW= yTextExtent[0]+ yLabelWH[1]
-        bottomH= max(xTextExtent[1], yTextExtent[1]/2.)+ xLabelWH[1]
-        topH= yTextExtent[1]/2. + titleWH[1]
-        textSize_scale= _numpy.array([rhsW+lhsW,bottomH+topH]) # make plot area smaller by text size
-        textSize_shift= _numpy.array([lhsW, bottomH])          # shift plot area by this amount
-
-        # drawing title and labels text
-        dc.SetFont(self._getFont(self._fontSizeTitle))
-        titlePos= (self.plotbox_origin[0]+ lhsW + (self.plotbox_size[0]-lhsW-rhsW)/2.- titleWH[0]/2.,
-                 self.plotbox_origin[1]- self.plotbox_size[1])
-        dc.DrawText(graphics.getTitle(),titlePos[0],titlePos[1])
-        dc.SetFont(self._getFont(self._fontSizeAxis))
-        xLabelPos= (self.plotbox_origin[0]+ lhsW + (self.plotbox_size[0]-lhsW-rhsW)/2.- xLabelWH[0]/2.,
-                 self.plotbox_origin[1]- xLabelWH[1])
-        dc.DrawText(graphics.getXLabel(),xLabelPos[0],xLabelPos[1])
-        yLabelPos= (self.plotbox_origin[0],
-                 self.plotbox_origin[1]- bottomH- (self.plotbox_size[1]-bottomH-topH)/2.+ yLabelWH[0]/2.)
-        if graphics.getYLabel():  # bug fix for Linux
-            dc.DrawRotatedText(graphics.getYLabel(),yLabelPos[0],yLabelPos[1],90)
-
-        # drawing legend makers and text
-        if self._legendEnabled:
-            self._drawLegend(dc,graphics,rhsW,topH,legendBoxWH, legendSymExt, legendTextExt)
-
-        # allow for scaling and shifting plotted points
-        scale = (self.plotbox_size-textSize_scale) / (p2-p1)* _numpy.array((1,-1))
-        shift = -p1*scale + self.plotbox_origin + textSize_shift * _numpy.array((1,-1))
-        self._pointScale= scale  # make available for mouse events
-        self._pointShift= shift
-
-        #dc.SetLogicalFunction(wx.INVERT) #wx.XOR wx.INVERT
-        self._drawAxes(dc, p1, p2, scale, shift, xticks, yticks)
-        #dc.SetLogicalFunction(wx.COPY)
-
-        graphics.scaleAndShift(scale, shift)
-        graphics.setPrinterScale(self.printerScale)  # thicken up lines and markers if printing
-
-        # set clipping area so drawing does not occur outside axis box
-        ptx,pty,rectWidth,rectHeight= self._point2ClientCoord(p1, p2)
-        dc.SetClippingRegion(ptx,pty,rectWidth,rectHeight)
-        # Draw the lines and markers
-        #start = _time.clock()
-
-        graphics.draw(dc)
-        # print "entire graphics drawing took: %f second"%(_time.clock() - start)
-        # remove the clipping region
-        dc.DestroyClippingRegion()
-        dc.EndDrawing()
-
-
-        if self.use_persistence:
-          dc=None
-          self._Buffer.CopyToBuffer(self._Bufferarray) #, format=wx.BitmapBufferFormat_RGB, stride=-1)
-          ## do the IIR filter
-          alpha_int=int(float(self.alpha*256))
-          if True:
-            _numpy.add(self._Bufferarray,0,self._Buffer3array)
-            _numpy.multiply(self._Buffer3array,alpha_int,self._Buffer3array)
-            _numpy.multiply(self._Buffer2array,(256-alpha_int),self._Buffer2array)
-            _numpy.add(self._Buffer3array,self._Buffer2array,self._Buffer2array)
-            _numpy.right_shift(self._Buffer2array,8,self._Buffer2array)
-          elif False:
-            self._Buffer2array=(self._Bufferarray.astype(_numpy.uint32) *alpha_int + self._Buffer2array*(256-alpha_int)).__rshift__(8)
-          elif False:
-            self._Buffer2array *=(256-alpha_int)
-            self._Buffer2array +=self._Bufferarray.astype(_numpy.uint32)*alpha_int
-            self._Buffer2array /=256
-
-          ##copy back to image buffer
-          self._Buffer2.CopyFromBuffer(self._Buffer2array.astype(_numpy.uint8)) #, format=wx.BitmapBufferFormat_RGB, stride=-1)
-
-          #draw to the screen
-          #self.decim_counter=self.decim_counter+1
-          if True: #self.decim_counter>self.decimation:
-            #self.decim_counter=0
-            dc2 = wx.ClientDC( self )
-            dc2.BeginDrawing()
-            dc2.DrawBitmap(self._Buffer2, 0, 0, False)
-            #dc2.DrawBitmap(self._Buffer, 0, 0, False)
-            dc2.EndDrawing()
-
-    def Redraw(self, dc= None):
-        """Redraw the existing plot."""
-        if self.last_draw is not None:
-            graphics, xAxis, yAxis= self.last_draw
-            self.Draw(graphics,xAxis,yAxis,dc)
-
-    def Clear(self):
-        """Erase the window."""
-        self.last_PointLabel = None        #reset pointLabel
-        dc = wx.BufferedDC(wx.ClientDC(self), self._Buffer)
-        dc.Clear()
-        self.last_draw = None
-
-    def Zoom(self, Center, Ratio):
-        """ Zoom on the plot
-            Centers on the X,Y coords given in Center
-            Zooms by the Ratio = (Xratio, Yratio) given
-        """
-        self.last_PointLabel = None   #reset maker
-        x,y = Center
-        if self.last_draw != None:
-            (graphics, xAxis, yAxis) = self.last_draw
-            w = (xAxis[1] - xAxis[0]) * Ratio[0]
-            h = (yAxis[1] - yAxis[0]) * Ratio[1]
-            xAxis = ( x - w/2, x + w/2 )
-            yAxis = ( y - h/2, y + h/2 )
-            self.Draw(graphics, xAxis, yAxis)
-
-    def GetClosestPoints(self, pntXY, pointScaled= True):
-        """Returns list with
-            [curveNumber, legend, index of closest point, pointXY, scaledXY, distance]
-            list for each curve.
-            Returns [] if no curves are being plotted.
-
-            x, y in user coords
-            if pointScaled == True based on screen coords
-            if pointScaled == False based on user coords
-        """
-        if self.last_draw == None:
-            #no graph available
-            return []
-        graphics, xAxis, yAxis= self.last_draw
-        l = []
-        for curveNum,obj in enumerate(graphics):
-            #check there are points in the curve
-            if len(obj.points) == 0:
-                continue  #go to next obj
-            #[curveNumber, legend, index of closest point, pointXY, scaledXY, distance]
-            cn = [curveNum]+ [obj.getLegend()]+ obj.getClosestPoint( pntXY, pointScaled)
-            l.append(cn)
-        return l
-
-    def GetClosetPoint(self, pntXY, pointScaled= True):
-        """Returns list with
-            [curveNumber, legend, index of closest point, pointXY, scaledXY, distance]
-            list for only the closest curve.
-            Returns [] if no curves are being plotted.
-
-            x, y in user coords
-            if pointScaled == True based on screen coords
-            if pointScaled == False based on user coords
-        """
-        #closest points on screen based on screen scaling (pointScaled= True)
-        #list [curveNumber, index, pointXY, scaledXY, distance] for each curve
-        closestPts= self.GetClosestPoints(pntXY, pointScaled)
-        if closestPts == []:
-            return []  #no graph present
-        #find one with least distance
-        dists = [c[-1] for c in closestPts]
-        mdist = min(dists)  #Min dist
-        i = dists.index(mdist)  #index for min dist
-        return closestPts[i]  #this is the closest point on closest curve
-
-    def UpdatePointLabel(self, mDataDict):
-        """Updates the pointLabel point on screen with data contained in
-            mDataDict.
-
-            mDataDict will be passed to your function set by
-            SetPointLabelFunc.  It can contain anything you
-            want to display on the screen at the scaledXY point
-            you specify.
-
-            This function can be called from parent window with onClick,
-            onMotion events etc.
-        """
-        if self.last_PointLabel != None:
-            #compare pointXY
-            if mDataDict["pointXY"] != self.last_PointLabel["pointXY"]:
-                #closest changed
-                self._drawPointLabel(self.last_PointLabel) #erase old
-                self._drawPointLabel(mDataDict) #plot new
-        else:
-            #just plot new with no erase
-            self._drawPointLabel(mDataDict) #plot new
-        #save for next erase
-        self.last_PointLabel = mDataDict
-
-    # event handlers **********************************
-    def OnMotion(self, event):
-        if self._zoomEnabled and event.LeftIsDown():
-            if self._hasDragged:
-                self._drawRubberBand(self._zoomCorner1, self._zoomCorner2) # remove old
-            else:
-                self._hasDragged= True
-            self._zoomCorner2[0], self._zoomCorner2[1] = self.GetXY(event)
-            self._drawRubberBand(self._zoomCorner1, self._zoomCorner2) # add new
-
-    def OnMouseLeftDown(self,event):
-        self._zoomCorner1[0], self._zoomCorner1[1]= self.GetXY(event)
-
-    def OnMouseLeftUp(self, event):
-        if self._zoomEnabled:
-            if self._hasDragged == True:
-                self._drawRubberBand(self._zoomCorner1, self._zoomCorner2) # remove old
-                self._zoomCorner2[0], self._zoomCorner2[1]= self.GetXY(event)
-                self._hasDragged = False  # reset flag
-                minX, minY= _numpy.minimum( self._zoomCorner1, self._zoomCorner2)
-                maxX, maxY= _numpy.maximum( self._zoomCorner1, self._zoomCorner2)
-                self.last_PointLabel = None        #reset pointLabel
-                if self.last_draw != None:
-                    self.Draw(self.last_draw[0], xAxis = (minX,maxX), yAxis = (minY,maxY), dc = None)
-            #else: # A box has not been drawn, zoom in on a point
-            ## this interfered with the double click, so I've disables it.
-            #    X,Y = self.GetXY(event)
-            #    self.Zoom( (X,Y), (self._zoomInFactor,self._zoomInFactor) )
-
-    def OnMouseDoubleClick(self,event):
-        if self._zoomEnabled:
-            self.Reset()
-
-    def OnMouseRightDown(self,event):
-        if self._zoomEnabled:
-            X,Y = self.GetXY(event)
-            self.Zoom( (X,Y), (self._zoomOutFactor, self._zoomOutFactor) )
-
-    def OnPaint(self, event):
-        # All that is needed here is to draw the buffer to screen
-        if self.last_PointLabel != None:
-            self._drawPointLabel(self.last_PointLabel) #erase old
-            self.last_PointLabel = None
-
-        #paint current buffer to screen
-        dc = wx.BufferedPaintDC(self, self._Buffer)
-
-    def OnSize(self,event):
-        # The Buffer init is done here, to make sure the buffer is always
-        # the same size as the Window
-        Size  = self.GetClientSize()
-
-        # Make new offscreen bitmap: this bitmap will always have the
-        # current drawing in it, so it can be used to save the image to
-        # a file, or whatever.
-        self._Buffer = wx.EmptyBitmap(Size[0],Size[1],24)
-
-
-        if True: #self.use_persistence:
-          #self._Bufferarray = _numpy.zeros((Size[0], Size[1],3), dtype=_numpy.uint8)
-          self._Bufferarray = _numpy.zeros((Size[0]* Size[1]*3), dtype=_numpy.uint8)
-
-          # Make new second offscreen bitmap: this bitmap will always have the
-          # last drawing in it, so it can be used to do display time dependent processing
-          # like averaging (IIR) or show differences between updates
-          self._Buffer2 = wx.EmptyBitmap(Size[0],Size[1],24)
-          # now the extra buffers for the IIR processing
-          # note the different datatype uint32
-          self._Buffer2array = _numpy.zeros((Size[0]* Size[1]*3), dtype=_numpy.uint32) #dtype=_numpy.float
-          self._Buffer3array = _numpy.zeros((Size[0]* Size[1]*3), dtype=_numpy.uint32) #dtype=_numpy.float
-          # optional you can set the ufunct buffer size to improve speed
-          #_numpy.setbufsize(16*((Size[0]* Size[1]*3)/16 +1))
-        self._setSize()
-
-        self.last_PointLabel = None        #reset pointLabel
-
-        if self.last_draw is None:
-            self.Clear()
-        else:
-            graphics, xSpec, ySpec = self.last_draw
-            self.Draw(graphics,xSpec,ySpec)
-
-    def OnLeave(self, event):
-        """Used to erase pointLabel when mouse outside window"""
-        if self.last_PointLabel != None:
-            self._drawPointLabel(self.last_PointLabel) #erase old
-            self.last_PointLabel = None
-
-
-    # Private Methods **************************************************
-    def _setSize(self, width=None, height=None):
-        """DC width and height."""
-        if width == None:
-            (self.width,self.height) = self.GetClientSize()
-        else:
-            self.width, self.height= width,height
-        self.plotbox_size = 0.97*_numpy.array([self.width, self.height])
-        xo = 0.5*(self.width-self.plotbox_size[0])
-        yo = self.height-0.5*(self.height-self.plotbox_size[1])
-        self.plotbox_origin = _numpy.array([xo, yo])
-
-    def _setPrinterScale(self, scale):
-        """Used to thicken lines and increase marker size for print out."""
-        # line thickness on printer is very thin at 600 dot/in. Markers small
-        self.printerScale= scale
-
-    def _printDraw(self, printDC):
-        """Used for printing."""
-        if self.last_draw != None:
-            graphics, xSpec, ySpec= self.last_draw
-            self.Draw(graphics,xSpec,ySpec,printDC)
-
-    def _drawPointLabel(self, mDataDict):
-        """Draws and erases pointLabels"""
-        width = self._Buffer.GetWidth()
-        height = self._Buffer.GetHeight()
-        tmp_Buffer = wx.EmptyBitmap(width,height)
-        dcs = wx.MemoryDC()
-        dcs.SelectObject(tmp_Buffer)
-        dcs.Clear()
-        dcs.BeginDrawing()
-        self._pointLabelFunc(dcs,mDataDict)  #custom user pointLabel function
-        dcs.EndDrawing()
-
-        dc = wx.ClientDC( self )
-        #this will erase if called twice
-        dc.Blit(0, 0, width, height, dcs, 0, 0, wx.EQUIV)  #(NOT src) XOR dst
-
-
-    def _drawLegend(self,dc,graphics,rhsW,topH,legendBoxWH, legendSymExt, legendTextExt):
-        """Draws legend symbols and text"""
-        # top right hand corner of graph box is ref corner
-        trhc= self.plotbox_origin+ (self.plotbox_size-[rhsW,topH])*[1,-1]
-        legendLHS= .091* legendBoxWH[0]  # border space between legend sym and graph box
-        lineHeight= max(legendSymExt[1], legendTextExt[1]) * 1.1 #1.1 used as space between lines
-        dc.SetFont(self._getFont(self._fontSizeLegend))
-        for i in range(len(graphics)):
-            o = graphics[i]
-            s= i*lineHeight
-            if isinstance(o,PolyMarker):
-                # draw marker with legend
-                pnt= (trhc[0]+legendLHS+legendSymExt[0]/2., trhc[1]+s+lineHeight/2.)
-                o.draw(dc, self.printerScale, coord= _numpy.array([pnt]))
-            elif isinstance(o,PolyLine):
-                # draw line with legend
-                pnt1= (trhc[0]+legendLHS, trhc[1]+s+lineHeight/2.)
-                pnt2= (trhc[0]+legendLHS+legendSymExt[0], trhc[1]+s+lineHeight/2.)
-                o.draw(dc, self.printerScale, coord= _numpy.array([pnt1,pnt2]))
-            else:
-                raise TypeError, "object is neither PolyMarker or PolyLine instance"
-            # draw legend txt
-            pnt= (trhc[0]+legendLHS+legendSymExt[0], trhc[1]+s+lineHeight/2.-legendTextExt[1]/2)
-            dc.DrawText(o.getLegend(),pnt[0],pnt[1])
-        dc.SetFont(self._getFont(self._fontSizeAxis)) # reset
-
-    def _titleLablesWH(self, dc, graphics):
-        """Draws Title and labels and returns width and height for each"""
-        # TextExtents for Title and Axis Labels
-        dc.SetFont(self._getFont(self._fontSizeTitle))
-        title= graphics.getTitle()
-        titleWH= dc.GetTextExtent(title)
-        dc.SetFont(self._getFont(self._fontSizeAxis))
-        xLabel, yLabel= graphics.getXLabel(),graphics.getYLabel()
-        xLabelWH= dc.GetTextExtent(xLabel)
-        yLabelWH= dc.GetTextExtent(yLabel)
-        return titleWH, xLabelWH, yLabelWH
-
-    def _legendWH(self, dc, graphics):
-        """Returns the size in screen units for legend box"""
-        if self._legendEnabled != True:
-            legendBoxWH= symExt= txtExt= (0,0)
-        else:
-            # find max symbol size
-            symExt= graphics.getSymExtent(self.printerScale)
-            # find max legend text extent
-            dc.SetFont(self._getFont(self._fontSizeLegend))
-            txtList= graphics.getLegendNames()
-            txtExt= dc.GetTextExtent(txtList[0])
-            for txt in graphics.getLegendNames()[1:]:
-                txtExt= _numpy.maximum(txtExt,dc.GetTextExtent(txt))
-            maxW= symExt[0]+txtExt[0]
-            maxH= max(symExt[1],txtExt[1])
-            # padding .1 for lhs of legend box and space between lines
-            maxW= maxW* 1.1
-            maxH= maxH* 1.1 * len(txtList)
-            dc.SetFont(self._getFont(self._fontSizeAxis))
-            legendBoxWH= (maxW,maxH)
-        return (legendBoxWH, symExt, txtExt)
-
-    def _drawRubberBand(self, corner1, corner2):
-        """Draws/erases rect box from corner1 to corner2"""
-        ptx,pty,rectWidth,rectHeight= self._point2ClientCoord(corner1, corner2)
-        # draw rectangle
-        dc = wx.ClientDC( self )
-        dc.BeginDrawing()
-        dc.SetPen(wx.Pen(wx.BLACK))
-        dc.SetBrush(wx.Brush( wx.WHITE, wx.TRANSPARENT ) )
-        dc.SetLogicalFunction(wx.INVERT)
-        dc.DrawRectangle( ptx,pty, rectWidth,rectHeight)
-        dc.SetLogicalFunction(wx.COPY)
-        dc.EndDrawing()
-
-    def _getFont(self,size):
-        """Take font size, adjusts if printing and returns wx.Font"""
-        s = size*self.printerScale
-        of = self.GetFont()
-        # Linux speed up to get font from cache rather than X font server
-        key = (int(s), of.GetFamily (), of.GetStyle (), of.GetWeight ())
-        font = self._fontCache.get (key, None)
-        if font:
-            return font                 # yeah! cache hit
-        else:
-            font =  wx.Font(int(s), of.GetFamily(), of.GetStyle(), of.GetWeight())
-            self._fontCache[key] = font
-            return font
-
-
-    def _point2ClientCoord(self, corner1, corner2):
-        """Converts user point coords to client screen int coords x,y,width,height"""
-        c1= _numpy.array(corner1)
-        c2= _numpy.array(corner2)
-        # convert to screen coords
-        pt1= c1*self._pointScale+self._pointShift
-        pt2= c2*self._pointScale+self._pointShift
-        # make height and width positive
-        pul= _numpy.minimum(pt1,pt2) # Upper left corner
-        plr= _numpy.maximum(pt1,pt2) # Lower right corner
-        rectWidth, rectHeight= plr-pul
-        ptx,pty= pul
-        return ptx, pty, rectWidth, rectHeight
-
-    def _axisInterval(self, spec, lower, upper):
-        """Returns sensible axis range for given spec"""
-        if spec == 'none' or spec == 'min':
-            if lower == upper:
-                return lower-0.5, upper+0.5
-            else:
-                return lower, upper
-        elif spec == 'auto':
-            range = upper-lower
-            # if range == 0.:
-            if abs(range) < 1e-36:
-                return lower-0.5, upper+0.5
-            log = _numpy.log10(range)
-            power = _numpy.floor(log)
-            fraction = log-power
-            if fraction <= 0.05:
-                power = power-1
-            grid = 10.**power
-            lower = lower - lower % grid
-            mod = upper % grid
-            if mod != 0:
-                upper = upper - mod + grid
-            return lower, upper
-        elif type(spec) == type(()):
-            lower, upper = spec
-            if lower <= upper:
-                return lower, upper
-            else:
-                return upper, lower
-        else:
-            raise ValueError, str(spec) + ': illegal axis specification'
-
-    def _drawAxes(self, dc, p1, p2, scale, shift, xticks, yticks):
-
-        penWidth= self.printerScale        # increases thickness for printing only
-        dc.SetPen(wx.Pen(wx.NamedColour('BLACK'), penWidth))
-
-        # set length of tick marks--long ones make grid
-        if self._gridEnabled:
-            x,y,width,height= self._point2ClientCoord(p1,p2)
-            yTickLength= width/2.0 +1
-            xTickLength= height/2.0 +1
-        else:
-            yTickLength= 3 * self.printerScale  # lengthens lines for printing
-            xTickLength= 3 * self.printerScale
-
-        if self._xSpec is not 'none':
-            lower, upper = p1[0],p2[0]
-            text = 1
-            for y, d in [(p1[1], -xTickLength), (p2[1], xTickLength)]:   # miny, maxy and tick lengths
-                a1 = scale*_numpy.array([lower, y])+shift
-                a2 = scale*_numpy.array([upper, y])+shift
-                dc.DrawLine(a1[0],a1[1],a2[0],a2[1])  # draws upper and lower axis line
-                for x, label in xticks:
-                    pt = scale*_numpy.array([x, y])+shift
-                    dc.DrawLine(pt[0],pt[1],pt[0],pt[1] + d) # draws tick mark d units
-                    if text:
-                        dc.DrawText(label,pt[0],pt[1])
-                text = 0  # axis values not drawn on top side
-
-        if self._ySpec is not 'none':
-            lower, upper = p1[1],p2[1]
-            text = 1
-            h = dc.GetCharHeight()
-            for x, d in [(p1[0], -yTickLength), (p2[0], yTickLength)]:
-                a1 = scale*_numpy.array([x, lower])+shift
-                a2 = scale*_numpy.array([x, upper])+shift
-                dc.DrawLine(a1[0],a1[1],a2[0],a2[1])
-                for y, label in yticks:
-                    pt = scale*_numpy.array([x, y])+shift
-                    dc.DrawLine(pt[0],pt[1],pt[0]-d,pt[1])
-                    if text:
-                        dc.DrawText(label,pt[0]-dc.GetTextExtent(label)[0],
-                                    pt[1]-0.5*h)
-                text = 0    # axis values not drawn on right side
-
-    def _ticks(self, lower, upper, step=None):
-        ideal = (upper-lower)/7.
-        log = _numpy.log10(ideal)
-        power = _numpy.floor(log)
-        fraction = log-power
-        factor = 1.
-        error = fraction
-        for f, lf in self._multiples:
-            e = _numpy.fabs(fraction-lf)
-            if e < error:
-                error = e
-                factor = f
-        grid = factor * 10.**power
-        if power > 4 or power < -4:
-            format = '%+7.1e'
-        elif power >= 0:
-            digits = max(1, int(power))
-            format = '%' + `digits`+'.0f'
-        else:
-            digits = -int(power)
-            format = '%'+`digits+2`+'.'+`digits`+'f'
-        #force grid when step is not None
-        if step is not None: grid = step
-        ticks = []
-        t = -grid*_numpy.floor(-lower/grid)
-        while t <= upper:
-            if t == -0: t = 0 #remove neg zero condition
-            ticks.append( (t, format % (t,)) )
-            t = t + grid
-        return ticks
-
-    def _scope_ticks (self, lower, upper):
-        '''Always 10 divisions, no labels'''
-        grid = (upper - lower) / 10.0
-        ticks = []
-        t = lower
-        while t <= upper:
-            ticks.append( (t, ""))
-            t = t + grid
-        return ticks
-
-    _multiples = [(2., _numpy.log10(2.)), (5., _numpy.log10(5.))]
-
-
-#-------------------------------------------------------------------------------
-# Used to layout the printer page
-
-class PlotPrintout(wx.Printout):
-    """Controls how the plot is made in printing and previewing"""
-    # Do not change method names in this class,
-    # we have to override wx.Printout methods here!
-    def __init__(self, graph):
-        """graph is instance of plotCanvas to be printed or previewed"""
-        wx.Printout.__init__(self)
-        self.graph = graph
-
-    def HasPage(self, page):
-        if page == 1:
-            return True
-        else:
-            return False
-
-    def GetPageInfo(self):
-        return (1, 1, 1, 1)  # disable page numbers
-
-    def OnPrintPage(self, page):
-        dc = self.GetDC()  # allows using floats for certain functions
-##        print "PPI Printer",self.GetPPIPrinter()
-##        print "PPI Screen", self.GetPPIScreen()
-##        print "DC GetSize", dc.GetSize()
-##        print "GetPageSizePixels", self.GetPageSizePixels()
-        # Note PPIScreen does not give the correct number
-        # Calulate everything for printer and then scale for preview
-        PPIPrinter= self.GetPPIPrinter()        # printer dots/inch (w,h)
-        #PPIScreen= self.GetPPIScreen()          # screen dots/inch (w,h)
-        dcSize= dc.GetSize()                    # DC size
-        pageSize= self.GetPageSizePixels() # page size in terms of pixcels
-        clientDcSize= self.graph.GetClientSize()
-
-        # find what the margins are (mm)
-        margLeftSize,margTopSize= self.graph.pageSetupData.GetMarginTopLeft()
-        margRightSize, margBottomSize= self.graph.pageSetupData.GetMarginBottomRight()
-
-        # calculate offset and scale for dc
-        pixLeft= margLeftSize*PPIPrinter[0]/25.4  # mm*(dots/in)/(mm/in)
-        pixRight= margRightSize*PPIPrinter[0]/25.4
-        pixTop= margTopSize*PPIPrinter[1]/25.4
-        pixBottom= margBottomSize*PPIPrinter[1]/25.4
-
-        plotAreaW= pageSize[0]-(pixLeft+pixRight)
-        plotAreaH= pageSize[1]-(pixTop+pixBottom)
-
-        # ratio offset and scale to screen size if preview
-        if self.IsPreview():
-            ratioW= float(dcSize[0])/pageSize[0]
-            ratioH= float(dcSize[1])/pageSize[1]
-            pixLeft *= ratioW
-            pixTop *= ratioH
-            plotAreaW *= ratioW
-            plotAreaH *= ratioH
-
-        # rescale plot to page or preview plot area
-        self.graph._setSize(plotAreaW,plotAreaH)
-
-        # Set offset and scale
-        dc.SetDeviceOrigin(pixLeft,pixTop)
-
-        # Thicken up pens and increase marker size for printing
-        ratioW= float(plotAreaW)/clientDcSize[0]
-        ratioH= float(plotAreaH)/clientDcSize[1]
-        aveScale= (ratioW+ratioH)/2
-        self.graph._setPrinterScale(aveScale)  # tickens up pens for printing
-
-        self.graph._printDraw(dc)
-        # rescale back to original
-        self.graph._setSize()
-        self.graph._setPrinterScale(1)
-        self.graph.Redraw()     #to get point label scale and shift correct
-
-        return True
-
-
-
-
-#---------------------------------------------------------------------------
-# if running standalone...
-#
-#     ...a sample implementation using the above
-#
-
-def _draw1Objects():
-    # 100 points sin function, plotted as green circles
-    data1 = 2.*_numpy.pi*_numpy.arange(200)/200.
-    data1.shape = (100, 2)
-    data1[:,1] = _numpy.sin(data1[:,0])
-    markers1 = PolyMarker(data1, legend='Green Markers', colour='green', marker='circle',size=1)
-
-    # 50 points cos function, plotted as red line
-    data1 = 2.*_numpy.pi*_numpy.arange(100)/100.
-    data1.shape = (50,2)
-    data1[:,1] = _numpy.cos(data1[:,0])
-    lines = PolyLine(data1, legend= 'Red Line', colour='red')
-
-    # A few more points...
-    pi = _numpy.pi
-    markers2 = PolyMarker([(0., 0.), (pi/4., 1.), (pi/2, 0.),
-                          (3.*pi/4., -1)], legend='Cross Legend', colour='blue',
-                          marker='cross')
-
-    return PlotGraphics([markers1, lines, markers2],"Graph Title", "X Axis", "Y Axis")
-
-def _draw2Objects():
-    # 100 points sin function, plotted as green dots
-    data1 = 2.*_numpy.pi*_numpy.arange(200)/200.
-    data1.shape = (100, 2)
-    data1[:,1] = _numpy.sin(data1[:,0])
-    line1 = PolyLine(data1, legend='Green Line', colour='green', width=6, style=wx.DOT)
-
-    # 50 points cos function, plotted as red dot-dash
-    data1 = 2.*_numpy.pi*_numpy.arange(100)/100.
-    data1.shape = (50,2)
-    data1[:,1] = _numpy.cos(data1[:,0])
-    line2 = PolyLine(data1, legend='Red Line', colour='red', width=3, style= wx.DOT_DASH)
-
-    # A few more points...
-    pi = _numpy.pi
-    markers1 = PolyMarker([(0., 0.), (pi/4., 1.), (pi/2, 0.),
-                          (3.*pi/4., -1)], legend='Cross Hatch Square', colour='blue', width= 3, size= 6,
-                          fillcolour= 'red', fillstyle= wx.CROSSDIAG_HATCH,
-                          marker='square')
-
-    return PlotGraphics([markers1, line1, line2], "Big Markers with Different Line Styles")
-
-def _draw3Objects():
-    markerList= ['circle', 'dot', 'square', 'triangle', 'triangle_down',
-                'cross', 'plus', 'circle']
-    m=[]
-    for i in range(len(markerList)):
-        m.append(PolyMarker([(2*i+.5,i+.5)], legend=markerList[i], colour='blue',
-                          marker=markerList[i]))
-    return PlotGraphics(m, "Selection of Markers", "Minimal Axis", "No Axis")
-
-def _draw4Objects():
-    # 25,000 point line
-    data1 = _numpy.arange(5e5,1e6,10)
-    data1.shape = (25000, 2)
-    line1 = PolyLine(data1, legend='Wide Line', colour='green', width=5)
-
-    # A few more points...
-    markers2 = PolyMarker(data1, legend='Square', colour='blue',
-                          marker='square')
-    return PlotGraphics([line1, markers2], "25,000 Points", "Value X", "")
-
-def _draw5Objects():
-    # Empty graph with axis defined but no points/lines
-    points=[]
-    line1 = PolyLine(points, legend='Wide Line', colour='green', width=5)
-    return PlotGraphics([line1], "Empty Plot With Just Axes", "Value X", "Value Y")
-
-def _draw6Objects():
-    # Bar graph
-    points1=[(1,0), (1,10)]
-    line1 = PolyLine(points1, colour='green', legend='Feb.', width=10)
-    points1g=[(2,0), (2,4)]
-    line1g = PolyLine(points1g, colour='red', legend='Mar.', width=10)
-    points1b=[(3,0), (3,6)]
-    line1b = PolyLine(points1b, colour='blue', legend='Apr.', width=10)
-
-    points2=[(4,0), (4,12)]
-    line2 = PolyLine(points2, colour='Yellow', legend='May', width=10)
-    points2g=[(5,0), (5,8)]
-    line2g = PolyLine(points2g, colour='orange', legend='June', width=10)
-    points2b=[(6,0), (6,4)]
-    line2b = PolyLine(points2b, colour='brown', legend='July', width=10)
-
-    return PlotGraphics([line1, line1g, line1b, line2, line2g, line2b],
-                        "Bar Graph - (Turn on Grid, Legend)", "Months", "Number of Students")
-
-
-class TestFrame(wx.Frame):
-    def __init__(self, parent, id, title):
-        wx.Frame.__init__(self, parent, id, title,
-                          wx.DefaultPosition, (600, 400))
-
-        # Now Create the menu bar and items
-        self.mainmenu = wx.MenuBar()
-
-        menu = wx.Menu()
-        menu.Append(200, 'Page Setup...', 'Setup the printer page')
-        self.Bind(wx.EVT_MENU, self.OnFilePageSetup, id=200)
-
-        menu.Append(201, 'Print Preview...', 'Show the current plot on page')
-        self.Bind(wx.EVT_MENU, self.OnFilePrintPreview, id=201)
-
-        menu.Append(202, 'Print...', 'Print the current plot')
-        self.Bind(wx.EVT_MENU, self.OnFilePrint, id=202)
-
-        menu.Append(203, 'Save Plot...', 'Save current plot')
-        self.Bind(wx.EVT_MENU, self.OnSaveFile, id=203)
-
-        menu.Append(205, 'E&xit', 'Enough of this already!')
-        self.Bind(wx.EVT_MENU, self.OnFileExit, id=205)
-        self.mainmenu.Append(menu, '&File')
-
-        menu = wx.Menu()
-        menu.Append(206, 'Draw1', 'Draw plots1')
-        self.Bind(wx.EVT_MENU,self.OnPlotDraw1, id=206)
-        menu.Append(207, 'Draw2', 'Draw plots2')
-        self.Bind(wx.EVT_MENU,self.OnPlotDraw2, id=207)
-        menu.Append(208, 'Draw3', 'Draw plots3')
-        self.Bind(wx.EVT_MENU,self.OnPlotDraw3, id=208)
-        menu.Append(209, 'Draw4', 'Draw plots4')
-        self.Bind(wx.EVT_MENU,self.OnPlotDraw4, id=209)
-        menu.Append(210, 'Draw5', 'Draw plots5')
-        self.Bind(wx.EVT_MENU,self.OnPlotDraw5, id=210)
-        menu.Append(260, 'Draw6', 'Draw plots6')
-        self.Bind(wx.EVT_MENU,self.OnPlotDraw6, id=260)
-
-
-        menu.Append(211, '&Redraw', 'Redraw plots')
-        self.Bind(wx.EVT_MENU,self.OnPlotRedraw, id=211)
-        menu.Append(212, '&Clear', 'Clear canvas')
-        self.Bind(wx.EVT_MENU,self.OnPlotClear, id=212)
-        menu.Append(213, '&Scale', 'Scale canvas')
-        self.Bind(wx.EVT_MENU,self.OnPlotScale, id=213)
-        menu.Append(214, 'Enable &Zoom', 'Enable Mouse Zoom', kind=wx.ITEM_CHECK)
-        self.Bind(wx.EVT_MENU,self.OnEnableZoom, id=214)
-        menu.Append(215, 'Enable &Grid', 'Turn on Grid', kind=wx.ITEM_CHECK)
-        self.Bind(wx.EVT_MENU,self.OnEnableGrid, id=215)
-        menu.Append(220, 'Enable &Legend', 'Turn on Legend', kind=wx.ITEM_CHECK)
-        self.Bind(wx.EVT_MENU,self.OnEnableLegend, id=220)
-        menu.Append(222, 'Enable &Point Label', 'Show Closest Point', kind=wx.ITEM_CHECK)
-        self.Bind(wx.EVT_MENU,self.OnEnablePointLabel, id=222)
-
-        menu.Append(225, 'Scroll Up 1', 'Move View Up 1 Unit')
-        self.Bind(wx.EVT_MENU,self.OnScrUp, id=225)
-        menu.Append(230, 'Scroll Rt 2', 'Move View Right 2 Units')
-        self.Bind(wx.EVT_MENU,self.OnScrRt, id=230)
-        menu.Append(235, '&Plot Reset', 'Reset to original plot')
-        self.Bind(wx.EVT_MENU,self.OnReset, id=235)
-
-        self.mainmenu.Append(menu, '&Plot')
-
-        menu = wx.Menu()
-        menu.Append(300, '&About', 'About this thing...')
-        self.Bind(wx.EVT_MENU, self.OnHelpAbout, id=300)
-        self.mainmenu.Append(menu, '&Help')
-
-        self.SetMenuBar(self.mainmenu)
-
-        # A status bar to tell people what's happening
-        self.CreateStatusBar(1)
-
-        self.client = PlotCanvas(self)
-        #define the function for drawing pointLabels
-        self.client.SetPointLabelFunc(self.DrawPointLabel)
-        # Create mouse event for showing cursor coords in status bar
-        self.client.Bind(wx.EVT_LEFT_DOWN, self.OnMouseLeftDown)
-        # Show closest point when enabled
-        self.client.Bind(wx.EVT_MOTION, self.OnMotion)
-
-        self.Show(True)
-
-    def DrawPointLabel(self, dc, mDataDict):
-        """This is the fuction that defines how the pointLabels are plotted
-            dc - DC that will be passed
-            mDataDict - Dictionary of data that you want to use for the pointLabel
-
-            As an example I have decided I want a box at the curve point
-            with some text information about the curve plotted below.
-            Any wxDC method can be used.
-        """
-        # ----------
-        dc.SetPen(wx.Pen(wx.BLACK))
-        dc.SetBrush(wx.Brush( wx.BLACK, wx.SOLID ) )
-
-        sx, sy = mDataDict["scaledXY"] #scaled x,y of closest point
-        dc.DrawRectangle( sx-5,sy-5, 10, 10)  #10by10 square centered on point
-        px,py = mDataDict["pointXY"]
-        cNum = mDataDict["curveNum"]
-        pntIn = mDataDict["pIndex"]
-        legend = mDataDict["legend"]
-        #make a string to display
-        s = "Crv# %i, '%s', Pt. (%.2f,%.2f), PtInd %i" %(cNum, legend, px, py, pntIn)
-        dc.DrawText(s, sx , sy+1)
-        # -----------
-
-    def OnMouseLeftDown(self,event):
-        s= "Left Mouse Down at Point: (%.4f, %.4f)" % self.client.GetXY(event)
-        self.SetStatusText(s)
-        event.Skip()            #allows plotCanvas OnMouseLeftDown to be called
-
-    def OnMotion(self, event):
-        #show closest point (when enbled)
-        if self.client.GetEnablePointLabel() == True:
-            #make up dict with info for the pointLabel
-            #I've decided to mark the closest point on the closest curve
-            dlst= self.client.GetClosetPoint( self.client.GetXY(event), pointScaled= True)
-            if dlst != []:    #returns [] if none
-                curveNum, legend, pIndex, pointXY, scaledXY, distance = dlst
-                #make up dictionary to pass to my user function (see DrawPointLabel)
-                mDataDict= {"curveNum":curveNum, "legend":legend, "pIndex":pIndex,\
-                            "pointXY":pointXY, "scaledXY":scaledXY}
-                #pass dict to update the pointLabel
-                self.client.UpdatePointLabel(mDataDict)
-        event.Skip()           #go to next handler
-
-    def OnFilePageSetup(self, event):
-        self.client.PageSetup()
-
-    def OnFilePrintPreview(self, event):
-        self.client.PrintPreview()
-
-    def OnFilePrint(self, event):
-        self.client.Printout()
-
-    def OnSaveFile(self, event):
-        self.client.SaveFile()
-
-    def OnFileExit(self, event):
-        self.Close()
-
-    def OnPlotDraw1(self, event):
-        self.resetDefaults()
-        self.client.Draw(_draw1Objects())
-
-    def OnPlotDraw2(self, event):
-        self.resetDefaults()
-        self.client.Draw(_draw2Objects())
-
-    def OnPlotDraw3(self, event):
-        self.resetDefaults()
-        self.client.SetFont(wx.Font(10,wx.SCRIPT,wx.NORMAL,wx.NORMAL))
-        self.client.SetFontSizeAxis(20)
-        self.client.SetFontSizeLegend(12)
-        self.client.SetXSpec('min')
-        self.client.SetYSpec('none')
-        self.client.Draw(_draw3Objects())
-
-    def OnPlotDraw4(self, event):
-        self.resetDefaults()
-        drawObj= _draw4Objects()
-        self.client.Draw(drawObj)
-##        # profile
-##        start = _time.clock()
-##        for x in range(10):
-##            self.client.Draw(drawObj)
-##        print "10 plots of Draw4 took: %f sec."%(_time.clock() - start)
-##        # profile end
-
-    def OnPlotDraw5(self, event):
-        # Empty plot with just axes
-        self.resetDefaults()
-        drawObj= _draw5Objects()
-        # make the axis X= (0,5), Y=(0,10)
-        # (default with None is X= (-1,1), Y= (-1,1))
-        self.client.Draw(drawObj, xAxis= (0,5), yAxis= (0,10))
-
-    def OnPlotDraw6(self, event):
-        #Bar Graph Example
-        self.resetDefaults()
-        #self.client.SetEnableLegend(True)   #turn on Legend
-        #self.client.SetEnableGrid(True)     #turn on Grid
-        self.client.SetXSpec('none')        #turns off x-axis scale
-        self.client.SetYSpec('auto')
-        self.client.Draw(_draw6Objects(), xAxis= (0,7))
-
-    def OnPlotRedraw(self,event):
-        self.client.Redraw()
-
-    def OnPlotClear(self,event):
-        self.client.Clear()
-
-    def OnPlotScale(self, event):
-        if self.client.last_draw != None:
-            graphics, xAxis, yAxis= self.client.last_draw
-            self.client.Draw(graphics,(1,3.05),(0,1))
-
-    def OnEnableZoom(self, event):
-        self.client.SetEnableZoom(event.IsChecked())
-
-    def OnEnableGrid(self, event):
-        self.client.SetEnableGrid(event.IsChecked())
-
-    def OnEnableLegend(self, event):
-        self.client.SetEnableLegend(event.IsChecked())
-
-    def OnEnablePointLabel(self, event):
-        self.client.SetEnablePointLabel(event.IsChecked())
-
-    def OnScrUp(self, event):
-        self.client.ScrollUp(1)
-
-    def OnScrRt(self,event):
-        self.client.ScrollRight(2)
-
-    def OnReset(self,event):
-        self.client.Reset()
-
-    def OnHelpAbout(self, event):
-        from wx.lib.dialogs import ScrolledMessageDialog
-        about = ScrolledMessageDialog(self, __doc__, "About...")
-        about.ShowModal()
-
-    def resetDefaults(self):
-        """Just to reset the fonts back to the PlotCanvas defaults"""
-        self.client.SetFont(wx.Font(10,wx.SWISS,wx.NORMAL,wx.NORMAL))
-        self.client.SetFontSizeAxis(10)
-        self.client.SetFontSizeLegend(7)
-        self.client.SetXSpec('auto')
-        self.client.SetYSpec('auto')
-
-
-def __test():
-
-    class MyApp(wx.App):
-        def OnInit(self):
-            wx.InitAllImageHandlers()
-            frame = TestFrame(None, -1, "PlotCanvas")
-            #frame.Show(True)
-            self.SetTopWindow(frame)
-            return True
-
-
-    app = MyApp(0)
-    app.MainLoop()
-
-if __name__ == '__main__':
-    __test()
diff --git a/gr-wxgui/python/wxgui/plotter/__init__.py b/gr-wxgui/python/wxgui/plotter/__init__.py
deleted file mode 100644
index 616492a3e6..0000000000
--- a/gr-wxgui/python/wxgui/plotter/__init__.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# Copyright 2008 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-from channel_plotter import channel_plotter
-from waterfall_plotter import waterfall_plotter
-from bar_plotter import bar_plotter
diff --git a/gr-wxgui/python/wxgui/plotter/bar_plotter.py b/gr-wxgui/python/wxgui/plotter/bar_plotter.py
deleted file mode 100644
index 487db66b64..0000000000
--- a/gr-wxgui/python/wxgui/plotter/bar_plotter.py
+++ /dev/null
@@ -1,150 +0,0 @@
-#
-# Copyright 2009 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-import wx
-from grid_plotter_base import grid_plotter_base
-from OpenGL import GL
-import common
-import numpy
-
-LEGEND_TEXT_FONT_SIZE = 8
-LEGEND_BOX_PADDING = 3
-MIN_PADDING = 0, 0, 0, 70 #top, right, bottom, left
-#constants for the waveform storage
-SAMPLES_KEY = 'samples'
-COLOR_SPEC_KEY = 'color_spec'
-MARKERY_KEY = 'marker'
-TRIG_OFF_KEY = 'trig_off'
-
-##################################################
-# Bar Plotter for histogram waveforms
-##################################################
-class bar_plotter(grid_plotter_base):
-
-	def __init__(self, parent):
-		"""
-		Create a new bar plotter.
-		"""
-		#init
-		grid_plotter_base.__init__(self, parent, MIN_PADDING)
-		self._bars = list()
-		self._bar_width = .5
-		self._color_spec = (0, 0, 0)
-		#setup bar cache
-		self._bar_cache = self.new_gl_cache(self._draw_bars)
-		#setup bar plotter
-		self.register_init(self._init_bar_plotter)
-
-	def _init_bar_plotter(self):
-		"""
-		Run gl initialization tasks.
-		"""
-		GL.glEnableClientState(GL.GL_VERTEX_ARRAY)
-
-	def _draw_bars(self):
-		"""
-		Draw the vertical bars.
-		"""
-		bars = self._bars
-		num_bars = len(bars)
-		if num_bars == 0: return
-		#use scissor to prevent drawing outside grid
-		GL.glEnable(GL.GL_SCISSOR_TEST)
-		GL.glScissor(
-			self.padding_left,
-			self.padding_bottom+1,
-			self.width-self.padding_left-self.padding_right-1,
-			self.height-self.padding_top-self.padding_bottom-1,
-		)
-		#load the points
-		points = list()
-		width = self._bar_width/2
-		for i, bar in enumerate(bars):
-			points.extend([
-					(i-width, 0),
-					(i+width, 0),
-					(i+width, bar),
-					(i-width, bar),
-				]
-			)
-		GL.glColor3f(*self._color_spec)
-		#matrix transforms
-		GL.glPushMatrix()
-		GL.glTranslatef(self.padding_left, self.padding_top, 0)
-		GL.glScalef(
-			(self.width-self.padding_left-self.padding_right),
-			(self.height-self.padding_top-self.padding_bottom),
-			1,
-		)
-		GL.glTranslatef(0, 1, 0)
-		GL.glScalef(1.0/(num_bars-1), -1.0/(self.y_max-self.y_min), 1)
-		GL.glTranslatef(0, -self.y_min, 0)
-		#draw the bars
-		GL.glVertexPointerf(points)
-		GL.glDrawArrays(GL.GL_QUADS, 0, len(points))
-		GL.glPopMatrix()
-		GL.glDisable(GL.GL_SCISSOR_TEST)
-
-	def _populate_point_label(self, x_val, y_val):
-		"""
-		Get the text the will populate the point label.
-		Give X and Y values for the current point.
-		Give values for the channel at the X coordinate.
-
-                Args:
-		    x_val: the current x value
-		    y_val: the current y value
-
-                Returns:
-		    a string with newlines
-		"""
-		if len(self._bars) == 0: return ''
-		scalar = float(len(self._bars)-1)/(self.x_max - self.x_min)
-		#convert x val to bar #
-		bar_index = scalar*(x_val - self.x_min)
-		#if abs(bar_index - round(bar_index)) > self._bar_width/2: return ''
-		bar_index = int(round(bar_index))
-		bar_start = (bar_index - self._bar_width/2)/scalar + self.x_min
-		bar_end = (bar_index + self._bar_width/2)/scalar + self.x_min
-		bar_value = self._bars[bar_index]
-		return '%s to %s\n%s: %s'%(
-			common.eng_format(bar_start, self.x_units),
-			common.eng_format(bar_end, self.x_units),
-			self.y_label, common.eng_format(bar_value, self.y_units),
-		)
-
-	def set_bars(self, bars, bar_width, color_spec):
-		"""
-		Set the bars.
-
-                Args:
-		    bars: a list of bars
-		    bar_width: the fractional width of the bar, between 0 and 1
-		    color_spec: the color tuple
-		"""
-		self.lock()
-		self._bars = bars
-		self._bar_width = float(bar_width)
-		self._color_spec = color_spec
-		self._bar_cache.changed(True)
-		self.unlock()
-
-
diff --git a/gr-wxgui/python/wxgui/plotter/channel_plotter.py b/gr-wxgui/python/wxgui/plotter/channel_plotter.py
deleted file mode 100644
index db174c7b28..0000000000
--- a/gr-wxgui/python/wxgui/plotter/channel_plotter.py
+++ /dev/null
@@ -1,249 +0,0 @@
-#
-# Copyright 2008, 2009, 2010 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-import wx
-from grid_plotter_base import grid_plotter_base
-from OpenGL import GL
-import common
-import numpy
-import gltext
-import math
-
-LEGEND_TEXT_FONT_SIZE = 8
-LEGEND_BOX_PADDING = 3
-MIN_PADDING = 35, 10, 0, 0 #top, right, bottom, left
-#constants for the waveform storage
-SAMPLES_KEY = 'samples'
-COLOR_SPEC_KEY = 'color_spec'
-MARKERY_KEY = 'marker'
-TRIG_OFF_KEY = 'trig_off'
-
-##################################################
-# Channel Plotter for X Y Waveforms
-##################################################
-class channel_plotter(grid_plotter_base):
-
-	def __init__(self, parent):
-		"""
-		Create a new channel plotter.
-		"""
-		#init
-		grid_plotter_base.__init__(self, parent, MIN_PADDING)
-                self.set_use_persistence(False)
-		#setup legend cache
-		self._legend_cache = self.new_gl_cache(self._draw_legend, 50)
-		self.enable_legend(False)
-		#setup waveform cache
-		self._waveform_cache = self.new_gl_cache(self._draw_waveforms, 50)
-		self._channels = dict()
-		#init channel plotter
-		self.register_init(self._init_channel_plotter)
-		self.callback = None
-
-	def _init_channel_plotter(self):
-		"""
-		Run gl initialization tasks.
-		"""
-		GL.glEnableClientState(GL.GL_VERTEX_ARRAY)
-
-	def enable_legend(self, enable=None):
-		"""
-		Enable/disable the legend.
-
-                Args:
-		    enable: true to enable
-
-                Returns:
-		    the enable state when None
-		"""
-		if enable is None: return self._enable_legend
-		self.lock()
-		self._enable_legend = enable
-		self._legend_cache.changed(True)
-		self.unlock()
-
-	def _draw_waveforms(self):
-		"""
-		Draw the waveforms for each channel.
-		Scale the waveform data to the grid using gl matrix operations.
-		"""
-		#use scissor to prevent drawing outside grid
-		GL.glEnable(GL.GL_SCISSOR_TEST)
-		GL.glScissor(
-			self.padding_left+1,
-			self.padding_bottom+1,
-			self.width-self.padding_left-self.padding_right-1,
-			self.height-self.padding_top-self.padding_bottom-1,
-		)
-		for channel in reversed(sorted(self._channels.keys())):
-			samples = self._channels[channel][SAMPLES_KEY]
-			num_samps = len(samples)
-			if not num_samps: continue
-			#use opengl to scale the waveform
-			GL.glPushMatrix()
-			GL.glTranslatef(self.padding_left, self.padding_top, 0)
-			GL.glScalef(
-				(self.width-self.padding_left-self.padding_right),
-				(self.height-self.padding_top-self.padding_bottom),
-				1,
-			)
-			GL.glTranslatef(0, 1, 0)
-			if isinstance(samples, tuple):
-				x_scale, x_trans = 1.0/(self.x_max-self.x_min), -self.x_min
-				points = zip(*samples)
-			else:
-				x_scale, x_trans = 1.0/(num_samps-1), -self._channels[channel][TRIG_OFF_KEY]
-				points = zip(numpy.arange(0, num_samps), samples)
-			GL.glScalef(x_scale, -1.0/(self.y_max-self.y_min), 1)
-			GL.glTranslatef(x_trans, -self.y_min, 0)
-			#draw the points/lines
-			GL.glColor3f(*self._channels[channel][COLOR_SPEC_KEY])
-			marker = self._channels[channel][MARKERY_KEY]
-			if marker is None:
-				GL.glVertexPointerf(points)
-				GL.glDrawArrays(GL.GL_LINE_STRIP, 0, len(points))
-			elif isinstance(marker, (int, float)) and marker > 0:
-				GL.glPointSize(marker)
-				GL.glVertexPointerf(points)
-				GL.glDrawArrays(GL.GL_POINTS, 0, len(points))
-			GL.glPopMatrix()
-		GL.glDisable(GL.GL_SCISSOR_TEST)
-
-	def _populate_point_label(self, x_val, y_val):
-		"""
-		Get the text the will populate the point label.
-		Give X and Y values for the current point.
-		Give values for the channel at the X coordinate.
-
-                Args:
-		    x_val: the current x value
-		    y_val: the current y value
-
-                Returns:
-		    a string with newlines
-		"""
-		#create text
-		label_str = '%s: %s\n%s: %s'%(
-			self.x_label, common.eng_format(x_val, self.x_units),
-			self.y_label, common.eng_format(y_val, self.y_units),
-		)
-		for channel in sorted(self._channels.keys()):
-			samples = self._channels[channel][SAMPLES_KEY]
-			num_samps = len(samples)
-			if not num_samps: continue
-			if isinstance(samples, tuple): continue
-			#linear interpolation
-			x_index = (num_samps-1)*(x_val-self.x_min)/(self.x_max-self.x_min)
-			x_index_low = int(math.floor(x_index))
-			x_index_high = int(math.ceil(x_index))
-			scale = x_index - x_index_low + self._channels[channel][TRIG_OFF_KEY]
-			y_value = (samples[x_index_high] - samples[x_index_low])*scale + samples[x_index_low]
-			if math.isnan(y_value): continue
-			label_str += '\n%s: %s'%(channel, common.eng_format(y_value, self.y_units))
-		return label_str
-
-	def _call_callback (self, x_val, y_val):
-		if self.callback != None:
-			self.callback(x_val, y_val)
-
-	def set_callback (self, callback):
-		self.callback = callback
-
-	def _draw_legend(self):
-		"""
-		Draw the legend in the upper right corner.
-		For each channel, draw a rectangle out of the channel color,
-		and overlay the channel text on top of the rectangle.
-		"""
-		if not self.enable_legend(): return
-		x_off = self.width - self.padding_right - LEGEND_BOX_PADDING
-		for i, channel in enumerate(reversed(sorted(self._channels.keys()))):
-			samples = self._channels[channel][SAMPLES_KEY]
-			if not len(samples): continue
-			color_spec = self._channels[channel][COLOR_SPEC_KEY]
-			txt = gltext.Text(channel, font_size=LEGEND_TEXT_FONT_SIZE)
-			w, h = txt.get_size()
-			#draw rect + text
-			GL.glColor3f(*color_spec)
-			self._draw_rect(
-				x_off - w - LEGEND_BOX_PADDING,
-				self.padding_top/2 - h/2 - LEGEND_BOX_PADDING,
-				w+2*LEGEND_BOX_PADDING,
-				h+2*LEGEND_BOX_PADDING,
-			)
-			txt.draw_text(wx.Point(x_off - w, self.padding_top/2 - h/2))
-			x_off -= w + 4*LEGEND_BOX_PADDING
-
-	def clear_waveform(self, channel):
-		"""
-		Remove a waveform from the list of waveforms.
-
-                Args:
-		    channel: the channel key
-		"""
-		self.lock()
-		if channel in self._channels.keys():
-			self._channels.pop(channel)
-			self._legend_cache.changed(True)
-			self._waveform_cache.changed(True)
-		self.unlock()
-
-	def set_waveform(self, channel, samples=[], color_spec=(0, 0, 0), marker=None, trig_off=0):
-		"""
-		Set the waveform for a given channel.
-
-                Args:
-		    channel: the channel key
-		    samples: the waveform samples
-		    color_spec: the 3-tuple for line color
-		    marker: None for line
-		    trig_off: fraction of sample for trigger offset
-		"""
-		self.lock()
-		if channel not in self._channels.keys(): self._legend_cache.changed(True)
-		self._channels[channel] = {
-			SAMPLES_KEY: samples,
-			COLOR_SPEC_KEY: color_spec,
-			MARKERY_KEY: marker,
-			TRIG_OFF_KEY: trig_off,
-		}
-		self._waveform_cache.changed(True)
-		self.unlock()
-
-if __name__ == '__main__':
-	app = wx.PySimpleApp()
-	frame = wx.Frame(None, -1, 'Demo', wx.DefaultPosition)
-	vbox = wx.BoxSizer(wx.VERTICAL)
-
-	plotter = channel_plotter(frame)
-	plotter.set_x_grid(-1, 1, .2)
-	plotter.set_y_grid(-1, 1, .4)
-	vbox.Add(plotter, 1, wx.EXPAND)
-
-	plotter = channel_plotter(frame)
-	plotter.set_x_grid(-1, 1, .2)
-	plotter.set_y_grid(-1, 1, .4)
-	vbox.Add(plotter, 1, wx.EXPAND)
-
-	frame.SetSizerAndFit(vbox)
-	frame.SetSize(wx.Size(800, 600))
-	frame.Show()
-	app.MainLoop()
diff --git a/gr-wxgui/python/wxgui/plotter/common.py b/gr-wxgui/python/wxgui/plotter/common.py
deleted file mode 100644
index c296b1fa79..0000000000
--- a/gr-wxgui/python/wxgui/plotter/common.py
+++ /dev/null
@@ -1,149 +0,0 @@
-#
-# Copyright 2009 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-import threading
-import time
-import math
-import wx
-
-##################################################
-# Number formatting
-##################################################
-def get_exp(num):
-	"""
-	Get the exponent of the number in base 10.
-
-        Args:
-	    num: the floating point number
-
-        Returns:
-	    the exponent as an integer
-	"""
-	if num == 0: return 0
-	return int(math.floor(math.log10(abs(num))))
-
-def get_si_components(num):
-	"""
-	Get the SI units for the number.
-	Extract the coeff and exponent of the number.
-	The exponent will be a multiple of 3.
-
-        Args:
-	    num: the floating point number
-
-        Returns:
-	    the tuple coeff, exp, prefix
-	"""
-	num = float(num)
-	exp = get_exp(num)
-	exp -= exp%3
-	exp = min(max(exp, -24), 24) #bounds on SI table below
-	prefix = {
-		24: 'Y', 21: 'Z',
-		18: 'E', 15: 'P',
-		12: 'T', 9: 'G',
-		6: 'M', 3: 'k',
-		0: '',
-		-3: 'm', -6: 'u',
-		-9: 'n', -12: 'p',
-		-15: 'f', -18: 'a',
-		-21: 'z', -24: 'y',
-	}[exp]
-	coeff = num/10**exp
-	return coeff, exp, prefix
-
-def sci_format(num):
-	"""
-	Format a floating point number into scientific notation.
-
-        Args:
-	    num: the number to format
-
-        Returns:
-	    a label string
-	"""
-	coeff, exp, prefix = get_si_components(num)
-	if -3 <= exp < 3: return '%g'%num
-	return '%.3ge%d'%(coeff, exp)
-
-def eng_format(num, units=''):
-	"""
-	Format a floating point number into engineering notation.
-
-	Args:
-	    num: the number to format
-	    units: the units to append
-
-	Returns:
-	    a label string
-	"""
-	coeff, exp, prefix = get_si_components(num)
-	if -3 <= exp < 3: return '%g'%num
-	return '%g%s%s%s'%(coeff, units and ' ' or '', prefix, units)
-
-##################################################
-# Interface with thread safe lock/unlock
-##################################################
-class mutex(object):
-	_lock = threading.Lock()
-	def lock(self): self._lock.acquire()
-	def unlock(self): self._lock.release()
-
-##################################################
-# Periodic update thread for point label
-##################################################
-class point_label_thread(threading.Thread, mutex):
-
-	def __init__(self, plotter):
-		self._plotter = plotter
-		self._coor_queue = list()
-		#bind plotter mouse events
-		self._plotter.Bind(wx.EVT_MOTION, lambda evt: self.enqueue(evt.GetPosition()))
-		self._plotter.Bind(wx.EVT_LEAVE_WINDOW, lambda evt: self.enqueue(None))
-		self._plotter.Bind(wx.EVT_RIGHT_DOWN, lambda evt: plotter.enable_point_label(not plotter.enable_point_label()))
-		self._plotter.Bind(wx.EVT_LEFT_DOWN, lambda evt: plotter.call_freq_callback(evt.GetPosition()))
-		#start the thread
-		threading.Thread.__init__(self)
-		self.start()
-
-	def enqueue(self, coor):
-		self.lock()
-		self._coor_queue.append(coor)
-		self.unlock()
-
-	def run(self):
-		last_ts = time.time()
-		last_coor = coor = None
-		try:
-			while True:
-				time.sleep(1.0/30.0)
-				self.lock()
-				#get most recent coor change
-				if self._coor_queue:
-					coor = self._coor_queue[-1]
-					self._coor_queue = list()
-				self.unlock()
-				#update if coor change, or enough time expired
-				if last_coor != coor or (time.time() - last_ts) > (1.0/2.0):
-					self._plotter.set_point_label_coordinate(coor)
-					last_coor = coor
-					last_ts = time.time()
-		except wx.PyDeadObjectError: pass
diff --git a/gr-wxgui/python/wxgui/plotter/gltext.py b/gr-wxgui/python/wxgui/plotter/gltext.py
deleted file mode 100644
index 55627bceb1..0000000000
--- a/gr-wxgui/python/wxgui/plotter/gltext.py
+++ /dev/null
@@ -1,507 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8
-#
-#    Provides some text display functions for wx + ogl
-#    Copyright (C) 2007 Christian Brugger, Stefan Hacker
-#
-#    This program is free software; you can redistribute it and/or modify
-#    it under the terms of the GNU General Public License as published by
-#    the Free Software Foundation; either version 2 of the License, or
-#    (at your option) any later version.
-#
-#    This program is distributed in the hope that it will be useful,
-#    but WITHOUT ANY WARRANTY; without even the implied warranty of
-#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#    GNU General Public License for more details.
-#
-#    You should have received a copy of the GNU General Public License along
-#    with this program; if not, write to the Free Software Foundation, Inc.,
-#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-import wx
-from OpenGL.GL import *
-
-"""
-Optimize with psyco if possible, this gains us about 50% speed when
-creating our textures in trade for about 4MBytes of additional memory usage for
-psyco. If you don't like loosing the memory you have to turn the lines following
-"enable psyco" into a comment while uncommenting the line after "Disable psyco".
-"""
-#Try to enable psyco
-try:
-    import psyco
-    psyco_optimized = False
-except ImportError:
-    psyco = None
-
-#Disable psyco
-#psyco = None
-
-class TextElement(object):
-    """
-    A simple class for using system Fonts to display
-    text in an OpenGL scene
-    """
-    def __init__(self,
-                 text = '',
-                 font = None,
-                 foreground = wx.BLACK,
-                 centered = False):
-        """
-        text (String)         - Text
-        font (wx.Font)        - Font to draw with (None = System default)
-        foreground (wx.Color) - Color of the text
-                or (wx.Bitmap)- Bitmap to overlay the text with
-        centered (bool)       - Center the text
-
-        Initializes the TextElement
-        """
-        # save given variables
-        self._text        = text
-        self._lines       = text.split('\n')
-        self._font        = font
-        self._foreground  = foreground
-        self._centered    = centered
-
-        # init own variables
-        self._owner_cnt   = 0        #refcounter
-        self._texture     = None     #OpenGL texture ID
-        self._text_size   = None     #x/y size tuple of the text
-        self._texture_size= None     #x/y Texture size tuple
-
-        # create Texture
-        self.createTexture()
-
-
-    #---Internal helpers
-
-    def _getUpper2Base(self, value):
-        """
-        Returns the lowest value with the power of
-        2 greater than 'value' (2^n>value)
-        """
-        base2 = 1
-        while base2 < value:
-            base2 *= 2
-        return base2
-
-    #---Functions
-
-    def draw_text(self, position = wx.Point(0,0), scale = 1.0, rotation = 0):
-        """
-        position (wx.Point)    - x/y Position to draw in scene
-        scale    (float)       - Scale
-        rotation (int)         - Rotation in degree
-
-        Draws the text to the scene
-        """
-        #Enable necessary functions
-        glColor(1,1,1,1)
-        glEnable(GL_TEXTURE_2D)
-        glEnable(GL_ALPHA_TEST)       #Enable alpha test
-        glAlphaFunc(GL_GREATER, 0)
-        glEnable(GL_BLEND)            #Enable blending
-        glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
-        #Bind texture
-        glBindTexture(GL_TEXTURE_2D, self._texture)
-
-        ow, oh = self._text_size
-        w , h  = self._texture_size
-        #Perform transformations
-        glPushMatrix()
-        glTranslated(position.x, position.y, 0)
-        glRotate(-rotation, 0, 0, 1)
-        glScaled(scale, scale, scale)
-        if self._centered:
-            glTranslate(-w/2, -oh/2, 0)
-        #Draw vertices
-        glBegin(GL_QUADS)
-        glTexCoord2f(0,0); glVertex2f(0,0)
-        glTexCoord2f(0,1); glVertex2f(0,h)
-        glTexCoord2f(1,1); glVertex2f(w,h)
-        glTexCoord2f(1,0); glVertex2f(w,0)
-        glEnd()
-        glPopMatrix()
-
-        #Disable features
-        glDisable(GL_BLEND)
-        glDisable(GL_ALPHA_TEST)
-        glDisable(GL_TEXTURE_2D)
-
-    def createTexture(self):
-        """
-        Creates a texture from the settings saved in TextElement, to be able to use normal
-        system fonts conviently a wx.MemoryDC is used to draw on a wx.Bitmap. As wxwidgets
-        device contexts don't support alpha at all it is necessary to apply a little hack
-        to preserve antialiasing without sticking to a fixed background color:
-
-        We draw the bmp in b/w mode so we can use its data as a alpha channel for a solid
-        color bitmap which after GL_ALPHA_TEST and GL_BLEND will show a nicely antialiased
-        text on any surface.
-
-        To access the raw pixel data the bmp gets converted to a wx.Image. Now we just have
-        to merge our foreground color with the alpha data we just created and push it all
-        into a OpenGL texture and we are DONE *inhalesdelpy*
-
-        DRAWBACK of the whole conversion thing is a really long time for creating the
-        texture. If you see any optimizations that could save time PLEASE CREATE A PATCH!!!
-        """
-        # get a memory dc
-        dc = wx.MemoryDC()
-
-        # Select an empty bitmap into the MemoryDC - otherwise the call to
-        # GetMultiLineTextExtent() may fail below
-        dc.SelectObject(wx.EmptyBitmap(1,1))
-
-        # set our font
-        dc.SetFont(self._font)
-
-        # Approximate extend to next power of 2 and create our bitmap
-        # REMARK: You wouldn't believe how much fucking speed this little
-        #         sucker gains compared to sizes not of the power of 2. It's like
-        #         500ms --> 0.5ms (on my ATI-GPU powered Notebook). On Sams nvidia
-        #         machine there don't seem to occur any losses...bad drivers?
-        ow, oh = dc.GetMultiLineTextExtent(self._text)[:2]
-        w, h = self._getUpper2Base(ow), self._getUpper2Base(oh)
-
-        self._text_size = wx.Size(ow,oh)
-        self._texture_size = wx.Size(w,h)
-        bmp = wx.EmptyBitmap(w,h)
-
-
-        #Draw in b/w mode to bmp so we can use it as alpha channel
-        dc.SelectObject(bmp)
-        dc.SetBackground(wx.BLACK_BRUSH)
-        dc.Clear()
-        dc.SetTextForeground(wx.WHITE)
-        x,y = 0,0
-        centered = self.centered
-        for line in self._lines:
-            if not line: line = ' '
-            tw, th = dc.GetTextExtent(line)
-            if centered:
-                x = int(round((w-tw)/2))
-            dc.DrawText(line, x, y)
-            x = 0
-            y += th
-        #Release the dc
-        dc.SelectObject(wx.NullBitmap)
-        del dc
-
-        #Generate a correct RGBA data string from our bmp
-        """
-        NOTE: You could also use wx.AlphaPixelData to access the pixel data
-        in 'bmp' directly, but the iterator given by it is much slower than
-        first converting to an image and using wx.Image.GetData().
-        """
-        img   = wx.ImageFromBitmap(bmp)
-        alpha = img.GetData()
-
-        if isinstance(self._foreground, wx.Colour):
-            """
-            If we have a static color...
-            """
-            r,g,b = self._foreground.Get()
-            color = "%c%c%c" % (chr(r), chr(g), chr(b))
-
-            data = ''
-            for i in xrange(0, len(alpha)-1, 3):
-                data += color + alpha[i]
-
-        elif isinstance(self._foreground, wx.Bitmap):
-            """
-            If we have a bitmap...
-            """
-            bg_img    = wx.ImageFromBitmap(self._foreground)
-            bg        = bg_img.GetData()
-            bg_width  = self._foreground.GetWidth()
-            bg_height = self._foreground.GetHeight()
-
-            data = ''
-
-            for y in xrange(0, h):
-                for x in xrange(0, w):
-                    if (y > (bg_height-1)) or (x > (bg_width-1)):
-                        color = "%c%c%c" % (chr(0),chr(0),chr(0))
-                    else:
-                        pos = (x+y*bg_width) * 3
-                        color = bg[pos:pos+3]
-                    data += color + alpha[(x+y*w)*3]
-
-
-        # now convert it to ogl texture
-        self._texture = glGenTextures(1)
-        glBindTexture(GL_TEXTURE_2D, self._texture)
-        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR)
-        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR)
-
-        glPixelStorei(GL_UNPACK_ROW_LENGTH, 0)
-        glPixelStorei(GL_UNPACK_ALIGNMENT, 2)
-        glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, data)
-
-    def deleteTexture(self):
-        """
-        Deletes the OpenGL texture object
-        """
-        if self._texture:
-            if glIsTexture(self._texture):
-                glDeleteTextures(self._texture)
-            else:
-                self._texture = None
-
-    def bind(self):
-        """
-        Increase refcount
-        """
-        self._owner_cnt += 1
-
-    def release(self):
-        """
-        Decrease refcount
-        """
-        self._owner_cnt -= 1
-
-    def isBound(self):
-        """
-        Return refcount
-        """
-        return self._owner_cnt
-
-    def __del__(self):
-        """
-        Destructor
-        """
-        self.deleteTexture()
-
-    #---Getters/Setters
-
-    def getText(self): return self._text
-    def getFont(self): return self._font
-    def getForeground(self): return self._foreground
-    def getCentered(self): return self._centered
-    def getTexture(self): return self._texture
-    def getTexture_size(self): return self._texture_size
-
-    def getOwner_cnt(self): return self._owner_cnt
-    def setOwner_cnt(self, value):
-        self._owner_cnt = value
-
-    #---Properties
-
-    text         = property(getText, None, None, "Text of the object")
-    font         = property(getFont, None, None, "Font of the object")
-    foreground   = property(getForeground, None, None, "Color of the text")
-    centered     = property(getCentered, None, None, "Is text centered")
-    owner_cnt    = property(getOwner_cnt, setOwner_cnt, None, "Owner count")
-    texture      = property(getTexture, None, None, "Used texture")
-    texture_size = property(getTexture_size, None, None, "Size of the used texture")
-
-
-class Text(object):
-    """
-    A simple class for using System Fonts to display text in
-    an OpenGL scene. The Text adds a global Cache of already
-    created text elements to TextElement's base functionality
-    so you can save some memory and increase speed
-    """
-    _texts         = []    #Global cache for TextElements
-
-    def __init__(self,
-                 text = 'Text',
-                 font = None,
-                 font_size = 8,
-                 foreground = wx.BLACK,
-                 centered = False,
-                 bold = False):
-        """
-            text (string)           - displayed text
-            font (wx.Font)          - if None, system default font will be used with font_size
-            font_size (int)         - font size in points
-            foreground (wx.Color)   - Color of the text
-                    or (wx.Bitmap)  - Bitmap to overlay the text with
-            centered (bool)         - should the text drawn centered towards position?
-
-            Initializes the text object
-        """
-        #Init/save variables
-        self._aloc_text = None
-        self._text      = text
-        self._font_size = font_size
-        self._foreground= foreground
-        self._centered  = centered
-
-        #Check if we are offered a font
-        if not font:
-            #if not use the system default
-            self._font = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
-        else:
-            #save it
-            self._font = font
-
-        if bold: self._font.SetWeight(wx.FONTWEIGHT_BOLD)
-
-        #Bind us to our texture
-        self._initText()
-
-    #---Internal helpers
-
-    def _initText(self):
-        """
-        Initializes/Reinitializes the Text object by binding it
-        to a TextElement suitable for its current settings
-        """
-        #Check if we already bound to a texture
-        if self._aloc_text:
-            #if so release it
-            self._aloc_text.release()
-            if not self._aloc_text.isBound():
-                self._texts.remove(self._aloc_text)
-            self._aloc_text = None
-
-        #Adjust our font
-        self._font.SetPointSize(self._font_size)
-
-        #Search for existing element in our global buffer
-        for element in self._texts:
-            if element.text == self._text and\
-              element.font == self._font and\
-              element.foreground == self._foreground and\
-              element.centered == self._centered:
-                # We already exist in global buffer ;-)
-                element.bind()
-                self._aloc_text = element
-                break
-
-        if not self._aloc_text:
-            # We are not in the global buffer, let's create ourselves
-            aloc_text = self._aloc_text = TextElement(self._text,
-                                                       self._font,
-                                                       self._foreground,
-                                                       self._centered)
-            aloc_text.bind()
-            self._texts.append(aloc_text)
-
-    def __del__(self):
-        """
-        Destructor
-        """
-        aloc_text = self._aloc_text
-        aloc_text.release()
-        if not aloc_text.isBound():
-            self._texts.remove(aloc_text)
-
-    #---Functions
-
-    def draw_text(self, position = wx.Point(0,0), scale = 1.0, rotation = 0):
-        """
-        position (wx.Point)    - x/y Position to draw in scene
-        scale    (float)       - Scale
-        rotation (int)         - Rotation in degree
-
-        Draws the text to the scene
-        """
-
-        self._aloc_text.draw_text(position, scale, rotation)
-
-    #---Setter/Getter
-
-    def getText(self): return self._text
-    def setText(self, value, reinit = True):
-        """
-        value (bool)    - New Text
-        reinit (bool)   - Create a new texture
-
-        Sets a new text
-        """
-        self._text = value
-        if reinit:
-            self._initText()
-
-    def getFont(self): return self._font
-    def setFont(self, value, reinit = True):
-        """
-        value (bool)    - New Font
-        reinit (bool)   - Create a new texture
-
-        Sets a new font
-        """
-        self._font = value
-        if reinit:
-            self._initText()
-
-    def getFont_size(self): return self._font_size
-    def setFont_size(self, value, reinit = True):
-        """
-        value (bool)    - New font size
-        reinit (bool)   - Create a new texture
-
-        Sets a new font size
-        """
-        self._font_size = value
-        if reinit:
-            self._initText()
-
-    def getForeground(self): return self._foreground
-    def setForeground(self, value, reinit = True):
-        """
-        value (bool)    - New centered value
-        reinit (bool)   - Create a new texture
-
-        Sets a new value for 'centered'
-        """
-        self._foreground = value
-        if reinit:
-            self._initText()
-
-    def getCentered(self): return self._centered
-    def setCentered(self, value, reinit = True):
-        """
-        value (bool)    - New centered value
-        reinit (bool)   - Create a new texture
-
-        Sets a new value for 'centered'
-        """
-        self._centered = value
-        if reinit:
-            self._initText()
-
-    def get_size(self):
-        """
-        Returns a text size tuple
-        """
-        return self._aloc_text._text_size
-
-    def getTexture_size(self):
-        """
-        Returns a texture size tuple
-        """
-        return self._aloc_text.texture_size
-
-    def getTextElement(self):
-        """
-        Returns the text element bound to the Text class
-        """
-        return self._aloc_text
-
-    def getTexture(self):
-        """
-        Returns the texture of the bound TextElement
-        """
-        return self._aloc_text.texture
-
-
-    #---Properties
-
-    text         = property(getText, setText, None, "Text of the object")
-    font         = property(getFont, setFont, None, "Font of the object")
-    font_size    = property(getFont_size, setFont_size, None, "Font size")
-    foreground   = property(getForeground, setForeground, None, "Color/Overlay bitmap of the text")
-    centered     = property(getCentered, setCentered, None, "Display the text centered")
-    texture_size = property(getTexture_size, None, None, "Size of the used texture")
-    texture      = property(getTexture, None, None, "Texture of bound TextElement")
-    text_element = property(getTextElement,None , None, "TextElement bound to this class")
-
-#Optimize critical functions
-if psyco and not psyco_optimized:
-    psyco.bind(TextElement.createTexture)
-    psyco_optimized = True
diff --git a/gr-wxgui/python/wxgui/plotter/grid_plotter_base.py b/gr-wxgui/python/wxgui/plotter/grid_plotter_base.py
deleted file mode 100644
index bc48ad72f5..0000000000
--- a/gr-wxgui/python/wxgui/plotter/grid_plotter_base.py
+++ /dev/null
@@ -1,458 +0,0 @@
-#
-# Copyright 2009 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-import wx
-import wx.glcanvas
-from OpenGL import GL
-import common
-from plotter_base import plotter_base
-import gltext
-import math
-
-GRID_LINE_COLOR_SPEC = (.7, .7, .7) #gray
-GRID_BORDER_COLOR_SPEC = (0, 0, 0) #black
-TICK_TEXT_FONT_SIZE = 9
-TITLE_TEXT_FONT_SIZE = 13
-UNITS_TEXT_FONT_SIZE = 9
-AXIS_LABEL_PADDING = 5
-TICK_LABEL_PADDING = 5
-TITLE_LABEL_PADDING = 7
-POINT_LABEL_FONT_SIZE = 8
-POINT_LABEL_COLOR_SPEC = (1, 1, 0.5, 0.75)
-POINT_LABEL_PADDING = 3
-POINT_LABEL_OFFSET = 10
-GRID_LINE_DASH_LEN = 4
-
-##################################################
-# Grid Plotter Base Class
-##################################################
-class grid_plotter_base(plotter_base):
-
-	def __init__(self, parent, min_padding=(0, 0, 0, 0)):
-		plotter_base.__init__(self, parent)
-		#setup grid cache
-		self._grid_cache = self.new_gl_cache(self._draw_grid, 25)
-		self.enable_grid_lines(True)
-		#setup padding
-		self.padding_top_min, self.padding_right_min, self.padding_bottom_min, self.padding_left_min = min_padding
-		#store title and unit strings
-		self.set_title('Title')
-		self.set_x_label('X Label')
-		self.set_y_label('Y Label')
-		#init the grid to some value
-		self.set_x_grid(-1, 1, 1)
-		self.set_y_grid(-1, 1, 1)
-		#setup point label cache
-		self._point_label_cache = self.new_gl_cache(self._draw_point_label, 75)
-		self.enable_point_label(False)
-		self.enable_grid_aspect_ratio(False)
-		self.set_point_label_coordinate(None)
-		common.point_label_thread(self)
-		#init grid plotter
-		self.register_init(self._init_grid_plotter)
-
-	def _init_grid_plotter(self):
-		"""
-		Run gl initialization tasks.
-		"""
-		GL.glEnableClientState(GL.GL_VERTEX_ARRAY)
-
-	def set_point_label_coordinate(self, coor):
-		"""
-		Set the point label coordinate.
-
-                Args:
-		    coor: the coordinate x, y tuple or None
-		"""
-		self.lock()
-		self._point_label_coordinate = coor
-		self._point_label_cache.changed(True)
-		self.update()
-		self.unlock()
-
-	def call_freq_callback(self, coor):
-		try:
-			x, y = self._point_label_coordinate
-		except:
-			return
-		if x < self.padding_left or x > self.width-self.padding_right: return
-		if y < self.padding_top or y > self.height-self.padding_bottom: return
-		#scale to window bounds
-		x_win_scalar = float(x - self.padding_left)/(self.width-self.padding_left-self.padding_right)
-		y_win_scalar = float((self.height - y) - self.padding_bottom)/(self.height-self.padding_top-self.padding_bottom)
-		#scale to grid bounds
-		x_val = x_win_scalar*(self.x_max-self.x_min) + self.x_min
-		y_val = y_win_scalar*(self.y_max-self.y_min) + self.y_min
-		self._call_callback(x_val, y_val)
-
-	def enable_grid_aspect_ratio(self, enable=None):
-		"""
-		Enable/disable the grid aspect ratio.
-		If enabled, enforce the aspect ratio on the padding:
-			horizontal_padding:vertical_padding == width:height
-
-                Args:
-		    enable: true to enable
-
-                Returns:
-		    the enable state when None
-		"""
-		if enable is None: return self._enable_grid_aspect_ratio
-		self.lock()
-		self._enable_grid_aspect_ratio = enable
-		for cache in self._gl_caches: cache.changed(True)
-		self.unlock()
-
-	def enable_point_label(self, enable=None):
-		"""
-		Enable/disable the point label.
-
-                Args:
-		    enable: true to enable
-
-                Returns:
-		    the enable state when None
-		"""
-		if enable is None: return self._enable_point_label
-		self.lock()
-		self._enable_point_label = enable
-		self._point_label_cache.changed(True)
-		self.unlock()
-
-	def set_title(self, title):
-		"""
-		Set the title.
-
-                Args:
-		    title the title string
-		"""
-		self.lock()
-		self.title = title
-		self._grid_cache.changed(True)
-		self.unlock()
-
-	def set_x_label(self, x_label, x_units=''):
-		"""
-		Set the x label and units.
-
-                Args:
-		    x_label: the x label string
-		    x_units: the x units string
-		"""
-		self.lock()
-		self.x_label = x_label
-		self.x_units = x_units
-		self._grid_cache.changed(True)
-		self.unlock()
-
-	def set_y_label(self, y_label, y_units=''):
-		"""
-		Set the y label and units.
-
-                Args:
-		    y_label: the y label string
-		    y_units: the y units string
-		"""
-		self.lock()
-		self.y_label = y_label
-		self.y_units = y_units
-		self._grid_cache.changed(True)
-		self.unlock()
-
-	def set_x_grid(self, minimum, maximum, step, scale=False):
-		"""
-		Set the x grid parameters.
-
-                Args:
-		    minimum: the left-most value
-		    maximum: the right-most value
-		    step: the grid spacing
-		    scale: true to scale the x grid
-		"""
-		self.lock()
-		self.x_min = float(minimum)
-		self.x_max = float(maximum)
-		self.x_step = float(step)
-		if scale:
-			coeff, exp, prefix = common.get_si_components(max(abs(self.x_min), abs(self.x_max)))
-			self.x_scalar = 10**(-exp)
-			self.x_prefix = prefix
-		else:
-			self.x_scalar = 1.0
-			self.x_prefix = ''
-		for cache in self._gl_caches: cache.changed(True)
-		self.unlock()
-
-	def set_y_grid(self, minimum, maximum, step, scale=False):
-		"""
-		Set the y grid parameters.
-
-                Args:
-		    minimum: the bottom-most value
-		    maximum: the top-most value
-		    step: the grid spacing
-		    scale: true to scale the y grid
-		"""
-		self.lock()
-		self.y_min = float(minimum)
-		self.y_max = float(maximum)
-		self.y_step = float(step)
-		if scale:
-			coeff, exp, prefix = common.get_si_components(max(abs(self.y_min), abs(self.y_max)))
-			self.y_scalar = 10**(-exp)
-			self.y_prefix = prefix
-		else:
-			self.y_scalar = 1.0
-			self.y_prefix = ''
-		for cache in self._gl_caches: cache.changed(True)
-		self.unlock()
-
-	def _draw_grid(self):
-		"""
-		Create the x, y, tick, and title labels.
-		Resize the padding for the labels.
-		Draw the border, grid, title, and labels.
-		"""
-		##################################################
-		# Create GL text labels
-		##################################################
-		#create x tick labels
-		x_tick_labels = [(tick, self._get_tick_label(tick, self.x_units))
-			for tick in self._get_ticks(self.x_min, self.x_max, self.x_step, self.x_scalar)]
-		#create x tick labels
-		y_tick_labels = [(tick, self._get_tick_label(tick, self.y_units))
-			for tick in self._get_ticks(self.y_min, self.y_max, self.y_step, self.y_scalar)]
-		#create x label
-		x_label_str = self.x_units and "%s (%s%s)"%(self.x_label, self.x_prefix, self.x_units) or self.x_label
-		x_label = gltext.Text(x_label_str, bold=True, font_size=UNITS_TEXT_FONT_SIZE, centered=True)
-		#create y label
-		y_label_str = self.y_units and "%s (%s%s)"%(self.y_label, self.y_prefix, self.y_units) or self.y_label
-		y_label = gltext.Text(y_label_str, bold=True, font_size=UNITS_TEXT_FONT_SIZE, centered=True)
-		#create title
-		title_label = gltext.Text(self.title, bold=True, font_size=TITLE_TEXT_FONT_SIZE, centered=True)
-		##################################################
-		# Resize the padding
-		##################################################
-		self.padding_top = max(2*TITLE_LABEL_PADDING + title_label.get_size()[1], self.padding_top_min)
-		self.padding_right = max(2*TICK_LABEL_PADDING, self.padding_right_min)
-		self.padding_bottom = max(2*AXIS_LABEL_PADDING + TICK_LABEL_PADDING + x_label.get_size()[1] + max([label.get_size()[1] for tick, label in x_tick_labels]), self.padding_bottom_min)
-		self.padding_left = max(2*AXIS_LABEL_PADDING + TICK_LABEL_PADDING + y_label.get_size()[1] + max([label.get_size()[0] for tick, label in y_tick_labels]), self.padding_left_min)
-		#enforce padding aspect ratio if enabled
-		if self.enable_grid_aspect_ratio():
-			w_over_h_ratio = float(self.width)/float(self.height)
-			horizontal_padding = float(self.padding_right + self.padding_left)
-			veritical_padding = float(self.padding_top + self.padding_bottom)
-			if w_over_h_ratio > horizontal_padding/veritical_padding:
-				#increase the horizontal padding
-				new_padding = veritical_padding*w_over_h_ratio - horizontal_padding
-				#distribute the padding to left and right
-				self.padding_left += int(round(new_padding/2))
-				self.padding_right += int(round(new_padding/2))
-			else:
-				#increase the vertical padding
-				new_padding = horizontal_padding/w_over_h_ratio - veritical_padding
-				#distribute the padding to top and bottom
-				self.padding_top += int(round(new_padding/2))
-				self.padding_bottom += int(round(new_padding/2))
-		##################################################
-		# Draw Grid X
-		##################################################
-		for tick, label in x_tick_labels:
-			scaled_tick = (self.width-self.padding_left-self.padding_right)*\
-				(tick/self.x_scalar-self.x_min)/(self.x_max-self.x_min) + self.padding_left
-			self._draw_grid_line(
-				(scaled_tick, self.padding_top),
-				(scaled_tick, self.height-self.padding_bottom),
-			)
-			w, h = label.get_size()
-			label.draw_text(wx.Point(scaled_tick-w/2, self.height-self.padding_bottom+TICK_LABEL_PADDING))
-		##################################################
-		# Draw Grid Y
-		##################################################
-		for tick, label in y_tick_labels:
-			scaled_tick = (self.height-self.padding_top-self.padding_bottom)*\
-				(1 - (tick/self.y_scalar-self.y_min)/(self.y_max-self.y_min)) + self.padding_top
-			self._draw_grid_line(
-				(self.padding_left, scaled_tick),
-				(self.width-self.padding_right, scaled_tick),
-			)
-			w, h = label.get_size()
-			label.draw_text(wx.Point(self.padding_left-w-TICK_LABEL_PADDING, scaled_tick-h/2))
-		##################################################
-		# Draw Border
-		##################################################
-		GL.glColor3f(*GRID_BORDER_COLOR_SPEC)
-		self._draw_rect(
-			self.padding_left,
-			self.padding_top,
-			self.width - self.padding_right - self.padding_left,
-			self.height - self.padding_top - self.padding_bottom,
-			fill=False,
-		)
-		##################################################
-		# Draw Labels
-		##################################################
-		#draw title label
-		title_label.draw_text(wx.Point(self.width/2.0, TITLE_LABEL_PADDING + title_label.get_size()[1]/2))
-		#draw x labels
-		x_label.draw_text(wx.Point(
-				(self.width-self.padding_left-self.padding_right)/2.0 + self.padding_left,
-				self.height-(AXIS_LABEL_PADDING + x_label.get_size()[1]/2),
-				)
-		)
-		#draw y labels
-		y_label.draw_text(wx.Point(
-				AXIS_LABEL_PADDING + y_label.get_size()[1]/2,
-				(self.height-self.padding_top-self.padding_bottom)/2.0 + self.padding_top,
-			), rotation=90,
-		)
-
-	def _get_tick_label(self, tick, unit):
-		"""
-		Format the tick value and create a gl text.
-
-                Args:
-		    tick: the floating point tick value
-		    unit: the axis unit
-
-                Returns:
-		    the tick label text
-		"""
-		if unit: tick_str = common.sci_format(tick)
-		else: tick_str = common.eng_format(tick)
-		return gltext.Text(tick_str, font_size=TICK_TEXT_FONT_SIZE)
-
-	def _get_ticks(self, min, max, step, scalar):
-		"""
-		Determine the positions for the ticks.
-
-                Args:
-		    min: the lower bound
-		    max: the upper bound
-		    step: the grid spacing
-		    scalar: the grid scaling
-
-                Returns:
-		    a list of tick positions between min and max
-		"""
-		#cast to float
-		min = float(min)
-		max = float(max)
-		step = float(step)
-		#check for valid numbers
-		try:
-			assert step > 0
-			assert max > min
-			assert max - min > step
-		except AssertionError: return [-1, 1]
-		#determine the start and stop value
-		start = int(math.ceil(min/step))
-		stop = int(math.floor(max/step))
-		return [i*step*scalar for i in range(start, stop+1)]
-
-	def enable_grid_lines(self, enable=None):
-		"""
-		Enable/disable the grid lines.
-
-                Args:
-		    enable: true to enable
-
-                Returns:
-		    the enable state when None
-		"""
-		if enable is None: return self._enable_grid_lines
-		self.lock()
-		self._enable_grid_lines = enable
-		self._grid_cache.changed(True)
-		self.unlock()
-
-	def _draw_grid_line(self, coor1, coor2):
-		"""
-		Draw a dashed line from coor1 to coor2.
-
-                Args:
-		    corr1: a tuple of x, y
-		    corr2: a tuple of x, y
-		"""
-		if not self.enable_grid_lines(): return
-		length = math.sqrt((coor1[0] - coor2[0])**2 + (coor1[1] - coor2[1])**2)
-		num_points = int(length/GRID_LINE_DASH_LEN)
-		#calculate points array
-		points = [(
-			coor1[0] + i*(coor2[0]-coor1[0])/(num_points - 1),
-			coor1[1] + i*(coor2[1]-coor1[1])/(num_points - 1)
-		) for i in range(num_points)]
-		#set color and draw
-		GL.glColor3f(*GRID_LINE_COLOR_SPEC)
-		GL.glVertexPointerf(points)
-		GL.glDrawArrays(GL.GL_LINES, 0, len(points))
-
-	def _draw_rect(self, x, y, width, height, fill=True):
-		"""
-		Draw a rectangle on the x, y plane.
-		X and Y are the top-left corner.
-
-                Args:
-		    x: the left position of the rectangle
-		    y: the top position of the rectangle
-		    width: the width of the rectangle
-		    height: the height of the rectangle
-		    fill: true to color inside of rectangle
-		"""
-		GL.glBegin(fill and GL.GL_QUADS or GL.GL_LINE_LOOP)
-		GL.glVertex2f(x, y)
-		GL.glVertex2f(x+width, y)
-		GL.glVertex2f(x+width, y+height)
-		GL.glVertex2f(x, y+height)
-		GL.glEnd()
-
-	def _draw_point_label(self):
-		"""
-		Draw the point label for the last mouse motion coordinate.
-		The mouse coordinate must be an X, Y tuple.
-		The label will be drawn at the X, Y coordinate.
-		The values of the X, Y coordinate will be scaled to the current X, Y bounds.
-		"""
-		if not self.enable_point_label(): return
-		if not self._point_label_coordinate: return
-		x, y = self._point_label_coordinate
-		if x < self.padding_left or x > self.width-self.padding_right: return
-		if y < self.padding_top or y > self.height-self.padding_bottom: return
-		#scale to window bounds
-		x_win_scalar = float(x - self.padding_left)/(self.width-self.padding_left-self.padding_right)
-		y_win_scalar = float((self.height - y) - self.padding_bottom)/(self.height-self.padding_top-self.padding_bottom)
-		#scale to grid bounds
-		x_val = x_win_scalar*(self.x_max-self.x_min) + self.x_min
-		y_val = y_win_scalar*(self.y_max-self.y_min) + self.y_min
-		#create text
-		label_str = self._populate_point_label(x_val, y_val)
-		if not label_str: return
-		txt = gltext.Text(label_str, font_size=POINT_LABEL_FONT_SIZE)
-		w, h = txt.get_size()
-		#enable transparency
-		GL.glEnable(GL.GL_BLEND)
-		GL.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA)
-		#draw rect + text
-		GL.glColor4f(*POINT_LABEL_COLOR_SPEC)
-		if x > self.width/2: x -= w+2*POINT_LABEL_PADDING + POINT_LABEL_OFFSET
-		else: x += POINT_LABEL_OFFSET
-		self._draw_rect(x, y-h-2*POINT_LABEL_PADDING, w+2*POINT_LABEL_PADDING, h+2*POINT_LABEL_PADDING)
-		txt.draw_text(wx.Point(x+POINT_LABEL_PADDING, y-h-POINT_LABEL_PADDING))
diff --git a/gr-wxgui/python/wxgui/plotter/plotter_base.py b/gr-wxgui/python/wxgui/plotter/plotter_base.py
deleted file mode 100644
index ca904908ec..0000000000
--- a/gr-wxgui/python/wxgui/plotter/plotter_base.py
+++ /dev/null
@@ -1,220 +0,0 @@
-#
-# Copyright 2008, 2009, 2010 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-import wx
-import wx.glcanvas
-from OpenGL import GL
-import common
-
-BACKGROUND_COLOR_SPEC = (1, 0.976, 1, 1) #creamy white
-
-##################################################
-# GL caching interface
-##################################################
-class gl_cache(object):
-	"""
-	Cache a set of gl drawing routines in a compiled list.
-	"""
-
-	def __init__(self, draw):
-		"""
-		Create a new cache.
-
-                Args:
-		    draw: a function to draw gl stuff
-		"""
-		self.changed(True)
-		self._draw = draw
-
-	def init(self):
-		"""
-		To be called when gl initializes.
-		Create a new compiled list.
-		"""
-		self._grid_compiled_list_id = GL.glGenLists(1)
-
-	def draw(self):
-		"""
-		Draw the gl stuff using a compiled list.
-		If changed, reload the compiled list.
-		"""
-		if self.changed():
-			GL.glNewList(self._grid_compiled_list_id, GL.GL_COMPILE)
-			self._draw()
-			GL.glEndList()
-			self.changed(False)
-		#draw the grid
-		GL.glCallList(self._grid_compiled_list_id)
-
-	def changed(self, state=None):
-		"""
-		Set the changed flag if state is not None.
-		Otherwise return the changed flag.
-		"""
-		if state is None: return self._changed
-		self._changed = state
-
-##################################################
-# OpenGL WX Plotter Canvas
-##################################################
-class plotter_base(wx.glcanvas.GLCanvas, common.mutex):
-	"""
-	Plotter base class for all plot types.
-	"""
-
-	def __init__(self, parent):
-		"""
-		Create a new plotter base.
-		Initialize the GLCanvas with double buffering.
-		Initialize various plotter flags.
-		Bind the paint and size events.
-
-                Args:
-		    parent: the parent widgit
-		"""
-		attribList = (wx.glcanvas.WX_GL_DOUBLEBUFFER, wx.glcanvas.WX_GL_RGBA)
-		wx.glcanvas.GLCanvas.__init__(self, parent, wx.ID_ANY, attribList=attribList);	# Specifically use the CTOR which does NOT create an implicit GL context
-		self._gl_ctx = wx.glcanvas.GLContext(self)	# Create the explicit GL context
-		self.use_persistence=False
-		self.persist_alpha=2.0/15
-		self.clear_accum=True
-		self._gl_init_flag = False
-		self._resized_flag = True
-		self._init_fcns = list()
-		self._draw_fcns = list()
-		self._gl_caches = list()
-		self.Bind(wx.EVT_PAINT, self._on_paint)
-		self.Bind(wx.EVT_SIZE, self._on_size)
-		self.Bind(wx.EVT_ERASE_BACKGROUND, lambda e: None)
-
-	def set_use_persistence(self,enable):
-		self.use_persistence=enable
-		self.clear_accum=True
-
-	def set_persist_alpha(self,analog_alpha):
-		self.persist_alpha=analog_alpha
-
-	def new_gl_cache(self, draw_fcn, draw_pri=50):
-		"""
-		Create a new gl cache.
-		Register its draw and init function.
-
-                Returns:
-		    the new cache object
-		"""
-		cache = gl_cache(draw_fcn)
-		self.register_init(cache.init)
-		self.register_draw(cache.draw, draw_pri)
-		self._gl_caches.append(cache)
-		return cache
-
-	def register_init(self, init_fcn):
-		self._init_fcns.append(init_fcn)
-
-	def register_draw(self, draw_fcn, draw_pri=50):
-		"""
-		Register a draw function with a layer priority.
-		Large pri values are drawn last.
-		Small pri values are drawn first.
-		"""
-		for i in range(len(self._draw_fcns)):
-			if draw_pri < self._draw_fcns[i][0]:
-				self._draw_fcns.insert(i, (draw_pri, draw_fcn))
-				return
-		self._draw_fcns.append((draw_pri, draw_fcn))
-
-	def _on_size(self, event):
-		"""
-		Flag the resize event.
-		The paint event will handle the actual resizing.
-		"""
-		self.lock()
-		self._resized_flag = True
-		self.clear_accum=True
-		self.unlock()
-
-	def _on_paint(self, event):
-		"""
-		Respond to paint events.
-		Initialize GL if this is the first paint event.
-		Resize the view port if the width or height changed.
-		Redraw the screen, calling the draw functions.
-		"""
-		if not self.IsShownOnScreen():	# Cannot realise a GL context on OS X if window is not yet shown
-			return
-		# create device context (needed on Windows, noop on X)
-		dc = None
-		if event.GetEventObject():	# Only create DC if paint triggered by WM message (for OS X)
-			dc = wx.PaintDC(self)
-		self.lock()
-		self.SetCurrent(self._gl_ctx)	# Real the explicit GL context
-
-		# check if gl was initialized
-		if not self._gl_init_flag:
-			GL.glClearColor(*BACKGROUND_COLOR_SPEC)
-			for fcn in self._init_fcns: fcn()
-			self._gl_init_flag = True
-
-		# check for a change in window size
-		if self._resized_flag:
-			self.width, self.height = self.GetSize()
-			GL.glMatrixMode(GL.GL_PROJECTION)
-			GL.glLoadIdentity()
-			GL.glOrtho(0, self.width, self.height, 0, 1, 0)
-			GL.glMatrixMode(GL.GL_MODELVIEW)
-			GL.glLoadIdentity()
-			GL.glViewport(0, 0, self.width, self.height)
-			for cache in self._gl_caches: cache.changed(True)
-			self._resized_flag = False
-
-		# clear buffer if needed
-		if self.clear_accum or not self.use_persistence:
-			GL.glClear(GL.GL_COLOR_BUFFER_BIT)
-			self.clear_accum=False
-
-		# apply fading
-		if self.use_persistence:
-			GL.glEnable(GL.GL_BLEND)
-			GL.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA)
-
-			GL.glBegin(GL.GL_QUADS)
-			GL.glColor4f(1,1,1,self.persist_alpha)
-			GL.glVertex2f(0, self.height)
-			GL.glVertex2f(self.width, self.height)
-			GL.glVertex2f(self.width, 0)
-			GL.glVertex2f(0, 0)
-			GL.glEnd()
-
-			GL.glDisable(GL.GL_BLEND)
-
-		# draw functions
-		for fcn in self._draw_fcns: fcn[1]()
-
-		# show result
-		self.SwapBuffers()
-		self.unlock()
-
-	def update(self):
-		"""
-		Force a paint event.
-		"""
-		if not self._gl_init_flag: return
-		wx.PostEvent(self, wx.PaintEvent())
diff --git a/gr-wxgui/python/wxgui/plotter/waterfall_plotter.py b/gr-wxgui/python/wxgui/plotter/waterfall_plotter.py
deleted file mode 100644
index a5601e25bc..0000000000
--- a/gr-wxgui/python/wxgui/plotter/waterfall_plotter.py
+++ /dev/null
@@ -1,294 +0,0 @@
-#
-# Copyright 2008, 2009, 2010 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-import wx
-from grid_plotter_base import grid_plotter_base
-from OpenGL import GL
-import common
-import numpy
-import gltext
-import math
-import struct
-
-LEGEND_LEFT_PAD = 7
-LEGEND_NUM_BLOCKS = 256
-LEGEND_NUM_LABELS = 9
-LEGEND_WIDTH = 8
-LEGEND_FONT_SIZE = 8
-LEGEND_BORDER_COLOR_SPEC = (0, 0, 0) #black
-MIN_PADDING = 0, 60, 0, 0 #top, right, bottom, left
-
-ceil_log2 = lambda x: 2**int(math.ceil(math.log(x)/math.log(2)))
-
-pack_color   = lambda x: struct.unpack('I', struct.pack('BBBB', *x))[0]
-unpack_color = lambda x: struct.unpack('BBBB', struct.pack('I', int(x)))
-
-def _get_rbga(red_pts, green_pts, blue_pts, alpha_pts=[(0, 0), (1, 0)]):
-	"""
-	Get an array of 256 rgba values where each index maps to a color.
-	The scaling for red, green, blue, alpha are specified in piece-wise functions.
-	The piece-wise functions consist of a set of x, y coordinates.
-	The x and y values of the coordinates range from 0 to 1.
-	The coordinates must be specified so that x increases with the index value.
-	Resulting values are calculated along the line formed between 2 coordinates.
-
-        Args:
-	    red_pts, green_pts, blue_pts, alpha_pts: an array of x,y coordinates for each color element
-
-        Returns:
-	    array of rbga values (4 bytes) each
-	"""
-	def _fcn(x, pw):
-		for (x1, y1), (x2, y2) in zip(pw, pw[1:]):
-			#linear interpolation
-			if x <= x2: return float(y1 - y2)/(x1 - x2)*(x - x1) + y1
-		raise Exception
-	return numpy.array([pack_color(map(
-		lambda pw: int(255*_fcn(i/255.0, pw)),
-		(red_pts, green_pts, blue_pts, alpha_pts),
-	)) for i in range(0, 256)], numpy.uint32)
-
-COLORS = {
-	'rgb1': _get_rbga( #http://www.ks.uiuc.edu/Research/vmd/vmd-1.7.1/ug/img47.gif
-		red_pts = [(0, 0), (.5, 0), (1, 1)],
-		green_pts = [(0, 0), (.5, 1), (1, 0)],
-		blue_pts = [(0, 1), (.5, 0), (1, 0)],
-	),
-	'rgb2': _get_rbga( #http://xtide.ldeo.columbia.edu/~krahmann/coledit/screen.jpg
-		red_pts = [(0, 0), (3.0/8, 0), (5.0/8, 1), (7.0/8, 1), (1, .5)],
-		green_pts = [(0, 0), (1.0/8, 0), (3.0/8, 1), (5.0/8, 1), (7.0/8, 0), (1, 0)],
-		blue_pts = [(0, .5), (1.0/8, 1), (3.0/8, 1), (5.0/8, 0), (1, 0)],
-	),
-	'rgb3': _get_rbga(
-		red_pts = [(0, 0), (1.0/3.0, 0), (2.0/3.0, 0), (1, 1)],
-		green_pts = [(0, 0), (1.0/3.0, 0), (2.0/3.0, 1), (1, 0)],
-		blue_pts = [(0, 0), (1.0/3.0, 1), (2.0/3.0, 0), (1, 0)],
-	),
-	'gray': _get_rbga(
-		red_pts = [(0, 0), (1, 1)],
-		green_pts = [(0, 0), (1, 1)],
-		blue_pts = [(0, 0), (1, 1)],
-	),
-}
-
-##################################################
-# Waterfall Plotter
-##################################################
-class waterfall_plotter(grid_plotter_base):
-	def __init__(self, parent):
-		"""
-		Create a new channel plotter.
-		"""
-		#init
-		grid_plotter_base.__init__(self, parent, MIN_PADDING)
-		#setup legend cache
-		self._legend_cache = self.new_gl_cache(self._draw_legend)
-		#setup waterfall cache
-		self._waterfall_cache = self.new_gl_cache(self._draw_waterfall, 50)
-		#setup waterfall plotter
-		self.register_init(self._init_waterfall)
-		self._resize_texture(False)
-		self._minimum = 0
-		self._maximum = 0
-		self._fft_size = 1
-		self._buffer = list()
-		self._pointer = 0
-		self._counter = 0
-		self.set_num_lines(0)
-		self.set_color_mode(COLORS.keys()[0])
-		self.callback = None
-
-	def _init_waterfall(self):
-		"""
-		Run gl initialization tasks.
-		"""
-		self._waterfall_texture = GL.glGenTextures(1)
-
-	def _draw_waterfall(self):
-		"""
-		Draw the waterfall from the texture.
-		The texture is circularly filled and will wrap around.
-		Use matrix modeling to shift and scale the texture onto the coordinate plane.
-		"""
-		#resize texture
-		self._resize_texture()
-		#setup texture
-		GL.glBindTexture(GL.GL_TEXTURE_2D, self._waterfall_texture)
-		GL.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_LINEAR)
-		GL.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR)
-		GL.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_T, GL.GL_REPEAT)
-		GL.glTexEnvi(GL.GL_TEXTURE_ENV, GL.GL_TEXTURE_ENV_MODE, GL.GL_REPLACE)
-		#write the buffer to the texture
-		while self._buffer:
-			GL.glTexSubImage2D(GL.GL_TEXTURE_2D, 0, 0, self._pointer, self._fft_size, 1, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, self._buffer.pop(0))
-			self._pointer = (self._pointer + 1)%self._num_lines
-		#begin drawing
-		GL.glEnable(GL.GL_TEXTURE_2D)
-		GL.glPushMatrix()
-		#matrix scaling
-		GL.glTranslatef(self.padding_left, self.padding_top, 0)
-		GL.glScalef(
-			float(self.width-self.padding_left-self.padding_right),
-			float(self.height-self.padding_top-self.padding_bottom),
-			1.0,
-		)
-		#draw texture with wrapping
-		GL.glBegin(GL.GL_QUADS)
-		prop_y = float(self._pointer)/(self._num_lines-1)
-		prop_x = float(self._fft_size)/ceil_log2(self._fft_size)
-		off = 1.0/(self._num_lines-1)
-		GL.glTexCoord2f(0, prop_y+1-off)
-		GL.glVertex2f(0, 1)
-		GL.glTexCoord2f(prop_x, prop_y+1-off)
-		GL.glVertex2f(1, 1)
-		GL.glTexCoord2f(prop_x, prop_y)
-		GL.glVertex2f(1, 0)
-		GL.glTexCoord2f(0, prop_y)
-		GL.glVertex2f(0, 0)
-		GL.glEnd()
-		GL.glPopMatrix()
-		GL.glDisable(GL.GL_TEXTURE_2D)
-
-	def _populate_point_label(self, x_val, y_val):
-		"""
-		Get the text the will populate the point label.
-		Give the X value for the current point.
-
-                Args:
-		    x_val: the current x value
-		    y_val: the current y value
-
-                Returns:
-		    a value string with units
-		"""
-		return '%s: %s'%(self.x_label, common.eng_format(x_val, self.x_units))
-
-	def _call_callback(self, x_val, y_val):
-		if self.callback != None:
-			self.callback(x_val,y_val)
-
-	def set_callback(self,callback):
-		self.callback = callback
-
-	def _draw_legend(self):
-		"""
-		Draw the color scale legend.
-		"""
-		if not self._color_mode: return
-		legend_height = self.height-self.padding_top-self.padding_bottom
-		#draw each legend block
-		block_height = float(legend_height)/LEGEND_NUM_BLOCKS
-		x = self.width - self.padding_right + LEGEND_LEFT_PAD
-		for i in range(LEGEND_NUM_BLOCKS):
-			color = unpack_color(COLORS[self._color_mode][int(255*i/float(LEGEND_NUM_BLOCKS-1))])
-			GL.glColor4f(*numpy.array(color)/255.0)
-			y = self.height - (i+1)*block_height - self.padding_bottom
-			self._draw_rect(x, y, LEGEND_WIDTH, block_height)
-		#draw rectangle around color scale border
-		GL.glColor3f(*LEGEND_BORDER_COLOR_SPEC)
-		self._draw_rect(x, self.padding_top, LEGEND_WIDTH, legend_height, fill=False)
-		#draw each legend label
-		label_spacing = float(legend_height)/(LEGEND_NUM_LABELS-1)
-		x = self.width - (self.padding_right - LEGEND_LEFT_PAD - LEGEND_WIDTH)/2
-		for i in range(LEGEND_NUM_LABELS):
-			proportion = i/float(LEGEND_NUM_LABELS-1)
-			dB = proportion*(self._maximum - self._minimum) + self._minimum
-			y = self.height - i*label_spacing - self.padding_bottom
-			txt = gltext.Text('%ddB'%int(dB), font_size=LEGEND_FONT_SIZE, centered=True)
-			txt.draw_text(wx.Point(x, y))
-
-	def _resize_texture(self, flag=None):
-		"""
-		Create the texture to fit the fft_size X num_lines.
-
-                Args:
-		    flag: the set/unset or update flag
-		"""
-		if flag is not None:
-			self._resize_texture_flag = flag
-			return
-		if not self._resize_texture_flag: return
-		self._buffer = list()
-		self._pointer = 0
-		if self._num_lines and self._fft_size:
-			GL.glBindTexture(GL.GL_TEXTURE_2D, self._waterfall_texture)
-			data = numpy.zeros(self._num_lines*ceil_log2(self._fft_size)*4, numpy.uint8).tostring()
-			GL.glTexImage2D(GL.GL_TEXTURE_2D, 0, GL.GL_RGBA, ceil_log2(self._fft_size), self._num_lines, 0, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, data)
-		self._resize_texture_flag = False
-
-	def set_color_mode(self, color_mode):
-		"""
-		Set the color mode.
-		New samples will be converted to the new color mode.
-		Old samples will not be recolorized.
-
-                Args:
-		    color_mode: the new color mode string
-		"""
-		self.lock()
-		if color_mode in COLORS.keys():
-			self._color_mode = color_mode
-			self._legend_cache.changed(True)
-		self.update()
-		self.unlock()
-
-	def set_num_lines(self, num_lines):
-		"""
-		Set number of lines.
-		Powers of two only.
-
-                Args:
-		    num_lines: the new number of lines
-		"""
-		self.lock()
-		self._num_lines = num_lines
-		self._resize_texture(True)
-		self.update()
-		self.unlock()
-
-	def set_samples(self, samples, minimum, maximum):
-		"""
-		Set the samples to the waterfall.
-		Convert the samples to color data.
-
-                Args:
-		    samples: the array of floats
-		    minimum: the minimum value to scale
-		    maximum: the maximum value to scale
-		"""
-		self.lock()
-		#set the min, max values
-		if self._minimum != minimum or self._maximum != maximum:
-			self._minimum = minimum
-			self._maximum = maximum
-			self._legend_cache.changed(True)
-		if self._fft_size != len(samples):
-			self._fft_size = len(samples)
-			self._resize_texture(True)
-		#normalize the samples to min/max
-		samples = (samples - minimum)*float(255/(maximum-minimum))
-		samples = numpy.clip(samples, 0, 255) #clip
-		samples = numpy.array(samples, numpy.uint8)
-		#convert the samples to RGBA data
-		data = COLORS[self._color_mode][samples].tostring()
-		self._buffer.append(data)
-		self._waterfall_cache.changed(True)
-		self.unlock()
diff --git a/gr-wxgui/python/wxgui/powermate.py b/gr-wxgui/python/wxgui/powermate.py
deleted file mode 100644
index 7c324c5d95..0000000000
--- a/gr-wxgui/python/wxgui/powermate.py
+++ /dev/null
@@ -1,448 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2005 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-"""
-Handler for Griffin PowerMate, Contour ShuttlePro & ShuttleXpress USB knobs
-
-This is Linux and wxPython specific.
-"""
-
-import os
-import sys
-import struct
-import exceptions
-import threading
-import wx
-from gnuradio import gru
-
-imported_ok = True
-
-try:
-    import select
-    import fcntl
-except ImportError:
-    imported_ok = False
-
-
-# First a little bit of background:
-#
-# The Griffin PowerMate has
-#  * a single knob which rotates
-#  * a single button (pressing the knob)
-#
-# The Contour ShuttleXpress (aka SpaceShuttle) has
-#  * "Jog Wheel"  -- the knob (rotary encoder) on the inside
-#  * "Shuttle Ring" -- the spring loaded rubber covered ring
-#  * 5 buttons
-#
-# The Contour ShuttlePro has
-#  * "Jog Wheel" -- the knob (rotary encoder) on the inside
-#  * "Shuttle Ring" -- the spring loaded rubber covered ring
-#  * 13 buttons
-#
-# The Contour ShuttlePro V2 has
-#  *"Jog Wheel" -- the knob (rotary encoder) on the inside
-#  * "Shuttle Ring" -- the spring loaded rubber covered ring
-#  * 15 buttons
-
-# We remap all the buttons on the devices so that they start at zero.
-
-# For the ShuttleXpress the buttons are 0 to 4 (left to right)
-
-# For the ShuttlePro, we number the buttons immediately above
-# the ring 0 to 4 (left to right) so that they match our numbering
-# on the ShuttleXpress.  The top row is 5, 6, 7, 8.  The first row below
-# the ring is 9, 10, and the bottom row is 11, 12.
-
-# For the ShuttlePro V2, buttons 13 & 14 are to the
-# left and right of the wheel respectively.
-
-# We generate 3 kinds of events:
-#
-#   button press/release (button_number, press/release)
-#   knob rotation (relative_clicks)       # typically -1, +1
-#   shuttle position (absolute_position)  # -7,-6,...,0,...,6,7
-
-# ----------------------------------------------------------------
-# Our ID's for the devices:
-# Not to be confused with anything related to magic hardware numbers.
-
-ID_POWERMATE         = 'powermate'
-ID_SHUTTLE_XPRESS    = 'shuttle xpress'
-ID_SHUTTLE_PRO       = 'shuttle pro'
-ID_SHUTTLE_PRO_V2    = 'shuttle pro v2'
-
-# ------------------------------------------------------------------------
-# format of messages that we read from /dev/input/event*
-# See /usr/include/linux/input.h for more info
-#
-#struct input_event {
-#        struct timeval time; = {long seconds, long microseconds}
-#        unsigned short type;
-#        unsigned short code;
-#        unsigned int value;
-#};
-
-input_event_struct = "@llHHi"
-input_event_size = struct.calcsize(input_event_struct)
-
-# ------------------------------------------------------------------------
-# input_event types
-# ------------------------------------------------------------------------
-
-IET_SYN		  = 0x00   # aka RESET
-IET_KEY		  = 0x01   # key or button press/release
-IET_REL		  = 0x02   # relative movement (knob rotation)
-IET_ABS		  = 0x03   # absolute position (graphics pad, etc)
-IET_MSC		  = 0x04
-IET_LED		  = 0x11
-IET_SND		  = 0x12
-IET_REP		  = 0x14
-IET_FF		  = 0x15
-IET_PWR		  = 0x16
-IET_FF_STATUS	  = 0x17
-IET_MAX		  = 0x1f
-
-# ------------------------------------------------------------------------
-# input_event codes (there are a zillion of them, we only define a few)
-# ------------------------------------------------------------------------
-
-# these are valid for IET_KEY
-
-IEC_BTN_0	   = 0x100
-IEC_BTN_1	   = 0x101
-IEC_BTN_2	   = 0x102
-IEC_BTN_3	   = 0x103
-IEC_BTN_4	   = 0x104
-IEC_BTN_5	   = 0x105
-IEC_BTN_6	   = 0x106
-IEC_BTN_7	   = 0x107
-IEC_BTN_8	   = 0x108
-IEC_BTN_9	   = 0x109
-IEC_BTN_10	   = 0x10a
-IEC_BTN_11	   = 0x10b
-IEC_BTN_12	   = 0x10c
-IEC_BTN_13	   = 0x10d
-IEC_BTN_14	   = 0x10e
-IEC_BTN_15	   = 0x10f
-
-# these are valid for IET_REL (Relative axes)
-
-IEC_REL_X	   = 0x00
-IEC_REL_Y	   = 0x01
-IEC_REL_Z	   = 0x02
-IEC_REL_HWHEEL	   = 0x06
-IEC_REL_DIAL	   = 0x07   # rotating the knob
-IEC_REL_WHEEL	   = 0x08   # moving the shuttle ring
-IEC_REL_MISC	   = 0x09
-IEC_REL_MAX	   = 0x0f
-
-# ------------------------------------------------------------------------
-
-class powermate(threading.Thread):
-    """
-    Interface to Griffin PowerMate and Contour Shuttles
-    """
-    def __init__(self, event_receiver=None, filename=None, **kwargs):
-        self.event_receiver = event_receiver
-        self.handle = -1
-        if not imported_ok:
-            raise exceptions.RuntimeError, 'powermate not supported on this platform'
-
-        if filename:
-            if not self._open_device(filename):
-                raise exceptions.RuntimeError, 'Unable to find powermate'
-        else:
-            ok = False
-            for d in range(0, 16):
-                if self._open_device("/dev/input/event%d" % d):
-                    ok = True
-                    break
-            if not ok:
-                raise exceptions.RuntimeError, 'Unable to find powermate'
-
-        threading.Thread.__init__(self, **kwargs)
-        self.setDaemon (1)
-        self.keep_running = True
-        self.start ()
-
-    def __del__(self):
-        self.keep_running = False
-        if self.handle >= 0:
-            os.close(self.handle)
-            self.handle = -1
-
-    def _open_device(self, filename):
-        try:
-            self.handle = os.open(filename, os.O_RDWR)
-            if self.handle < 0:
-                return False
-
-            # read event device name
-            name = fcntl.ioctl(self.handle, gru.hexint(0x80ff4506), chr(0) * 256)
-            name = name.replace(chr(0), '')
-
-            # do we see anything we recognize?
-            if name == 'Griffin PowerMate' or name == 'Griffin SoundKnob':
-                self.id = ID_POWERMATE
-                self.mapper = _powermate_remapper()
-            elif name == 'CAVS SpaceShuttle A/V' or name == 'Contour Design ShuttleXpress':
-                self.id = ID_SHUTTLE_XPRESS
-                self.mapper = _contour_remapper()
-            elif name == 'Contour Design ShuttlePRO':
-                self.id = ID_SHUTTLE_PRO
-                self.mapper = _contour_remapper()
-            elif name == 'Contour Design ShuttlePRO v2':
-                self.id = ID_SHUTTLE_PRO_V2
-                self.mapper = _contour_remapper()
-            else:
-                os.close(self.handle)
-                self.handle = -1
-                return False
-
-            # get exclusive control of the device, using ioctl EVIOCGRAB
-	    # there may be an issue with this on non x86 platforms and if
-	    # the _IOW,_IOC,... macros in <asm/ioctl.h> are changed
-            fcntl.ioctl(self.handle,gru.hexint(0x40044590), 1)
-            return True
-        except exceptions.OSError:
-            return False
-
-
-    def set_event_receiver(self, obj):
-        self.event_receiver = obj
-
-
-    def set_led_state(self, static_brightness, pulse_speed=0,
-                      pulse_table=0, pulse_on_sleep=0, pulse_on_wake=0):
-        """
-        What do these magic values mean...
-        """
-        if self.id != ID_POWERMATE:
-            return False
-
-        static_brightness &= 0xff;
-        if pulse_speed < 0:
-            pulse_speed = 0
-        if pulse_speed > 510:
-            pulse_speed = 510
-        if pulse_table < 0:
-            pulse_table = 0
-        if pulse_table > 2:
-            pulse_table = 2
-        pulse_on_sleep = not not pulse_on_sleep # not not = convert to 0/1
-        pulse_on_wake  = not not pulse_on_wake
-        magic = (static_brightness
-                 | (pulse_speed << 8)
-                 | (pulse_table << 17)
-                 | (pulse_on_sleep << 19)
-                 | (pulse_on_wake << 20))
-        data = struct.pack(input_event_struct, 0, 0, 0x04, 0x01, magic)
-        os.write(self.handle, data)
-        return True
-
-    def run (self):
-        while (self.keep_running):
-            s = os.read (self.handle, input_event_size)
-            if not s:
-                self.keep_running = False
-                break
-
-            raw_input_event = struct.unpack(input_event_struct,s)
-            sec, usec, type, code, val = self.mapper(raw_input_event)
-
-            if self.event_receiver is None:
-                continue
-
-            if type == IET_SYN:    # ignore
-                pass
-            elif type == IET_MSC:  # ignore (seems to be PowerMate reporting led brightness)
-                pass
-            elif type == IET_REL and code == IEC_REL_DIAL:
-                #print "Dial: %d" % (val,)
-                wx.PostEvent(self.event_receiver, PMRotateEvent(val))
-            elif type == IET_REL and code == IEC_REL_WHEEL:
-                #print "Shuttle: %d" % (val,)
-                wx.PostEvent(self.event_receiver, PMShuttleEvent(val))
-            elif type == IET_KEY:
-                #print "Key: Btn%d %d" % (code - IEC_BTN_0, val)
-                wx.PostEvent(self.event_receiver,
-                             PMButtonEvent(code - IEC_BTN_0, val))
-            else:
-                print "powermate: unrecognized event: type = 0x%x  code = 0x%x  val = %d" % (type, code, val)
-
-
-class _powermate_remapper(object):
-    def __init__(self):
-        pass
-    def __call__(self, event):
-        """
-        Notice how nice and simple this is...
-        """
-        return event
-
-class _contour_remapper(object):
-    def __init__(self):
-        self.prev = None
-    def __call__(self, event):
-        """
-        ...and how screwed up this is
-        """
-        sec, usec, type, code, val = event
-        if type == IET_REL and code == IEC_REL_WHEEL:
-            # === Shuttle ring ===
-            # First off, this really ought to be IET_ABS, not IET_REL!
-            # They never generate a zero value so you can't
-            # tell when the shuttle ring is back in the center.
-            # We kludge around this by calling both -1 and 1 zero.
-            if val == -1 or val == 1:
-                return (sec, usec, type, code, 0)
-            return event
-
-        if type == IET_REL and code == IEC_REL_DIAL:
-            # === Jog knob (rotary encoder) ===
-            # Dim wits got it wrong again!  This one should return a
-            # a relative value, e.g., -1, +1.  Instead they return
-            # a total that runs modulo 256 (almost!).   For some
-            # reason they count like this 253, 254, 255, 1, 2, 3
-
-            if self.prev is None:                  # first time call
-                self.prev = val
-                return (sec, usec, IET_SYN, 0, 0)  # will be ignored above
-
-            diff = val - self.prev
-            if diff == 0:                          # sometimes it just sends stuff...
-                return (sec, usec, IET_SYN, 0, 0)  # will be ignored above
-
-            if abs(diff) > 100:      # crossed into the twilight zone
-                if self.prev > val:  # we've wrapped going forward
-                    self.prev = val
-                    return (sec, usec, type, code, +1)
-                else:                # we've wrapped going backward
-                    self.prev = val
-                    return (sec, usec, type, code, -1)
-
-            self.prev = val
-            return (sec, usec, type, code, diff)
-
-        if type == IET_KEY:
-            # remap keys so that all 3 gadgets have buttons 0 to 4 in common
-            return (sec, usec, type,
-                    (IEC_BTN_5, IEC_BTN_6, IEC_BTN_7, IEC_BTN_8,
-                     IEC_BTN_0, IEC_BTN_1, IEC_BTN_2, IEC_BTN_3, IEC_BTN_4,
-                     IEC_BTN_9,  IEC_BTN_10,
-                     IEC_BTN_11, IEC_BTN_12,
-                     IEC_BTN_13, IEC_BTN_14)[code - IEC_BTN_0], val)
-
-        return event
-
-# ------------------------------------------------------------------------
-# new wxPython event classes
-# ------------------------------------------------------------------------
-
-grEVT_POWERMATE_BUTTON  = wx.NewEventType()
-grEVT_POWERMATE_ROTATE  = wx.NewEventType()
-grEVT_POWERMATE_SHUTTLE = wx.NewEventType()
-
-EVT_POWERMATE_BUTTON = wx.PyEventBinder(grEVT_POWERMATE_BUTTON, 0)
-EVT_POWERMATE_ROTATE = wx.PyEventBinder(grEVT_POWERMATE_ROTATE, 0)
-EVT_POWERMATE_SHUTTLE = wx.PyEventBinder(grEVT_POWERMATE_SHUTTLE, 0)
-
-class PMButtonEvent(wx.PyEvent):
-    def __init__(self, button, value):
-        wx.PyEvent.__init__(self)
-        self.SetEventType(grEVT_POWERMATE_BUTTON)
-        self.button = button
-        self.value = value
-
-    def Clone (self):
-        self.__class__(self.GetId())
-
-
-class PMRotateEvent(wx.PyEvent):
-    def __init__(self, delta):
-        wx.PyEvent.__init__(self)
-        self.SetEventType (grEVT_POWERMATE_ROTATE)
-        self.delta = delta
-
-    def Clone (self):
-        self.__class__(self.GetId())
-
-
-class PMShuttleEvent(wx.PyEvent):
-    def __init__(self, position):
-        wx.PyEvent.__init__(self)
-        self.SetEventType (grEVT_POWERMATE_SHUTTLE)
-        self.position = position
-
-    def Clone (self):
-        self.__class__(self.GetId())
-
-# ------------------------------------------------------------------------
-#  Example usage
-# ------------------------------------------------------------------------
-
-if __name__ == '__main__':
-    class Frame(wx.Frame):
-        def __init__(self,parent=None,id=-1,title='Title',
-                     pos=wx.DefaultPosition, size=(400,200)):
-            wx.Frame.__init__(self,parent,id,title,pos,size)
-            EVT_POWERMATE_BUTTON(self, self.on_button)
-            EVT_POWERMATE_ROTATE(self, self.on_rotate)
-            EVT_POWERMATE_SHUTTLE(self, self.on_shuttle)
-            self.brightness = 128
-            self.pulse_speed = 0
-
-            try:
-                self.pm = powermate(self)
-            except:
-                sys.stderr.write("Unable to find PowerMate or Contour Shuttle\n")
-                sys.exit(1)
-
-            self.pm.set_led_state(self.brightness, self.pulse_speed)
-
-
-        def on_button(self, evt):
-            print "Button %d %s" % (evt.button,
-                                    ("Released", "Pressed")[evt.value])
-
-        def on_rotate(self, evt):
-            print "Rotated %d" % (evt.delta,)
-            if 0:
-                new = max(0, min(255, self.brightness + evt.delta))
-                if new != self.brightness:
-                    self.brightness = new
-                    self.pm.set_led_state(self.brightness, self.pulse_speed)
-
-        def on_shuttle(self, evt):
-            print "Shuttle %d" % (evt.position,)
-
-    class App(wx.App):
-        def OnInit(self):
-            title='PowerMate Demo'
-            self.frame = Frame(parent=None,id=-1,title=title)
-            self.frame.Show()
-            self.SetTopWindow(self.frame)
-            return True
-
-    app = App()
-    app.MainLoop ()
diff --git a/gr-wxgui/python/wxgui/pubsub.py b/gr-wxgui/python/wxgui/pubsub.py
deleted file mode 100644
index e55d691978..0000000000
--- a/gr-wxgui/python/wxgui/pubsub.py
+++ /dev/null
@@ -1,153 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2008 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-"""
-Abstract GNU Radio publisher/subscriber interface
-
-This is a proof of concept implementation, will likely change significantly.
-"""
-
-class pubsub(dict):
-    def __init__(self):
-        self._publishers = { }
-        self._subscribers = { }
-        self._proxies = { }
-
-    def __missing__(self, key, value=None):
-        dict.__setitem__(self, key, value)
-        self._publishers[key] = None
-        self._subscribers[key] = []
-        self._proxies[key] = None
-
-    def __setitem__(self, key, val):
-        if not self.has_key(key):
-            self.__missing__(key, val)
-        elif self._proxies[key] is not None:
-            (p, pkey) = self._proxies[key]
-            p[pkey] = val
-        else:
-            dict.__setitem__(self, key, val)
-        for sub in self._subscribers[key]:
-            # Note this means subscribers will get called in the thread
-            # context of the 'set' caller.
-            sub(val)
-
-    def __getitem__(self, key):
-        if not self.has_key(key): self.__missing__(key)
-        if self._proxies[key] is not None:
-            (p, pkey) = self._proxies[key]
-            return p[pkey]
-        elif self._publishers[key] is not None:
-            return self._publishers[key]()
-        else:
-            return dict.__getitem__(self, key)
-
-    def publish(self, key, publisher):
-        if not self.has_key(key): self.__missing__(key)
-        if self._proxies[key] is not None:
-            (p, pkey) = self._proxies[key]
-            p.publish(pkey, publisher)
-        else:
-            self._publishers[key] = publisher
-
-    def subscribe(self, key, subscriber):
-        if not self.has_key(key): self.__missing__(key)
-        if self._proxies[key] is not None:
-            (p, pkey) = self._proxies[key]
-            p.subscribe(pkey, subscriber)
-        else:
-            self._subscribers[key].append(subscriber)
-
-    def unpublish(self, key):
-        if self._proxies[key] is not None:
-            (p, pkey) = self._proxies[key]
-            p.unpublish(pkey)
-        else:
-            self._publishers[key] = None
-
-    def unsubscribe(self, key, subscriber):
-        if self._proxies[key] is not None:
-            (p, pkey) = self._proxies[key]
-            p.unsubscribe(pkey, subscriber)
-        else:
-            self._subscribers[key].remove(subscriber)
-
-    def proxy(self, key, p, pkey=None):
-        if not self.has_key(key): self.__missing__(key)
-        if pkey is None: pkey = key
-        self._proxies[key] = (p, pkey)
-
-    def unproxy(self, key):
-        self._proxies[key] = None
-
-# Test code
-if __name__ == "__main__":
-    import sys
-    o = pubsub()
-
-    # Non-existent key gets auto-created with None value
-    print "Auto-created key 'foo' value:", o['foo']
-
-    # Add some subscribers
-    # First is a bare function
-    def print_len(x):
-        print "len=%i" % (len(x), )
-    o.subscribe('foo', print_len)
-
-    # The second is a class member function
-    class subber(object):
-        def __init__(self, param):
-            self._param = param
-        def printer(self, x):
-            print self._param, `x`
-    s = subber('param')
-    o.subscribe('foo', s.printer)
-
-    # The third is a lambda function
-    o.subscribe('foo', lambda x: sys.stdout.write('val='+`x`+'\n'))
-
-    # Update key 'foo', will notify subscribers
-    print "Updating 'foo' with three subscribers:"
-    o['foo'] = 'bar';
-
-    # Remove first subscriber
-    o.unsubscribe('foo', print_len)
-
-    # Update now will only trigger second and third subscriber
-    print "Updating 'foo' after removing a subscriber:"
-    o['foo'] = 'bar2';
-
-    # Publish a key as a function, in this case, a lambda function
-    o.publish('baz', lambda : 42)
-    print "Published value of 'baz':", o['baz']
-
-    # Unpublish the key
-    o.unpublish('baz')
-
-    # This will return None, as there is no publisher
-    print "Value of 'baz' with no publisher:", o['baz']
-
-    # Set 'baz' key, it gets cached
-    o['baz'] = 'bazzz'
-
-    # Now will return cached value, since no provider
-    print "Cached value of 'baz' after being set:", o['baz']
diff --git a/gr-wxgui/python/wxgui/scope_window.py b/gr-wxgui/python/wxgui/scope_window.py
deleted file mode 100644
index 71e2b8e285..0000000000
--- a/gr-wxgui/python/wxgui/scope_window.py
+++ /dev/null
@@ -1,691 +0,0 @@
-#
-# Copyright 2008,2010 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-##################################################
-# Imports
-##################################################
-import plotter
-import common
-import wx
-import numpy
-import time
-import pubsub
-from constants import *
-from gnuradio import gr #for gr.prefs, trigger modes
-from gnuradio import wxgui
-import forms
-
-##################################################
-# Constants
-##################################################
-DEFAULT_FRAME_RATE = gr.prefs().get_long('wxgui', 'scope_rate', 30)
-PERSIST_ALPHA_MIN_EXP, PERSIST_ALPHA_MAX_EXP = -2, 0
-SLIDER_STEPS = 100
-DEFAULT_TRIG_MODE = gr.prefs().get_long('wxgui', 'trig_mode', wxgui.TRIG_MODE_AUTO)
-DEFAULT_WIN_SIZE = (600, 300)
-COUPLING_MODES = (
-	('DC', False),
-	('AC', True),
-)
-TRIGGER_MODES = (
-	('Freerun', wxgui.TRIG_MODE_FREE),
-	('Auto', wxgui.TRIG_MODE_AUTO),
-	('Normal', wxgui.TRIG_MODE_NORM),
-	('Stripchart', wxgui.TRIG_MODE_STRIPCHART),
-)
-TRIGGER_SLOPES = (
-	('Pos +', wxgui.TRIG_SLOPE_POS),
-	('Neg -', wxgui.TRIG_SLOPE_NEG),
-)
-CHANNEL_COLOR_SPECS = (
-	(0.3, 0.3, 1.0),
-	(0.0, 0.8, 0.0),
-	(1.0, 0.0, 0.0),
-	(0.8, 0.0, 0.8),
-        (0.7, 0.7, 0.0),
-        (0.15, 0.90, 0.98),
-
-)
-TRIGGER_COLOR_SPEC = (1.0, 0.4, 0.0)
-AUTORANGE_UPDATE_RATE = 0.5 #sec
-MARKER_TYPES = (
-	('Line Link', None),
-	('Dot Large', 3.0),
-	('Dot Med', 2.0),
-	('Dot Small', 1.0),
-	('None', 0.0),
-)
-DEFAULT_MARKER_TYPE = None
-
-##################################################
-# Scope window control panel
-##################################################
-class control_panel(wx.Panel):
-	"""
-	A control panel with wx widgits to control the plotter and scope block.
-	"""
-	def __init__(self, parent):
-		"""
-		Create a new control panel.
-
-                Args:
-		    parent: the wx parent window
-		"""
-		WIDTH = 90
-		self.parent = parent
-		wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
-		parent[SHOW_CONTROL_PANEL_KEY] = True
-		parent.subscribe(SHOW_CONTROL_PANEL_KEY, self.Show)
-		control_box = wx.BoxSizer(wx.VERTICAL)
-
-		##################################################
-		# Persistence
-		##################################################
-
-		forms.check_box(
-			sizer=control_box, parent=self, label='Persistence',
-			ps=parent, key=USE_PERSISTENCE_KEY,
-		)
-		#static text and slider for analog alpha
-		persist_alpha_text = forms.static_text(
-			sizer=control_box, parent=self, label='Analog Alpha',
-			converter=forms.float_converter(lambda x: '%.4f'%x),
-			ps=parent, key=PERSIST_ALPHA_KEY, width=50,
-		)
-		persist_alpha_slider = forms.log_slider(
-			sizer=control_box, parent=self,
-			min_exp=PERSIST_ALPHA_MIN_EXP,
-			max_exp=PERSIST_ALPHA_MAX_EXP,
-			num_steps=SLIDER_STEPS,
-			ps=parent, key=PERSIST_ALPHA_KEY,
-		)
-		for widget in (persist_alpha_text, persist_alpha_slider):
-			parent.subscribe(USE_PERSISTENCE_KEY, widget.Enable)
-			widget.Enable(parent[USE_PERSISTENCE_KEY])
-			parent.subscribe(USE_PERSISTENCE_KEY, widget.ShowItems)
-                        #allways show initially, so room is reserved for them
-			widget.ShowItems(True) # (parent[USE_PERSISTENCE_KEY])
-
-                parent.subscribe(USE_PERSISTENCE_KEY, self._update_layout)
-
-		##################################################
-		# Axes Options
-		##################################################
-		control_box.AddStretchSpacer()
-		axes_options_box = forms.static_box_sizer(
-			parent=self, sizer=control_box, label='Axes Options',
-			bold=True, orient=wx.VERTICAL,
-		)
-		##################################################
-		# Scope Mode Box
-		##################################################
-		scope_mode_box = wx.BoxSizer(wx.VERTICAL)
-		axes_options_box.Add(scope_mode_box, 0, wx.EXPAND)
-		#x axis divs
-		forms.incr_decr_buttons(
-			parent=self, sizer=scope_mode_box, label='Secs/Div',
-			on_incr=self._on_incr_t_divs, on_decr=self._on_decr_t_divs,
-		)
-		#y axis divs
-		y_buttons_scope = forms.incr_decr_buttons(
-			parent=self, sizer=scope_mode_box, label='Counts/Div',
-			on_incr=self._on_incr_y_divs, on_decr=self._on_decr_y_divs,
-		)
-		#y axis ref lvl
-		y_off_buttons_scope = forms.incr_decr_buttons(
-			parent=self, sizer=scope_mode_box, label='Y Offset',
-			on_incr=self._on_incr_y_off, on_decr=self._on_decr_y_off,
-		)
-		#t axis ref lvl
-		scope_mode_box.AddSpacer(5)
-		forms.slider(
-			parent=self, sizer=scope_mode_box,
-			ps=parent, key=T_FRAC_OFF_KEY, label='T Offset',
-			minimum=0, maximum=1, num_steps=1000,
-		)
-		scope_mode_box.AddSpacer(5)
-		##################################################
-		# XY Mode Box
-		##################################################
-		xy_mode_box = wx.BoxSizer(wx.VERTICAL)
-		axes_options_box.Add(xy_mode_box, 0, wx.EXPAND)
-		#x div controls
-		x_buttons = forms.incr_decr_buttons(
-			parent=self, sizer=xy_mode_box, label='X/Div',
-			on_incr=self._on_incr_x_divs, on_decr=self._on_decr_x_divs,
-		)
-		#y div controls
-		y_buttons = forms.incr_decr_buttons(
-			parent=self, sizer=xy_mode_box, label='Y/Div',
-			on_incr=self._on_incr_y_divs, on_decr=self._on_decr_y_divs,
-		)
-		#x offset controls
-		x_off_buttons = forms.incr_decr_buttons(
-			parent=self, sizer=xy_mode_box, label='X Off',
-			on_incr=self._on_incr_x_off, on_decr=self._on_decr_x_off,
-		)
-		#y offset controls
-		y_off_buttons = forms.incr_decr_buttons(
-			parent=self, sizer=xy_mode_box, label='Y Off',
-			on_incr=self._on_incr_y_off, on_decr=self._on_decr_y_off,
-		)
-		for widget in (y_buttons_scope, y_off_buttons_scope, x_buttons, y_buttons, x_off_buttons, y_off_buttons):
-			parent.subscribe(AUTORANGE_KEY, widget.Disable)
-			widget.Disable(parent[AUTORANGE_KEY])
-		xy_mode_box.ShowItems(False)
-		#autorange check box
-		forms.check_box(
-			parent=self, sizer=axes_options_box, label='Autorange',
-			ps=parent, key=AUTORANGE_KEY,
-		)
-		##################################################
-		# Channel Options
-		##################################################
-		TRIGGER_PAGE_INDEX = parent.num_inputs
-		XY_PAGE_INDEX = parent.num_inputs+1
-		control_box.AddStretchSpacer()
-		chan_options_box = forms.static_box_sizer(
-			parent=self, sizer=control_box, label='Channel Options',
-			bold=True, orient=wx.VERTICAL,
-		)
-		options_notebook = wx.Notebook(self)
-		options_notebook_args = list()
-		CHANNELS = [('Ch %d'%(i+1), i) for i in range(parent.num_inputs)]
-		##################################################
-		# Channel Menu Boxes
-		##################################################
-		for i in range(parent.num_inputs):
-			channel_menu_panel = wx.Panel(options_notebook)
-			options_notebook_args.append((channel_menu_panel, i, 'Ch%d'%(i+1)))
-			channel_menu_box = wx.BoxSizer(wx.VERTICAL)
-			channel_menu_panel.SetSizer(channel_menu_box)
-			#ac couple check box
-			channel_menu_box.AddStretchSpacer()
-			forms.drop_down(
-				parent=channel_menu_panel, sizer=channel_menu_box,
-				ps=parent, key=common.index_key(AC_COUPLE_KEY, i),
-				choices=map(lambda x: x[1], COUPLING_MODES),
-				labels=map(lambda x: x[0], COUPLING_MODES),
-				label='Coupling', width=WIDTH,
-			)
-			#marker
-			channel_menu_box.AddStretchSpacer()
-			forms.drop_down(
-				parent=channel_menu_panel, sizer=channel_menu_box,
-				ps=parent, key=common.index_key(MARKER_KEY, i),
-				choices=map(lambda x: x[1], MARKER_TYPES),
-				labels=map(lambda x: x[0], MARKER_TYPES),
-				label='Marker', width=WIDTH,
-			)
-			channel_menu_box.AddStretchSpacer()
-		##################################################
-		# Trigger Menu Box
-		##################################################
-		trigger_menu_panel = wx.Panel(options_notebook)
-		options_notebook_args.append((trigger_menu_panel, TRIGGER_PAGE_INDEX, 'Trig'))
-		trigger_menu_box = wx.BoxSizer(wx.VERTICAL)
-		trigger_menu_panel.SetSizer(trigger_menu_box)
-		#trigger mode
-		forms.drop_down(
-			parent=trigger_menu_panel, sizer=trigger_menu_box,
-			ps=parent, key=TRIGGER_MODE_KEY,
-			choices=map(lambda x: x[1], TRIGGER_MODES),
-			labels=map(lambda x: x[0], TRIGGER_MODES),
-			label='Mode', width=WIDTH,
-		)
-		#trigger slope
-		trigger_slope_chooser = forms.drop_down(
-			parent=trigger_menu_panel, sizer=trigger_menu_box,
-			ps=parent, key=TRIGGER_SLOPE_KEY,
-			choices=map(lambda x: x[1], TRIGGER_SLOPES),
-			labels=map(lambda x: x[0], TRIGGER_SLOPES),
-			label='Slope', width=WIDTH,
-		)
-		#trigger channel
-		trigger_channel_chooser = forms.drop_down(
-			parent=trigger_menu_panel, sizer=trigger_menu_box,
-			ps=parent, key=TRIGGER_CHANNEL_KEY,
-			choices=map(lambda x: x[1], CHANNELS),
-			labels=map(lambda x: x[0], CHANNELS),
-			label='Channel', width=WIDTH,
-		)
-		#trigger level
-		hbox = wx.BoxSizer(wx.HORIZONTAL)
-		trigger_menu_box.Add(hbox, 0, wx.EXPAND)
-		hbox.Add(wx.StaticText(trigger_menu_panel, label='Level:'), 1, wx.ALIGN_CENTER_VERTICAL)
-		trigger_level_button = forms.single_button(
-			parent=trigger_menu_panel, sizer=hbox, label='50%',
-			callback=parent.set_auto_trigger_level, style=wx.BU_EXACTFIT,
-		)
-		hbox.AddSpacer(WIDTH-60)
-		trigger_level_buttons = forms.incr_decr_buttons(
-			parent=trigger_menu_panel, sizer=hbox,
-			on_incr=self._on_incr_trigger_level, on_decr=self._on_decr_trigger_level,
-		)
-		def disable_all(trigger_mode):
-			for widget in (trigger_slope_chooser, trigger_channel_chooser, trigger_level_buttons, trigger_level_button):
-				widget.Disable(trigger_mode == wxgui.TRIG_MODE_FREE)
-		parent.subscribe(TRIGGER_MODE_KEY, disable_all)
-		disable_all(parent[TRIGGER_MODE_KEY])
-		##################################################
-		# XY Menu Box
-		##################################################
-		if parent.num_inputs > 1:
-			xy_menu_panel = wx.Panel(options_notebook)
-			options_notebook_args.append((xy_menu_panel, XY_PAGE_INDEX, 'XY'))
-			xy_menu_box = wx.BoxSizer(wx.VERTICAL)
-			xy_menu_panel.SetSizer(xy_menu_box)
-			#x and y channel choosers
-			xy_menu_box.AddStretchSpacer()
-			forms.drop_down(
-				parent=xy_menu_panel, sizer=xy_menu_box,
-				ps=parent, key=X_CHANNEL_KEY,
-				choices=map(lambda x: x[1], CHANNELS),
-				labels=map(lambda x: x[0], CHANNELS),
-				label='Channel X', width=WIDTH,
-			)
-			xy_menu_box.AddStretchSpacer()
-			forms.drop_down(
-				parent=xy_menu_panel, sizer=xy_menu_box,
-				ps=parent, key=Y_CHANNEL_KEY,
-				choices=map(lambda x: x[1], CHANNELS),
-				labels=map(lambda x: x[0], CHANNELS),
-				label='Channel Y', width=WIDTH,
-			)
-			#marker
-			xy_menu_box.AddStretchSpacer()
-			forms.drop_down(
-				parent=xy_menu_panel, sizer=xy_menu_box,
-				ps=parent, key=XY_MARKER_KEY,
-				choices=map(lambda x: x[1], MARKER_TYPES),
-				labels=map(lambda x: x[0], MARKER_TYPES),
-				label='Marker', width=WIDTH,
-			)
-			xy_menu_box.AddStretchSpacer()
-		##################################################
-		# Setup Options Notebook
-		##################################################
-		forms.notebook(
-			parent=self, sizer=chan_options_box,
-			notebook=options_notebook,
-			ps=parent, key=CHANNEL_OPTIONS_KEY,
-			pages=map(lambda x: x[0], options_notebook_args),
-			choices=map(lambda x: x[1], options_notebook_args),
-			labels=map(lambda x: x[2], options_notebook_args),
-		)
-		#gui handling for channel options changing
-		def options_notebook_changed(chan_opt):
-			try:
-				parent[TRIGGER_SHOW_KEY] = chan_opt == TRIGGER_PAGE_INDEX
-				parent[XY_MODE_KEY] = chan_opt == XY_PAGE_INDEX
-			except wx.PyDeadObjectError: pass
-		parent.subscribe(CHANNEL_OPTIONS_KEY, options_notebook_changed)
-		#gui handling for xy mode changing
-		def xy_mode_changed(mode):
-			#ensure xy tab is selected
-			if mode and parent[CHANNEL_OPTIONS_KEY] != XY_PAGE_INDEX:
-				parent[CHANNEL_OPTIONS_KEY] = XY_PAGE_INDEX
-			#ensure xy tab is not selected
-			elif not mode and parent[CHANNEL_OPTIONS_KEY] == XY_PAGE_INDEX:
-				parent[CHANNEL_OPTIONS_KEY] = 0
-			#show/hide control buttons
-			scope_mode_box.ShowItems(not mode)
-			xy_mode_box.ShowItems(mode)
-			control_box.Layout()
-		parent.subscribe(XY_MODE_KEY, xy_mode_changed)
-		xy_mode_changed(parent[XY_MODE_KEY])
-		##################################################
-		# Run/Stop Button
-		##################################################
-		#run/stop
-		control_box.AddStretchSpacer()
-		forms.toggle_button(
-			sizer=control_box, parent=self,
-			true_label='Stop', false_label='Run',
-			ps=parent, key=RUNNING_KEY,
-		)
-		#set sizer
-		self.SetSizerAndFit(control_box)
-		#mouse wheel event
-		def on_mouse_wheel(event):
-			if not parent[XY_MODE_KEY]:
-				if event.GetWheelRotation() < 0: self._on_incr_t_divs(event)
-				else: self._on_decr_t_divs(event)
-		parent.plotter.Bind(wx.EVT_MOUSEWHEEL, on_mouse_wheel)
-
-	##################################################
-	# Event handlers
-	##################################################
-	#trigger level
-	def _on_incr_trigger_level(self, event):
-		self.parent[TRIGGER_LEVEL_KEY] += self.parent[Y_PER_DIV_KEY]/3.
-	def _on_decr_trigger_level(self, event):
-		self.parent[TRIGGER_LEVEL_KEY] -= self.parent[Y_PER_DIV_KEY]/3.
-	#incr/decr divs
-	def _on_incr_t_divs(self, event):
-		self.parent[T_PER_DIV_KEY] = common.get_clean_incr(self.parent[T_PER_DIV_KEY])
-	def _on_decr_t_divs(self, event):
-		self.parent[T_PER_DIV_KEY] = common.get_clean_decr(self.parent[T_PER_DIV_KEY])
-	def _on_incr_x_divs(self, event):
-		self.parent[X_PER_DIV_KEY] = common.get_clean_incr(self.parent[X_PER_DIV_KEY])
-	def _on_decr_x_divs(self, event):
-		self.parent[X_PER_DIV_KEY] = common.get_clean_decr(self.parent[X_PER_DIV_KEY])
-	def _on_incr_y_divs(self, event):
-		self.parent[Y_PER_DIV_KEY] = common.get_clean_incr(self.parent[Y_PER_DIV_KEY])
-	def _on_decr_y_divs(self, event):
-		self.parent[Y_PER_DIV_KEY] = common.get_clean_decr(self.parent[Y_PER_DIV_KEY])
-	#incr/decr offset
-	def _on_incr_x_off(self, event):
-		self.parent[X_OFF_KEY] = self.parent[X_OFF_KEY] + self.parent[X_PER_DIV_KEY]
-	def _on_decr_x_off(self, event):
-		self.parent[X_OFF_KEY] = self.parent[X_OFF_KEY] - self.parent[X_PER_DIV_KEY]
-	def _on_incr_y_off(self, event):
-		self.parent[Y_OFF_KEY] = self.parent[Y_OFF_KEY] + self.parent[Y_PER_DIV_KEY]
-	def _on_decr_y_off(self, event):
-		self.parent[Y_OFF_KEY] = self.parent[Y_OFF_KEY] - self.parent[Y_PER_DIV_KEY]
-
-	##################################################
-	# subscriber handlers
-	##################################################
-        def _update_layout(self,key):
-          # Just ignore the key value we get
-          # we only need to now that the visability or size of something has changed
-          self.parent.Layout()
-          #self.parent.Fit()
-
-##################################################
-# Scope window with plotter and control panel
-##################################################
-class scope_window(wx.Panel, pubsub.pubsub):
-	def __init__(
-		self,
-		parent,
-		controller,
-		size,
-		title,
-		frame_rate,
-		num_inputs,
-		sample_rate_key,
-		t_scale,
-		v_scale,
-		v_offset,
-		xy_mode,
-		ac_couple_key,
-		trigger_level_key,
-		trigger_mode_key,
-		trigger_slope_key,
-		trigger_channel_key,
-		decimation_key,
-		msg_key,
-                use_persistence,
-                persist_alpha,
-		trig_mode,
-		y_axis_label,
-	):
-		pubsub.pubsub.__init__(self)
-		#check num inputs
-		assert num_inputs <= len(CHANNEL_COLOR_SPECS)
-		#setup
-		self.sampleses = None
-		self.num_inputs = num_inputs
-		autorange = not v_scale
-		self.autorange_ts = 0
-		v_scale = v_scale or 1
-		self.frame_rate_ts = 0
-		#proxy the keys
-		self.proxy(MSG_KEY, controller, msg_key)
-		self.proxy(SAMPLE_RATE_KEY, controller, sample_rate_key)
-		self.proxy(TRIGGER_LEVEL_KEY, controller, trigger_level_key)
-		self.proxy(TRIGGER_MODE_KEY, controller, trigger_mode_key)
-		self.proxy(TRIGGER_SLOPE_KEY, controller, trigger_slope_key)
-		self.proxy(TRIGGER_CHANNEL_KEY, controller, trigger_channel_key)
-		self.proxy(DECIMATION_KEY, controller, decimation_key)
-		#initialize values
-		self[RUNNING_KEY] = True
-		self[XY_MARKER_KEY] = 2.0
-		self[CHANNEL_OPTIONS_KEY] = 0
-		self[XY_MODE_KEY] = xy_mode
-		self[X_CHANNEL_KEY] = 0
-		self[Y_CHANNEL_KEY] = self.num_inputs-1
-		self[AUTORANGE_KEY] = autorange
-		self[T_PER_DIV_KEY] = t_scale
-		self[X_PER_DIV_KEY] = v_scale
-		self[Y_PER_DIV_KEY] = v_scale
-		self[T_OFF_KEY] = 0
-		self[X_OFF_KEY] = v_offset
-		self[Y_OFF_KEY] = v_offset
-		self[T_DIVS_KEY] = 8
-		self[X_DIVS_KEY] = 8
-		self[Y_DIVS_KEY] = 8
-		self[Y_AXIS_LABEL] = y_axis_label
-		self[FRAME_RATE_KEY] = frame_rate
-		self[TRIGGER_LEVEL_KEY] = 0
-		self[TRIGGER_CHANNEL_KEY] = 0
-		self[TRIGGER_MODE_KEY] = trig_mode
-
-		self[TRIGGER_SLOPE_KEY] = wxgui.TRIG_SLOPE_POS
-		self[T_FRAC_OFF_KEY] = 0.5
-		self[USE_PERSISTENCE_KEY] = use_persistence
-		self[PERSIST_ALPHA_KEY] = persist_alpha
-
-		if self[TRIGGER_MODE_KEY] == wxgui.TRIG_MODE_STRIPCHART:
-			self[T_FRAC_OFF_KEY] = 0.0
-
-		for i in range(num_inputs):
-			self.proxy(common.index_key(AC_COUPLE_KEY, i), controller, common.index_key(ac_couple_key, i))
-		#init panel and plot
-		wx.Panel.__init__(self, parent, style=wx.SIMPLE_BORDER)
-		self.plotter = plotter.channel_plotter(self)
-		self.plotter.SetSize(wx.Size(*size))
-		self.plotter.SetSizeHints(*size)
-		self.plotter.set_title(title)
-		self.plotter.enable_legend(True)
-		self.plotter.enable_point_label(True)
-		self.plotter.enable_grid_lines(True)
-                self.plotter.set_use_persistence(use_persistence)
-                self.plotter.set_persist_alpha(persist_alpha)
-		#setup the box with plot and controls
-		self.control_panel = control_panel(self)
-		main_box = wx.BoxSizer(wx.HORIZONTAL)
-		main_box.Add(self.plotter, 1, wx.EXPAND)
-		main_box.Add(self.control_panel, 0, wx.EXPAND)
-		self.SetSizerAndFit(main_box)
-		#register events for message
-		self.subscribe(MSG_KEY, self.handle_msg)
-		#register events for grid
-		for key in [common.index_key(MARKER_KEY, i) for i in range(self.num_inputs)] + [
-			TRIGGER_LEVEL_KEY, TRIGGER_MODE_KEY,
-			T_PER_DIV_KEY, X_PER_DIV_KEY, Y_PER_DIV_KEY,
-			T_OFF_KEY, X_OFF_KEY, Y_OFF_KEY,
-			T_DIVS_KEY, X_DIVS_KEY, Y_DIVS_KEY,
-			XY_MODE_KEY, AUTORANGE_KEY, T_FRAC_OFF_KEY,
-			TRIGGER_SHOW_KEY, XY_MARKER_KEY, X_CHANNEL_KEY, Y_CHANNEL_KEY,
-		]: self.subscribe(key, self.update_grid)
-                #register events for plotter settings
-		self.subscribe(USE_PERSISTENCE_KEY, self.plotter.set_use_persistence)
-		self.subscribe(PERSIST_ALPHA_KEY, self.plotter.set_persist_alpha)
-		#initial update
-		self.update_grid()
-
-	def handle_msg(self, msg):
-		"""
-		Handle the message from the scope sink message queue.
-		Plot the list of arrays of samples onto the grid.
-		Each samples array gets its own channel.
-
-                Args:
-		    msg: the time domain data as a character array
-		"""
-		if not self[RUNNING_KEY]: return
-		#check time elapsed
-		if time.time() - self.frame_rate_ts < 1.0/self[FRAME_RATE_KEY]: return
-		#convert to floating point numbers
-		samples = numpy.fromstring(msg, numpy.float32)
-		#extract the trigger offset
-		self.trigger_offset = samples[-1]
-		samples = samples[:-1]
-		samps_per_ch = len(samples)/self.num_inputs
-		self.sampleses = [samples[samps_per_ch*i:samps_per_ch*(i+1)] for i in range(self.num_inputs)]
-		#handle samples
-		self.handle_samples()
-		self.frame_rate_ts = time.time()
-
-	def set_auto_trigger_level(self, *args):
-		"""
-		Use the current trigger channel and samples to calculate the 50% level.
-		"""
-		if not self.sampleses: return
-		samples = self.sampleses[self[TRIGGER_CHANNEL_KEY]]
-		self[TRIGGER_LEVEL_KEY] = (numpy.max(samples)+numpy.min(samples))/2
-
-	def handle_samples(self):
-		"""
-		Handle the cached samples from the scope input.
-		Perform ac coupling, triggering, and auto ranging.
-		"""
-		if not self.sampleses: return
-		sampleses = self.sampleses
-		if self[XY_MODE_KEY]:
-			self[DECIMATION_KEY] = 1
-			x_samples = sampleses[self[X_CHANNEL_KEY]]
-			y_samples = sampleses[self[Y_CHANNEL_KEY]]
-			#autorange
-			if self[AUTORANGE_KEY] and time.time() - self.autorange_ts > AUTORANGE_UPDATE_RATE:
-				x_min, x_max = common.get_min_max(x_samples)
-				y_min, y_max = common.get_min_max(y_samples)
-				#adjust the x per div
-				x_per_div = common.get_clean_num((x_max-x_min)/self[X_DIVS_KEY])
-				if x_per_div != self[X_PER_DIV_KEY]: self[X_PER_DIV_KEY] = x_per_div; return
-				#adjust the x offset
-				x_off = x_per_div*round((x_max+x_min)/2/x_per_div)
-				if x_off != self[X_OFF_KEY]: self[X_OFF_KEY] = x_off; return
-				#adjust the y per div
-				y_per_div = common.get_clean_num((y_max-y_min)/self[Y_DIVS_KEY])
-				if y_per_div != self[Y_PER_DIV_KEY]: self[Y_PER_DIV_KEY] = y_per_div; return
-				#adjust the y offset
-				y_off = y_per_div*round((y_max+y_min)/2/y_per_div)
-				if y_off != self[Y_OFF_KEY]: self[Y_OFF_KEY] = y_off; return
-				self.autorange_ts = time.time()
-			#plot xy channel
-			self.plotter.set_waveform(
-				channel='XY',
-				samples=(x_samples, y_samples),
-				color_spec=CHANNEL_COLOR_SPECS[0],
-				marker=self[XY_MARKER_KEY],
-			)
-			#turn off each waveform
-			for i, samples in enumerate(sampleses):
-				self.plotter.clear_waveform(channel='Ch%d'%(i+1))
-		else:
-			#autorange
-			if self[AUTORANGE_KEY] and time.time() - self.autorange_ts > AUTORANGE_UPDATE_RATE:
-				bounds = [common.get_min_max(samples) for samples in sampleses]
-				y_min = numpy.min([bound[0] for bound in bounds])
-				y_max = numpy.max([bound[1] for bound in bounds])
-				#adjust the y per div
-				y_per_div = common.get_clean_num((y_max-y_min)/self[Y_DIVS_KEY])
-				if y_per_div != self[Y_PER_DIV_KEY]: self[Y_PER_DIV_KEY] = y_per_div; return
-				#adjust the y offset
-				y_off = y_per_div*round((y_max+y_min)/2/y_per_div)
-				if y_off != self[Y_OFF_KEY]: self[Y_OFF_KEY] = y_off; return
-				self.autorange_ts = time.time()
-			#number of samples to scale to the screen
-			actual_rate = self.get_actual_rate()
-			time_span = self[T_PER_DIV_KEY]*self[T_DIVS_KEY]
-			num_samps = int(round(time_span*actual_rate))
-			#handle the time offset
-			t_off = self[T_FRAC_OFF_KEY]*(len(sampleses[0])/actual_rate - time_span)
-			if t_off != self[T_OFF_KEY]: self[T_OFF_KEY] = t_off; return
-			samps_off = int(round(actual_rate*self[T_OFF_KEY]))
-			#adjust the decim so that we use about half the samps
-			self[DECIMATION_KEY] = int(round(
-					time_span*self[SAMPLE_RATE_KEY]/(0.5*len(sampleses[0]))
-				)
-			)
-			#num samps too small, auto increment the time
-			if num_samps < 2: self[T_PER_DIV_KEY] = common.get_clean_incr(self[T_PER_DIV_KEY])
-			#num samps in bounds, plot each waveform
-			elif num_samps <= len(sampleses[0]):
-				for i, samples in enumerate(sampleses):
-					#plot samples
-					self.plotter.set_waveform(
-						channel='Ch%d'%(i+1),
-						samples=samples[samps_off:num_samps+samps_off],
-						color_spec=CHANNEL_COLOR_SPECS[i],
-						marker=self[common.index_key(MARKER_KEY, i)],
-						trig_off=self.trigger_offset,
-					)
-			#turn XY channel off
-			self.plotter.clear_waveform(channel='XY')
-		#keep trigger level within range
-		if self[TRIGGER_LEVEL_KEY] > self.get_y_max():
-			self[TRIGGER_LEVEL_KEY] = self.get_y_max(); return
-		if self[TRIGGER_LEVEL_KEY] < self.get_y_min():
-			self[TRIGGER_LEVEL_KEY] = self.get_y_min(); return
-		#disable the trigger channel
-		if not self[TRIGGER_SHOW_KEY] or self[XY_MODE_KEY] or self[TRIGGER_MODE_KEY] == wxgui.TRIG_MODE_FREE:
-			self.plotter.clear_waveform(channel='Trig')
-		else: #show trigger channel
-			trigger_level = self[TRIGGER_LEVEL_KEY]
-			trigger_point = (len(self.sampleses[0])-1)/self.get_actual_rate()/2.0
-			self.plotter.set_waveform(
-				channel='Trig',
-				samples=(
-					[self.get_t_min(), trigger_point, trigger_point, trigger_point, trigger_point, self.get_t_max()],
-					[trigger_level, trigger_level, self.get_y_max(), self.get_y_min(), trigger_level, trigger_level]
-				),
-				color_spec=TRIGGER_COLOR_SPEC,
-			)
-		#update the plotter
-		self.plotter.update()
-
-	def get_actual_rate(self): return 1.0*self[SAMPLE_RATE_KEY]/self[DECIMATION_KEY]
-	def get_t_min(self): return self[T_OFF_KEY]
-	def get_t_max(self): return self[T_PER_DIV_KEY]*self[T_DIVS_KEY] + self[T_OFF_KEY]
-	def get_x_min(self): return -1*self[X_PER_DIV_KEY]*self[X_DIVS_KEY]/2.0 + self[X_OFF_KEY]
-	def get_x_max(self): return self[X_PER_DIV_KEY]*self[X_DIVS_KEY]/2.0 + self[X_OFF_KEY]
-	def get_y_min(self): return -1*self[Y_PER_DIV_KEY]*self[Y_DIVS_KEY]/2.0 + self[Y_OFF_KEY]
-	def get_y_max(self): return self[Y_PER_DIV_KEY]*self[Y_DIVS_KEY]/2.0 + self[Y_OFF_KEY]
-
-	def update_grid(self, *args):
-		"""
-		Update the grid to reflect the current settings:
-		xy divisions, xy offset, xy mode setting
-		"""
-		if self[T_FRAC_OFF_KEY] < 0: self[T_FRAC_OFF_KEY] = 0; return
-		if self[T_FRAC_OFF_KEY] > 1: self[T_FRAC_OFF_KEY] = 1; return
-		if self[XY_MODE_KEY]:
-			#update the x axis
-			self.plotter.set_x_label('Ch%d'%(self[X_CHANNEL_KEY]+1))
-			self.plotter.set_x_grid(self.get_x_min(), self.get_x_max(), self[X_PER_DIV_KEY])
-			#update the y axis
-			self.plotter.set_y_label('Ch%d'%(self[Y_CHANNEL_KEY]+1))
-			self.plotter.set_y_grid(self.get_y_min(), self.get_y_max(), self[Y_PER_DIV_KEY])
-		else:
-			#update the t axis
-			self.plotter.set_x_label('Time', 's')
-			self.plotter.set_x_grid(self.get_t_min(), self.get_t_max(), self[T_PER_DIV_KEY], True)
-			#update the y axis
-			self.plotter.set_y_label(self[Y_AXIS_LABEL])
-			self.plotter.set_y_grid(self.get_y_min(), self.get_y_max(), self[Y_PER_DIV_KEY])
-		#redraw current sample
-		self.handle_samples()
-
diff --git a/gr-wxgui/python/wxgui/scopesink2.py b/gr-wxgui/python/wxgui/scopesink2.py
deleted file mode 100644
index 99e268895a..0000000000
--- a/gr-wxgui/python/wxgui/scopesink2.py
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-# Copyright 2008,2009 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-from gnuradio import gr
-
-p = gr.prefs()
-style = p.get_string('wxgui', 'style', 'auto')
-
-if style == 'auto' or style == 'gl':
-    try:
-        import wx.glcanvas
-        from OpenGL.GL import *
-        from scopesink_gl import scope_sink_f, scope_sink_c
-    except ImportError:
-        if style == 'gl':
-            raise RuntimeError("Unable to import OpenGL.  Are Python wrappers for OpenGL installed?")
-        else:
-            # Fall backto non-gl sinks
-            from scopesink_nongl import scope_sink_f, scope_sink_c
-elif style == 'nongl':
-    from scopesink_nongl import scope_sink_f, scope_sink_c
-else:
-    raise RuntimeError("Unknown wxgui style")
diff --git a/gr-wxgui/python/wxgui/scopesink_gl.py b/gr-wxgui/python/wxgui/scopesink_gl.py
deleted file mode 100644
index b2d5670c77..0000000000
--- a/gr-wxgui/python/wxgui/scopesink_gl.py
+++ /dev/null
@@ -1,239 +0,0 @@
-#
-# Copyright 2008,2010,2012 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-##################################################
-# Imports
-##################################################
-import scope_window
-import common
-from gnuradio import gr, filter
-from gnuradio import blocks
-from gnuradio import analog
-from gnuradio import wxgui
-from pubsub import pubsub
-from constants import *
-import math
-
-class ac_couple_block(gr.hier_block2):
-	"""
-	AC couple the incoming stream by subtracting out the low pass signal.
-	Mute the low pass filter to disable ac coupling.
-	"""
-
-	def __init__(self, controller, ac_couple_key, sample_rate_key):
-		gr.hier_block2.__init__(
-			self,
-			"ac_couple",
-			gr.io_signature(1, 1, gr.sizeof_float),
-			gr.io_signature(1, 1, gr.sizeof_float),
-		)
-		#blocks
-		lpf = filter.single_pole_iir_filter_ff(0.0)
-		sub = blocks.sub_ff()
-		mute = blocks.mute_ff()
-		#connect
-		self.connect(self, sub, self)
-		self.connect(self, lpf, mute, (sub, 1))
-		#subscribe
-		controller.subscribe(ac_couple_key, lambda x: mute.set_mute(not x))
-		controller.subscribe(sample_rate_key, lambda x: lpf.set_taps(0.05))
-		#initialize
-		controller[ac_couple_key] = controller[ac_couple_key]
-		controller[sample_rate_key] = controller[sample_rate_key]
-
-##################################################
-# Scope sink block (wrapper for old wxgui)
-##################################################
-class _scope_sink_base(gr.hier_block2, common.wxgui_hb):
-	"""
-	A scope block with a gui window.
-	"""
-
-	def __init__(
-		self,
-		parent,
-		title='',
-		sample_rate=1,
-		size=scope_window.DEFAULT_WIN_SIZE,
-		v_scale=0,
-		t_scale=0,
-		v_offset=0,
-		xy_mode=False,
-		ac_couple=False,
-		num_inputs=1,
-		trig_mode=scope_window.DEFAULT_TRIG_MODE,
-		y_axis_label='Counts',
-		frame_rate=scope_window.DEFAULT_FRAME_RATE,
-                use_persistence=False,
-                persist_alpha=None,
-		**kwargs #do not end with a comma
-	):
-                #ensure analog alpha
-                if persist_alpha is None:
-                  actual_frame_rate=float(frame_rate)
-                  analog_cutoff_freq=0.5 # Hertz
-                  #calculate alpha from wanted cutoff freq
-                  persist_alpha = 1.0 - math.exp(-2.0*math.pi*analog_cutoff_freq/actual_frame_rate)
-
-		if not t_scale: t_scale = 10.0/sample_rate
-		#init
-		gr.hier_block2.__init__(
-			self,
-			"scope_sink",
-			gr.io_signature(num_inputs, num_inputs, self._item_size),
-			gr.io_signature(0, 0, 0),
-		)
-		#scope
-		msgq = gr.msg_queue(2)
-		scope = wxgui.oscope_sink_f(sample_rate, msgq)
-		#controller
-		self.controller = pubsub()
-		self.controller.subscribe(SAMPLE_RATE_KEY, scope.set_sample_rate)
-		self.controller.publish(SAMPLE_RATE_KEY, scope.sample_rate)
-		self.controller.subscribe(DECIMATION_KEY, scope.set_decimation_count)
-		self.controller.publish(DECIMATION_KEY, scope.get_decimation_count)
-		self.controller.subscribe(TRIGGER_LEVEL_KEY, scope.set_trigger_level)
-		self.controller.publish(TRIGGER_LEVEL_KEY, scope.get_trigger_level)
-		self.controller.subscribe(TRIGGER_MODE_KEY, scope.set_trigger_mode)
-		self.controller.publish(TRIGGER_MODE_KEY, scope.get_trigger_mode)
-		self.controller.subscribe(TRIGGER_SLOPE_KEY, scope.set_trigger_slope)
-		self.controller.publish(TRIGGER_SLOPE_KEY, scope.get_trigger_slope)
-		self.controller.subscribe(TRIGGER_CHANNEL_KEY, scope.set_trigger_channel)
-		self.controller.publish(TRIGGER_CHANNEL_KEY, scope.get_trigger_channel)
-		actual_num_inputs = self._real and num_inputs or num_inputs*2
-		#init ac couple
-		for i in range(actual_num_inputs):
-			self.controller[common.index_key(AC_COUPLE_KEY, i)] = ac_couple
-		#start input watcher
-		common.input_watcher(msgq, self.controller, MSG_KEY)
-		#create window
-		self.win = scope_window.scope_window(
-			parent=parent,
-			controller=self.controller,
-			size=size,
-			title=title,
-			frame_rate=frame_rate,
-			num_inputs=actual_num_inputs,
-			sample_rate_key=SAMPLE_RATE_KEY,
-			t_scale=t_scale,
-			v_scale=v_scale,
-			v_offset=v_offset,
-			xy_mode=xy_mode,
-			trig_mode=trig_mode,
-			y_axis_label=y_axis_label,
-			ac_couple_key=AC_COUPLE_KEY,
-			trigger_level_key=TRIGGER_LEVEL_KEY,
-			trigger_mode_key=TRIGGER_MODE_KEY,
-			trigger_slope_key=TRIGGER_SLOPE_KEY,
-			trigger_channel_key=TRIGGER_CHANNEL_KEY,
-			decimation_key=DECIMATION_KEY,
-			msg_key=MSG_KEY,
-                        use_persistence=use_persistence,
-                        persist_alpha=persist_alpha,
-		)
-		common.register_access_methods(self, self.win)
-		#connect
-		if self._real:
-			for i in range(num_inputs):
-				self.wxgui_connect(
-					(self, i),
-					ac_couple_block(self.controller, common.index_key(AC_COUPLE_KEY, i), SAMPLE_RATE_KEY),
-					(scope, i),
-				)
-		else:
-			for i in range(num_inputs):
-				c2f = blocks.complex_to_float()
-				self.wxgui_connect((self, i), c2f)
-				for j in range(2):
-					self.connect(
-						(c2f, j),
-						ac_couple_block(self.controller, common.index_key(AC_COUPLE_KEY, 2*i+j), SAMPLE_RATE_KEY),
-						(scope, 2*i+j),
-					)
-
-class scope_sink_f(_scope_sink_base):
-	_item_size = gr.sizeof_float
-	_real = True
-
-class scope_sink_c(_scope_sink_base):
-	_item_size = gr.sizeof_gr_complex
-	_real = False
-
-# ----------------------------------------------------------------
-# Stand-alone test application
-# ----------------------------------------------------------------
-
-import wx
-from gnuradio.wxgui import stdgui2
-
-class test_top_block (stdgui2.std_top_block):
-    def __init__(self, frame, panel, vbox, argv):
-        stdgui2.std_top_block.__init__ (self, frame, panel, vbox, argv)
-
-        default_input_rate = 1e6
-        if len(argv) > 1:
-            input_rate = int(argv[1])
-        else:
-            input_rate = default_input_rate
-
-        if len(argv) > 2:
-            v_scale = float(argv[2])  # start up at this v_scale value
-        else:
-            v_scale = None  # start up in autorange mode, default
-
-        if len(argv) > 3:
-            t_scale = float(argv[3])  # start up at this t_scale value
-        else:
-            t_scale = .00003*default_input_rate/input_rate # old behavior
-
-        print "input rate %s  v_scale %s  t_scale %s" % (input_rate,v_scale,t_scale)
-
-
-        # Generate a complex sinusoid
-        ampl=1.0e3
-        self.src0 = analog.sig_source_c(input_rate, analog.GR_SIN_WAVE,
-					25.1e3*input_rate/default_input_rate, ampl)
-        self.noise = analog.sig_source_c(input_rate, analog.GR_SIN_WAVE,
-					 11.1*25.1e3*input_rate/default_input_rate,
-                                         ampl/10)
-        #self.noise = analog.noise_source_c(analog.GR_GAUSSIAN, ampl/10)
-        self.combine = blocks.add_cc()
-
-        # We add this throttle block so that this demo doesn't suck down
-        # all the CPU available.  You normally wouldn't use it...
-        self.thr = blocks.throttle(gr.sizeof_gr_complex, input_rate)
-
-        scope = scope_sink_c(panel,"Secret Data",sample_rate=input_rate,
-			     v_scale=v_scale, t_scale=t_scale)
-        vbox.Add(scope.win, 1, wx.EXPAND)
-
-        # Ultimately this will be
-        # self.connect("src0 throttle scope")
-	self.connect(self.src0,(self.combine,0))
-        self.connect(self.noise,(self.combine,1))
-        self.connect(self.combine, self.thr, scope)
-
-def main ():
-    app = stdgui2.stdapp(test_top_block, "O'Scope Test App")
-    app.MainLoop()
-
-if __name__ == '__main__':
-    main()
diff --git a/gr-wxgui/python/wxgui/scopesink_nongl.py b/gr-wxgui/python/wxgui/scopesink_nongl.py
deleted file mode 100644
index 28a473860f..0000000000
--- a/gr-wxgui/python/wxgui/scopesink_nongl.py
+++ /dev/null
@@ -1,654 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2003,2004,2006,2007,2012 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-from gnuradio import gr, gru, eng_notation
-from gnuradio import analog
-from gnuradio import blocks
-from gnuradio import wxgui
-from gnuradio.wxgui import stdgui2
-import wx
-import gnuradio.wxgui.plot as plot
-import numpy
-import struct
-
-default_scopesink_size = (640, 240)
-default_v_scale = 1000
-default_frame_decim = gr.prefs().get_long('wxgui', 'frame_decim', 1)
-
-class scope_sink_f(gr.hier_block2):
-    def __init__(self, parent, title='', sample_rate=1,
-                 size=default_scopesink_size, frame_decim=default_frame_decim,
-                 v_scale=default_v_scale, t_scale=None, num_inputs=1, **kwargs):
-
-        gr.hier_block2.__init__(self, "scope_sink_f",
-                                gr.io_signature(num_inputs, num_inputs, gr.sizeof_float),
-                                gr.io_signature(0,0,0))
-
-        msgq = gr.msg_queue(2)         # message queue that holds at most 2 messages
-        self.guts = wxgui.oscope_sink_f(sample_rate, msgq)
-        for i in range(num_inputs):
-          self.connect((self, i), (self.guts, i))
-
-        self.win = scope_window(win_info(msgq, sample_rate, frame_decim,
-                                          v_scale, t_scale, self.guts, title), parent)
-
-    def set_sample_rate(self, sample_rate):
-        self.guts.set_sample_rate(sample_rate)
-        self.win.info.set_sample_rate(sample_rate)
-
-class scope_sink_c(gr.hier_block2):
-    def __init__(self, parent, title='', sample_rate=1,
-                 size=default_scopesink_size, frame_decim=default_frame_decim,
-                 v_scale=default_v_scale, t_scale=None, num_inputs=1, xy_mode=False, **kwargs):
-
-        gr.hier_block2.__init__(self, "scope_sink_c",
-                                gr.io_signature(num_inputs, num_inputs, gr.sizeof_gr_complex),
-                                gr.io_signature(0,0,0))
-
-        msgq = gr.msg_queue(2)         # message queue that holds at most 2 messages
-        self.guts = wxgui.oscope_sink_f(sample_rate, msgq)
-        for i in range(num_inputs):
-	        c2f = blocks.complex_to_float()
-	        self.connect((self, i), c2f)
-	        self.connect((c2f, 0),(self.guts, 2*i+0))
-	        self.connect((c2f, 1),(self.guts, 2*i+1))
-
-        self.win = scope_window(win_info(msgq, sample_rate, frame_decim,
-                                         v_scale, t_scale, self.guts, title), parent)
-        self.win.info.xy = xy_mode
-
-    def set_sample_rate(self, sample_rate):
-        self.guts.set_sample_rate(sample_rate)
-        self.win.info.set_sample_rate(sample_rate)
-
-class constellation_sink(scope_sink_c):
-    def __init__(self, parent, title='Constellation', sample_rate=1,
-                 size=default_scopesink_size, frame_decim=default_frame_decim):
-        scope_sink_c.__init__(self, parent=parent, title=title, sample_rate=sample_rate,
-                              size=size, frame_decim=frame_decim)
-        self.win.info.xy = True	#constellation mode
-
-# ========================================================================
-
-
-time_base_list = [                      # time / division
-    1.0e-7,   # 100ns / div
-    2.5e-7,
-    5.0e-7,
-    1.0e-6,   #   1us / div
-    2.5e-6,
-    5.0e-6,
-    1.0e-5,   #  10us / div
-    2.5e-5,
-    5.0e-5,
-    1.0e-4,   # 100us / div
-    2.5e-4,
-    5.0e-4,
-    1.0e-3,   #   1ms / div
-    2.5e-3,
-    5.0e-3,
-    1.0e-2,   #  10ms / div
-    2.5e-2,
-    5.0e-2
-    ]
-
-v_scale_list = [ # counts / div, LARGER gains are SMALLER /div, appear EARLIER
-    2.0e-3,   # 2m / div, don't call it V/div it's actually counts/div
-    5.0e-3,
-    1.0e-2,
-    2.0e-2,
-    5.0e-2,
-    1.0e-1,
-    2.0e-1,
-    5.0e-1,
-    1.0e+0,
-    2.0e+0,
-    5.0e+0,
-    1.0e+1,
-    2.0e+1,
-    5.0e+1,
-    1.0e+2,
-    2.0e+2,
-    5.0e+2,
-    1.0e+3,
-    2.0e+3,
-    5.0e+3,
-    1.0e+4 # 10000 /div, USRP full scale is -/+ 32767
-    ]
-
-
-wxDATA_EVENT = wx.NewEventType()
-
-def EVT_DATA_EVENT(win, func):
-    win.Connect(-1, -1, wxDATA_EVENT, func)
-
-class DataEvent(wx.PyEvent):
-    def __init__(self, data):
-        wx.PyEvent.__init__(self)
-        self.SetEventType(wxDATA_EVENT)
-        self.data = data
-
-    def Clone(self):
-        self.__class__(self.GetId())
-
-
-class win_info(object):
-    __slots__ = ['msgq', 'sample_rate', 'frame_decim', 'v_scale',
-                 'scopesink', 'title',
-                 'time_scale_cursor', 'v_scale_cursor', 'marker', 'xy',
-                 'autorange', 'running']
-
-    def __init__(self, msgq, sample_rate, frame_decim, v_scale, t_scale,
-                 scopesink, title = "Oscilloscope", xy=False):
-        self.msgq = msgq
-        self.sample_rate = sample_rate
-        self.frame_decim = frame_decim
-        self.scopesink = scopesink
-        self.title = title;
-
-        self.time_scale_cursor = gru.seq_with_cursor(time_base_list, initial_value = t_scale)
-        self.v_scale_cursor = gru.seq_with_cursor(v_scale_list, initial_value = v_scale)
-
-        self.marker = 'line'
-        self.xy = xy
-        self.autorange = not v_scale
-        self.running = True
-
-    def get_time_per_div(self):
-        return self.time_scale_cursor.current()
-
-    def get_volts_per_div(self):
-        return self.v_scale_cursor.current()
-
-    def set_sample_rate(self, sample_rate):
-        self.sample_rate = sample_rate
-
-    def get_sample_rate(self):
-        return self.sample_rate
-
-    def get_decimation_rate(self):
-        return 1.0
-
-    def set_marker(self, s):
-        self.marker = s
-
-    def get_marker(self):
-        return self.marker
-
-
-class input_watcher(gru.msgq_runner):
-    def __init__(self, msgq, event_receiver, frame_decim, **kwds):
-        self.event_receiver = event_receiver
-        self.frame_decim = frame_decim
-        self.iscan = 0
-        gru.msgq_runner.__init__(self, msgq, self.handle_msg)
-
-    def handle_msg(self, msg):
-        if self.iscan == 0:            # only display at frame_decim
-            self.iscan = self.frame_decim
-
-            nchan = int(msg.arg1())    # number of channels of data in msg
-            nsamples = int(msg.arg2()) # number of samples in each channel
-
-            s = msg.to_string()      # get the body of the msg as a string
-
-            bytes_per_chan = nsamples * gr.sizeof_float
-
-            records = []
-            for ch in range(nchan):
-
-                start = ch * bytes_per_chan
-                chan_data = s[start:start+bytes_per_chan]
-                rec = numpy.fromstring(chan_data, numpy.float32)
-                records.append(rec)
-
-            # print "nrecords = %d, reclen = %d" % (len (records),nsamples)
-
-            de = DataEvent(records)
-            wx.PostEvent(self.event_receiver, de)
-            records = []
-            del de
-
-        self.iscan -= 1
-
-
-class scope_window(wx.Panel):
-
-    def __init__(self, info, parent, id = -1,
-                 pos = wx.DefaultPosition, size = wx.DefaultSize, name = ""):
-        wx.Panel.__init__(self, parent, -1)
-        self.info = info
-
-        vbox = wx.BoxSizer(wx.VERTICAL)
-
-        self.graph = graph_window(info, self, -1)
-
-        vbox.Add(self.graph, 1, wx.EXPAND)
-        vbox.Add(self.make_control_box(), 0, wx.EXPAND)
-        vbox.Add(self.make_control2_box(), 0, wx.EXPAND)
-
-        self.sizer = vbox
-        self.SetSizer(self.sizer)
-        self.SetAutoLayout(True)
-        self.sizer.Fit(self)
-        self.set_autorange(self.info.autorange)
-
-
-    # second row of control buttons etc. appears BELOW control_box
-    def make_control2_box(self):
-        ctrlbox = wx.BoxSizer(wx.HORIZONTAL)
-
-        self.inc_v_button = wx.Button(self, 1101, " < ", style=wx.BU_EXACTFIT)
-        self.inc_v_button.SetToolTipString("Increase vertical range")
-        wx.EVT_BUTTON(self, 1101, self.incr_v_scale) # ID matches button ID above
-
-        self.dec_v_button  = wx.Button(self, 1100, " > ", style=wx.BU_EXACTFIT)
-        self.dec_v_button.SetToolTipString("Decrease vertical range")
-        wx.EVT_BUTTON(self, 1100, self.decr_v_scale)
-
-        self.v_scale_label = wx.StaticText(self, 1002, "None") # vertical /div
-        self.update_v_scale_label()
-
-        self.autorange_checkbox = wx.CheckBox(self, 1102, "Autorange")
-        self.autorange_checkbox.SetToolTipString("Select autorange on/off")
-        wx.EVT_CHECKBOX(self, 1102, self.autorange_checkbox_event)
-
-        ctrlbox.Add((5,0) ,0) # left margin space
-        ctrlbox.Add(self.inc_v_button, 0, wx.EXPAND)
-        ctrlbox.Add(self.dec_v_button, 0, wx.EXPAND)
-        ctrlbox.Add(self.v_scale_label, 0, wx.ALIGN_CENTER)
-        ctrlbox.Add((20,0) ,0) # spacer
-        ctrlbox.Add(self.autorange_checkbox, 0, wx.ALIGN_CENTER)
-
-        return ctrlbox
-
-    def make_control_box(self):
-        ctrlbox = wx.BoxSizer(wx.HORIZONTAL)
-
-        tb_left = wx.Button(self, 1001, " < ", style=wx.BU_EXACTFIT)
-        tb_left.SetToolTipString("Increase time base")
-        wx.EVT_BUTTON(self, 1001, self.incr_timebase)
-
-
-        tb_right = wx.Button(self, 1000, " > ", style=wx.BU_EXACTFIT)
-        tb_right.SetToolTipString("Decrease time base")
-        wx.EVT_BUTTON(self, 1000, self.decr_timebase)
-
-        self.time_base_label = wx.StaticText(self, 1002, "")
-        self.update_timebase_label()
-
-        ctrlbox.Add((5,0) ,0)
-        # ctrlbox.Add(wx.StaticText(self, -1, "Horiz Scale: "), 0, wx.ALIGN_CENTER)
-        ctrlbox.Add(tb_left, 0, wx.EXPAND)
-        ctrlbox.Add(tb_right, 0, wx.EXPAND)
-        ctrlbox.Add(self.time_base_label, 0, wx.ALIGN_CENTER)
-
-        ctrlbox.Add((10,0) ,1)            # stretchy space
-
-        ctrlbox.Add(wx.StaticText(self, -1, "Trig: "), 0, wx.ALIGN_CENTER)
-        self.trig_chan_choice = wx.Choice(self, 1004,
-                                          choices = ['Ch1', 'Ch2', 'Ch3', 'Ch4'])
-        self.trig_chan_choice.SetToolTipString("Select channel for trigger")
-        wx.EVT_CHOICE(self, 1004, self.trig_chan_choice_event)
-        ctrlbox.Add(self.trig_chan_choice, 0, wx.ALIGN_CENTER)
-
-        self.trig_mode_choice = wx.Choice(self, 1005,
-                                          choices = ['Free', 'Auto', 'Norm'])
-        self.trig_mode_choice.SetSelection(1)
-        self.trig_mode_choice.SetToolTipString("Select trigger slope or Auto (untriggered roll)")
-        wx.EVT_CHOICE(self, 1005, self.trig_mode_choice_event)
-        ctrlbox.Add(self.trig_mode_choice, 0, wx.ALIGN_CENTER)
-
-        trig_level50 = wx.Button(self, 1006, "50%")
-        trig_level50.SetToolTipString("Set trigger level to 50%")
-        wx.EVT_BUTTON(self, 1006, self.set_trig_level50)
-        ctrlbox.Add(trig_level50, 0, wx.EXPAND)
-
-        run_stop = wx.Button(self, 1007, "Run/Stop")
-        run_stop.SetToolTipString("Toggle Run/Stop mode")
-        wx.EVT_BUTTON(self, 1007, self.run_stop)
-        ctrlbox.Add(run_stop, 0, wx.EXPAND)
-
-        ctrlbox.Add((10, 0) ,1)            # stretchy space
-
-        ctrlbox.Add(wx.StaticText(self, -1, "Fmt: "), 0, wx.ALIGN_CENTER)
-        self.marker_choice = wx.Choice(self, 1002, choices = self._marker_choices)
-        self.marker_choice.SetToolTipString("Select plotting with lines, pluses or dots")
-        wx.EVT_CHOICE(self, 1002, self.marker_choice_event)
-        ctrlbox.Add(self.marker_choice, 0, wx.ALIGN_CENTER)
-
-        self.xy_choice = wx.Choice(self, 1003, choices = ['X:t', 'X:Y'])
-        self.xy_choice.SetToolTipString("Select X vs time or X vs Y display")
-        wx.EVT_CHOICE(self, 1003, self.xy_choice_event)
-        ctrlbox.Add(self.xy_choice, 0, wx.ALIGN_CENTER)
-
-        return ctrlbox
-
-    _marker_choices = ['line', 'plus', 'dot']
-
-    def update_timebase_label(self):
-        time_per_div = self.info.get_time_per_div()
-        s = ' ' + eng_notation.num_to_str(time_per_div) + 's/div'
-        self.time_base_label.SetLabel(s)
-
-    def decr_timebase(self, evt):
-        self.info.time_scale_cursor.prev()
-        self.update_timebase_label()
-
-    def incr_timebase(self, evt):
-        self.info.time_scale_cursor.next()
-        self.update_timebase_label()
-
-    def update_v_scale_label(self):
-        volts_per_div = self.info.get_volts_per_div()
-        s = ' ' + eng_notation.num_to_str(volts_per_div) + '/div' # Not V/div
-        self.v_scale_label.SetLabel(s)
-
-    def decr_v_scale(self, evt):
-        self.info.v_scale_cursor.prev()
-        self.update_v_scale_label()
-
-    def incr_v_scale(self, evt):
-        self.info.v_scale_cursor.next()
-        self.update_v_scale_label()
-
-    def marker_choice_event(self, evt):
-        s = evt.GetString()
-        self.set_marker(s)
-
-    def set_autorange(self, on):
-        if on:
-            self.v_scale_label.SetLabel(" (auto)")
-            self.info.autorange = True
-            self.autorange_checkbox.SetValue(True)
-            self.inc_v_button.Enable(False)
-            self.dec_v_button.Enable(False)
-        else:
-            if self.graph.y_range:
-                (l,u) = self.graph.y_range # found by autorange
-                self.info.v_scale_cursor.set_index_by_value((u-l)/8.0)
-            self.update_v_scale_label()
-            self.info.autorange = False
-            self.autorange_checkbox.SetValue(False)
-            self.inc_v_button.Enable(True)
-            self.dec_v_button.Enable(True)
-
-    def autorange_checkbox_event(self, evt):
-        if evt.Checked():
-            self.set_autorange(True)
-        else:
-            self.set_autorange(False)
-
-    def set_marker(self, s):
-        self.info.set_marker(s)        # set info for drawing routines
-        i = self.marker_choice.FindString(s)
-        assert i >= 0, "Hmmm, set_marker problem"
-        self.marker_choice.SetSelection(i)
-
-    def set_format_line(self):
-        self.set_marker('line')
-
-    def set_format_dot(self):
-        self.set_marker('dot')
-
-    def set_format_plus(self):
-        self.set_marker('plus')
-
-    def xy_choice_event(self, evt):
-        s = evt.GetString()
-        self.info.xy = s == 'X:Y'
-
-    def trig_chan_choice_event(self, evt):
-        s = evt.GetString()
-        ch = int(s[-1]) - 1
-        self.info.scopesink.set_trigger_channel(ch)
-
-    def trig_mode_choice_event(self, evt):
-        sink = self.info.scopesink
-        s = evt.GetString()
-        if s == 'Norm':
-            sink.set_trigger_mode(wxgui.TRIG_MODE_NORM)
-        elif s == 'Auto':
-            sink.set_trigger_mode(wxgui.TRIG_MODE_AUTO)
-        elif s == 'Free':
-            sink.set_trigger_mode(wxgui.TRIG_MODE_FREE)
-        else:
-            assert 0, "Bad trig_mode_choice string"
-
-    def set_trig_level50(self, evt):
-        self.info.scopesink.set_trigger_level_auto()
-
-    def run_stop(self, evt):
-        self.info.running = not self.info.running
-
-
-class graph_window(plot.PlotCanvas):
-
-    channel_colors = ['BLUE', 'RED',
-                      'CYAN', 'MAGENTA', 'GREEN', 'YELLOW']
-
-    def __init__(self, info, parent, id = -1,
-                  pos = wx.DefaultPosition, size = (640, 240),
-                  style = wx.DEFAULT_FRAME_STYLE, name = ""):
-        plot.PlotCanvas.__init__(self, parent, id, pos, size, style, name)
-
-        self.SetXUseScopeTicks(True)
-        self.SetEnableGrid(True)
-        self.SetEnableZoom(True)
-        self.SetEnableLegend(True)
-        # self.SetBackgroundColour('black')
-
-        self.info = info;
-        self.y_range = None
-        self.x_range = None
-        self.avg_y_min = None
-        self.avg_y_max = None
-        self.avg_x_min = None
-        self.avg_x_max = None
-
-        EVT_DATA_EVENT(self, self.format_data)
-
-        self.input_watcher = input_watcher(info.msgq, self, info.frame_decim)
-
-    def channel_color(self, ch):
-        return self.channel_colors[ch % len(self.channel_colors)]
-
-    def format_data(self, evt):
-        if not self.info.running:
-            return
-
-        if self.info.xy:
-            self.format_xy_data(evt)
-            return
-
-        info = self.info
-        records = evt.data
-        nchannels = len(records)
-        npoints = len(records[0])
-
-        objects = []
-
-        Ts = 1.0 / (info.get_sample_rate() / info.get_decimation_rate())
-        x_vals = Ts * numpy.arange(-npoints/2, npoints/2)
-
-        # preliminary clipping based on time axis here, instead of in graphics code
-        time_per_window = self.info.get_time_per_div() * 10
-        n = int(time_per_window / Ts + 0.5)
-        n = n & ~0x1                    # make even
-        n = max(2, min(n, npoints))
-
-        self.SetXUseScopeTicks(True)   # use 10 divisions, no labels
-
-        for ch in range(nchannels):
-            r = records[ch]
-
-            # plot middle n points of record
-
-            lb = npoints/2 - n/2
-            ub = npoints/2 + n/2
-            # points = zip(x_vals[lb:ub], r[lb:ub])
-            points = numpy.zeros((ub-lb, 2), numpy.float64)
-            points[:,0] = x_vals[lb:ub]
-            points[:,1] = r[lb:ub]
-
-            m = info.get_marker()
-            if m == 'line':
-                objects.append(plot.PolyLine(points,
-                                             colour=self.channel_color(ch),
-                                             legend=('Ch%d' % (ch+1,))))
-            else:
-                objects.append(plot.PolyMarker(points,
-                                               marker=m,
-                                               colour=self.channel_color(ch),
-                                               legend=('Ch%d' % (ch+1,))))
-
-        graphics = plot.PlotGraphics(objects,
-                                     title=self.info.title,
-                                     xLabel = '', yLabel = '')
-
-        time_per_div = info.get_time_per_div()
-        x_range = (-5.0 * time_per_div, 5.0 * time_per_div) # ranges are tuples!
-        volts_per_div = info.get_volts_per_div()
-        if not self.info.autorange:
-            self.y_range = (-4.0 * volts_per_div, 4.0 * volts_per_div)
-        self.Draw(graphics, xAxis=x_range, yAxis=self.y_range)
-        self.update_y_range() # autorange to self.y_range
-
-
-    def format_xy_data(self, evt):
-        info = self.info
-        records = evt.data
-        nchannels = len(records)
-        npoints = len(records[0])
-
-        if nchannels < 2:
-            return
-
-        objects = []
-        # points = zip(records[0], records[1])
-        points = numpy.zeros((len(records[0]), 2), numpy.float32)
-        points[:,0] = records[0]
-        points[:,1] = records[1]
-
-        self.SetXUseScopeTicks(False)
-
-        m = info.get_marker()
-        if m == 'line':
-            objects.append(plot.PolyLine(points,
-                                         colour=self.channel_color(0)))
-        else:
-            objects.append(plot.PolyMarker(points,
-                                           marker=m,
-                                           colour=self.channel_color(0)))
-
-        graphics = plot.PlotGraphics(objects,
-                                     title=self.info.title,
-                                     xLabel = 'I', yLabel = 'Q')
-
-        self.Draw(graphics, xAxis=self.x_range, yAxis=self.y_range)
-        self.update_y_range()
-        self.update_x_range()
-
-
-    def update_y_range(self):
-        alpha = 1.0/25
-        graphics = self.last_draw[0]
-        p1, p2 = graphics.boundingBox()     # min, max points of graphics
-
-        if self.avg_y_min: # prevent vertical scale from jumping abruptly --?
-            self.avg_y_min = p1[1] * alpha + self.avg_y_min * (1 - alpha)
-            self.avg_y_max = p2[1] * alpha + self.avg_y_max * (1 - alpha)
-        else: # initial guess
-            self.avg_y_min = p1[1] # -500.0 workaround, sometimes p1 is ~ 10^35
-            self.avg_y_max = p2[1] # 500.0
-
-        self.y_range = self._axisInterval('auto', self.avg_y_min, self.avg_y_max)
-        # print "p1 %s  p2 %s  y_min %s  y_max %s  y_range %s" \
-        #        % (p1, p2, self.avg_y_min, self.avg_y_max, self.y_range)
-
-
-    def update_x_range(self):
-        alpha = 1.0/25
-        graphics = self.last_draw[0]
-        p1, p2 = graphics.boundingBox()     # min, max points of graphics
-
-        if self.avg_x_min:
-            self.avg_x_min = p1[0] * alpha + self.avg_x_min * (1 - alpha)
-            self.avg_x_max = p2[0] * alpha + self.avg_x_max * (1 - alpha)
-        else:
-            self.avg_x_min = p1[0]
-            self.avg_x_max = p2[0]
-
-        self.x_range = self._axisInterval('auto', self.avg_x_min, self.avg_x_max)
-
-
-# ----------------------------------------------------------------
-# Stand-alone test application
-# ----------------------------------------------------------------
-
-class test_top_block(stdgui2.std_top_block):
-    def __init__(self, frame, panel, vbox, argv):
-        stdgui2.std_top_block.__init__(self, frame, panel, vbox, argv)
-
-        if len(argv) > 1:
-            frame_decim = int(argv[1])
-        else:
-            frame_decim = 1
-
-        if len(argv) > 2:
-            v_scale = float(argv[2])  # start up at this v_scale value
-        else:
-            v_scale = None  # start up in autorange mode, default
-
-        if len(argv) > 3:
-            t_scale = float(argv[3])  # start up at this t_scale value
-        else:
-            t_scale = None  # old behavior
-
-        print "frame decim %s  v_scale %s  t_scale %s" % (frame_decim,v_scale,t_scale)
-
-        input_rate = 1e6
-
-        # Generate a complex sinusoid
-        self.src0 = analog.sig_source_c(input_rate, analog.GR_SIN_WAVE, 25.1e3, 1e3)
-
-        # We add this throttle block so that this demo doesn't suck down
-        # all the CPU available.  You normally wouldn't use it...
-        self.thr = blocks.throttle(gr.sizeof_gr_complex, input_rate)
-
-        scope = scope_sink_c(panel,"Secret Data",sample_rate=input_rate,
-                             frame_decim=frame_decim,
-                             v_scale=v_scale, t_scale=t_scale)
-        vbox.Add(scope.win, 1, wx.EXPAND)
-
-        # Ultimately this will be
-        # self.connect("src0 throttle scope")
-	self.connect(self.src0, self.thr, scope)
-
-def main():
-    app = stdgui2.stdapp(test_top_block, "O'Scope Test App")
-    app.MainLoop()
-
-if __name__ == '__main__':
-    main()
-
-# ----------------------------------------------------------------
diff --git a/gr-wxgui/python/wxgui/slider.py b/gr-wxgui/python/wxgui/slider.py
deleted file mode 100644
index 9a8bfff7e7..0000000000
--- a/gr-wxgui/python/wxgui/slider.py
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/env python
-
-import wx
-
-def slider(parent, min, max, callback):
-    """
-    Return a wx.Slider object.
-
-    Args:
-        min: minimum slider value (float)
-        max: maximum slider value (float)
-        callback: function of one arg invoked when slider moves.
-    @rtype: wx.Slider
-    """
-    new_id = wx.NewId()
-    s = wx.Slider(parent, new_id, (max+min)/2, min, max, wx.DefaultPosition,
-                  wx.Size(250,-1), wx.SL_HORIZONTAL | wx.SL_LABELS)
-    wx.EVT_COMMAND_SCROLL(parent, new_id,
-                          lambda evt : callback(evt.GetInt()))
-    return s
-
-
-# ----------------------------------------------------------------
-# 		             Demo app
-# ----------------------------------------------------------------
-if __name__ == '__main__':
-
-    from gnuradio.wxgui import stdgui2
-
-    class demo_graph(stdgui2.std_top_block):
-
-        def __init__(self, frame, panel, vbox, argv):
-            stdgui2.std_top_block.__init__ (self, frame, panel, vbox, argv)
-
-            vbox.Add(slider(panel, 23, 47, self.my_callback1), 1, wx.ALIGN_CENTER)
-            vbox.Add(slider(panel, -100, 100, self.my_callback2), 1, wx.ALIGN_CENTER)
-
-        def my_callback1(self, val):
-            print "cb1 = ", val
-
-        def my_callback2(self, val):
-            print "cb2 = ", val
-
-    def main ():
-        app = stdgui2.stdapp (demo_graph, "Slider Demo")
-        app.MainLoop ()
-
-    main ()
diff --git a/gr-wxgui/python/wxgui/stdgui2.py b/gr-wxgui/python/wxgui/stdgui2.py
deleted file mode 100644
index dbd0307195..0000000000
--- a/gr-wxgui/python/wxgui/stdgui2.py
+++ /dev/null
@@ -1,107 +0,0 @@
-#
-# Copyright 2004 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-'''A simple wx gui for GNU Radio applications'''
-
-import ctypes
-import wx
-import sys
-from gnuradio import gr
-
-
-class stdapp (wx.App):
-    def __init__ (self, top_block_maker, title="GNU Radio", nstatus=2,
-                  max_noutput_items=None):
-        self.top_block_maker = top_block_maker
-        self.title = title
-        self._nstatus = nstatus
-        self._max_noutput_items = max_noutput_items
-        # If we're on Linux, also enable multi-threading Xlib access
-        if sys.platform.startswith('linux'):
-            try:
-                x11 = ctypes.cdll.LoadLibrary('libX11.so')
-                x11.XInitThreads()
-            except:
-                print "Warning: failed to XInitThreads()"
-        # All our initialization must come before calling wx.App.__init__.
-        # OnInit is called from somewhere in the guts of __init__.
-        wx.App.__init__ (self, redirect=False)
-
-    def OnInit (self):
-        frame = stdframe (self.top_block_maker, self.title, self._nstatus)
-        frame.Show (True)
-        self.SetTopWindow (frame)
-
-        if(self._max_noutput_items is not None):
-            frame.top_block().start (self._max_noutput_items)
-        else:
-            frame.top_block().start ()
-
-        return True
-
-
-class stdframe (wx.Frame):
-    def __init__ (self, top_block_maker, title="GNU Radio", nstatus=2):
-        # print "stdframe.__init__"
-        wx.Frame.__init__(self, None, -1, title)
-
-        self.CreateStatusBar (nstatus)
-        mainmenu = wx.MenuBar ()
-
-        menu = wx.Menu ()
-        item = menu.Append (200, 'E&xit', 'Exit')
-        self.Bind (wx.EVT_MENU, self.OnCloseWindow, item)
-        mainmenu.Append (menu, "&File")
-        self.SetMenuBar (mainmenu)
-
-        self.Bind (wx.EVT_CLOSE, self.OnCloseWindow)
-        self.panel = stdpanel (self, self, top_block_maker)
-        vbox = wx.BoxSizer(wx.VERTICAL)
-        vbox.Add(self.panel, 1, wx.EXPAND)
-        self.SetSizer(vbox)
-        self.SetAutoLayout(True)
-        vbox.Fit(self)
-
-    def OnCloseWindow (self, event):
-        self.top_block().stop()
-        self.top_block().wait()
-        self.Destroy ()
-
-    def top_block (self):
-        return self.panel.top_block
-
-class stdpanel (wx.Panel):
-    def __init__ (self, parent, frame, top_block_maker):
-        # print "stdpanel.__init__"
-        wx.Panel.__init__ (self, parent, -1)
-        self.frame = frame
-
-        vbox = wx.BoxSizer (wx.VERTICAL)
-        self.top_block = top_block_maker (frame, self, vbox, sys.argv)
-        self.SetSizer (vbox)
-        self.SetAutoLayout (True)
-        vbox.Fit (self)
-
-class std_top_block (gr.top_block):
-    def __init__ (self, parent, panel, vbox, argv):
-        # Call the hier_block2 constructor
-        # Top blocks have no inputs and outputs
-        gr.top_block.__init__(self, "std_top_block")
diff --git a/gr-wxgui/python/wxgui/termsink.py b/gr-wxgui/python/wxgui/termsink.py
deleted file mode 100644
index a0cfd575d6..0000000000
--- a/gr-wxgui/python/wxgui/termsink.py
+++ /dev/null
@@ -1,77 +0,0 @@
-#
-# Copyright 2009 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-from gnuradio import gru
-import wx
-
-DEFAULT_WIN_SIZE = (600, 300)
-APPEND_EVENT = wx.NewEventType()
-EVT_APPEND_EVENT = wx.PyEventBinder(APPEND_EVENT, 0)
-
-class AppendEvent(wx.PyEvent):
-    def __init__(self, text):
-        wx.PyEvent.__init__(self)
-        self.SetEventType(APPEND_EVENT)
-        self.text = text
-
-    def Clone(self):
-        self.__class__(self.GetId())
-
-class termsink(wx.Panel):
-	def __init__(self,
-		     parent,
-		     msgq,
-		     size=DEFAULT_WIN_SIZE,
-		     ):
-
-		wx.Panel.__init__(self,
-				  parent,
-				  size=size,
-				  style=wx.SIMPLE_BORDER,
-				  )
-
-		self.text_ctrl = wx.TextCtrl(self,
-					     wx.ID_ANY,
-					     value="",
-					     size=size,
-					     style=wx.TE_MULTILINE|wx.TE_READONLY,
-					     )
-
-		main_sizer = wx.BoxSizer(wx.VERTICAL)
-		main_sizer.Add(self.text_ctrl, 1, wx.EXPAND)
-		self.SetSizerAndFit(main_sizer)
-
-                EVT_APPEND_EVENT(self, self.evt_append)
-		self.runner = gru.msgq_runner(msgq, self.handle_msg)
-
-	def handle_msg(self, msg):
-		# This gets called in the queue runner thread context
-		# For now, just add whatever the user sends to the text control
-		text = msg.to_string()
-
-		# Create a wxPython event and post it to the event queue
-		evt = AppendEvent(text)
-		wx.PostEvent(self, evt)
-		del evt
-
-        def evt_append(self, evt):
-		# This gets called by the wxPython event queue runner
-		self.text_ctrl.AppendText(evt.text)
diff --git a/gr-wxgui/python/wxgui/waterfall_window.py b/gr-wxgui/python/wxgui/waterfall_window.py
deleted file mode 100644
index 272af10ffc..0000000000
--- a/gr-wxgui/python/wxgui/waterfall_window.py
+++ /dev/null
@@ -1,328 +0,0 @@
-#
-# Copyright 2008 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1`301, USA.
-#
-
-##################################################
-# Imports
-##################################################
-import plotter
-import common
-import wx
-import numpy
-import math
-import pubsub
-from constants import *
-from gnuradio import gr #for gr.prefs
-import forms
-
-##################################################
-# Constants
-##################################################
-SLIDER_STEPS = 100
-AVG_ALPHA_MIN_EXP, AVG_ALPHA_MAX_EXP = -3, 0
-DEFAULT_FRAME_RATE = gr.prefs().get_long('wxgui', 'waterfall_rate', 30)
-DEFAULT_COLOR_MODE = gr.prefs().get_string('wxgui', 'waterfall_color', 'rgb1')
-DEFAULT_WIN_SIZE = (600, 300)
-DIV_LEVELS = (1, 2, 5, 10, 20)
-MIN_DYNAMIC_RANGE, MAX_DYNAMIC_RANGE = 10, 200
-DYNAMIC_RANGE_STEP = 10.
-COLOR_MODES = (
-	('RGB1', 'rgb1'),
-	('RGB2', 'rgb2'),
-	('RGB3', 'rgb3'),
-	('Gray', 'gray'),
-)
-
-##################################################
-# Waterfall window control panel
-##################################################
-class control_panel(wx.Panel):
-	"""
-	A control panel with wx widgits to control the plotter and fft block chain.
-	"""
-
-	def __init__(self, parent):
-		"""
-		Create a new control panel.
-
-		Args:
-		    parent: the wx parent window
-		"""
-		self.parent = parent
-		wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
-		parent[SHOW_CONTROL_PANEL_KEY] = True
-		parent.subscribe(SHOW_CONTROL_PANEL_KEY, self.Show)
-		control_box = wx.BoxSizer(wx.VERTICAL)
-		control_box.AddStretchSpacer()
-		options_box = forms.static_box_sizer(
-			parent=self, sizer=control_box, label='Options',
-			bold=True, orient=wx.VERTICAL,
-		)
-		#average
-		forms.check_box(
-			sizer=options_box, parent=self, label='Average',
-			ps=parent, key=AVERAGE_KEY,
-		)
-		avg_alpha_text = forms.static_text(
-			sizer=options_box, parent=self, label='Avg Alpha',
-			converter=forms.float_converter(lambda x: '%.4f'%x),
-			ps=parent, key=AVG_ALPHA_KEY, width=50,
-		)
-		avg_alpha_slider = forms.log_slider(
-			sizer=options_box, parent=self,
-			min_exp=AVG_ALPHA_MIN_EXP,
-			max_exp=AVG_ALPHA_MAX_EXP,
-			num_steps=SLIDER_STEPS,
-			ps=parent, key=AVG_ALPHA_KEY,
-		)
-		for widget in (avg_alpha_text, avg_alpha_slider):
-			parent.subscribe(AVERAGE_KEY, widget.Enable)
-			widget.Enable(parent[AVERAGE_KEY])
-		#begin axes box
-		control_box.AddStretchSpacer()
-		axes_box = forms.static_box_sizer(
-			parent=self, sizer=control_box, label='Axes Options',
-			bold=True, orient=wx.VERTICAL,
-		)
-		#num lines buttons
-		forms.incr_decr_buttons(
-			parent=self, sizer=axes_box, label='Time Scale',
-			on_incr=self._on_incr_time_scale, on_decr=self._on_decr_time_scale,
-		)
-		#dyanmic range buttons
-		forms.incr_decr_buttons(
-			parent=self, sizer=axes_box, label='Dyn Range',
-			on_incr=self._on_incr_dynamic_range, on_decr=self._on_decr_dynamic_range,
-		)
-		#ref lvl buttons
-		forms.incr_decr_buttons(
-			parent=self, sizer=axes_box, label='Ref Level',
-			on_incr=self._on_incr_ref_level, on_decr=self._on_decr_ref_level,
-		)
-		#color mode
-		forms.drop_down(
-			parent=self, sizer=axes_box, width=100,
-			ps=parent, key=COLOR_MODE_KEY, label='Color',
-			choices=map(lambda x: x[1], COLOR_MODES),
-			labels=map(lambda x: x[0], COLOR_MODES),
-		)
-		#autoscale
-		forms.single_button(
-			parent=self, sizer=axes_box, label='Autoscale',
-			callback=self.parent.autoscale,
-		)
-		#clear
-		control_box.AddStretchSpacer()
-		forms.single_button(
-			parent=self, sizer=control_box, label='Clear',
-			callback=self._on_clear_button,
-		)
-		#run/stop
-		forms.toggle_button(
-			sizer=control_box, parent=self,
-			true_label='Stop', false_label='Run',
-			ps=parent, key=RUNNING_KEY,
-		)
-		#set sizer
-		self.SetSizerAndFit(control_box)
-
-	##################################################
-	# Event handlers
-	##################################################
-	def _on_clear_button(self, event):
-		self.parent[NUM_LINES_KEY] = self.parent[NUM_LINES_KEY]
-	def _on_incr_dynamic_range(self, event):
-		self.parent[DYNAMIC_RANGE_KEY] = min(MAX_DYNAMIC_RANGE, common.get_clean_incr(self.parent[DYNAMIC_RANGE_KEY]))
-	def _on_decr_dynamic_range(self, event):
-		self.parent[DYNAMIC_RANGE_KEY] = max(MIN_DYNAMIC_RANGE, common.get_clean_decr(self.parent[DYNAMIC_RANGE_KEY]))
-	def _on_incr_ref_level(self, event):
-		self.parent[REF_LEVEL_KEY] = self.parent[REF_LEVEL_KEY] + self.parent[DYNAMIC_RANGE_KEY]/DYNAMIC_RANGE_STEP
-	def _on_decr_ref_level(self, event):
-		self.parent[REF_LEVEL_KEY] = self.parent[REF_LEVEL_KEY] - self.parent[DYNAMIC_RANGE_KEY]/DYNAMIC_RANGE_STEP
-	def _on_incr_time_scale(self, event):
-		old_rate = self.parent[FRAME_RATE_KEY]
-		self.parent[FRAME_RATE_KEY] *= 0.75
-		if self.parent[FRAME_RATE_KEY] < 1.0:
-			self.parent[FRAME_RATE_KEY] = 1.0
-
-		if self.parent[FRAME_RATE_KEY] == old_rate:
-			self.parent[DECIMATION_KEY] += 1
-	def _on_decr_time_scale(self, event):
-		old_rate = self.parent[FRAME_RATE_KEY]
-		self.parent[FRAME_RATE_KEY] *= 1.25
-		if self.parent[FRAME_RATE_KEY] == old_rate:
-			self.parent[DECIMATION_KEY] -= 1
-
-##################################################
-# Waterfall window with plotter and control panel
-##################################################
-class waterfall_window(wx.Panel, pubsub.pubsub):
-	def __init__(
-		self,
-		parent,
-		controller,
-		size,
-		title,
-		real,
-		fft_size,
-		num_lines,
-		decimation_key,
-		baseband_freq,
-		sample_rate_key,
-		frame_rate_key,
-		dynamic_range,
-		ref_level,
-		average_key,
-		avg_alpha_key,
-		msg_key,
-	):
-		pubsub.pubsub.__init__(self)
-		#setup
-		self.samples = list()
-		self.real = real
-		self.fft_size = fft_size
-		#proxy the keys
-		self.proxy(MSG_KEY, controller, msg_key)
-		self.proxy(DECIMATION_KEY, controller, decimation_key)
-		self.proxy(FRAME_RATE_KEY, controller, frame_rate_key)
-		self.proxy(AVERAGE_KEY, controller, average_key)
-		self.proxy(AVG_ALPHA_KEY, controller, avg_alpha_key)
-		self.proxy(SAMPLE_RATE_KEY, controller, sample_rate_key)
-		#init panel and plot
-		wx.Panel.__init__(self, parent, style=wx.SIMPLE_BORDER)
-		self.plotter = plotter.waterfall_plotter(self)
-		self.plotter.SetSize(wx.Size(*size))
-		self.plotter.SetSizeHints(*size)
-		self.plotter.set_title(title)
-		self.plotter.enable_point_label(True)
-		self.plotter.enable_grid_lines(False)
-		#plotter listeners
-		self.subscribe(COLOR_MODE_KEY, self.plotter.set_color_mode)
-		self.subscribe(NUM_LINES_KEY, self.plotter.set_num_lines)
-		#initialize values
-		self[DYNAMIC_RANGE_KEY] = dynamic_range
-		self[NUM_LINES_KEY] = num_lines
-		self[Y_DIVS_KEY] = 8
-		self[X_DIVS_KEY] = 8 #approximate
-		self[REF_LEVEL_KEY] = ref_level
-		self[BASEBAND_FREQ_KEY] = baseband_freq
-		self[COLOR_MODE_KEY] = COLOR_MODES[0][1]
-		self[COLOR_MODE_KEY] = DEFAULT_COLOR_MODE
-		self[RUNNING_KEY] = True
-		#setup the box with plot and controls
-		self.control_panel = control_panel(self)
-		main_box = wx.BoxSizer(wx.HORIZONTAL)
-		main_box.Add(self.plotter, 1, wx.EXPAND)
-		main_box.Add(self.control_panel, 0, wx.EXPAND)
-		self.SetSizerAndFit(main_box)
-		#register events
-		self.subscribe(MSG_KEY, self.handle_msg)
-		for key in (
-			DECIMATION_KEY, SAMPLE_RATE_KEY, FRAME_RATE_KEY,
-			BASEBAND_FREQ_KEY, X_DIVS_KEY, Y_DIVS_KEY, NUM_LINES_KEY,
-		): self.subscribe(key, self.update_grid)
-		#initial update
-		self.update_grid()
-
-	def set_callback(self,callb):
-		self.plotter.set_callback(callb)
-
-	def autoscale(self, *args):
-		"""
-		Autoscale the waterfall plot to the last frame.
-		Set the dynamic range and reference level.
-		Does not affect the current data in the waterfall.
-		"""
-		if not len(self.samples): return
-		min_level, max_level = common.get_min_max_fft(self.samples)
-		#set the range and level
-		self[DYNAMIC_RANGE_KEY] = common.get_clean_num(max_level - min_level)
-		self[REF_LEVEL_KEY] = DYNAMIC_RANGE_STEP*round(.5+max_level/DYNAMIC_RANGE_STEP)
-
-	def handle_msg(self, msg):
-		"""
-		Handle the message from the fft sink message queue.
-		If complex, reorder the fft samples so the negative bins come first.
-		If real, keep take only the positive bins.
-		Send the data to the plotter.
-
-		Args:
-		    msg: the fft array as a character array
-		"""
-		if not self[RUNNING_KEY]: return
-		#convert to floating point numbers
-		self.samples = samples = numpy.fromstring(msg, numpy.float32)[:self.fft_size] #only take first frame
-		num_samps = len(samples)
-		#reorder fft
-		if self.real: samples = samples[:(num_samps+1)/2]
-		else: samples = numpy.concatenate((samples[num_samps/2+1:], samples[:(num_samps+1)/2]))
-		#plot the fft
-		self.plotter.set_samples(
-			samples=samples,
-			minimum=self[REF_LEVEL_KEY] - self[DYNAMIC_RANGE_KEY],
-			maximum=self[REF_LEVEL_KEY],
-		)
-		#update the plotter
-		self.plotter.update()
-
-	def update_grid(self, *args):
-		"""
-		Update the plotter grid.
-		This update method is dependent on the variables below.
-		Determine the x and y axis grid parameters.
-		The x axis depends on sample rate, baseband freq, and x divs.
-		The y axis depends on y per div, y divs, and ref level.
-		"""
-		#grid parameters
-		sample_rate = self[SAMPLE_RATE_KEY]
-		frame_rate = self[FRAME_RATE_KEY]
-		if frame_rate < 1.0 :
-			frame_rate = 1.0
-		baseband_freq = self[BASEBAND_FREQ_KEY]
-		num_lines = self[NUM_LINES_KEY]
-		y_divs = self[Y_DIVS_KEY]
-		x_divs = self[X_DIVS_KEY]
-		#determine best fitting x_per_div
-		if self.real: x_width = sample_rate/2.0
-		else: x_width = sample_rate/1.0
-		x_per_div = common.get_clean_num(x_width/x_divs)
-		#update the x grid
-		if self.real:
-			self.plotter.set_x_grid(
-				baseband_freq,
-				baseband_freq + sample_rate/2.0,
-				x_per_div, True,
-			)
-		else:
-			self.plotter.set_x_grid(
-				baseband_freq - sample_rate/2.0,
-				baseband_freq + sample_rate/2.0,
-				x_per_div, True,
-			)
-		#update x units
-		self.plotter.set_x_label('Frequency', 'Hz')
-		#update y grid
-		duration = float(num_lines)/frame_rate
-		y_per_div = common.get_clean_num(duration/y_divs)
-		self.plotter.set_y_grid(0, duration, y_per_div, True)
-		#update y units
-		self.plotter.set_y_label('Time', 's')
-		#update plotter
-		self.plotter.update()
diff --git a/gr-wxgui/python/wxgui/waterfallsink2.py b/gr-wxgui/python/wxgui/waterfallsink2.py
deleted file mode 100644
index 0b876fc3e2..0000000000
--- a/gr-wxgui/python/wxgui/waterfallsink2.py
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-# Copyright 2008,2009 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-from gnuradio import gr
-
-p = gr.prefs()
-style = p.get_string('wxgui', 'style', 'auto')
-
-if style == 'auto' or style == 'gl':
-    try:
-        import wx.glcanvas
-        from OpenGL.GL import *
-        from waterfallsink_gl import waterfall_sink_f, waterfall_sink_c
-    except ImportError:
-        if style == 'gl':
-            raise RuntimeError("Unable to import OpenGL.  Are Python wrappers for OpenGL installed?")
-        else:
-            # Fall backto non-gl sinks
-            from waterfallsink_nongl import waterfall_sink_f, waterfall_sink_c
-elif style == 'nongl':
-    from waterfallsink_nongl import waterfall_sink_f, waterfall_sink_c
-else:
-    raise RuntimeError("Unknown wxgui style")
diff --git a/gr-wxgui/python/wxgui/waterfallsink_gl.py b/gr-wxgui/python/wxgui/waterfallsink_gl.py
deleted file mode 100644
index c763d591b2..0000000000
--- a/gr-wxgui/python/wxgui/waterfallsink_gl.py
+++ /dev/null
@@ -1,176 +0,0 @@
-#
-# Copyright 2008,2009,2012 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-##################################################
-# Imports
-##################################################
-import waterfall_window
-import common
-from gnuradio import gr, fft
-from gnuradio import analog
-from gnuradio import blocks
-from gnuradio.fft import logpwrfft
-from pubsub import pubsub
-from constants import *
-
-##################################################
-# Waterfall sink block (wrapper for old wxgui)
-##################################################
-class _waterfall_sink_base(gr.hier_block2, common.wxgui_hb):
-	"""
-	An fft block with real/complex inputs and a gui window.
-	"""
-
-	def __init__(
-		self,
-		parent,
-		baseband_freq=0,
-		ref_level=50,
-		sample_rate=1,
-		fft_size=512,
-		fft_rate=waterfall_window.DEFAULT_FRAME_RATE,
-		average=False,
-		avg_alpha=None,
-		title='',
-		size=waterfall_window.DEFAULT_WIN_SIZE,
-		ref_scale=2.0,
-		dynamic_range=80,
-		num_lines=256,
-		win=None,
-		**kwargs #do not end with a comma
-	):
-		#ensure avg alpha
-		if avg_alpha is None: avg_alpha = 2.0/fft_rate
-		#init
-		gr.hier_block2.__init__(
-			self,
-			"waterfall_sink",
-			gr.io_signature(1, 1, self._item_size),
-			gr.io_signature(0, 0, 0),
-		)
-		#blocks
-		fft = self._fft_chain(
-			sample_rate=sample_rate,
-			fft_size=fft_size,
-			frame_rate=fft_rate,
-			ref_scale=ref_scale,
-			avg_alpha=avg_alpha,
-			average=average,
-			win=win,
-		)
-		msgq = gr.msg_queue(2)
-		sink = blocks.message_sink(gr.sizeof_float*fft_size, msgq, True)
-		#controller
-		self.controller = pubsub()
-		self.controller.subscribe(AVERAGE_KEY, fft.set_average)
-		self.controller.publish(AVERAGE_KEY, fft.average)
-		self.controller.subscribe(AVG_ALPHA_KEY, fft.set_avg_alpha)
-		self.controller.publish(AVG_ALPHA_KEY, fft.avg_alpha)
-		self.controller.subscribe(SAMPLE_RATE_KEY, fft.set_sample_rate)
-		self.controller.publish(SAMPLE_RATE_KEY, fft.sample_rate)
-		self.controller.subscribe(DECIMATION_KEY, fft.set_decimation)
-		self.controller.publish(DECIMATION_KEY, fft.decimation)
-		self.controller.subscribe(FRAME_RATE_KEY, fft.set_vec_rate)
-		self.controller.publish(FRAME_RATE_KEY, fft.frame_rate)
-		#start input watcher
-		common.input_watcher(msgq, self.controller, MSG_KEY)
-		#create window
-		self.win = waterfall_window.waterfall_window(
-			parent=parent,
-			controller=self.controller,
-			size=size,
-			title=title,
-			real=self._real,
-			fft_size=fft_size,
-			num_lines=num_lines,
-			baseband_freq=baseband_freq,
-			decimation_key=DECIMATION_KEY,
-			sample_rate_key=SAMPLE_RATE_KEY,
-			frame_rate_key=FRAME_RATE_KEY,
-			dynamic_range=dynamic_range,
-			ref_level=ref_level,
-			average_key=AVERAGE_KEY,
-			avg_alpha_key=AVG_ALPHA_KEY,
-			msg_key=MSG_KEY,
-		)
-		common.register_access_methods(self, self.win)
-		setattr(self.win, 'set_baseband_freq', getattr(self, 'set_baseband_freq')) #BACKWARDS
-		#connect
-		self.wxgui_connect(self, fft, sink)
-
-	def set_callback(self,callb):
-		self.win.set_callback(callb)
-
-class waterfall_sink_f(_waterfall_sink_base):
-	_fft_chain = logpwrfft.logpwrfft_f
-	_item_size = gr.sizeof_float
-	_real = True
-
-class waterfall_sink_c(_waterfall_sink_base):
-	_fft_chain = logpwrfft.logpwrfft_c
-	_item_size = gr.sizeof_gr_complex
-	_real = False
-
-# ----------------------------------------------------------------
-# Standalone test app
-# ----------------------------------------------------------------
-
-import wx
-from gnuradio.wxgui import stdgui2
-
-class test_top_block(stdgui2.std_top_block):
-    def __init__(self, frame, panel, vbox, argv):
-        stdgui2.std_top_block.__init__(self, frame, panel, vbox, argv)
-
-        fft_size = 512
-
-        # build our flow graph
-        input_rate = 20.000e3
-
-        # Generate a complex sinusoid
-        self.src1 = analog.sig_source_c(input_rate, analog.GR_SIN_WAVE, 5.75e3, 1000)
-        #src1 = analog.sig_source_c(input_rate, analog.GR_CONST_WAVE, 5.75e3, 1000)
-
-        # We add these throttle blocks so that this demo doesn't
-        # suck down all the CPU available.  Normally you wouldn't use these.
-        self.thr1 = blocks.throttle(gr.sizeof_gr_complex, input_rate)
-
-        sink1 = waterfall_sink_c(panel, title="Complex Data", fft_size=fft_size,
-				 sample_rate=input_rate, baseband_freq=100e3)
-	self.connect(self.src1, self.thr1, sink1)
-        vbox.Add(sink1.win, 1, wx.EXPAND)
-
-        # generate a real sinusoid
-        self.src2 = analog.sig_source_f(input_rate, analog.GR_SIN_WAVE, 5.75e3, 1000)
-        self.thr2 = blocks.throttle(gr.sizeof_float, input_rate)
-        sink2 = waterfall_sink_f(panel, title="Real Data", fft_size=fft_size,
-				 sample_rate=input_rate, baseband_freq=100e3)
-	self.connect(self.src2, self.thr2, sink2)
-        vbox.Add(sink2.win, 1, wx.EXPAND)
-
-
-def main ():
-    app = stdgui2.stdapp(test_top_block, "Waterfall Sink Test App")
-    app.MainLoop()
-
-if __name__ == '__main__':
-    main ()
-
diff --git a/gr-wxgui/python/wxgui/waterfallsink_nongl.py b/gr-wxgui/python/wxgui/waterfallsink_nongl.py
deleted file mode 100644
index 5cfcd24413..0000000000
--- a/gr-wxgui/python/wxgui/waterfallsink_nongl.py
+++ /dev/null
@@ -1,434 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2003-2005,2007,2008,2013 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-from gnuradio import gr, gru, fft, filter
-from gnuradio import blocks
-from gnuradio import analog
-from gnuradio.wxgui import stdgui2
-from gnuradio.filter import window
-import wx
-import gnuradio.wxgui.plot as plot
-import numpy
-import os
-import math
-
-default_fftsink_size = (640,240)
-default_fft_rate = gr.prefs().get_long('wxgui', 'fft_rate', 15)
-
-class waterfall_sink_base(object):
-    def __init__(self, input_is_real=False, baseband_freq=0,
-                 sample_rate=1, fft_size=512,
-                 fft_rate=default_fft_rate,
-                 average=False, avg_alpha=None, title=''):
-
-        # initialize common attributes
-        self.baseband_freq = baseband_freq
-        self.sample_rate = sample_rate
-        self.fft_size = fft_size
-        self.fft_rate = fft_rate
-        self.average = average
-        if avg_alpha is None:
-            self.avg_alpha = 2.0 / fft_rate
-        else:
-            self.avg_alpha = avg_alpha
-        self.title = title
-        self.input_is_real = input_is_real
-        self.msgq = gr.msg_queue(2)         # queue up to 2 messages
-
-    def set_average(self, average):
-        self.average = average
-        if average:
-            self.avg.set_taps(self.avg_alpha)
-        else:
-            self.avg.set_taps(1.0)
-
-    def set_avg_alpha(self, avg_alpha):
-        self.avg_alpha = avg_alpha
-
-    def set_baseband_freq(self, baseband_freq):
-        self.baseband_freq = baseband_freq
-
-    def set_sample_rate(self, sample_rate):
-        self.sample_rate = sample_rate
-        self._set_n()
-
-    def _set_n(self):
-        self.one_in_n.set_n(max(1, int(self.sample_rate/self.fft_size/self.fft_rate)))
-
-    def set_callback(self, callb):
-        return
-
-class waterfall_sink_f(gr.hier_block2, waterfall_sink_base):
-    def __init__(self, parent, baseband_freq=0,
-                 y_per_div=10, ref_level=50, sample_rate=1, fft_size=512,
-                 fft_rate=default_fft_rate, average=False, avg_alpha=None,
-                 title='', size=default_fftsink_size, **kwargs):
-
-        gr.hier_block2.__init__(self, "waterfall_sink_f",
-                                gr.io_signature(1, 1, gr.sizeof_float),
-                                gr.io_signature(0,0,0))
-
-        waterfall_sink_base.__init__(self, input_is_real=True, baseband_freq=baseband_freq,
-                               sample_rate=sample_rate, fft_size=fft_size,
-                               fft_rate=fft_rate,
-                               average=average, avg_alpha=avg_alpha, title=title)
-
-        self.s2p = blocks.stream_to_vector(gr.sizeof_float, self.fft_size)
-        self.one_in_n = blocks.keep_one_in_n(gr.sizeof_float * self.fft_size,
-                                             max(1, int(self.sample_rate/self.fft_size/self.fft_rate)))
-
-        mywindow = window.blackmanharris(self.fft_size)
-        self.fft = fft.fft_vfc(self.fft_size, True, mywindow)
-        self.c2mag = blocks.complex_to_mag(self.fft_size)
-        self.avg = filter.single_pole_iir_filter_ff(1.0, self.fft_size)
-        self.log = blocks.nlog10_ff(20, self.fft_size, -20*math.log10(self.fft_size))
-        self.sink = blocks.message_sink(gr.sizeof_float * self.fft_size, self.msgq, True)
-	self.connect(self, self.s2p, self.one_in_n, self.fft, self.c2mag, self.avg, self.log, self.sink)
-
-        self.win = waterfall_window(self, parent, size=size)
-        self.set_average(self.average)
-
-
-class waterfall_sink_c(gr.hier_block2, waterfall_sink_base):
-    def __init__(self, parent, baseband_freq=0,
-                 y_per_div=10, ref_level=50, sample_rate=1, fft_size=512,
-                 fft_rate=default_fft_rate, average=False, avg_alpha=None,
-                 title='', size=default_fftsink_size, **kwargs):
-
-        gr.hier_block2.__init__(self, "waterfall_sink_f",
-                                gr.io_signature(1, 1, gr.sizeof_gr_complex),
-                                gr.io_signature(0,0,0))
-
-        waterfall_sink_base.__init__(self, input_is_real=False, baseband_freq=baseband_freq,
-                                     sample_rate=sample_rate, fft_size=fft_size,
-                                     fft_rate=fft_rate,
-                                     average=average, avg_alpha=avg_alpha, title=title)
-
-        self.s2p = blocks.stream_to_vector(gr.sizeof_gr_complex, self.fft_size)
-        self.one_in_n = blocks.keep_one_in_n(gr.sizeof_gr_complex * self.fft_size,
-                                             max(1, int(self.sample_rate/self.fft_size/self.fft_rate)))
-
-        mywindow = window.blackmanharris(self.fft_size)
-        self.fft = fft.fft_vcc(self.fft_size, True, mywindow)
-        self.c2mag = blocks.complex_to_mag(self.fft_size)
-        self.avg = filter.single_pole_iir_filter_ff(1.0, self.fft_size)
-        self.log = blocks.nlog10_ff(20, self.fft_size, -20*math.log10(self.fft_size))
-        self.sink = blocks.message_sink(gr.sizeof_float * self.fft_size, self.msgq, True)
-	self.connect(self, self.s2p, self.one_in_n, self.fft, self.c2mag, self.avg, self.log, self.sink)
-
-        self.win = waterfall_window(self, parent, size=size)
-        self.set_average(self.average)
-
-
-# ------------------------------------------------------------------------
-
-myDATA_EVENT = wx.NewEventType()
-EVT_DATA_EVENT = wx.PyEventBinder (myDATA_EVENT, 0)
-
-
-class DataEvent(wx.PyEvent):
-    def __init__(self, data):
-        wx.PyEvent.__init__(self)
-        self.SetEventType (myDATA_EVENT)
-        self.data = data
-
-    def Clone (self):
-        self.__class__ (self.GetId())
-
-class input_watcher (gru.msgq_runner):
-    def __init__ (self, msgq, fft_size, event_receiver, **kwds):
-        self.fft_size = fft_size
-        self.event_receiver = event_receiver
-        gru.msgq_runner.__init__(self, msgq, self.handle_msg)
-
-    def handle_msg(self, msg):
-        itemsize = int(msg.arg1())
-        nitems = int(msg.arg2())
-
-        s = msg.to_string() # get the body of the msg as a string
-
-        # There may be more than one FFT frame in the message.
-        # If so, we take only the last one
-        if nitems > 1:
-            start = itemsize * (nitems - 1)
-            s = s[start:start+itemsize]
-
-        complex_data = numpy.fromstring (s, numpy.float32)
-        de = DataEvent (complex_data)
-        wx.PostEvent (self.event_receiver, de)
-        del de
-
-class waterfall_window (wx.Panel):
-    def __init__ (self, fftsink, parent, id = -1,
-                  pos = wx.DefaultPosition, size = wx.DefaultSize,
-                  style = wx.DEFAULT_FRAME_STYLE, name = ""):
-        wx.Panel.__init__(self, parent, id, pos, size, style, name)
-        self.set_baseband_freq = fftsink.set_baseband_freq
-        self.fftsink = fftsink
-        self.bm = wx.EmptyBitmap(self.fftsink.fft_size, 300, -1)
-
-        self.scale_factor = 5.0           # FIXME should autoscale, or set this
-
-        dc1 = wx.MemoryDC()
-        dc1.SelectObject(self.bm)
-        dc1.Clear()
-
-        self.pens = self.make_pens()
-
-        wx.EVT_PAINT( self, self.OnPaint )
-        wx.EVT_CLOSE (self, self.on_close_window)
-        EVT_DATA_EVENT (self, self.set_data)
-
-        self.build_popup_menu()
-
-        wx.EVT_CLOSE (self, self.on_close_window)
-        self.Bind(wx.EVT_RIGHT_UP, self.on_right_click)
-
-        self.input_watcher = input_watcher(fftsink.msgq, fftsink.fft_size, self)
-
-
-    def on_close_window (self, event):
-        print "waterfall_window: on_close_window"
-        self.keep_running = False
-
-    def const_list(self,const,len):
-        return [const] * len
-
-    def make_colormap(self):
-        r = []
-        r.extend(self.const_list(0,96))
-        r.extend(range(0,255,4))
-        r.extend(self.const_list(255,64))
-        r.extend(range(255,128,-4))
-
-        g = []
-        g.extend(self.const_list(0,32))
-        g.extend(range(0,255,4))
-        g.extend(self.const_list(255,64))
-        g.extend(range(255,0,-4))
-        g.extend(self.const_list(0,32))
-
-        b = range(128,255,4)
-        b.extend(self.const_list(255,64))
-        b.extend(range(255,0,-4))
-        b.extend(self.const_list(0,96))
-        return (r,g,b)
-
-    def make_pens(self):
-        (r,g,b) = self.make_colormap()
-        pens = []
-        for i in range(0,256):
-            colour = wx.Colour(r[i], g[i], b[i])
-            pens.append( wx.Pen(colour, 2, wx.SOLID))
-        return pens
-
-    def OnPaint(self, event):
-        dc = wx.PaintDC(self)
-        self.DoDrawing(dc)
-
-    def DoDrawing(self, dc=None):
-        if dc is None:
-            dc = wx.ClientDC(self)
-        dc.DrawBitmap(self.bm, 0, 0, False )
-
-
-    def const_list(self,const,len):
-        a = [const]
-        for i in range(1,len):
-            a.append(const)
-        return a
-
-
-    def set_data (self, evt):
-        dB = evt.data
-        L = len (dB)
-
-        dc1 = wx.MemoryDC()
-        dc1.SelectObject(self.bm)
-        dc1.Blit(0,1,self.fftsink.fft_size,300,dc1,0,0,wx.COPY,False,-1,-1)
-
-        x = max(abs(self.fftsink.sample_rate), abs(self.fftsink.baseband_freq))
-        if x >= 1e9:
-            sf = 1e-9
-            units = "GHz"
-        elif x >= 1e6:
-            sf = 1e-6
-            units = "MHz"
-        else:
-            sf = 1e-3
-            units = "kHz"
-
-
-        if self.fftsink.input_is_real:     # only plot 1/2 the points
-            d_max = L/2
-            p_width = 2
-        else:
-            d_max = L/2
-            p_width = 1
-
-        scale_factor = self.scale_factor
-        if self.fftsink.input_is_real:     # real fft
-           for x_pos in range(0, d_max):
-               value = int(dB[x_pos] * scale_factor)
-               value = min(255, max(0, value))
-               dc1.SetPen(self.pens[value])
-               dc1.DrawRectangle(x_pos*p_width, 0, p_width, 2)
-        else:                               # complex fft
-           for x_pos in range(0, d_max):    # positive freqs
-               value = int(dB[x_pos] * scale_factor)
-               value = min(255, max(0, value))
-               dc1.SetPen(self.pens[value])
-               dc1.DrawRectangle(x_pos*p_width + d_max, 0, p_width, 2)
-           for x_pos in range(0 , d_max):   # negative freqs
-               value = int(dB[x_pos+d_max] * scale_factor)
-               value = min(255, max(0, value))
-               dc1.SetPen(self.pens[value])
-               dc1.DrawRectangle(x_pos*p_width, 0, p_width, 2)
-
-	del dc1
-        self.DoDrawing (None)
-
-    def on_average(self, evt):
-        # print "on_average"
-        self.fftsink.set_average(evt.IsChecked())
-
-    def on_right_click(self, event):
-        menu = self.popup_menu
-        for id, pred in self.checkmarks.items():
-            item = menu.FindItemById(id)
-            item.Check(pred())
-        self.PopupMenu(menu, event.GetPosition())
-
-
-    def build_popup_menu(self):
-        self.id_incr_ref_level = wx.NewId()
-        self.id_decr_ref_level = wx.NewId()
-        self.id_incr_y_per_div = wx.NewId()
-        self.id_decr_y_per_div = wx.NewId()
-        self.id_y_per_div_1 = wx.NewId()
-        self.id_y_per_div_2 = wx.NewId()
-        self.id_y_per_div_5 = wx.NewId()
-        self.id_y_per_div_10 = wx.NewId()
-        self.id_y_per_div_20 = wx.NewId()
-        self.id_average = wx.NewId()
-
-        self.Bind(wx.EVT_MENU, self.on_average, id=self.id_average)
-        #self.Bind(wx.EVT_MENU, self.on_incr_ref_level, id=self.id_incr_ref_level)
-        #self.Bind(wx.EVT_MENU, self.on_decr_ref_level, id=self.id_decr_ref_level)
-        #self.Bind(wx.EVT_MENU, self.on_incr_y_per_div, id=self.id_incr_y_per_div)
-        #self.Bind(wx.EVT_MENU, self.on_decr_y_per_div, id=self.id_decr_y_per_div)
-        #self.Bind(wx.EVT_MENU, self.on_y_per_div, id=self.id_y_per_div_1)
-        #self.Bind(wx.EVT_MENU, self.on_y_per_div, id=self.id_y_per_div_2)
-        #self.Bind(wx.EVT_MENU, self.on_y_per_div, id=self.id_y_per_div_5)
-        #self.Bind(wx.EVT_MENU, self.on_y_per_div, id=self.id_y_per_div_10)
-        #self.Bind(wx.EVT_MENU, self.on_y_per_div, id=self.id_y_per_div_20)
-
-
-        # make a menu
-        menu = wx.Menu()
-        self.popup_menu = menu
-        menu.AppendCheckItem(self.id_average, "Average")
-        # menu.Append(self.id_incr_ref_level, "Incr Ref Level")
-        # menu.Append(self.id_decr_ref_level, "Decr Ref Level")
-        # menu.Append(self.id_incr_y_per_div, "Incr dB/div")
-        # menu.Append(self.id_decr_y_per_div, "Decr dB/div")
-        # menu.AppendSeparator()
-        # we'd use RadioItems for these, but they're not supported on Mac
-        #menu.AppendCheckItem(self.id_y_per_div_1, "1 dB/div")
-        #menu.AppendCheckItem(self.id_y_per_div_2, "2 dB/div")
-        #menu.AppendCheckItem(self.id_y_per_div_5, "5 dB/div")
-        #menu.AppendCheckItem(self.id_y_per_div_10, "10 dB/div")
-        #menu.AppendCheckItem(self.id_y_per_div_20, "20 dB/div")
-
-        self.checkmarks = {
-            self.id_average : lambda : self.fftsink.average
-            #self.id_y_per_div_1 : lambda : self.fftsink.y_per_div == 1,
-            #self.id_y_per_div_2 : lambda : self.fftsink.y_per_div == 2,
-            #self.id_y_per_div_5 : lambda : self.fftsink.y_per_div == 5,
-            #self.id_y_per_div_10 : lambda : self.fftsink.y_per_div == 10,
-            #self.id_y_per_div_20 : lambda : self.fftsink.y_per_div == 20,
-            }
-
-
-def next_up(v, seq):
-    """
-    Return the first item in seq that is > v.
-    """
-    for s in seq:
-        if s > v:
-            return s
-    return v
-
-def next_down(v, seq):
-    """
-    Return the last item in seq that is < v.
-    """
-    rseq = list(seq[:])
-    rseq.reverse()
-
-    for s in rseq:
-        if s < v:
-            return s
-    return v
-
-
-# ----------------------------------------------------------------
-# Standalone test app
-# ----------------------------------------------------------------
-
-class test_top_block (stdgui2.std_top_block):
-    def __init__(self, frame, panel, vbox, argv):
-        stdgui2.std_top_block.__init__(self, frame, panel, vbox, argv)
-
-        fft_size = 512
-
-        # build our flow graph
-        input_rate = 20.000e3
-
-        # Generate a complex sinusoid
-        self.src1 = analog.sig_source_c(input_rate, analog.GR_SIN_WAVE, 5.75e3, 1000)
-        #src1 = analog.sig_source_c(input_rate, analog.GR_CONST_WAVE, 5.75e3, 1000)
-
-        # We add these throttle blocks so that this demo doesn't
-        # suck down all the CPU available.  Normally you wouldn't use these.
-        self.thr1 = blocks.throttle(gr.sizeof_gr_complex, input_rate)
-
-        sink1 = waterfall_sink_c(panel, title="Complex Data", fft_size=fft_size,
-                                 sample_rate=input_rate, baseband_freq=100e3)
-	self.connect(self.src1, self.thr1, sink1)
-        vbox.Add(sink1.win, 1, wx.EXPAND)
-
-        # generate a real sinusoid
-        self.src2 = analog.sig_source_f(input_rate, analog.GR_SIN_WAVE, 5.75e3, 1000)
-        self.thr2 = blocks.throttle(gr.sizeof_float, input_rate)
-        sink2 = waterfall_sink_f(panel, title="Real Data", fft_size=fft_size,
-                                 sample_rate=input_rate, baseband_freq=100e3)
-	self.connect(self.src2, self.thr2, sink2)
-        vbox.Add(sink2.win, 1, wx.EXPAND)
-
-
-def main ():
-    app = stdgui2.stdapp(test_top_block, "Waterfall Sink Test App")
-    app.MainLoop()
-
-if __name__ == '__main__':
-    main()
diff --git a/gr-wxgui/swig/CMakeLists.txt b/gr-wxgui/swig/CMakeLists.txt
deleted file mode 100644
index 4eb11633a7..0000000000
--- a/gr-wxgui/swig/CMakeLists.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-# Copyright 2013 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-
-########################################################################
-# Setup swig generation
-########################################################################
-include(GrPython)
-include(GrSwig)
-
-set(GR_SWIG_INCLUDE_DIRS
-    ${CMAKE_CURRENT_BINARY_DIR}/../include
-    ${GR_WXGUI_INCLUDE_DIRS}
-    ${GNURADIO_RUNTIME_SWIG_INCLUDE_DIRS}
-    ${Boost_INCLUDE_DIRS}
-)
-
-if(ENABLE_GR_CTRLPORT)
-  list(APPEND GR_SWIG_FLAGS "-DGR_CTRLPORT")
-endif(ENABLE_GR_CTRLPORT)
-
-set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/wxgui_swig_doc.i)
-set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../include/gnuradio/wxgui)
-set(GR_SWIG_DOCS_TARGET_DEPS runtime_swig_swig_doc)
-set(GR_SWIG_TARGET_DEPS wxgui_generated_includes)
-set(GR_SWIG_LIBRARIES gnuradio-wxgui)
-
-GR_SWIG_MAKE(wxgui_swig wxgui_swig.i)
-
-GR_SWIG_INSTALL(
-    TARGETS wxgui_swig
-    DESTINATION ${GR_PYTHON_DIR}/gnuradio/wxgui
-)
-
-install(
-    FILES
-    wxgui_swig.i
-    ${CMAKE_CURRENT_BINARY_DIR}/wxgui_swig_doc.i
-    DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
-)
diff --git a/gr-wxgui/swig/wxgui_swig.i b/gr-wxgui/swig/wxgui_swig.i
deleted file mode 100644
index f370da407a..0000000000
--- a/gr-wxgui/swig/wxgui_swig.i
+++ /dev/null
@@ -1,43 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#define WXGUI_API
-
-%include "gnuradio.i"
-
-//load generated python docstrings
-%include "wxgui_swig_doc.i"
-
-%include "gnuradio/wxgui/trigger_mode.h"
-
-%{
-#include "gnuradio/wxgui/oscope_sink_x.h"
-#include "gnuradio/wxgui/histo_sink_f.h"
-#include "gnuradio/wxgui/oscope_sink_f.h"
-%}
-
-%include "gnuradio/wxgui/oscope_sink_x.h"
-%include "gnuradio/wxgui/histo_sink_f.h"
-%include "gnuradio/wxgui/oscope_sink_f.h"
-
-GR_SWIG_BLOCK_MAGIC2(wxgui, histo_sink_f);
-GR_SWIG_BLOCK_MAGIC2(wxgui, oscope_sink_f);
-- 
cgit v1.2.3


From f874d7767cc1d70eb13add441124c4da9d637b4d Mon Sep 17 00:00:00 2001
From: Jiří Pinkava <j-pi@seznam.cz>
Date: Sun, 26 Jun 2016 13:04:36 +0200
Subject: tools, docs: replace OptionParser by ArgumentParser

---
 README.hacking                | 60 +++++++++++++++++++++----------------------
 docs/doxygen/other/doxypy.py  | 56 ++++++++++++++++++----------------------
 dtools/bin/update_fsf_address | 26 +++++++++----------
 gr-audio/doc/audio.dox        |  8 +++---
 4 files changed, 72 insertions(+), 78 deletions(-)

(limited to 'docs/doxygen')

diff --git a/README.hacking b/README.hacking
index 2d0a1c395f..0b5bf6d0c3 100644
--- a/README.hacking
+++ b/README.hacking
@@ -120,8 +120,8 @@ http://gnuradio.org/redmine/projects/gnuradio/wiki/Coding_guide_impl#Unit-testin
 When writing programs that are executable from the command line,
 please follow these guidelines for command line argument names (short
 and long) and types of the arguments.  We list them below using the
-Python optparse syntax.  In general, the default value should be coded
-into the help string using the "... [default=%default]" syntax.
+Python argparse syntax.  In general, the default value should be coded
+into the help string using the "... [default=%(default)r]" syntax.
 
 ** Mandatory options by gr::block
 
@@ -132,7 +132,7 @@ option parsing will automatically be set up for you.
 
 Any program using an audio source shall include:
 
-  add_option("-I", "--audio-input", type="string", default="",
+  add_argument("-I", "--audio-input", default="",
              help="pcm input device name.  E.g., hw:0,0 or /dev/dsp")
 
 The default must be "".  This allows an audio module-dependent default
@@ -141,7 +141,7 @@ to be specified in the user preferences file.
 
 *** Audio sink
 
-  add_option("-O", "--audio-output", type="string", default="",
+  add_argument("-O", "--audio-output", default="",
              help="pcm output device name.  E.g., hw:0,0 or /dev/dsp")
 
 The default must be "".  This allows an audio module-dependent default
@@ -162,69 +162,69 @@ following parameters, please use these options to specify them:
 
 To specify a frequency (typically an RF center frequency) use:
 
-  add_option("-f", "--freq", type="eng_float", default=<your-default-here>,
-             help="set frequency to FREQ [default=%default]")
+  add_argument("-f", "--freq", type=eng_float, default=<your-default-here>,
+             help="set frequency to FREQ [default=%(default)r]")
 
 
 To specify a decimation factor use:
 
-  add_option("-d", "--decim", type="intx", default=<your-default-here>,
-             help="set decimation rate to DECIM [default=%default]")
+  add_argument("-d", "--decim", type=intx, default=<your-default-here>,
+             help="set decimation rate to DECIM [default=%(default)r]")
 
 
 To specify an interpolation factor use:
 
-  add_option("-i", "--interp", type="intx", default=<your-default-here>,
-             help="set interpolation rate to INTERP [default=%default]")
+  add_argument("-i", "--interp", type=intx, default=<your-default-here>,
+             help="set interpolation rate to INTERP [default=%(default)r]")
 
 
 To specify a gain setting use:
 
-  add_option("-g", "--gain", type="eng_float", default=<your-default-here>,
-	     help="set gain in dB [default=%default]")
+  add_argument("-g", "--gain", type=eng_float, default=<your-default-here>,
+             help="set gain in dB [default=%(default)r]")
 
 
 If your application specifies both a tx and an rx gain, use:
 
-  add_option("", "--rx-gain", type="eng_float", default=<your-default-here>,
-	     help="set receive gain in dB [default=%default]")
+  add_argument("--rx-gain", type=eng_float, default=<your-default-here>,
+            help="set receive gain in dB [default=%(default)r]")
 
-  add_option("", "--tx-gain", type="eng_float", default=<your-default-here>,
-	     help="set transmit gain in dB [default=%default]")
+  add_argument("--tx-gain", type=eng_float, default=<your-default-here>,
+             help="set transmit gain in dB [default=%(default)r]")
 
 
 To specify the number of channels of something use:
 
-  add_option("-n", "--nchannels", type="intx", default=1,
-             help="specify number of channels [default=%default]")
+  add_argument("-n", "--nchannels", type=intx, default=1,
+             help="specify number of channels [default=%(default)r]")
 
 
 To specify an output filename use:
 
-  add_option("-o", "--output-filename", type="string", default=<your-default-here>,
-             help="specify output-filename [default=%default]")
+  add_argument("-o", "--output-filename", default=<your-default-here>,
+             help="specify output-filename [default=%(default)r]")
 
 
 To specify a rate use:
 
-  add_option("-r", "--bit-rate", type="eng_float", default=<your-default-here>,
-             help="specify bit-rate [default=%default]")
+  add_argument("-r", "--bit-rate", type=eng_float, default=<your-default-here>,
+             help="specify bit-rate [default=%(default)r]")
      or
 
-  add_option("-r", "--sample-rate", type="eng_float", default=<your-default-here>,
-             help="specify sample-rate [default=%default]")
+  add_argument("-r", "--sample-rate", type=eng_float, default=<your-default-here>,
+             help="specify sample-rate [default=%(default)r]")
 
 
 If your application has a verbose option, use:
 
-  add_option('-v', '--verbose', action="store_true", default=False,
-	     help="verbose output")
+  add_argument('-v', '--verbose', action="store_true",
+             help="verbose output")
 
 
 If your application allows the user to specify the "fast USB" options, use:
 
-  add_option("", "--fusb-block-size", type="intx", default=0,
-             help="specify fast USB block size [default=%default]")
+  add_argument("--fusb-block-size", type=intx, default=0,
+             help="specify fast USB block size [default=%(default)r]")
 
-  add_option("", "--fusb-nblocks", type="intx", default=0,
-             help="specify number of fast USB blocks [default=%default]")
+  add_argument("--fusb-nblocks", type=intx, default=0,
+             help="specify number of fast USB blocks [default=%(default)r]")
diff --git a/docs/doxygen/other/doxypy.py b/docs/doxygen/other/doxypy.py
index 15d3e0824d..a9af32ab53 100755
--- a/docs/doxygen/other/doxypy.py
+++ b/docs/doxygen/other/doxypy.py
@@ -15,7 +15,7 @@ add the following lines to your Doxyfile:
 	INPUT_FILTER = "python /path/to/doxypy.py"
 """
 
-__version__ = "0.4.1"
+__version__ = "0.4.2"
 __date__ = "5th December 2008"
 __website__ = "http://code.foosel.org/doxypy"
 
@@ -42,7 +42,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 import sys
 import re
 
-from optparse import OptionParser, OptionGroup
+from argparse import ArgumentParser
 
 class FSM(object):
 	"""Implements a finite state machine.
@@ -85,7 +85,7 @@ class FSM(object):
 					self.current_state = to_state
 					self.current_input = input
 					self.current_transition = transition
-					if options.debug:
+					if args.debug:
 						print >>sys.stderr, "# FSM: executing (%s -> %s) for line '%s'" % (from_state, to_state, input)
 					callback(match)
 					return
@@ -179,7 +179,7 @@ class Doxypy(object):
 	def __closeComment(self):
 		"""Appends any open comment block and triggering block to the output."""
 
-		if options.autobrief:
+		if args.autobrief:
 			if len(self.comment) == 1 \
 			or (len(self.comment) > 2 and self.comment[1].strip() == ''):
 				self.comment[0] = self.__docstringSummaryToBrief(self.comment[0])
@@ -207,7 +207,7 @@ class Doxypy(object):
 		"""Flushes the current outputbuffer to the outstream."""
 		if self.output:
 			try:
-				if options.debug:
+				if args.debug:
 					print >>sys.stderr, "# OUTPUT: ", self.output
 				print >>self.outstream, "\n".join(self.output)
 				self.outstream.flush()
@@ -227,7 +227,7 @@ class Doxypy(object):
 
 		Closes the current commentblock and starts a new comment search.
 		"""
-		if options.debug:
+		if args.debug:
 			print >>sys.stderr, "# CALLBACK: resetCommentSearch"
 		self.__closeComment()
 		self.startCommentSearch(match)
@@ -238,7 +238,7 @@ class Doxypy(object):
 		Saves the triggering line, resets the current comment and saves
 		the current indentation.
 		"""
-		if options.debug:
+		if args.debug:
 			print >>sys.stderr, "# CALLBACK: startCommentSearch"
 		self.defclass = [self.fsm.current_input]
 		self.comment = []
@@ -250,7 +250,7 @@ class Doxypy(object):
 		Closes the current commentblock, resets	the triggering line and
 		appends the current line to the output.
 		"""
-		if options.debug:
+		if args.debug:
 			print >>sys.stderr, "# CALLBACK: stopCommentSearch"
 		self.__closeComment()
 
@@ -262,7 +262,7 @@ class Doxypy(object):
 
 		Closes the open comment	block, resets it and appends the current line.
 		"""
-		if options.debug:
+		if args.debug:
 			print >>sys.stderr, "# CALLBACK: appendFileheadLine"
 		self.__closeComment()
 		self.comment = []
@@ -274,7 +274,7 @@ class Doxypy(object):
 		The comment delimiter is removed from multiline start and ends as
 		well as singleline comments.
 		"""
-		if options.debug:
+		if args.debug:
 			print >>sys.stderr, "# CALLBACK: appendCommentLine"
 		(from_state, to_state, condition, callback) = self.fsm.current_transition
 
@@ -311,13 +311,13 @@ class Doxypy(object):
 
 	def appendNormalLine(self, match):
 		"""Appends a line to the output."""
-		if options.debug:
+		if args.debug:
 			print >>sys.stderr, "# CALLBACK: appendNormalLine"
 		self.output.append(self.fsm.current_input)
 
 	def appendDefclassLine(self, match):
 		"""Appends a line to the triggering block."""
-		if options.debug:
+		if args.debug:
 			print >>sys.stderr, "# CALLBACK: appendDefclassLine"
 		self.defclass.append(self.fsm.current_input)
 
@@ -378,37 +378,31 @@ class Doxypy(object):
 		self.fsm.makeTransition(line)
 		self.__flushBuffer()
 
-def optParse():
-	"""Parses commandline options."""
-	parser = OptionParser(prog=__applicationName__, version="%prog " + __version__)
+def argParse():
+	"""Parses commandline args."""
+	parser = ArgumentParser(prog=__applicationName__)
 
-	parser.set_usage("%prog [options] filename")
-	parser.add_option("--autobrief",
-		action="store_true", dest="autobrief",
+	parser.add_argument("--version", action="version",
+		version="%(prog)s " + __version__
+	)
+	parser.add_argument("--autobrief", action="store_true",
 		help="use the docstring summary line as \\brief description"
 	)
-	parser.add_option("--debug",
-		action="store_true", dest="debug",
+	parser.add_argument("--debug", action="store_true",
 		help="enable debug output on stderr"
 	)
+	parser.add_argument("filename", metavar="FILENAME")
 
-	## parse options
-	global options
-	(options, filename) = parser.parse_args()
-
-	if not filename:
-		print >>sys.stderr, "No filename given."
-		sys.exit(-1)
-
-	return filename[0]
+	return parser.parse_args()
 
 def main():
 	"""Starts the parser on the file given by the filename as the first
 	argument on the commandline.
 	"""
-	filename = optParse()
+	global args
+	args = argParse()
 	fsm = Doxypy()
-	fsm.parseFile(filename)
+	fsm.parseFile(args.filename)
 
 if __name__ == "__main__":
 	main()
diff --git a/dtools/bin/update_fsf_address b/dtools/bin/update_fsf_address
index 608ba0a8e2..0017fa11a9 100755
--- a/dtools/bin/update_fsf_address
+++ b/dtools/bin/update_fsf_address
@@ -23,7 +23,7 @@ import re
 import os
 import os.path
 import sys
-from optparse import OptionParser
+from argparse import ArgumentParser
 
 dry_run = False
 modified_files = []
@@ -109,22 +109,22 @@ def handle_file_or_dir(file_or_dir):
 def main():
     global dry_run
 
-    usage = '%prog: [options] [file_or_dir...]'
-    parser = OptionParser (usage=usage)
-    parser.add_option('-l', '--list-modified-files', action='store_true', default=False,
-                      help='List modified files to stdout [default=%default]')
-    parser.add_option('', '--dry-run', action='store_true', default=False,
-                      help="Don't modify any files, just report what would be modified [default=%default]")
-    (options, args) = parser.parse_args()
+    parser = ArgumentParser()
+    parser.add_argument('-l', '--list-modified-files', action='store_true',
+                      help='List modified files to stdout')
+    parser.add_argument('--dry-run', action='store_true',
+                      help="Don't modify any files, just report what would be modified")
+    parser.add_argument('file_or_dir', metavar='FILE-OR-DIR', nargs='*')
+    args = parser.parse_args()
 
-    dry_run = options.dry_run
-    if options.dry_run:
-        options.list_modified_files = True
+    dry_run = args.dry_run
+    if args.dry_run:
+        args.list_modified_files = True
 
-    for file_or_dir in args:
+    for file_or_dir in args.file_or_dir:
         handle_file_or_dir(file_or_dir)
 
-    if options.list_modified_files:
+    if args.list_modified_files:
         for f in modified_files:
             sys.stdout.write(f + '\n')
 
diff --git a/gr-audio/doc/audio.dox b/gr-audio/doc/audio.dox
index d706bbb6ae..648f126104 100644
--- a/gr-audio/doc/audio.dox
+++ b/gr-audio/doc/audio.dox
@@ -41,21 +41,21 @@ after importing by using:
 
 
 \section audio_usage Usage
-For an audio source, a typical OptionParser option and it's use looks
+For an audio source, a typical ArgumentParser option and it's use looks
 like:
 
 \code
-    parser.add_option("-O", "--audio-output", type="string", default="",
+    parser.add_argument("-O", "--audio-output", default="",
                        help="pcm device name.  E.g., hw:0,0 or surround51 or /dev/dsp")
     audio_rate = 32e3
     audio_sink = audio.sink (int (audio_rate), options.audio_output)
 \endcode
 
-Similarly, an audio sink would have a typical OptionParser option and
+Similarly, an audio sink would have a typical ArgumentParser option and
 its use would look like:
 
 \code
-    parser.add_option("-I", "--audio-input", type="string", default="",
+    parser.add_argument("-I", "--audio-input", default="",
                       help="pcm input device name.  E.g., hw:0,0 or /dev/dsp")
     audio_rate = 32e3
     audio_source = audio.source(int(audio_rate), audio_input)
-- 
cgit v1.2.3


From 9e625c4821f4c63421b3d3747c0c4f358fef6c5f Mon Sep 17 00:00:00 2001
From: Douglas Anderson <danderson@ntia.doc.gov>
Date: Sun, 12 Feb 2017 15:52:19 -0800
Subject: python3: update non-GRC components to use python2 or python3

---
 CMakeLists.txt                                     |    9 +-
 cmake/Modules/GrMiscUtils.cmake                    |   10 +-
 cmake/Modules/GrPython.cmake                       |   55 +-
 cmake/Modules/GrSwig.cmake                         |   14 +-
 cmake/Modules/UseSWIG.cmake                        |    2 +-
 docs/doxygen/doxyxml/__init__.py                   |    3 +-
 docs/doxygen/doxyxml/base.py                       |   19 +-
 docs/doxygen/doxyxml/doxyindex.py                  |    7 +-
 docs/doxygen/doxyxml/generated/__init__.py         |    1 +
 docs/doxygen/doxyxml/generated/compound.py         |    9 +-
 docs/doxygen/doxyxml/generated/compoundsuper.py    |   39 +-
 docs/doxygen/doxyxml/generated/index.py            |    5 +-
 docs/doxygen/doxyxml/generated/indexsuper.py       |   21 +-
 docs/doxygen/doxyxml/text.py                       |    3 +-
 docs/doxygen/other/doxypy.py                       |  717 +++++++-------
 docs/doxygen/swig_doc.py                           |    9 +-
 docs/exploring-gnuradio/dial_tone.py               |    3 +-
 docs/exploring-gnuradio/fm_demod.py                |    6 +-
 docs/sphinx/gnuradio_sphinx.py                     |    1 +
 docs/sphinx/hieroglyph/__init__.py                 |    3 +-
 docs/sphinx/hieroglyph/errors.py                   |    3 +-
 docs/sphinx/hieroglyph/hieroglyph.py               |    6 +-
 docs/sphinx/hieroglyph/nodes.py                    |    1 +
 docs/sphinx/hieroglyph/test/__init__.py            |    1 +
 docs/sphinx/hieroglyph/test/test_comments.py       |    1 +
 docs/sphinx/hieroglyph/test/test_hierglyph.py      |    1 +
 docs/sphinx/hieroglyph/test/test_nodes.py          |    1 +
 docs/sphinx/hieroglyph/version.py                  |    1 +
 gnuradio-runtime/apps/evaluation_random_numbers.py |   23 +-
 gnuradio-runtime/examples/mp-sched/affinity_set.py |    6 +-
 gnuradio-runtime/examples/mp-sched/plot_flops.py   |    1 +
 .../examples/mp-sched/run_synthetic.py             |    4 +-
 gnuradio-runtime/examples/mp-sched/synthetic.py    |   31 +-
 .../examples/mp-sched/wfm_rcv_pll_to_wav.py        |    8 +-
 gnuradio-runtime/examples/network/audio_sink.py    |    1 +
 gnuradio-runtime/examples/network/audio_source.py  |    1 +
 .../examples/network/dial_tone_sink.py             |    1 +
 .../examples/network/dial_tone_source.py           |    1 +
 gnuradio-runtime/examples/network/vector_sink.py   |    1 +
 gnuradio-runtime/examples/network/vector_source.py |    1 +
 .../examples/volk_benchmark/volk_math.py           |   12 +-
 .../examples/volk_benchmark/volk_plot.py           |    8 +-
 .../examples/volk_benchmark/volk_test_funcs.py     |   14 +-
 .../examples/volk_benchmark/volk_types.py          |   12 +-
 gnuradio-runtime/include/gnuradio/sptr_magic.h     |    2 +-
 gnuradio-runtime/lib/CMakeLists.txt                |    6 +-
 gnuradio-runtime/lib/math/gen_sine_table.py        |    6 +-
 gnuradio-runtime/lib/pmt/CMakeLists.txt            |    2 +-
 gnuradio-runtime/lib/pmt/gen-serial-tags.py        |    5 +-
 gnuradio-runtime/lib/pmt/generate_unv.py           |    3 +-
 gnuradio-runtime/lib/sptr_magic.cc                 |    2 +-
 gnuradio-runtime/python/build_utils.py             |    9 +-
 gnuradio-runtime/python/build_utils_codes.py       |    1 +
 gnuradio-runtime/python/gnuradio/__init__.py       |    1 +
 .../gnuradio/ctrlport/GNURadioControlPortClient.py |    8 +-
 .../python/gnuradio/ctrlport/GrDataPlotter.py      |   23 +-
 .../python/gnuradio/ctrlport/RPCConnection.py      |    1 +
 .../gnuradio/ctrlport/RPCConnectionThrift.py       |   17 +-
 .../python/gnuradio/ctrlport/__init__.py           |    4 +-
 .../python/gnuradio/ctrlport/gr-perf-monitorx      |   16 +-
 .../python/gnuradio/ctrlport/monitor.py            |   21 +-
 gnuradio-runtime/python/gnuradio/eng_arg.py        |    1 +
 gnuradio-runtime/python/gnuradio/eng_notation.py   |    3 +-
 gnuradio-runtime/python/gnuradio/eng_option.py     |    4 +-
 gnuradio-runtime/python/gnuradio/gr/CMakeLists.txt |    3 +-
 gnuradio-runtime/python/gnuradio/gr/__init__.py    |   18 +-
 gnuradio-runtime/python/gnuradio/gr/exceptions.py  |    1 +
 gnuradio-runtime/python/gnuradio/gr/gateway.py     |   21 +-
 .../python/gnuradio/gr/gr_threading.py             |    6 +-
 .../python/gnuradio/gr/gr_threading_23.py          |   26 +-
 .../python/gnuradio/gr/gr_threading_24.py          |   26 +-
 gnuradio-runtime/python/gnuradio/gr/hier_block2.py |    3 +-
 .../python/gnuradio/gr/packet_utils.py             |   13 +-
 gnuradio-runtime/python/gnuradio/gr/pubsub.py      |   89 +-
 gnuradio-runtime/python/gnuradio/gr/qa_feval.py    |    1 +
 .../python/gnuradio/gr/qa_flowgraph.py             |    1 +
 .../python/gnuradio/gr/qa_hier_block2.py           |    8 +-
 .../python/gnuradio/gr/qa_kludged_imports.py       |    1 +
 gnuradio-runtime/python/gnuradio/gr/qa_random.py   |    1 +
 .../python/gnuradio/gr/qa_tag_utils.py             |   10 +-
 gnuradio-runtime/python/gnuradio/gr/tag_utils.py   |   33 +-
 gnuradio-runtime/python/gnuradio/gr/top_block.py   |   15 +-
 gnuradio-runtime/python/gnuradio/gr_unittest.py    |   61 +-
 gnuradio-runtime/python/gnuradio/gr_xmlrunner.py   |   86 +-
 gnuradio-runtime/python/gnuradio/gru/__init__.py   |   22 +-
 gnuradio-runtime/python/gnuradio/gru/daemon.py     |   46 +-
 gnuradio-runtime/python/gnuradio/gru/freqz.py      |   32 +-
 .../python/gnuradio/gru/gnuplot_freqz.py           |    8 +-
 gnuradio-runtime/python/gnuradio/gru/hexint.py     |    1 +
 gnuradio-runtime/python/gnuradio/gru/listmisc.py   |    1 +
 gnuradio-runtime/python/gnuradio/gru/mathmisc.py   |    4 +-
 .../python/gnuradio/gru/msgq_runner.py             |    3 +-
 .../python/gnuradio/gru/os_read_exactly.py         |    1 +
 .../python/gnuradio/gru/seq_with_cursor.py         |   13 +-
 .../python/gnuradio/gru/socket_stuff.py            |    5 +-
 gnuradio-runtime/python/pmt/CMakeLists.txt         |    2 +-
 gnuradio-runtime/python/pmt/__init__.py            |   11 +-
 gnuradio-runtime/python/pmt/pmt_to_python.py       |   29 +-
 gnuradio-runtime/python/pmt/qa_pmt.py              |    4 +-
 gnuradio-runtime/python/pmt/qa_pmt_to_python.py    |    7 +-
 gnuradio-runtime/swig/basic_block.i                |    6 +
 gnuradio-runtime/swig/gnuradio.i                   |   11 +
 gnuradio-runtime/swig/pmt_swig.i                   |    6 +
 gnuradio-runtime/swig/py3compat.i                  |    7 +
 gr-analog/examples/fmtest.py                       |   37 +-
 gr-analog/examples/tags/uhd_burst_detector.py      |    1 +
 gr-analog/python/analog/CMakeLists.txt             |    2 +-
 gr-analog/python/analog/__init__.py                |   26 +-
 gr-analog/python/analog/am_demod.py                |   27 +-
 gr-analog/python/analog/fm_demod.py                |   13 +-
 gr-analog/python/analog/fm_emph.py                 |   73 +-
 gr-analog/python/analog/nbfm_rx.py                 |   30 +-
 gr-analog/python/analog/nbfm_tx.py                 |   34 +-
 gr-analog/python/analog/qa_agc.py                  |   47 +-
 gr-analog/python/analog/qa_cpfsk.py                |    3 +-
 gr-analog/python/analog/qa_ctcss_squelch.py        |    6 +-
 gr-analog/python/analog/qa_dpll.py                 |    4 +-
 gr-analog/python/analog/qa_fastnoise.py            |    1 +
 gr-analog/python/analog/qa_fmdet.py                |    1 +
 gr-analog/python/analog/qa_frequency_modulator.py  |    8 +-
 gr-analog/python/analog/qa_noise.py                |    1 +
 gr-analog/python/analog/qa_phase_modulator.py      |    6 +-
 gr-analog/python/analog/qa_pll_carriertracking.py  |    4 +-
 gr-analog/python/analog/qa_pll_freqdet.py          |    6 +-
 gr-analog/python/analog/qa_pll_refout.py           |    4 +-
 gr-analog/python/analog/qa_probe_avg_mag_sqrd.py   |    1 +
 gr-analog/python/analog/qa_pwr_squelch.py          |    6 +-
 gr-analog/python/analog/qa_quadrature_demod.py     |    8 +-
 gr-analog/python/analog/qa_rail_ff.py              |    3 +-
 .../python/analog/qa_random_uniform_source.py      |    1 +
 gr-analog/python/analog/qa_sig_source.py           |    2 +
 gr-analog/python/analog/qa_simple_squelch.py       |    4 +-
 gr-analog/python/analog/standard_squelch.py        |   20 +-
 gr-analog/python/analog/wfm_rcv.py                 |   25 +-
 gr-analog/python/analog/wfm_rcv_fmdet.py           |   55 +-
 gr-analog/python/analog/wfm_rcv_pll.py             |   47 +-
 gr-analog/python/analog/wfm_tx.py                  |   26 +-
 gr-audio/examples/python/audio_copy.py             |    1 +
 gr-audio/examples/python/audio_play.py             |    1 +
 gr-audio/examples/python/audio_to_file.py          |    1 +
 gr-audio/examples/python/dial_tone.py              |    1 +
 gr-audio/examples/python/dial_tone_daemon.py       |    4 +-
 gr-audio/examples/python/dial_tone_wav.py          |    1 +
 gr-audio/examples/python/mono_tone.py              |    1 +
 gr-audio/examples/python/multi_tone.py             |   12 +-
 gr-audio/examples/python/noise.py                  |    1 +
 gr-audio/examples/python/spectrum_inversion.py     |    1 +
 gr-audio/examples/python/test_resampler.py         |   11 +-
 gr-audio/python/audio/CMakeLists.txt               |    2 +-
 gr-audio/python/audio/__init__.py                  |    1 +
 .../examples/ctrlport/simple_copy_controller.py    |    1 +
 .../examples/ctrlport/usrp_sink_controller.py      |    1 +
 .../examples/ctrlport/usrp_source_controller.py    |    1 +
 gr-blocks/examples/tags/test_file_tags.py          |    7 +-
 gr-blocks/python/blocks/CMakeLists.txt             |    2 +-
 gr-blocks/python/blocks/__init__.py                |   10 +-
 gr-blocks/python/blocks/parse_file_metadata.py     |   32 +-
 gr-blocks/python/blocks/qa_add_mult_div_sub.py     |    9 +-
 gr-blocks/python/blocks/qa_add_mult_v.py           |  381 +++----
 gr-blocks/python/blocks/qa_affinity.py             |    1 +
 gr-blocks/python/blocks/qa_argmax.py               |    1 +
 gr-blocks/python/blocks/qa_bin_statistics.py       |   25 +-
 gr-blocks/python/blocks/qa_block_behavior.py       |    1 +
 gr-blocks/python/blocks/qa_block_gateway.py        |    8 +-
 gr-blocks/python/blocks/qa_boolean_operators.py    |    7 +-
 gr-blocks/python/blocks/qa_burst_tagger.py         |    1 +
 gr-blocks/python/blocks/qa_conjugate.py            |    1 +
 gr-blocks/python/blocks/qa_copy.py                 |    3 +-
 gr-blocks/python/blocks/qa_cpp_py_binding.py       |    7 +-
 gr-blocks/python/blocks/qa_cpp_py_binding_set.py   |    5 +-
 gr-blocks/python/blocks/qa_ctrlport_probes.py      |   21 +-
 gr-blocks/python/blocks/qa_delay.py                |    1 +
 gr-blocks/python/blocks/qa_endian_swap.py          |    1 +
 gr-blocks/python/blocks/qa_file_metadata.py        |   29 +-
 gr-blocks/python/blocks/qa_file_source_sink.py     |   11 +-
 gr-blocks/python/blocks/qa_head.py                 |    1 +
 gr-blocks/python/blocks/qa_hier_block2.py          |  235 ++---
 .../blocks/qa_hier_block2_message_connections.py   |    1 +
 gr-blocks/python/blocks/qa_integrate.py            |  101 +-
 gr-blocks/python/blocks/qa_interleave.py           |   38 +-
 gr-blocks/python/blocks/qa_keep_m_in_n.py          |   14 +-
 gr-blocks/python/blocks/qa_keep_one_in_n.py        |    1 +
 gr-blocks/python/blocks/qa_logger.py               |    1 +
 gr-blocks/python/blocks/qa_max.py                  |   46 +-
 gr-blocks/python/blocks/qa_message.py              |    5 +-
 gr-blocks/python/blocks/qa_min.py                  |   46 +-
 gr-blocks/python/blocks/qa_moving_average.py       |    1 +
 gr-blocks/python/blocks/qa_multiply_conjugate.py   |    1 +
 gr-blocks/python/blocks/qa_multiply_matrix_xx.py   |    9 +-
 gr-blocks/python/blocks/qa_mute.py                 |    7 +-
 gr-blocks/python/blocks/qa_nlog10.py               |    1 +
 gr-blocks/python/blocks/qa_null_sink_source.py     |    1 +
 gr-blocks/python/blocks/qa_pack_k_bits.py          |    3 +-
 gr-blocks/python/blocks/qa_packed_to_unpacked.py   |   23 +-
 .../python/blocks/qa_patterned_interleaver.py      |    1 +
 gr-blocks/python/blocks/qa_pdu.py                  |    5 +-
 gr-blocks/python/blocks/qa_peak_detector.py        |    1 +
 gr-blocks/python/blocks/qa_peak_detector2.py       |    1 +
 gr-blocks/python/blocks/qa_pipe_fittings.py        |    5 +-
 gr-blocks/python/blocks/qa_plateau_detector_fb.py  |    1 +
 gr-blocks/python/blocks/qa_probe_signal.py         |    1 +
 .../python/blocks/qa_python_message_passing.py     |    1 +
 gr-blocks/python/blocks/qa_regenerate.py           |    1 +
 gr-blocks/python/blocks/qa_repack_bits_bb.py       |    1 +
 gr-blocks/python/blocks/qa_repeat.py               |   23 +-
 gr-blocks/python/blocks/qa_rms.py                  |   14 +-
 gr-blocks/python/blocks/qa_sample_and_hold.py      |    1 +
 gr-blocks/python/blocks/qa_skiphead.py             |    1 +
 gr-blocks/python/blocks/qa_socket_pdu.py           |    3 +-
 gr-blocks/python/blocks/qa_stream_mux.py           |    5 +-
 .../python/blocks/qa_stream_to_tagged_stream.py    |    5 +-
 gr-blocks/python/blocks/qa_stretch.py              |    6 +-
 gr-blocks/python/blocks/qa_tag_debug.py            |    1 +
 gr-blocks/python/blocks/qa_tag_file_sink.py        |   13 +-
 gr-blocks/python/blocks/qa_tag_gate.py             |    3 +-
 gr-blocks/python/blocks/qa_tagged_stream_mux.py    |    7 +-
 gr-blocks/python/blocks/qa_tags_strobe.py          |    4 +-
 gr-blocks/python/blocks/qa_tcp_server_sink.py      |    1 +
 gr-blocks/python/blocks/qa_threshold.py            |    1 +
 gr-blocks/python/blocks/qa_throttle.py             |    1 +
 gr-blocks/python/blocks/qa_transcendental.py       |    1 +
 gr-blocks/python/blocks/qa_tsb_vector_sink_X.py    |    3 +-
 gr-blocks/python/blocks/qa_type_conversions.py     |    1 +
 gr-blocks/python/blocks/qa_udp_source_sink.py      |    1 +
 gr-blocks/python/blocks/qa_unpack_k_bits.py        |    1 +
 gr-blocks/python/blocks/qa_vco.py                  |   16 +-
 gr-blocks/python/blocks/qa_vector_insert.py        |    1 +
 gr-blocks/python/blocks/qa_vector_map.py           |    7 +-
 gr-blocks/python/blocks/qa_vector_sink_source.py   |    1 +
 gr-blocks/python/blocks/qa_wavfile.py              |   39 +-
 .../python/blocks/stream_to_vector_decimator.py    |    5 +-
 gr-blocks/swig/blocks_swig.py.in                   |   14 +-
 gr-channels/python/channels/CMakeLists.txt         |    2 +-
 gr-channels/python/channels/__init__.py            |   24 +-
 gr-channels/python/channels/amp_bal.py             |    1 +
 gr-channels/python/channels/conj_fs_iqcorr.py      |    1 +
 gr-channels/python/channels/distortion_2_gen.py    |    1 +
 gr-channels/python/channels/distortion_3_gen.py    |    1 +
 gr-channels/python/channels/impairments.py         |   15 +-
 gr-channels/python/channels/iqbal_gen.py           |    6 +-
 gr-channels/python/channels/phase_bal.py           |    1 +
 gr-channels/python/channels/phase_noise_gen.py     |    1 +
 gr-channels/python/channels/qa_channel_model.py    |    1 +
 gr-channels/python/channels/qa_fading_model.py     |    1 +
 gr-channels/python/channels/quantizer.py           |    6 +-
 gr-comedi/python/comedi/CMakeLists.txt             |    2 +-
 gr-comedi/python/comedi/__init__.py                |    5 +-
 gr-comedi/python/comedi/qa_comedi.py               |    1 +
 gr-digital/examples/berawgn.py                     |   23 +-
 gr-digital/examples/example_costas.py              |    8 +-
 gr-digital/examples/example_fll.py                 |    8 +-
 gr-digital/examples/example_timing.py              |   12 +-
 gr-digital/examples/gen_whitener.py                |    1 +
 .../examples/narrowband/benchmark_add_channel.py   |   26 +-
 gr-digital/examples/narrowband/benchmark_rx.py     |   36 +-
 gr-digital/examples/narrowband/benchmark_tx.py     |   38 +-
 gr-digital/examples/narrowband/digital_bert_rx.py  |   56 +-
 gr-digital/examples/narrowband/digital_bert_tx.py  |    8 +-
 gr-digital/examples/narrowband/receive_path.py     |   44 +-
 gr-digital/examples/narrowband/rx_voice.py         |   47 +-
 gr-digital/examples/narrowband/transmit_path.py    |   43 +-
 gr-digital/examples/narrowband/tunnel.py           |   78 +-
 gr-digital/examples/narrowband/tx_voice.py         |   48 +-
 gr-digital/examples/narrowband/uhd_interface.py    |  100 +-
 gr-digital/examples/ofdm/benchmark_add_channel.py  |   28 +-
 gr-digital/examples/ofdm/receive_path.py           |    1 +
 gr-digital/examples/ofdm/transmit_path.py          |   29 +-
 gr-digital/examples/ofdm/uhd_interface.py          |   76 +-
 gr-digital/examples/run_length.py                  |   37 +-
 gr-digital/examples/snr_estimators.py              |   36 +-
 gr-digital/python/digital/CMakeLists.txt           |    2 +-
 gr-digital/python/digital/__init__.py              |   66 +-
 gr-digital/python/digital/bpsk.py                  |    7 +-
 .../python/digital/constellation_map_generator.py  |    1 +
 gr-digital/python/digital/cpm.py                   |  121 +--
 gr-digital/python/digital/crc.py                   |   13 +-
 gr-digital/python/digital/generic_mod_demod.py     |   68 +-
 gr-digital/python/digital/gfsk.py                  |  167 ++--
 gr-digital/python/digital/gmsk.py                  |  135 +--
 gr-digital/python/digital/modulation_utils.py      |    1 +
 gr-digital/python/digital/ofdm.py                  |  109 +-
 gr-digital/python/digital/ofdm_packet_utils.py     |   31 +-
 gr-digital/python/digital/ofdm_receiver.py         |   58 +-
 gr-digital/python/digital/ofdm_sync_fixed.py       |    1 +
 gr-digital/python/digital/ofdm_sync_ml.py          |   50 +-
 gr-digital/python/digital/ofdm_sync_pn.py          |   31 +-
 gr-digital/python/digital/ofdm_sync_pnac.py        |   31 +-
 gr-digital/python/digital/ofdm_txrx.py             |   27 +-
 gr-digital/python/digital/packet_utils.py          |   52 +-
 gr-digital/python/digital/pkt.py                   |   64 +-
 gr-digital/python/digital/psk.py                   |   32 +-
 gr-digital/python/digital/psk_constellations.py    |    4 +-
 gr-digital/python/digital/qa_binary_slicer_fb.py   |   20 +-
 gr-digital/python/digital/qa_burst_shaper.py       |    9 +-
 gr-digital/python/digital/qa_chunks_to_symbols.py  |    7 +-
 gr-digital/python/digital/qa_clock_recovery_mm.py  |    1 +
 gr-digital/python/digital/qa_cma_equalizer.py      |   37 +-
 gr-digital/python/digital/qa_constellation.py      |   18 +-
 .../python/digital/qa_constellation_decoder_cb.py  |   30 +-
 .../python/digital/qa_constellation_receiver.py    |   31 +-
 .../digital/qa_constellation_soft_decoder_cf.py    |   13 +-
 .../python/digital/qa_correlate_access_code.py     |    3 +-
 .../digital/qa_correlate_access_code_XX_ts.py      |    5 +-
 .../python/digital/qa_correlate_access_code_tag.py |    3 +-
 gr-digital/python/digital/qa_costas_loop_cc.py     |   12 +-
 gr-digital/python/digital/qa_cpm.py                |    1 +
 gr-digital/python/digital/qa_crc32.py              |    1 +
 gr-digital/python/digital/qa_crc32_bb.py           |   13 +-
 gr-digital/python/digital/qa_diff_encoder.py       |    1 +
 gr-digital/python/digital/qa_diff_phasor_cc.py     |    1 +
 gr-digital/python/digital/qa_digital.py            |    1 +
 gr-digital/python/digital/qa_fll_band_edge.py      |    4 +-
 gr-digital/python/digital/qa_framer_sink.py        |    3 +-
 gr-digital/python/digital/qa_glfsr_source.py       |   19 +-
 gr-digital/python/digital/qa_hdlc_framer.py        |    5 +-
 .../python/digital/qa_header_payload_demux.py      |   29 +-
 gr-digital/python/digital/qa_lfsr.py               |    3 +-
 gr-digital/python/digital/qa_lms_equalizer.py      |   37 +-
 gr-digital/python/digital/qa_map.py                |    3 +-
 gr-digital/python/digital/qa_mpsk_snr_est.py       |   19 +-
 .../digital/qa_ofdm_carrier_allocator_cvc.py       |   17 +-
 gr-digital/python/digital/qa_ofdm_chanest_vcvc.py  |   10 +-
 .../python/digital/qa_ofdm_cyclic_prefixer.py      |   16 +-
 .../python/digital/qa_ofdm_frame_equalizer_vcvc.py |   18 +-
 .../python/digital/qa_ofdm_serializer_vcc.py       |   26 +-
 gr-digital/python/digital/qa_ofdm_sync_sc_cfb.py   |   28 +-
 gr-digital/python/digital/qa_ofdm_txrx.py          |    1 +
 gr-digital/python/digital/qa_packet_format.py      |   24 +-
 .../python/digital/qa_packet_headergenerator_bb.py |    1 +
 .../python/digital/qa_packet_headerparser_b.py     |   11 +-
 gr-digital/python/digital/qa_pfb_clock_sync.py     |   18 +-
 gr-digital/python/digital/qa_pn_correlator_cc.py   |    1 +
 gr-digital/python/digital/qa_probe_density.py      |    4 +-
 gr-digital/python/digital/qa_scrambler.py          |    1 +
 gr-digital/python/digital/qa_simple_correlator.py  |    1 +
 gr-digital/python/digital/qa_simple_framer.py      |    1 +
 gr-digital/python/digital/qam.py                   |   77 +-
 gr-digital/python/digital/qam_constellations.py    |   11 +-
 gr-digital/python/digital/qamlike.py               |   19 +-
 gr-digital/python/digital/qpsk.py                  |    8 +-
 gr-digital/python/digital/soft_dec_lut_gen.py      |   19 +-
 gr-digital/python/digital/test_soft_decisions.py   |   35 +-
 gr-digital/python/digital/utils/alignment.py       |   12 +-
 gr-digital/python/digital/utils/gray_code.py       |   16 +-
 gr-digital/python/digital/utils/mod_codes.py       |    1 +
 gr-digital/python/digital/utils/tagged_streams.py  |   23 +-
 gr-digital/swig/digital_swig.py.in                 |    8 +-
 gr-dtv/examples/atsc_ctrlport_monitor.py           |   14 +-
 gr-dtv/python/dtv/CMakeLists.txt                   |    2 +-
 gr-dtv/python/dtv/__init__.py                      |    9 +-
 gr-dtv/python/dtv/atsc_rx.py                       |   20 +-
 gr-dtv/python/dtv/atsc_rx_filter.py                |    8 +-
 gr-dtv/python/dtv/qa_dtv.py                        |    1 +
 gr-fec/include/gnuradio/fec/polar_common.h         |    2 +
 gr-fec/python/fec/CMakeLists.txt                   |    2 +-
 gr-fec/python/fec/LDPC/Generate_LDPC_matrix.py     |   25 +-
 .../fec/LDPC/Generate_LDPC_matrix_functions.py     |  150 +--
 gr-fec/python/fec/LDPC/__init__.py                 |    4 +-
 gr-fec/python/fec/__init__.py                      |   31 +-
 gr-fec/python/fec/_qa_helper.py                    |   23 +-
 gr-fec/python/fec/bercurve_generator.py            |    6 +-
 gr-fec/python/fec/bitflip.py                       |   13 +-
 gr-fec/python/fec/capillary_threaded_decoder.py    |   13 +-
 gr-fec/python/fec/capillary_threaded_encoder.py    |   17 +-
 gr-fec/python/fec/extended_async_encoder.py        |   13 +-
 gr-fec/python/fec/extended_decoder.py              |   31 +-
 gr-fec/python/fec/extended_encoder.py              |   12 +-
 gr-fec/python/fec/extended_tagged_decoder.py       |   28 +-
 gr-fec/python/fec/extended_tagged_encoder.py       |   10 +-
 gr-fec/python/fec/fec_test.py                      |   11 +-
 gr-fec/python/fec/polar/CMakeLists.txt             |    3 +
 gr-fec/python/fec/polar/__init__.py                |    9 +-
 gr-fec/python/fec/polar/channel_construction.py    |   14 +-
 .../python/fec/polar/channel_construction_awgn.py  |   18 +-
 .../python/fec/polar/channel_construction_bec.py   |    9 +-
 gr-fec/python/fec/polar/common.py                  |   10 +-
 gr-fec/python/fec/polar/decoder.py                 |   37 +-
 gr-fec/python/fec/polar/encoder.py                 |   16 +-
 gr-fec/python/fec/polar/helper_functions.py        |   10 +-
 gr-fec/python/fec/polar/testbed.py                 |   21 +-
 gr-fec/python/fec/qa_ber_bf.py                     |   12 +-
 gr-fec/python/fec/qa_depuncture.py                 |   83 +-
 gr-fec/python/fec/qa_ecc_ccsds_27.py               |   27 +-
 gr-fec/python/fec/qa_fecapi_cc.py                  |   32 +-
 gr-fec/python/fec/qa_fecapi_dummy.py               |   41 +-
 gr-fec/python/fec/qa_fecapi_ldpc.py                |   40 +-
 gr-fec/python/fec/qa_fecapi_repetition.py          |   29 +-
 gr-fec/python/fec/qa_polar_decoder_sc.py           |   15 +-
 gr-fec/python/fec/qa_polar_decoder_sc_list.py      |   18 +-
 .../python/fec/qa_polar_decoder_sc_systematic.py   |   15 +-
 gr-fec/python/fec/qa_polar_encoder.py              |   13 +-
 gr-fec/python/fec/qa_polar_encoder_systematic.py   |   14 +-
 gr-fec/python/fec/qa_puncture.py                   |  122 +--
 gr-fec/python/fec/threaded_decoder.py              |    4 +-
 gr-fec/python/fec/threaded_encoder.py              |    5 +-
 gr-fft/python/fft/CMakeLists.txt                   |    2 +-
 gr-fft/python/fft/__init__.py                      |    8 +-
 gr-fft/python/fft/logpwrfft.py                     |   13 +-
 gr-fft/python/fft/qa_fft.py                        |    2 +
 gr-fft/python/fft/qa_goertzel.py                   |   40 +-
 gr-filter/examples/benchmark_filters.py            |    6 +-
 gr-filter/examples/channelize.py                   |   33 +-
 gr-filter/examples/chirp_channelize.py             |   29 +-
 gr-filter/examples/decimate.py                     |   27 +-
 gr-filter/examples/fft_filter_ccc.py               |   13 +-
 gr-filter/examples/fir_filter_ccc.py               |   13 +-
 gr-filter/examples/fir_filter_fff.py               |   13 +-
 gr-filter/examples/gr_filtdes_api.py               |   10 +-
 gr-filter/examples/gr_filtdes_callback.py          |   14 +-
 gr-filter/examples/gr_filtdes_live_upd.py          |    6 +-
 gr-filter/examples/gr_filtdes_restrict.py          |   14 +-
 gr-filter/examples/interpolate.py                  |   31 +-
 gr-filter/examples/reconstruction.py               |   19 +-
 gr-filter/examples/resampler.py                    |   29 +-
 gr-filter/examples/synth_filter.py                 |    9 +-
 gr-filter/examples/synth_to_chan.py                |   17 +-
 gr-filter/lib/iir_filter_ffd_impl.cc               |   28 +-
 gr-filter/lib/single_pole_iir_filter_ff_impl.cc    |   36 +-
 gr-filter/python/filter/CMakeLists.txt             |    2 +-
 gr-filter/python/filter/__init__.py                |   18 +-
 gr-filter/python/filter/design/api_object.py       |    3 +-
 gr-filter/python/filter/design/filter_design.py    |  572 +++++------
 gr-filter/python/filter/design/fir_design.py       |   30 +-
 gr-filter/python/filter/filterbank.py              |   12 +-
 gr-filter/python/filter/freq_xlating_fft_filter.py |    4 +-
 gr-filter/python/filter/gui/bandgraphicsview.py    |    1 +
 gr-filter/python/filter/gui/banditems.py           |    7 +-
 gr-filter/python/filter/gui/icons_rc.py            |    1 +
 gr-filter/python/filter/gui/idealbanditems.py      |   53 +-
 gr-filter/python/filter/gui/polezero_plot.py       |    1 +
 gr-filter/python/filter/gui/pyqt_filter_stacked.py |    1 +
 gr-filter/python/filter/optfir.py                  |   20 +-
 gr-filter/python/filter/pfb.py                     |   44 +-
 gr-filter/python/filter/qa_dc_blocker.py           |    1 +
 gr-filter/python/filter/qa_fft_filter.py           |   78 +-
 gr-filter/python/filter/qa_filter_delay_fc.py      |   16 +-
 gr-filter/python/filter/qa_filterbank.py           |    1 +
 gr-filter/python/filter/qa_fir_filter.py           |    1 +
 gr-filter/python/filter/qa_firdes.py               |    6 +-
 .../python/filter/qa_fractional_interpolator.py    |   22 +-
 gr-filter/python/filter/qa_fractional_resampler.py |   32 +-
 .../python/filter/qa_freq_xlating_fft_filter.py    |   24 +-
 .../python/filter/qa_freq_xlating_fir_filter.py    |   48 +-
 gr-filter/python/filter/qa_hilbert.py              |    8 +-
 gr-filter/python/filter/qa_iir_filter.py           |    1 +
 gr-filter/python/filter/qa_interp_fir_filter.py    |    1 +
 gr-filter/python/filter/qa_pfb_arb_resampler.py    |   50 +-
 gr-filter/python/filter/qa_pfb_channelizer.py      |   30 +-
 gr-filter/python/filter/qa_pfb_decimator.py        |   24 +-
 gr-filter/python/filter/qa_pfb_interpolator.py     |   16 +-
 gr-filter/python/filter/qa_pfb_synthesizer.py      |   18 +-
 gr-filter/python/filter/qa_pm_remez.py             |   15 +-
 gr-filter/python/filter/qa_rational_resampler.py   |   38 +-
 gr-filter/python/filter/qa_single_pole_iir.py      |    1 +
 gr-filter/python/filter/rational_resampler.py      |   29 +-
 gr-qtgui/apps/gr_constellation_plot                |    6 +-
 gr-qtgui/apps/plot_base.py                         |   34 +-
 gr-qtgui/apps/plot_constellation_form.py           |   10 +-
 gr-qtgui/apps/plot_form.py                         |   14 +-
 gr-qtgui/apps/plot_psd_base.py                     |   15 +-
 gr-qtgui/apps/plot_psd_form.py                     |    5 +-
 gr-qtgui/apps/plot_spectrogram_base.py             |   20 +-
 gr-qtgui/apps/plot_spectrogram_form.py             |    7 +-
 gr-qtgui/apps/plot_time_base.py                    |   15 +-
 gr-qtgui/apps/plot_time_form.py                    |    7 +-
 gr-qtgui/apps/plot_time_raster_base.py             |   15 +-
 gr-qtgui/apps/plot_time_raster_form.py             |    9 +-
 gr-qtgui/apps/uhd_display.py                       |   19 +-
 gr-qtgui/apps/usrp_display_qtgui.py                |    1 +
 gr-qtgui/examples/pyqt_const_c.py                  |   10 +-
 gr-qtgui/examples/pyqt_example_c.py                |   10 +-
 gr-qtgui/examples/pyqt_example_f.py                |   10 +-
 gr-qtgui/examples/pyqt_freq_c.py                   |   10 +-
 gr-qtgui/examples/pyqt_freq_f.py                   |   10 +-
 gr-qtgui/examples/pyqt_histogram_f.py              |    8 +-
 gr-qtgui/examples/pyqt_time_c.py                   |   10 +-
 gr-qtgui/examples/pyqt_time_f.py                   |   10 +-
 gr-qtgui/examples/pyqt_time_raster_b.py            |    4 +-
 gr-qtgui/examples/pyqt_time_raster_f.py            |    4 +-
 gr-qtgui/examples/pyqt_waterfall_c.py              |   10 +-
 gr-qtgui/examples/pyqt_waterfall_f.py              |   10 +-
 gr-qtgui/python/qtgui/CMakeLists.txt               |    2 +-
 gr-qtgui/python/qtgui/__init__.py                  |    9 +-
 gr-qtgui/python/qtgui/qa_qtgui.py                  |    1 +
 gr-qtgui/python/qtgui/util.py.cmakein              |    5 +-
 gr-trellis/doc/make_numbered_listing.py            |    1 +
 gr-trellis/doc/test_tcm.py                         |   23 +-
 gr-trellis/doc/test_viterbi_equalization1.py       |   19 +-
 gr-trellis/examples/python/test_tcm.py             |   27 +-
 gr-trellis/python/trellis/CMakeLists.txt           |    2 +-
 gr-trellis/python/trellis/__init__.py              |    5 +-
 gr-trellis/python/trellis/fsm_utils.py             |   56 +-
 gr-trellis/python/trellis/qa_trellis.py            |   14 +-
 gr-trellis/swig/trellis_swig.py.in                 |    6 +-
 gr-uhd/apps/uhd_app.py                             |   20 +-
 gr-uhd/apps/uhd_siggen_base.py                     |   20 +-
 gr-uhd/grc/gen_uhd_usrp_blocks.py                  | 1042 ++++++++++----------
 gr-uhd/python/uhd/CMakeLists.txt                   |    2 +-
 gr-uhd/python/uhd/__init__.py                      |   21 +-
 gr-uhd/python/uhd/qa_uhd.py                        |    4 +-
 gr-utils/python/modtool/__init__.py                |   28 +-
 gr-utils/python/modtool/cmakefile_editor.py        |    7 +-
 gr-utils/python/modtool/code_generator.py          |   14 +-
 .../gr-newmod/cmake/Modules/GrMiscUtils.cmake      |   10 +-
 .../modtool/gr-newmod/cmake/Modules/GrPython.cmake |   11 +-
 .../modtool/gr-newmod/cmake/Modules/GrSwig.cmake   |    2 +-
 .../gr-newmod/docs/doxygen/doxyxml/__init__.py     |    3 +-
 .../modtool/gr-newmod/docs/doxygen/doxyxml/base.py |   18 +-
 .../gr-newmod/docs/doxygen/doxyxml/doxyindex.py    |    8 +-
 .../docs/doxygen/doxyxml/generated/__init__.py     |    1 +
 .../docs/doxygen/doxyxml/generated/compound.py     |    8 +-
 .../doxygen/doxyxml/generated/compoundsuper.py     |   40 +-
 .../docs/doxygen/doxyxml/generated/index.py        |    6 +-
 .../docs/doxygen/doxyxml/generated/indexsuper.py   |   21 +-
 .../modtool/gr-newmod/docs/doxygen/doxyxml/text.py |    5 +-
 .../modtool/gr-newmod/docs/doxygen/swig_doc.py     |    3 +-
 .../python/modtool/gr-newmod/python/__init__.py    |    1 +
 .../python/modtool/gr-newmod/python/build_utils.py |   12 +-
 .../modtool/gr-newmod/python/build_utils_codes.py  |    1 +
 gr-utils/python/modtool/grc_xml_generator.py       |    3 +-
 gr-utils/python/modtool/modtool_add.py             |   56 +-
 gr-utils/python/modtool/modtool_base.py            |   18 +-
 gr-utils/python/modtool/modtool_disable.py         |   24 +-
 gr-utils/python/modtool/modtool_info.py            |   27 +-
 gr-utils/python/modtool/modtool_makexml.py         |   28 +-
 gr-utils/python/modtool/modtool_newmod.py          |   18 +-
 gr-utils/python/modtool/modtool_rename.py          |   42 +-
 gr-utils/python/modtool/modtool_rm.py              |   22 +-
 gr-utils/python/modtool/parser_cc_block.py         |   16 +-
 gr-utils/python/modtool/scm.py                     |    9 +-
 gr-utils/python/modtool/templates.py               |    1 +
 gr-utils/python/modtool/util_functions.py          |    5 +-
 gr-utils/python/utils/gr_modtool                   |    4 +-
 gr-utils/python/utils/gr_plot_char                 |    6 +-
 gr-utils/python/utils/gr_plot_const                |   21 +-
 gr-utils/python/utils/gr_plot_float                |    6 +-
 gr-utils/python/utils/gr_plot_int                  |    4 +-
 gr-utils/python/utils/gr_plot_iq                   |   19 +-
 gr-utils/python/utils/gr_plot_qt                   |   24 +-
 gr-utils/python/utils/gr_plot_short                |    6 +-
 gr-utils/python/utils/gr_read_file_metadata        |    8 +-
 gr-utils/python/utils/plot_data.py                 |   22 +-
 gr-utils/python/utils/plot_fft_base.py             |   33 +-
 gr-utils/python/utils/plot_psd_base.py             |   33 +-
 gr-utils/python/utils/pyqt_filter.py               |    1 +
 gr-utils/python/utils/pyqt_plot.py                 |    1 +
 gr-video-sdl/python/video_sdl/CMakeLists.txt       |    2 +-
 gr-video-sdl/python/video_sdl/__init__.py          |    1 +
 gr-video-sdl/python/video_sdl/qa_video_sdl.py      |    1 +
 gr-vocoder/examples/alaw_audio_loopback.py         |    6 +-
 gr-vocoder/examples/codec2_audio_loopback.py       |    6 +-
 gr-vocoder/examples/cvsd_audio_loopback.py         |    6 +-
 gr-vocoder/examples/g721_audio_loopback.py         |    6 +-
 gr-vocoder/examples/g723_24_audio_loopback.py      |    6 +-
 gr-vocoder/examples/g723_40_audio_loopback.py      |    6 +-
 gr-vocoder/examples/gsm_audio_loopback.py          |    6 +-
 gr-vocoder/examples/ulaw_audio_loopback.py         |    6 +-
 gr-vocoder/python/vocoder/CMakeLists.txt           |    2 +-
 gr-vocoder/python/vocoder/__init__.py              |    9 +-
 gr-vocoder/python/vocoder/cvsd.py                  |   19 +-
 gr-vocoder/python/vocoder/qa_alaw_vocoder.py       |    1 +
 gr-vocoder/python/vocoder/qa_codec2_vocoder.py     |    1 +
 gr-vocoder/python/vocoder/qa_cvsd_vocoder.py       |    1 +
 gr-vocoder/python/vocoder/qa_g721_vocoder.py       |    1 +
 gr-vocoder/python/vocoder/qa_g723_24_vocoder.py    |    1 +
 gr-vocoder/python/vocoder/qa_g723_40_vocoder.py    |    1 +
 gr-vocoder/python/vocoder/qa_gsm_full_rate.py      |    1 +
 gr-vocoder/python/vocoder/qa_ulaw_vocoder.py       |    1 +
 gr-wavelet/python/wavelet/CMakeLists.txt           |    2 +-
 gr-wavelet/python/wavelet/__init__.py              |    5 +-
 gr-wavelet/python/wavelet/qa_classify.py           |   18 +-
 gr-zeromq/examples/python/client.py                |   10 +-
 gr-zeromq/examples/python/gui.py                   |    3 +-
 gr-zeromq/examples/python/server.py                |   10 +-
 gr-zeromq/python/zeromq/CMakeLists.txt             |    2 +-
 gr-zeromq/python/zeromq/__init__.py                |   10 +-
 gr-zeromq/python/zeromq/probe_manager.py           |    6 +-
 gr-zeromq/python/zeromq/qa_zeromq_pub.py           |    3 +-
 gr-zeromq/python/zeromq/qa_zeromq_pubsub.py        |    3 +-
 gr-zeromq/python/zeromq/qa_zeromq_pushpull.py      |    3 +-
 gr-zeromq/python/zeromq/qa_zeromq_reqrep.py        |    3 +-
 gr-zeromq/python/zeromq/rpc_manager.py             |   23 +-
 582 files changed, 6307 insertions(+), 5186 deletions(-)
 mode change 100755 => 100644 docs/doxygen/other/doxypy.py
 mode change 100755 => 100644 docs/exploring-gnuradio/dial_tone.py
 mode change 100755 => 100644 docs/exploring-gnuradio/fm_demod.py
 mode change 100755 => 100644 gnuradio-runtime/examples/mp-sched/affinity_set.py
 mode change 100755 => 100644 gnuradio-runtime/examples/mp-sched/plot_flops.py
 mode change 100755 => 100644 gnuradio-runtime/examples/mp-sched/run_synthetic.py
 mode change 100755 => 100644 gnuradio-runtime/examples/mp-sched/synthetic.py
 mode change 100755 => 100644 gnuradio-runtime/examples/mp-sched/wfm_rcv_pll_to_wav.py
 mode change 100755 => 100644 gnuradio-runtime/examples/network/audio_sink.py
 mode change 100755 => 100644 gnuradio-runtime/examples/network/audio_source.py
 mode change 100755 => 100644 gnuradio-runtime/examples/network/dial_tone_sink.py
 mode change 100755 => 100644 gnuradio-runtime/examples/network/dial_tone_source.py
 mode change 100755 => 100644 gnuradio-runtime/examples/network/vector_sink.py
 mode change 100755 => 100644 gnuradio-runtime/examples/network/vector_source.py
 mode change 100755 => 100644 gnuradio-runtime/examples/volk_benchmark/volk_math.py
 mode change 100755 => 100644 gnuradio-runtime/examples/volk_benchmark/volk_plot.py
 mode change 100755 => 100644 gnuradio-runtime/examples/volk_benchmark/volk_types.py
 mode change 100755 => 100644 gnuradio-runtime/lib/math/gen_sine_table.py
 mode change 100755 => 100644 gnuradio-runtime/lib/pmt/generate_unv.py
 mode change 100755 => 100644 gnuradio-runtime/python/gnuradio/gr/qa_feval.py
 mode change 100755 => 100644 gnuradio-runtime/python/gnuradio/gr/qa_flowgraph.py
 mode change 100755 => 100644 gnuradio-runtime/python/gnuradio/gr/qa_kludged_imports.py
 mode change 100755 => 100644 gnuradio-runtime/python/gnuradio/gr/qa_tag_utils.py
 mode change 100755 => 100644 gnuradio-runtime/python/gnuradio/gr_unittest.py
 mode change 100755 => 100644 gnuradio-runtime/python/gnuradio/gru/gnuplot_freqz.py
 mode change 100755 => 100644 gnuradio-runtime/python/pmt/qa_pmt.py
 mode change 100755 => 100644 gnuradio-runtime/python/pmt/qa_pmt_to_python.py
 create mode 100644 gnuradio-runtime/swig/py3compat.i
 mode change 100755 => 100644 gr-analog/examples/fmtest.py
 mode change 100755 => 100644 gr-analog/examples/tags/uhd_burst_detector.py
 mode change 100755 => 100644 gr-analog/python/analog/qa_agc.py
 mode change 100755 => 100644 gr-analog/python/analog/qa_cpfsk.py
 mode change 100755 => 100644 gr-analog/python/analog/qa_ctcss_squelch.py
 mode change 100755 => 100644 gr-analog/python/analog/qa_dpll.py
 mode change 100755 => 100644 gr-analog/python/analog/qa_fmdet.py
 mode change 100755 => 100644 gr-analog/python/analog/qa_frequency_modulator.py
 mode change 100755 => 100644 gr-analog/python/analog/qa_noise.py
 mode change 100755 => 100644 gr-analog/python/analog/qa_phase_modulator.py
 mode change 100755 => 100644 gr-analog/python/analog/qa_pll_carriertracking.py
 mode change 100755 => 100644 gr-analog/python/analog/qa_pll_freqdet.py
 mode change 100755 => 100644 gr-analog/python/analog/qa_pll_refout.py
 mode change 100755 => 100644 gr-analog/python/analog/qa_probe_avg_mag_sqrd.py
 mode change 100755 => 100644 gr-analog/python/analog/qa_pwr_squelch.py
 mode change 100755 => 100644 gr-analog/python/analog/qa_quadrature_demod.py
 mode change 100755 => 100644 gr-analog/python/analog/qa_rail_ff.py
 mode change 100755 => 100644 gr-analog/python/analog/qa_random_uniform_source.py
 mode change 100755 => 100644 gr-analog/python/analog/qa_sig_source.py
 mode change 100755 => 100644 gr-analog/python/analog/qa_simple_squelch.py
 mode change 100755 => 100644 gr-audio/examples/python/audio_copy.py
 mode change 100755 => 100644 gr-audio/examples/python/audio_play.py
 mode change 100755 => 100644 gr-audio/examples/python/audio_to_file.py
 mode change 100755 => 100644 gr-audio/examples/python/dial_tone.py
 mode change 100755 => 100644 gr-audio/examples/python/dial_tone_daemon.py
 mode change 100755 => 100644 gr-audio/examples/python/dial_tone_wav.py
 mode change 100755 => 100644 gr-audio/examples/python/mono_tone.py
 mode change 100755 => 100644 gr-audio/examples/python/multi_tone.py
 mode change 100755 => 100644 gr-audio/examples/python/noise.py
 mode change 100755 => 100644 gr-audio/examples/python/spectrum_inversion.py
 mode change 100755 => 100644 gr-audio/examples/python/test_resampler.py
 mode change 100755 => 100644 gr-blocks/examples/ctrlport/simple_copy_controller.py
 mode change 100755 => 100644 gr-blocks/examples/ctrlport/usrp_sink_controller.py
 mode change 100755 => 100644 gr-blocks/examples/ctrlport/usrp_source_controller.py
 mode change 100755 => 100644 gr-blocks/examples/tags/test_file_tags.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_add_mult_div_sub.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_add_mult_v.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_bin_statistics.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_boolean_operators.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_copy.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_delay.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_head.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_hier_block2.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_integrate.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_interleave.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_keep_m_in_n.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_keep_one_in_n.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_max.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_message.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_multiply_matrix_xx.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_mute.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_nlog10.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_pack_k_bits.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_packed_to_unpacked.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_patterned_interleaver.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_pdu.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_pipe_fittings.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_plateau_detector_fb.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_regenerate.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_repack_bits_bb.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_repeat.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_skiphead.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_socket_pdu.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_stream_mux.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_stream_to_tagged_stream.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_stretch.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_tag_debug.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_tag_gate.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_tagged_stream_mux.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_throttle.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_tsb_vector_sink_X.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_type_conversions.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_unpack_k_bits.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_vector_insert.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_vector_sink_source.py
 mode change 100755 => 100644 gr-blocks/python/blocks/qa_wavfile.py
 mode change 100755 => 100644 gr-channels/python/channels/qa_channel_model.py
 mode change 100755 => 100644 gr-comedi/python/comedi/qa_comedi.py
 mode change 100755 => 100644 gr-digital/examples/berawgn.py
 mode change 100755 => 100644 gr-digital/examples/example_costas.py
 mode change 100755 => 100644 gr-digital/examples/example_fll.py
 mode change 100755 => 100644 gr-digital/examples/example_timing.py
 mode change 100755 => 100644 gr-digital/examples/gen_whitener.py
 mode change 100755 => 100644 gr-digital/examples/narrowband/benchmark_add_channel.py
 mode change 100755 => 100644 gr-digital/examples/narrowband/benchmark_rx.py
 mode change 100755 => 100644 gr-digital/examples/narrowband/benchmark_tx.py
 mode change 100755 => 100644 gr-digital/examples/narrowband/digital_bert_rx.py
 mode change 100755 => 100644 gr-digital/examples/narrowband/digital_bert_tx.py
 mode change 100755 => 100644 gr-digital/examples/narrowband/rx_voice.py
 mode change 100755 => 100644 gr-digital/examples/narrowband/tunnel.py
 mode change 100755 => 100644 gr-digital/examples/narrowband/tx_voice.py
 mode change 100755 => 100644 gr-digital/examples/ofdm/benchmark_add_channel.py
 mode change 100755 => 100644 gr-digital/examples/run_length.py
 mode change 100755 => 100644 gr-digital/examples/snr_estimators.py
 mode change 100755 => 100644 gr-digital/python/digital/psk_constellations.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_binary_slicer_fb.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_burst_shaper.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_chunks_to_symbols.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_clock_recovery_mm.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_cma_equalizer.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_constellation_decoder_cb.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_constellation_receiver.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_correlate_access_code.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_correlate_access_code_XX_ts.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_correlate_access_code_tag.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_costas_loop_cc.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_cpm.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_crc32.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_crc32_bb.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_diff_encoder.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_diff_phasor_cc.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_digital.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_fll_band_edge.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_framer_sink.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_glfsr_source.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_hdlc_framer.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_header_payload_demux.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_lfsr.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_lms_equalizer.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_map.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_mpsk_snr_est.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_ofdm_carrier_allocator_cvc.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_ofdm_chanest_vcvc.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_ofdm_cyclic_prefixer.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_ofdm_frame_equalizer_vcvc.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_ofdm_serializer_vcc.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_ofdm_sync_sc_cfb.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_ofdm_txrx.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_packet_headergenerator_bb.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_packet_headerparser_b.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_pfb_clock_sync.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_pn_correlator_cc.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_probe_density.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_scrambler.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_simple_correlator.py
 mode change 100755 => 100644 gr-digital/python/digital/qa_simple_framer.py
 mode change 100755 => 100644 gr-digital/python/digital/qam_constellations.py
 mode change 100755 => 100644 gr-digital/python/digital/test_soft_decisions.py
 mode change 100755 => 100644 gr-dtv/examples/atsc_ctrlport_monitor.py
 mode change 100755 => 100644 gr-dtv/python/dtv/qa_dtv.py
 mode change 100755 => 100644 gr-fec/python/fec/_qa_helper.py
 mode change 100755 => 100644 gr-fec/python/fec/polar/channel_construction_awgn.py
 mode change 100755 => 100644 gr-fec/python/fec/polar/testbed.py
 mode change 100755 => 100644 gr-fec/python/fec/qa_ecc_ccsds_27.py
 mode change 100755 => 100644 gr-fft/python/fft/qa_fft.py
 mode change 100755 => 100644 gr-fft/python/fft/qa_goertzel.py
 mode change 100755 => 100644 gr-filter/examples/benchmark_filters.py
 mode change 100755 => 100644 gr-filter/examples/channelize.py
 mode change 100755 => 100644 gr-filter/examples/chirp_channelize.py
 mode change 100755 => 100644 gr-filter/examples/decimate.py
 mode change 100755 => 100644 gr-filter/examples/fft_filter_ccc.py
 mode change 100755 => 100644 gr-filter/examples/fir_filter_ccc.py
 mode change 100755 => 100644 gr-filter/examples/fir_filter_fff.py
 mode change 100755 => 100644 gr-filter/examples/gr_filtdes_api.py
 mode change 100755 => 100644 gr-filter/examples/gr_filtdes_callback.py
 mode change 100755 => 100644 gr-filter/examples/gr_filtdes_live_upd.py
 mode change 100755 => 100644 gr-filter/examples/gr_filtdes_restrict.py
 mode change 100755 => 100644 gr-filter/examples/interpolate.py
 mode change 100755 => 100644 gr-filter/examples/reconstruction.py
 mode change 100755 => 100644 gr-filter/examples/resampler.py
 mode change 100755 => 100644 gr-filter/examples/synth_filter.py
 mode change 100755 => 100644 gr-filter/examples/synth_to_chan.py
 mode change 100755 => 100644 gr-filter/python/filter/qa_dc_blocker.py
 mode change 100755 => 100644 gr-filter/python/filter/qa_fft_filter.py
 mode change 100755 => 100644 gr-filter/python/filter/qa_filter_delay_fc.py
 mode change 100755 => 100644 gr-filter/python/filter/qa_fir_filter.py
 mode change 100755 => 100644 gr-filter/python/filter/qa_firdes.py
 mode change 100755 => 100644 gr-filter/python/filter/qa_fractional_interpolator.py
 mode change 100755 => 100644 gr-filter/python/filter/qa_freq_xlating_fft_filter.py
 mode change 100755 => 100644 gr-filter/python/filter/qa_freq_xlating_fir_filter.py
 mode change 100755 => 100644 gr-filter/python/filter/qa_hilbert.py
 mode change 100755 => 100644 gr-filter/python/filter/qa_iir_filter.py
 mode change 100755 => 100644 gr-filter/python/filter/qa_interp_fir_filter.py
 mode change 100755 => 100644 gr-filter/python/filter/qa_pfb_arb_resampler.py
 mode change 100755 => 100644 gr-filter/python/filter/qa_pfb_channelizer.py
 mode change 100755 => 100644 gr-filter/python/filter/qa_pfb_decimator.py
 mode change 100755 => 100644 gr-filter/python/filter/qa_pfb_interpolator.py
 mode change 100755 => 100644 gr-filter/python/filter/qa_pfb_synthesizer.py
 mode change 100755 => 100644 gr-filter/python/filter/qa_pm_remez.py
 mode change 100755 => 100644 gr-filter/python/filter/qa_rational_resampler.py
 mode change 100755 => 100644 gr-filter/python/filter/qa_single_pole_iir.py
 mode change 100755 => 100644 gr-qtgui/apps/uhd_display.py
 mode change 100755 => 100644 gr-qtgui/examples/pyqt_const_c.py
 mode change 100755 => 100644 gr-qtgui/examples/pyqt_example_c.py
 mode change 100755 => 100644 gr-qtgui/examples/pyqt_example_f.py
 mode change 100755 => 100644 gr-qtgui/examples/pyqt_freq_c.py
 mode change 100755 => 100644 gr-qtgui/examples/pyqt_freq_f.py
 mode change 100755 => 100644 gr-qtgui/examples/pyqt_histogram_f.py
 mode change 100755 => 100644 gr-qtgui/examples/pyqt_time_c.py
 mode change 100755 => 100644 gr-qtgui/examples/pyqt_time_f.py
 mode change 100755 => 100644 gr-qtgui/examples/pyqt_time_raster_b.py
 mode change 100755 => 100644 gr-qtgui/examples/pyqt_time_raster_f.py
 mode change 100755 => 100644 gr-qtgui/examples/pyqt_waterfall_c.py
 mode change 100755 => 100644 gr-qtgui/examples/pyqt_waterfall_f.py
 mode change 100755 => 100644 gr-qtgui/python/qtgui/qa_qtgui.py
 mode change 100755 => 100644 gr-trellis/doc/make_numbered_listing.py
 mode change 100755 => 100644 gr-trellis/doc/test_viterbi_equalization1.py
 mode change 100755 => 100644 gr-trellis/examples/python/test_tcm.py
 mode change 100755 => 100644 gr-trellis/python/trellis/fsm_utils.py
 mode change 100755 => 100644 gr-trellis/python/trellis/qa_trellis.py
 mode change 100755 => 100644 gr-utils/python/utils/plot_fft_base.py
 mode change 100755 => 100644 gr-utils/python/utils/plot_psd_base.py
 mode change 100755 => 100644 gr-video-sdl/python/video_sdl/qa_video_sdl.py
 mode change 100755 => 100644 gr-vocoder/examples/alaw_audio_loopback.py
 mode change 100755 => 100644 gr-vocoder/examples/codec2_audio_loopback.py
 mode change 100755 => 100644 gr-vocoder/examples/cvsd_audio_loopback.py
 mode change 100755 => 100644 gr-vocoder/examples/g721_audio_loopback.py
 mode change 100755 => 100644 gr-vocoder/examples/g723_24_audio_loopback.py
 mode change 100755 => 100644 gr-vocoder/examples/g723_40_audio_loopback.py
 mode change 100755 => 100644 gr-vocoder/examples/gsm_audio_loopback.py
 mode change 100755 => 100644 gr-vocoder/examples/ulaw_audio_loopback.py
 mode change 100755 => 100644 gr-vocoder/python/vocoder/qa_alaw_vocoder.py
 mode change 100755 => 100644 gr-vocoder/python/vocoder/qa_codec2_vocoder.py
 mode change 100755 => 100644 gr-vocoder/python/vocoder/qa_cvsd_vocoder.py
 mode change 100755 => 100644 gr-vocoder/python/vocoder/qa_g721_vocoder.py
 mode change 100755 => 100644 gr-vocoder/python/vocoder/qa_g723_24_vocoder.py
 mode change 100755 => 100644 gr-vocoder/python/vocoder/qa_g723_40_vocoder.py
 mode change 100755 => 100644 gr-vocoder/python/vocoder/qa_gsm_full_rate.py
 mode change 100755 => 100644 gr-vocoder/python/vocoder/qa_ulaw_vocoder.py
 mode change 100755 => 100644 gr-wavelet/python/wavelet/qa_classify.py
 mode change 100755 => 100644 gr-zeromq/examples/python/client.py
 mode change 100755 => 100644 gr-zeromq/examples/python/gui.py
 mode change 100755 => 100644 gr-zeromq/examples/python/server.py
 mode change 100755 => 100644 gr-zeromq/python/zeromq/qa_zeromq_pub.py
 mode change 100755 => 100644 gr-zeromq/python/zeromq/qa_zeromq_pubsub.py
 mode change 100755 => 100644 gr-zeromq/python/zeromq/qa_zeromq_pushpull.py
 mode change 100755 => 100644 gr-zeromq/python/zeromq/qa_zeromq_reqrep.py

(limited to 'docs/doxygen')

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b5082878f7..051951d8eb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -150,7 +150,7 @@ if(MSVC)
 endif(MSVC)
 
 if(WIN32)
-	add_definitions(-D_USE_MATH_DEFINES)
+    add_definitions(-D_USE_MATH_DEFINES)
 endif(WIN32)
 
 # Record Compiler Info for record
@@ -283,7 +283,11 @@ include(GrBoost)
 ########################################################################
 # Enable python component
 ########################################################################
-find_package(PythonLibs 2)
+
+include(GrPython)
+
+GR_PYTHON_CHECK_MODULE("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
+
 find_package(SWIG)
 
 if(SWIG_FOUND)
@@ -299,6 +303,7 @@ GR_REGISTER_COMPONENT("python-support" ENABLE_PYTHON
     PYTHONLIBS_FOUND
     SWIG_FOUND
     SWIG_VERSION_CHECK
+    SIX_FOUND
 )
 
 find_package(CppUnit)
diff --git a/cmake/Modules/GrMiscUtils.cmake b/cmake/Modules/GrMiscUtils.cmake
index b158a08d07..a3086bebb6 100644
--- a/cmake/Modules/GrMiscUtils.cmake
+++ b/cmake/Modules/GrMiscUtils.cmake
@@ -339,7 +339,7 @@ if __name__ == '__main__':
   add_custom_command(
     OUTPUT ${expanded_files_h}
     DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
-    COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+    COMMAND ${PYTHON_EXECUTABLE} -B
     ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
     ${root} ${root}.h.t ${ARGN}
   )
@@ -384,7 +384,7 @@ if __name__ == '__main__':
   add_custom_command(
     OUTPUT ${expanded_files_cc}
     DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.cc.t
-    COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+    COMMAND ${PYTHON_EXECUTABLE} -B
     ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
     ${root} ${root}.cc.t ${ARGN}
   )
@@ -393,7 +393,7 @@ if __name__ == '__main__':
   add_custom_command(
     OUTPUT ${expanded_files_h}
     DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
-    COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+    COMMAND ${PYTHON_EXECUTABLE} -B
     ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
     ${root} ${root}.h.t ${ARGN}
   )
@@ -446,7 +446,7 @@ if __name__ == '__main__':
   add_custom_command(
     OUTPUT ${expanded_files_cc_impl}
     DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}_impl.cc.t
-    COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+    COMMAND ${PYTHON_EXECUTABLE} -B
     ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
     ${root} ${root}_impl.cc.t ${ARGN}
   )
@@ -455,7 +455,7 @@ if __name__ == '__main__':
   add_custom_command(
     OUTPUT ${expanded_files_h_impl}
     DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}_impl.h.t
-    COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+    COMMAND ${PYTHON_EXECUTABLE} -B
     ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
     ${root} ${root}_impl.h.t ${ARGN}
   )
diff --git a/cmake/Modules/GrPython.cmake b/cmake/Modules/GrPython.cmake
index 0bfa92db8d..3f63dc15b0 100644
--- a/cmake/Modules/GrPython.cmake
+++ b/cmake/Modules/GrPython.cmake
@@ -1,4 +1,4 @@
-# Copyright 2010-2011 Free Software Foundation, Inc.
+# Copyright 2010-2016 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -27,26 +27,21 @@ set(__INCLUDED_GR_PYTHON_CMAKE TRUE)
 # This allows the user to specify a specific interpreter,
 # or finds the interpreter via the built-in cmake module.
 ########################################################################
-#this allows the user to override PYTHON_EXECUTABLE
-if(PYTHON_EXECUTABLE)
 
-    set(PYTHONINTERP_FOUND TRUE)
+if (PYTHON_EXECUTABLE)
+    message(STATUS "User set python executable ${PYTHON_EXECUTABLE}")
+    find_package(PythonInterp 2.7 REQUIRED)
+else (PYTHON_EXECUTABLE)
+    message(STATUS "PYTHON_EXECUTABLE not set - using default python3")
+    message(STATUS "Use -DPYTHON_EXECUTABLE=/path/to/python2 to build for python2.")
+    find_package(PythonInterp 3.4 REQUIRED)
+endif (PYTHON_EXECUTABLE)
 
-#otherwise if not set, try to automatically find it
-else(PYTHON_EXECUTABLE)
+if (${PYTHON_VERSION_MAJOR} VERSION_EQUAL 3)
+    set(PYTHON3 TRUE)
+endif ()
 
-    #use the built-in find script
-    find_package(PythonInterp 2)
-
-    #and if that fails use the find program routine
-    if(NOT PYTHONINTERP_FOUND)
-        find_program(PYTHON_EXECUTABLE NAMES python python2 python2.7 python2.6 python2.5)
-        if(PYTHON_EXECUTABLE)
-            set(PYTHONINTERP_FOUND TRUE)
-        endif(PYTHON_EXECUTABLE)
-    endif(NOT PYTHONINTERP_FOUND)
-
-endif(PYTHON_EXECUTABLE)
+find_package(PythonLibs ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} EXACT)
 
 if (CMAKE_CROSSCOMPILING)
     set(QA_PYTHON_EXECUTABLE "/usr/bin/python")
@@ -58,18 +53,6 @@ endif(CMAKE_CROSSCOMPILING)
 set(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE} CACHE FILEPATH "python interpreter")
 set(QA_PYTHON_EXECUTABLE ${QA_PYTHON_EXECUTABLE} CACHE FILEPATH "python interpreter for QA tests")
 
-#make sure we can use -B with python (introduced in 2.6)
-if(PYTHON_EXECUTABLE)
-    execute_process(
-        COMMAND ${PYTHON_EXECUTABLE} -B -c ""
-        OUTPUT_QUIET ERROR_QUIET
-        RESULT_VARIABLE PYTHON_HAS_DASH_B_RESULT
-    )
-    if(PYTHON_HAS_DASH_B_RESULT EQUAL 0)
-        set(PYTHON_DASH_B "-B")
-    endif()
-endif(PYTHON_EXECUTABLE)
-
 ########################################################################
 # Check for the existence of a python module:
 # - desc a string description of the check
@@ -78,15 +61,13 @@ endif(PYTHON_EXECUTABLE)
 # - have the result variable to set
 ########################################################################
 macro(GR_PYTHON_CHECK_MODULE desc mod cmd have)
-    message(STATUS "")
-    message(STATUS "Python checking for ${desc}")
     execute_process(
         COMMAND ${PYTHON_EXECUTABLE} -c "
 #########################################
 try:
     import ${mod}
     assert ${cmd}
-except ImportError, AssertionError: exit(-1)
+except (ImportError, AssertionError): exit(-1)
 except: pass
 #########################################"
         RESULT_VARIABLE ${have}
@@ -105,8 +86,8 @@ endmacro(GR_PYTHON_CHECK_MODULE)
 ########################################################################
 if(NOT DEFINED GR_PYTHON_DIR)
 execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "
-from distutils import sysconfig
-print sysconfig.get_python_lib(plat_specific=True, prefix='')
+import site
+print(site.getsitepackages()[0])
 " OUTPUT_VARIABLE GR_PYTHON_DIR OUTPUT_STRIP_TRAILING_WHITESPACE
 )
 endif()
@@ -119,7 +100,7 @@ file(TO_CMAKE_PATH ${GR_PYTHON_DIR} GR_PYTHON_DIR)
 function(GR_UNIQUE_TARGET desc)
     file(RELATIVE_PATH reldir ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR})
     execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import re, hashlib
-unique = hashlib.md5('${reldir}${ARGN}').hexdigest()[:5]
+unique = hashlib.md5(b'${reldir}${ARGN}').hexdigest()[:5]
 print(re.sub('\\W', '_', '${desc} ${reldir} ' + unique))"
     OUTPUT_VARIABLE _target OUTPUT_STRIP_TRAILING_WHITESPACE)
     add_custom_target(${_target} ALL DEPENDS ${ARGN})
@@ -233,7 +214,7 @@ endfunction(GR_PYTHON_INSTALL)
 file(WRITE ${CMAKE_BINARY_DIR}/python_compile_helper.py "
 import sys, py_compile
 files = sys.argv[1:]
-srcs, gens = files[:len(files)/2], files[len(files)/2:]
+srcs, gens = files[:len(files)//2], files[len(files)//2:]
 for src, gen in zip(srcs, gens):
     py_compile.compile(file=src, cfile=gen, doraise=True)
 ")
diff --git a/cmake/Modules/GrSwig.cmake b/cmake/Modules/GrSwig.cmake
index c8d4eb466e..cc6860cb38 100644
--- a/cmake/Modules/GrSwig.cmake
+++ b/cmake/Modules/GrSwig.cmake
@@ -76,7 +76,7 @@ function(GR_SWIG_MAKE_DOCS output_file)
         add_custom_command(
             OUTPUT ${output_file}
             DEPENDS ${input_files} ${stamp-file} ${OUTPUT_DIRECTORY}/xml/index.xml
-            COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+            COMMAND ${PYTHON_EXECUTABLE} -B
                 ${CMAKE_SOURCE_DIR}/docs/doxygen/swig_doc.py
                 ${OUTPUT_DIRECTORY}/xml
                 ${output_file}
@@ -146,7 +146,6 @@ macro(GR_SWIG_MAKE name)
     endif()
 
     #append additional include directories
-    find_package(PythonLibs 2)
     list(APPEND GR_SWIG_INCLUDE_DIRS ${PYTHON_INCLUDE_PATH}) #deprecated name (now dirs)
     list(APPEND GR_SWIG_INCLUDE_DIRS ${PYTHON_INCLUDE_DIRS})
 
@@ -178,8 +177,13 @@ macro(GR_SWIG_MAKE name)
     include_directories(${GR_SWIG_INCLUDE_DIRS})
     list(APPEND SWIG_MODULE_${name}_EXTRA_DEPS ${tag_file})
 
+    if (PYTHON3)
+        set(py3 "-py3")
+    endif (PYTHON3)
+
     #setup the swig flags with flags and include directories
-    set(CMAKE_SWIG_FLAGS -fvirtual -modern -keyword -w511 -module ${name} ${GR_SWIG_FLAGS})
+    set(CMAKE_SWIG_FLAGS -fvirtual -modern -keyword -w511 -relativeimport ${py3} -module ${name} ${GR_SWIG_FLAGS})
+
     foreach(dir ${GR_SWIG_INCLUDE_DIRS})
         list(APPEND CMAKE_SWIG_FLAGS "-I${dir}")
     endforeach(dir)
@@ -241,7 +245,7 @@ endmacro(GR_SWIG_INSTALL)
 ########################################################################
 file(WRITE ${CMAKE_BINARY_DIR}/get_swig_deps.py "
 
-import os, sys, re
+import os, sys, re, io
 
 i_include_matcher = re.compile('%(include|import)\\s*[<|\"](.*)[>|\"]')
 h_include_matcher = re.compile('#(include)\\s*[<|\"](.*)[>|\"]')
@@ -250,7 +254,7 @@ include_dirs = sys.argv[2].split(';')
 def get_swig_incs(file_path):
     if file_path.endswith('.i'): matcher = i_include_matcher
     else: matcher = h_include_matcher
-    file_contents = open(file_path, 'r').read()
+    file_contents = io.open(file_path, 'r', encoding='utf-8').read()
     return matcher.findall(file_contents, re.MULTILINE)
 
 def get_swig_deps(file_path, level):
diff --git a/cmake/Modules/UseSWIG.cmake b/cmake/Modules/UseSWIG.cmake
index d1014943de..43b4bea88f 100644
--- a/cmake/Modules/UseSWIG.cmake
+++ b/cmake/Modules/UseSWIG.cmake
@@ -175,7 +175,7 @@ macro(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile)
   file(RELATIVE_PATH reldir ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR})
   execute_process(
     COMMAND ${PYTHON_EXECUTABLE} -c "import re, hashlib
-unique = hashlib.md5('${reldir}${ARGN}').hexdigest()[:5]
+unique = hashlib.md5(b'${reldir}${ARGN}').hexdigest()[:5]
 print(re.sub('\\W', '_', '${name} ${reldir} ' + unique))"
     OUTPUT_VARIABLE _target OUTPUT_STRIP_TRAILING_WHITESPACE
   )
diff --git a/docs/doxygen/doxyxml/__init__.py b/docs/doxygen/doxyxml/__init__.py
index 5cd0b3c6c5..b7a8884519 100644
--- a/docs/doxygen/doxyxml/__init__.py
+++ b/docs/doxygen/doxyxml/__init__.py
@@ -63,8 +63,9 @@ This line is uninformative and is only to test line breaks in the comments.
 u'Outputs the vital aadvark statistics.'
 
 """
+from __future__ import unicode_literals
 
-from doxyindex import DoxyIndex, DoxyFunction, DoxyParam, DoxyClass, DoxyFile, DoxyNamespace, DoxyGroup, DoxyFriend, DoxyOther
+from .doxyindex import DoxyIndex, DoxyFunction, DoxyParam, DoxyClass, DoxyFile, DoxyNamespace, DoxyGroup, DoxyFriend, DoxyOther
 
 def _test():
     import os
diff --git a/docs/doxygen/doxyxml/base.py b/docs/doxygen/doxyxml/base.py
index e8f026ab90..f6f2b8e195 100644
--- a/docs/doxygen/doxyxml/base.py
+++ b/docs/doxygen/doxyxml/base.py
@@ -25,23 +25,26 @@ Classes based upon this are used to make more user-friendly interfaces
 to the doxygen xml docs than the generated classes provide.
 """
 
+from __future__ import print_function
+from __future__ import unicode_literals
+
 import os
 import pdb
 
 from xml.parsers.expat import ExpatError
 
-from generated import compound
+from .generated import compound
 
 
 class Base(object):
 
-    class Duplicate(StandardError):
+    class Duplicate(Exception):
         pass
 
-    class NoSuchMember(StandardError):
+    class NoSuchMember(Exception):
         pass
 
-    class ParsingError(StandardError):
+    class ParsingError(Exception):
         pass
 
     def __init__(self, parse_data, top=None):
@@ -94,7 +97,7 @@ class Base(object):
         for cls in self.mem_classes:
             if cls.can_parse(mem):
                 return cls
-        raise StandardError(("Did not find a class for object '%s'." \
+        raise Exception(("Did not find a class for object '%s'." \
                                  % (mem.get_name())))
 
     def convert_mem(self, mem):
@@ -102,11 +105,11 @@ class Base(object):
             cls = self.get_cls(mem)
             converted = cls.from_parse_data(mem, self.top)
             if converted is None:
-                raise StandardError('No class matched this object.')
+                raise Exception('No class matched this object.')
             self.add_ref(converted)
             return converted
-        except StandardError, e:
-            print e
+        except Exception as e:
+            print(e)
 
     @classmethod
     def includes(cls, inst):
diff --git a/docs/doxygen/doxyxml/doxyindex.py b/docs/doxygen/doxyxml/doxyindex.py
index e039737714..083550bdf8 100644
--- a/docs/doxygen/doxyxml/doxyindex.py
+++ b/docs/doxygen/doxyxml/doxyindex.py
@@ -22,12 +22,13 @@
 Classes providing more user-friendly interfaces to the doxygen xml
 docs than the generated classes provide.
 """
+from __future__ import unicode_literals
 
 import os
 
-from generated import index
-from base import Base
-from text import description
+from .generated import index
+from .base import Base
+from .text import description
 
 class DoxyIndex(Base):
     """
diff --git a/docs/doxygen/doxyxml/generated/__init__.py b/docs/doxygen/doxyxml/generated/__init__.py
index 39823979f6..23095c1f34 100644
--- a/docs/doxygen/doxyxml/generated/__init__.py
+++ b/docs/doxygen/doxyxml/generated/__init__.py
@@ -5,3 +5,4 @@ These do the real work of parsing the doxygen xml files but the
 resultant classes are not very friendly to navigate so the rest of the
 doxyxml module processes them further.
 """
+from __future__ import unicode_literals
diff --git a/docs/doxygen/doxyxml/generated/compound.py b/docs/doxygen/doxyxml/generated/compound.py
index 1522ac23f1..cd3cd1f96b 100644
--- a/docs/doxygen/doxyxml/generated/compound.py
+++ b/docs/doxygen/doxyxml/generated/compound.py
@@ -3,15 +3,16 @@
 """
 Generated Mon Feb  9 19:08:05 2009 by generateDS.py.
 """
+from __future__ import unicode_literals
+
 
-from string import lower as str_lower
 from xml.dom import minidom
 from xml.dom import Node
 
 import sys
 
-import compoundsuper as supermod
-from compoundsuper import MixedContainer
+from . import compoundsuper as supermod
+from .compoundsuper import MixedContainer
 
 
 class DoxygenTypeSub(supermod.DoxygenType):
@@ -499,5 +500,3 @@ def parse(inFilename):
     rootObj = supermod.DoxygenType.factory()
     rootObj.build(rootNode)
     return rootObj
-
-
diff --git a/docs/doxygen/doxyxml/generated/compoundsuper.py b/docs/doxygen/doxyxml/generated/compoundsuper.py
index 6255dda163..f18ec6cda9 100644
--- a/docs/doxygen/doxyxml/generated/compoundsuper.py
+++ b/docs/doxygen/doxyxml/generated/compoundsuper.py
@@ -4,12 +4,16 @@
 # Generated Thu Jun 11 18:44:25 2009 by generateDS.py.
 #
 
+from __future__ import print_function
+from __future__ import unicode_literals
+
 import sys
-import getopt
-from string import lower as str_lower
+
 from xml.dom import minidom
 from xml.dom import Node
 
+import six
+
 #
 # User methods
 #
@@ -19,9 +23,9 @@ from xml.dom import Node
 
 try:
     from generatedssuper import GeneratedsSuper
-except ImportError, exp:
+except ImportError as exp:
 
-    class GeneratedsSuper:
+    class GeneratedsSuper(object):
         def format_string(self, input_data, input_name=''):
             return input_data
         def format_integer(self, input_data, input_name=''):
@@ -64,7 +68,7 @@ def showIndent(outfile, level):
         outfile.write('    ')
 
 def quote_xml(inStr):
-    s1 = (isinstance(inStr, basestring) and inStr or
+    s1 = (isinstance(inStr, six.string_types) and inStr or
           '%s' % inStr)
     s1 = s1.replace('&', '&amp;')
     s1 = s1.replace('<', '&lt;')
@@ -72,7 +76,7 @@ def quote_xml(inStr):
     return s1
 
 def quote_attrib(inStr):
-    s1 = (isinstance(inStr, basestring) and inStr or
+    s1 = (isinstance(inStr, six.string_types) and inStr or
           '%s' % inStr)
     s1 = s1.replace('&', '&amp;')
     s1 = s1.replace('<', '&lt;')
@@ -102,7 +106,7 @@ def quote_python(inStr):
             return '"""%s"""' % s1
 
 
-class MixedContainer:
+class MixedContainer(object):
     # Constants for category:
     CategoryNone = 0
     CategoryText = 1
@@ -4221,7 +4225,7 @@ class codelineType(GeneratedsSuper):
         if attrs.get('lineno'):
             try:
                 self.lineno = int(attrs.get('lineno').value)
-            except ValueError, exp:
+            except ValueError as exp:
                 raise ValueError('Bad integer attribute (lineno): %s' % exp)
         if attrs.get('refkind'):
             self.refkind = attrs.get('refkind').value
@@ -4504,12 +4508,12 @@ class referenceType(GeneratedsSuper):
         if attrs.get('endline'):
             try:
                 self.endline = int(attrs.get('endline').value)
-            except ValueError, exp:
+            except ValueError as exp:
                 raise ValueError('Bad integer attribute (endline): %s' % exp)
         if attrs.get('startline'):
             try:
                 self.startline = int(attrs.get('startline').value)
-            except ValueError, exp:
+            except ValueError as exp:
                 raise ValueError('Bad integer attribute (startline): %s' % exp)
         if attrs.get('refid'):
             self.refid = attrs.get('refid').value
@@ -4627,17 +4631,17 @@ class locationType(GeneratedsSuper):
         if attrs.get('bodystart'):
             try:
                 self.bodystart = int(attrs.get('bodystart').value)
-            except ValueError, exp:
+            except ValueError as exp:
                 raise ValueError('Bad integer attribute (bodystart): %s' % exp)
         if attrs.get('line'):
             try:
                 self.line = int(attrs.get('line').value)
-            except ValueError, exp:
+            except ValueError as exp:
                 raise ValueError('Bad integer attribute (line): %s' % exp)
         if attrs.get('bodyend'):
             try:
                 self.bodyend = int(attrs.get('bodyend').value)
-            except ValueError, exp:
+            except ValueError as exp:
                 raise ValueError('Bad integer attribute (bodyend): %s' % exp)
         if attrs.get('bodyfile'):
             self.bodyfile = attrs.get('bodyfile').value
@@ -6778,12 +6782,12 @@ class docTableType(GeneratedsSuper):
         if attrs.get('rows'):
             try:
                 self.rows = int(attrs.get('rows').value)
-            except ValueError, exp:
+            except ValueError as exp:
                 raise ValueError('Bad integer attribute (rows): %s' % exp)
         if attrs.get('cols'):
             try:
                 self.cols = int(attrs.get('cols').value)
-            except ValueError, exp:
+            except ValueError as exp:
                 raise ValueError('Bad integer attribute (cols): %s' % exp)
     def buildChildren(self, child_, nodeName_):
         if child_.nodeType == Node.ELEMENT_NODE and \
@@ -7108,7 +7112,7 @@ class docHeadingType(GeneratedsSuper):
         if attrs.get('level'):
             try:
                 self.level = int(attrs.get('level').value)
-            except ValueError, exp:
+            except ValueError as exp:
                 raise ValueError('Bad integer attribute (level): %s' % exp)
     def buildChildren(self, child_, nodeName_):
         if child_.nodeType == Node.TEXT_NODE:
@@ -8283,7 +8287,7 @@ Options:
 """
 
 def usage():
-    print USAGE_TEXT
+    print(USAGE_TEXT)
     sys.exit(1)
 
 
@@ -8339,4 +8343,3 @@ if __name__ == '__main__':
     main()
     #import pdb
     #pdb.run('main()')
-
diff --git a/docs/doxygen/doxyxml/generated/index.py b/docs/doxygen/doxyxml/generated/index.py
index 7a70e14a1a..eb9a9048b2 100644
--- a/docs/doxygen/doxyxml/generated/index.py
+++ b/docs/doxygen/doxyxml/generated/index.py
@@ -3,14 +3,15 @@
 """
 Generated Mon Feb  9 19:08:05 2009 by generateDS.py.
 """
+from __future__ import unicode_literals
 
 from xml.dom import minidom
 
 import os
 import sys
-import compound
+from . import compound
 
-import indexsuper as supermod
+from . import indexsuper as supermod
 
 class DoxygenTypeSub(supermod.DoxygenType):
     def __init__(self, version=None, compound=None):
diff --git a/docs/doxygen/doxyxml/generated/indexsuper.py b/docs/doxygen/doxyxml/generated/indexsuper.py
index a991530198..11312db635 100644
--- a/docs/doxygen/doxyxml/generated/indexsuper.py
+++ b/docs/doxygen/doxyxml/generated/indexsuper.py
@@ -4,12 +4,16 @@
 # Generated Thu Jun 11 18:43:54 2009 by generateDS.py.
 #
 
+from __future__ import print_function
+from __future__ import unicode_literals
+
 import sys
-import getopt
-from string import lower as str_lower
+
 from xml.dom import minidom
 from xml.dom import Node
 
+import six
+
 #
 # User methods
 #
@@ -19,9 +23,9 @@ from xml.dom import Node
 
 try:
     from generatedssuper import GeneratedsSuper
-except ImportError, exp:
+except ImportError as exp:
 
-    class GeneratedsSuper:
+    class GeneratedsSuper(object):
         def format_string(self, input_data, input_name=''):
             return input_data
         def format_integer(self, input_data, input_name=''):
@@ -64,7 +68,7 @@ def showIndent(outfile, level):
         outfile.write('    ')
 
 def quote_xml(inStr):
-    s1 = (isinstance(inStr, basestring) and inStr or
+    s1 = (isinstance(inStr, six.string_types) and inStr or
           '%s' % inStr)
     s1 = s1.replace('&', '&amp;')
     s1 = s1.replace('<', '&lt;')
@@ -72,7 +76,7 @@ def quote_xml(inStr):
     return s1
 
 def quote_attrib(inStr):
-    s1 = (isinstance(inStr, basestring) and inStr or
+    s1 = (isinstance(inStr, six.string_types) and inStr or
           '%s' % inStr)
     s1 = s1.replace('&', '&amp;')
     s1 = s1.replace('<', '&lt;')
@@ -102,7 +106,7 @@ def quote_python(inStr):
             return '"""%s"""' % s1
 
 
-class MixedContainer:
+class MixedContainer(object):
     # Constants for category:
     CategoryNone = 0
     CategoryText = 1
@@ -462,7 +466,7 @@ Options:
 """
 
 def usage():
-    print USAGE_TEXT
+    print(USAGE_TEXT)
     sys.exit(1)
 
 
@@ -520,4 +524,3 @@ if __name__ == '__main__':
     main()
     #import pdb
     #pdb.run('main()')
-
diff --git a/docs/doxygen/doxyxml/text.py b/docs/doxygen/doxyxml/text.py
index 629edd180d..f0322f6237 100644
--- a/docs/doxygen/doxyxml/text.py
+++ b/docs/doxygen/doxyxml/text.py
@@ -21,6 +21,7 @@
 """
 Utilities for extracting text from generated classes.
 """
+from __future__ import unicode_literals
 
 def is_string(txt):
     if isinstance(txt, str):
@@ -49,7 +50,7 @@ def description_bit(obj):
     elif is_string(obj):
         return obj
     else:
-        raise StandardError('Expecting a string or something with content, content_ or value attribute')
+        raise Exception('Expecting a string or something with content, content_ or value attribute')
     # If this bit is a paragraph then add one some line breaks.
     if hasattr(obj, 'name') and obj.name == 'para':
         result += "\n\n"
diff --git a/docs/doxygen/other/doxypy.py b/docs/doxygen/other/doxypy.py
old mode 100755
new mode 100644
index a9af32ab53..e474a9694f
--- a/docs/doxygen/other/doxypy.py
+++ b/docs/doxygen/other/doxypy.py
@@ -1,5 +1,8 @@
 #!/usr/bin/env python
 
+from __future__ import print_function
+from __future__ import unicode_literals
+
 __applicationName__ = "doxypy"
 __blurb__ = """
 doxypy is an input filter for Doxygen. It preprocesses python
@@ -11,8 +14,8 @@ __doc__ = __blurb__ + \
 """
 In order to make Doxygen preprocess files through doxypy, simply
 add the following lines to your Doxyfile:
-	FILTER_SOURCE_FILES = YES
-	INPUT_FILTER = "python /path/to/doxypy.py"
+    FILTER_SOURCE_FILES = YES
+    INPUT_FILTER = "python /path/to/doxypy.py"
 """
 
 __version__ = "0.4.2"
@@ -20,8 +23,8 @@ __date__ = "5th December 2008"
 __website__ = "http://code.foosel.org/doxypy"
 
 __author__ = (
-	"Philippe 'demod' Neumann (doxypy at demod dot org)",
-	"Gina 'foosel' Haeussge (gina at foosel dot net)"
+    "Philippe 'demod' Neumann (doxypy at demod dot org)",
+    "Gina 'foosel' Haeussge (gina at foosel dot net)"
 )
 
 __licenseName__ = "GPL v2"
@@ -45,364 +48,364 @@ import re
 from argparse import ArgumentParser
 
 class FSM(object):
-	"""Implements a finite state machine.
-
-	Transitions are given as 4-tuples, consisting of an origin state, a target
-	state, a condition for the transition (given as a reference to a function
-	which gets called with a given piece of input) and a pointer to a function
-	to be called upon the execution of the given transition.
-	"""
-
-	"""
-	@var transitions holds the transitions
-	@var current_state holds the current state
-	@var current_input holds the current input
-	@var current_transition hold the currently active transition
-	"""
-
-	def __init__(self, start_state=None, transitions=[]):
-		self.transitions = transitions
-		self.current_state = start_state
-		self.current_input = None
-		self.current_transition = None
-
-	def setStartState(self, state):
-		self.current_state = state
-
-	def addTransition(self, from_state, to_state, condition, callback):
-		self.transitions.append([from_state, to_state, condition, callback])
-
-	def makeTransition(self, input):
-		""" Makes a transition based on the given input.
-
-		@param	input	input to parse by the FSM
-		"""
-		for transition in self.transitions:
-			[from_state, to_state, condition, callback] = transition
-			if from_state == self.current_state:
-				match = condition(input)
-				if match:
-					self.current_state = to_state
-					self.current_input = input
-					self.current_transition = transition
-					if args.debug:
-						print >>sys.stderr, "# FSM: executing (%s -> %s) for line '%s'" % (from_state, to_state, input)
-					callback(match)
-					return
+    """Implements a finite state machine.
+
+    Transitions are given as 4-tuples, consisting of an origin state, a target
+    state, a condition for the transition (given as a reference to a function
+    which gets called with a given piece of input) and a pointer to a function
+    to be called upon the execution of the given transition.
+    """
+
+    """
+    @var transitions holds the transitions
+    @var current_state holds the current state
+    @var current_input holds the current input
+    @var current_transition hold the currently active transition
+    """
+
+    def __init__(self, start_state=None, transitions=[]):
+        self.transitions = transitions
+        self.current_state = start_state
+        self.current_input = None
+        self.current_transition = None
+
+    def setStartState(self, state):
+        self.current_state = state
+
+    def addTransition(self, from_state, to_state, condition, callback):
+        self.transitions.append([from_state, to_state, condition, callback])
+
+    def makeTransition(self, input):
+        """ Makes a transition based on the given input.
+
+        @param    input    input to parse by the FSM
+        """
+        for transition in self.transitions:
+            [from_state, to_state, condition, callback] = transition
+            if from_state == self.current_state:
+                match = condition(input)
+                if match:
+                    self.current_state = to_state
+                    self.current_input = input
+                    self.current_transition = transition
+                    if args.debug:
+                        print("# FSM: executing (%s -> %s) for line '%s'" % (from_state, to_state, input), file=sys.stderr)
+                    callback(match)
+                    return
 
 class Doxypy(object):
-	def __init__(self):
-		string_prefixes = "[uU]?[rR]?"
-
-		self.start_single_comment_re = re.compile("^\s*%s(''')" % string_prefixes)
-		self.end_single_comment_re = re.compile("(''')\s*$")
-
-		self.start_double_comment_re = re.compile("^\s*%s(\"\"\")" % string_prefixes)
-		self.end_double_comment_re = re.compile("(\"\"\")\s*$")
-
-		self.single_comment_re = re.compile("^\s*%s(''').*(''')\s*$" % string_prefixes)
-		self.double_comment_re = re.compile("^\s*%s(\"\"\").*(\"\"\")\s*$" % string_prefixes)
-
-		self.defclass_re = re.compile("^(\s*)(def .+:|class .+:)")
-		self.empty_re = re.compile("^\s*$")
-		self.hashline_re = re.compile("^\s*#.*$")
-		self.importline_re = re.compile("^\s*(import |from .+ import)")
-
-		self.multiline_defclass_start_re = re.compile("^(\s*)(def|class)(\s.*)?$")
-		self.multiline_defclass_end_re = re.compile(":\s*$")
-
-		## Transition list format
-		#  ["FROM", "TO", condition, action]
-		transitions = [
-			### FILEHEAD
-
-			# single line comments
-			["FILEHEAD", "FILEHEAD", self.single_comment_re.search, self.appendCommentLine],
-			["FILEHEAD", "FILEHEAD", self.double_comment_re.search, self.appendCommentLine],
-
-			# multiline comments
-			["FILEHEAD", "FILEHEAD_COMMENT_SINGLE", self.start_single_comment_re.search, self.appendCommentLine],
-			["FILEHEAD_COMMENT_SINGLE", "FILEHEAD", self.end_single_comment_re.search, self.appendCommentLine],
-			["FILEHEAD_COMMENT_SINGLE", "FILEHEAD_COMMENT_SINGLE", self.catchall, self.appendCommentLine],
-			["FILEHEAD", "FILEHEAD_COMMENT_DOUBLE", self.start_double_comment_re.search, self.appendCommentLine],
-			["FILEHEAD_COMMENT_DOUBLE", "FILEHEAD", self.end_double_comment_re.search, self.appendCommentLine],
-			["FILEHEAD_COMMENT_DOUBLE", "FILEHEAD_COMMENT_DOUBLE", self.catchall, self.appendCommentLine],
-
-			# other lines
-			["FILEHEAD", "FILEHEAD", self.empty_re.search, self.appendFileheadLine],
-			["FILEHEAD", "FILEHEAD", self.hashline_re.search, self.appendFileheadLine],
-			["FILEHEAD", "FILEHEAD", self.importline_re.search, self.appendFileheadLine],
-			["FILEHEAD", "DEFCLASS", self.defclass_re.search, self.resetCommentSearch],
-			["FILEHEAD", "DEFCLASS_MULTI", self.multiline_defclass_start_re.search, self.resetCommentSearch],
-			["FILEHEAD", "DEFCLASS_BODY", self.catchall, self.appendFileheadLine],
-
-			### DEFCLASS
-
-			# single line comments
-			["DEFCLASS", "DEFCLASS_BODY", self.single_comment_re.search, self.appendCommentLine],
-			["DEFCLASS", "DEFCLASS_BODY", self.double_comment_re.search, self.appendCommentLine],
-
-			# multiline comments
-			["DEFCLASS", "COMMENT_SINGLE", self.start_single_comment_re.search, self.appendCommentLine],
-			["COMMENT_SINGLE", "DEFCLASS_BODY", self.end_single_comment_re.search, self.appendCommentLine],
-			["COMMENT_SINGLE", "COMMENT_SINGLE", self.catchall, self.appendCommentLine],
-			["DEFCLASS", "COMMENT_DOUBLE", self.start_double_comment_re.search, self.appendCommentLine],
-			["COMMENT_DOUBLE", "DEFCLASS_BODY", self.end_double_comment_re.search, self.appendCommentLine],
-			["COMMENT_DOUBLE", "COMMENT_DOUBLE", self.catchall, self.appendCommentLine],
-
-			# other lines
-			["DEFCLASS", "DEFCLASS", self.empty_re.search, self.appendDefclassLine],
-			["DEFCLASS", "DEFCLASS", self.defclass_re.search, self.resetCommentSearch],
-			["DEFCLASS", "DEFCLASS_MULTI", self.multiline_defclass_start_re.search, self.resetCommentSearch],
-			["DEFCLASS", "DEFCLASS_BODY", self.catchall, self.stopCommentSearch],
-
-			### DEFCLASS_BODY
-
-			["DEFCLASS_BODY", "DEFCLASS", self.defclass_re.search, self.startCommentSearch],
-			["DEFCLASS_BODY", "DEFCLASS_MULTI", self.multiline_defclass_start_re.search, self.startCommentSearch],
-			["DEFCLASS_BODY", "DEFCLASS_BODY", self.catchall, self.appendNormalLine],
-
-			### DEFCLASS_MULTI
-			["DEFCLASS_MULTI", "DEFCLASS", self.multiline_defclass_end_re.search, self.appendDefclassLine],
-			["DEFCLASS_MULTI", "DEFCLASS_MULTI", self.catchall, self.appendDefclassLine],
-		]
-
-		self.fsm = FSM("FILEHEAD", transitions)
-		self.outstream = sys.stdout
-
-		self.output = []
-		self.comment = []
-		self.filehead = []
-		self.defclass = []
-		self.indent = ""
-
-	def __closeComment(self):
-		"""Appends any open comment block and triggering block to the output."""
-
-		if args.autobrief:
-			if len(self.comment) == 1 \
-			or (len(self.comment) > 2 and self.comment[1].strip() == ''):
-				self.comment[0] = self.__docstringSummaryToBrief(self.comment[0])
-
-		if self.comment:
-			block = self.makeCommentBlock()
-			self.output.extend(block)
-
-		if self.defclass:
-			self.output.extend(self.defclass)
-
-	def __docstringSummaryToBrief(self, line):
-		"""Adds \\brief to the docstrings summary line.
-
-		A \\brief is prepended, provided no other doxygen command is at the
-		start of the line.
-		"""
-		stripped = line.strip()
-		if stripped and not stripped[0] in ('@', '\\'):
-			return "\\brief " + line
-		else:
-			return line
-
-	def __flushBuffer(self):
-		"""Flushes the current outputbuffer to the outstream."""
-		if self.output:
-			try:
-				if args.debug:
-					print >>sys.stderr, "# OUTPUT: ", self.output
-				print >>self.outstream, "\n".join(self.output)
-				self.outstream.flush()
-			except IOError:
-				# Fix for FS#33. Catches "broken pipe" when doxygen closes
-				# stdout prematurely upon usage of INPUT_FILTER, INLINE_SOURCES
-				# and FILTER_SOURCE_FILES.
-				pass
-		self.output = []
-
-	def catchall(self, input):
-		"""The catchall-condition, always returns true."""
-		return True
-
-	def resetCommentSearch(self, match):
-		"""Restarts a new comment search for a different triggering line.
-
-		Closes the current commentblock and starts a new comment search.
-		"""
-		if args.debug:
-			print >>sys.stderr, "# CALLBACK: resetCommentSearch"
-		self.__closeComment()
-		self.startCommentSearch(match)
-
-	def startCommentSearch(self, match):
-		"""Starts a new comment search.
-
-		Saves the triggering line, resets the current comment and saves
-		the current indentation.
-		"""
-		if args.debug:
-			print >>sys.stderr, "# CALLBACK: startCommentSearch"
-		self.defclass = [self.fsm.current_input]
-		self.comment = []
-		self.indent = match.group(1)
-
-	def stopCommentSearch(self, match):
-		"""Stops a comment search.
-
-		Closes the current commentblock, resets	the triggering line and
-		appends the current line to the output.
-		"""
-		if args.debug:
-			print >>sys.stderr, "# CALLBACK: stopCommentSearch"
-		self.__closeComment()
-
-		self.defclass = []
-		self.output.append(self.fsm.current_input)
-
-	def appendFileheadLine(self, match):
-		"""Appends a line in the FILEHEAD state.
-
-		Closes the open comment	block, resets it and appends the current line.
-		"""
-		if args.debug:
-			print >>sys.stderr, "# CALLBACK: appendFileheadLine"
-		self.__closeComment()
-		self.comment = []
-		self.output.append(self.fsm.current_input)
-
-	def appendCommentLine(self, match):
-		"""Appends a comment line.
-
-		The comment delimiter is removed from multiline start and ends as
-		well as singleline comments.
-		"""
-		if args.debug:
-			print >>sys.stderr, "# CALLBACK: appendCommentLine"
-		(from_state, to_state, condition, callback) = self.fsm.current_transition
-
-		# single line comment
-		if (from_state == "DEFCLASS" and to_state == "DEFCLASS_BODY") \
-		or (from_state == "FILEHEAD" and to_state == "FILEHEAD"):
-			# remove comment delimiter from begin and end of the line
-			activeCommentDelim = match.group(1)
-			line = self.fsm.current_input
-			self.comment.append(line[line.find(activeCommentDelim)+len(activeCommentDelim):line.rfind(activeCommentDelim)])
-
-			if (to_state == "DEFCLASS_BODY"):
-				self.__closeComment()
-				self.defclass = []
-		# multiline start
-		elif from_state == "DEFCLASS" or from_state == "FILEHEAD":
-			# remove comment delimiter from begin of the line
-			activeCommentDelim = match.group(1)
-			line = self.fsm.current_input
-			self.comment.append(line[line.find(activeCommentDelim)+len(activeCommentDelim):])
-		# multiline end
-		elif to_state == "DEFCLASS_BODY" or to_state == "FILEHEAD":
-			# remove comment delimiter from end of the line
-			activeCommentDelim = match.group(1)
-			line = self.fsm.current_input
-			self.comment.append(line[0:line.rfind(activeCommentDelim)])
-			if (to_state == "DEFCLASS_BODY"):
-				self.__closeComment()
-				self.defclass = []
-		# in multiline comment
-		else:
-			# just append the comment line
-			self.comment.append(self.fsm.current_input)
-
-	def appendNormalLine(self, match):
-		"""Appends a line to the output."""
-		if args.debug:
-			print >>sys.stderr, "# CALLBACK: appendNormalLine"
-		self.output.append(self.fsm.current_input)
-
-	def appendDefclassLine(self, match):
-		"""Appends a line to the triggering block."""
-		if args.debug:
-			print >>sys.stderr, "# CALLBACK: appendDefclassLine"
-		self.defclass.append(self.fsm.current_input)
-
-	def makeCommentBlock(self):
-		"""Indents the current comment block with respect to the current
-		indentation level.
-
-		@returns a list of indented comment lines
-		"""
-		doxyStart = "##"
-		commentLines = self.comment
-
-		commentLines = map(lambda x: "%s# %s" % (self.indent, x), commentLines)
-		l = [self.indent + doxyStart]
-		l.extend(commentLines)
-
-		return l
-
-	def parse(self, input):
-		"""Parses a python file given as input string and returns the doxygen-
-		compatible representation.
-
-		@param	input	the python code to parse
-		@returns the modified python code
-		"""
-		lines = input.split("\n")
-
-		for line in lines:
-			self.fsm.makeTransition(line)
-
-		if self.fsm.current_state == "DEFCLASS":
-			self.__closeComment()
-
-		return "\n".join(self.output)
-
-	def parseFile(self, filename):
-		"""Parses a python file given as input string and returns the doxygen-
-		compatible representation.
-
-		@param	input	the python code to parse
-		@returns the modified python code
-		"""
-		f = open(filename, 'r')
-
-		for line in f:
-			self.parseLine(line.rstrip('\r\n'))
-		if self.fsm.current_state == "DEFCLASS":
-			self.__closeComment()
-			self.__flushBuffer()
-		f.close()
-
-	def parseLine(self, line):
-		"""Parse one line of python and flush the resulting output to the
-		outstream.
-
-		@param	line	the python code line to parse
-		"""
-		self.fsm.makeTransition(line)
-		self.__flushBuffer()
+    def __init__(self):
+        string_prefixes = "[uU]?[rR]?"
+
+        self.start_single_comment_re = re.compile("^\s*%s(''')" % string_prefixes)
+        self.end_single_comment_re = re.compile("(''')\s*$")
+
+        self.start_double_comment_re = re.compile("^\s*%s(\"\"\")" % string_prefixes)
+        self.end_double_comment_re = re.compile("(\"\"\")\s*$")
+
+        self.single_comment_re = re.compile("^\s*%s(''').*(''')\s*$" % string_prefixes)
+        self.double_comment_re = re.compile("^\s*%s(\"\"\").*(\"\"\")\s*$" % string_prefixes)
+
+        self.defclass_re = re.compile("^(\s*)(def .+:|class .+:)")
+        self.empty_re = re.compile("^\s*$")
+        self.hashline_re = re.compile("^\s*#.*$")
+        self.importline_re = re.compile("^\s*(import |from .+ import)")
+
+        self.multiline_defclass_start_re = re.compile("^(\s*)(def|class)(\s.*)?$")
+        self.multiline_defclass_end_re = re.compile(":\s*$")
+
+        ## Transition list format
+        #  ["FROM", "TO", condition, action]
+        transitions = [
+            ### FILEHEAD
+
+            # single line comments
+            ["FILEHEAD", "FILEHEAD", self.single_comment_re.search, self.appendCommentLine],
+            ["FILEHEAD", "FILEHEAD", self.double_comment_re.search, self.appendCommentLine],
+
+            # multiline comments
+            ["FILEHEAD", "FILEHEAD_COMMENT_SINGLE", self.start_single_comment_re.search, self.appendCommentLine],
+            ["FILEHEAD_COMMENT_SINGLE", "FILEHEAD", self.end_single_comment_re.search, self.appendCommentLine],
+            ["FILEHEAD_COMMENT_SINGLE", "FILEHEAD_COMMENT_SINGLE", self.catchall, self.appendCommentLine],
+            ["FILEHEAD", "FILEHEAD_COMMENT_DOUBLE", self.start_double_comment_re.search, self.appendCommentLine],
+            ["FILEHEAD_COMMENT_DOUBLE", "FILEHEAD", self.end_double_comment_re.search, self.appendCommentLine],
+            ["FILEHEAD_COMMENT_DOUBLE", "FILEHEAD_COMMENT_DOUBLE", self.catchall, self.appendCommentLine],
+
+            # other lines
+            ["FILEHEAD", "FILEHEAD", self.empty_re.search, self.appendFileheadLine],
+            ["FILEHEAD", "FILEHEAD", self.hashline_re.search, self.appendFileheadLine],
+            ["FILEHEAD", "FILEHEAD", self.importline_re.search, self.appendFileheadLine],
+            ["FILEHEAD", "DEFCLASS", self.defclass_re.search, self.resetCommentSearch],
+            ["FILEHEAD", "DEFCLASS_MULTI", self.multiline_defclass_start_re.search, self.resetCommentSearch],
+            ["FILEHEAD", "DEFCLASS_BODY", self.catchall, self.appendFileheadLine],
+
+            ### DEFCLASS
+
+            # single line comments
+            ["DEFCLASS", "DEFCLASS_BODY", self.single_comment_re.search, self.appendCommentLine],
+            ["DEFCLASS", "DEFCLASS_BODY", self.double_comment_re.search, self.appendCommentLine],
+
+            # multiline comments
+            ["DEFCLASS", "COMMENT_SINGLE", self.start_single_comment_re.search, self.appendCommentLine],
+            ["COMMENT_SINGLE", "DEFCLASS_BODY", self.end_single_comment_re.search, self.appendCommentLine],
+            ["COMMENT_SINGLE", "COMMENT_SINGLE", self.catchall, self.appendCommentLine],
+            ["DEFCLASS", "COMMENT_DOUBLE", self.start_double_comment_re.search, self.appendCommentLine],
+            ["COMMENT_DOUBLE", "DEFCLASS_BODY", self.end_double_comment_re.search, self.appendCommentLine],
+            ["COMMENT_DOUBLE", "COMMENT_DOUBLE", self.catchall, self.appendCommentLine],
+
+            # other lines
+            ["DEFCLASS", "DEFCLASS", self.empty_re.search, self.appendDefclassLine],
+            ["DEFCLASS", "DEFCLASS", self.defclass_re.search, self.resetCommentSearch],
+            ["DEFCLASS", "DEFCLASS_MULTI", self.multiline_defclass_start_re.search, self.resetCommentSearch],
+            ["DEFCLASS", "DEFCLASS_BODY", self.catchall, self.stopCommentSearch],
+
+            ### DEFCLASS_BODY
+
+            ["DEFCLASS_BODY", "DEFCLASS", self.defclass_re.search, self.startCommentSearch],
+            ["DEFCLASS_BODY", "DEFCLASS_MULTI", self.multiline_defclass_start_re.search, self.startCommentSearch],
+            ["DEFCLASS_BODY", "DEFCLASS_BODY", self.catchall, self.appendNormalLine],
+
+            ### DEFCLASS_MULTI
+            ["DEFCLASS_MULTI", "DEFCLASS", self.multiline_defclass_end_re.search, self.appendDefclassLine],
+            ["DEFCLASS_MULTI", "DEFCLASS_MULTI", self.catchall, self.appendDefclassLine],
+        ]
+
+        self.fsm = FSM("FILEHEAD", transitions)
+        self.outstream = sys.stdout
+
+        self.output = []
+        self.comment = []
+        self.filehead = []
+        self.defclass = []
+        self.indent = ""
+
+    def __closeComment(self):
+        """Appends any open comment block and triggering block to the output."""
+
+        if args.autobrief:
+            if len(self.comment) == 1 \
+            or (len(self.comment) > 2 and self.comment[1].strip() == ''):
+                self.comment[0] = self.__docstringSummaryToBrief(self.comment[0])
+
+        if self.comment:
+            block = self.makeCommentBlock()
+            self.output.extend(block)
+
+        if self.defclass:
+            self.output.extend(self.defclass)
+
+    def __docstringSummaryToBrief(self, line):
+        """Adds \\brief to the docstrings summary line.
+
+        A \\brief is prepended, provided no other doxygen command is at the
+        start of the line.
+        """
+        stripped = line.strip()
+        if stripped and not stripped[0] in ('@', '\\'):
+            return "\\brief " + line
+        else:
+            return line
+
+    def __flushBuffer(self):
+        """Flushes the current outputbuffer to the outstream."""
+        if self.output:
+            try:
+                if args.debug:
+                    print("# OUTPUT: ", self.output, file=sys.stderr)
+                print("\n".join(self.output), file=self.outstream)
+                self.outstream.flush()
+            except IOError:
+                # Fix for FS#33. Catches "broken pipe" when doxygen closes
+                # stdout prematurely upon usage of INPUT_FILTER, INLINE_SOURCES
+                # and FILTER_SOURCE_FILES.
+                pass
+        self.output = []
+
+    def catchall(self, input):
+        """The catchall-condition, always returns true."""
+        return True
+
+    def resetCommentSearch(self, match):
+        """Restarts a new comment search for a different triggering line.
+
+        Closes the current commentblock and starts a new comment search.
+        """
+        if args.debug:
+            print("# CALLBACK: resetCommentSearch", file=sys.stderr)
+        self.__closeComment()
+        self.startCommentSearch(match)
+
+    def startCommentSearch(self, match):
+        """Starts a new comment search.
+
+        Saves the triggering line, resets the current comment and saves
+        the current indentation.
+        """
+        if args.debug:
+            print("# CALLBACK: startCommentSearch", file=sys.stderr)
+        self.defclass = [self.fsm.current_input]
+        self.comment = []
+        self.indent = match.group(1)
+
+    def stopCommentSearch(self, match):
+        """Stops a comment search.
+
+        Closes the current commentblock, resets    the triggering line and
+        appends the current line to the output.
+        """
+        if args.debug:
+            print("# CALLBACK: stopCommentSearch", file=sys.stderr)
+        self.__closeComment()
+
+        self.defclass = []
+        self.output.append(self.fsm.current_input)
+
+    def appendFileheadLine(self, match):
+        """Appends a line in the FILEHEAD state.
+
+        Closes the open comment    block, resets it and appends the current line.
+        """
+        if args.debug:
+            print("# CALLBACK: appendFileheadLine", file=sys.stderr)
+        self.__closeComment()
+        self.comment = []
+        self.output.append(self.fsm.current_input)
+
+    def appendCommentLine(self, match):
+        """Appends a comment line.
+
+        The comment delimiter is removed from multiline start and ends as
+        well as singleline comments.
+        """
+        if args.debug:
+            print("# CALLBACK: appendCommentLine", file=sys.stderr)
+        (from_state, to_state, condition, callback) = self.fsm.current_transition
+
+        # single line comment
+        if (from_state == "DEFCLASS" and to_state == "DEFCLASS_BODY") \
+        or (from_state == "FILEHEAD" and to_state == "FILEHEAD"):
+            # remove comment delimiter from begin and end of the line
+            activeCommentDelim = match.group(1)
+            line = self.fsm.current_input
+            self.comment.append(line[line.find(activeCommentDelim)+len(activeCommentDelim):line.rfind(activeCommentDelim)])
+
+            if (to_state == "DEFCLASS_BODY"):
+                self.__closeComment()
+                self.defclass = []
+        # multiline start
+        elif from_state == "DEFCLASS" or from_state == "FILEHEAD":
+            # remove comment delimiter from begin of the line
+            activeCommentDelim = match.group(1)
+            line = self.fsm.current_input
+            self.comment.append(line[line.find(activeCommentDelim)+len(activeCommentDelim):])
+        # multiline end
+        elif to_state == "DEFCLASS_BODY" or to_state == "FILEHEAD":
+            # remove comment delimiter from end of the line
+            activeCommentDelim = match.group(1)
+            line = self.fsm.current_input
+            self.comment.append(line[0:line.rfind(activeCommentDelim)])
+            if (to_state == "DEFCLASS_BODY"):
+                self.__closeComment()
+                self.defclass = []
+        # in multiline comment
+        else:
+            # just append the comment line
+            self.comment.append(self.fsm.current_input)
+
+    def appendNormalLine(self, match):
+        """Appends a line to the output."""
+        if args.debug:
+            print("# CALLBACK: appendNormalLine", file=sys.stderr)
+        self.output.append(self.fsm.current_input)
+
+    def appendDefclassLine(self, match):
+        """Appends a line to the triggering block."""
+        if args.debug:
+            print("# CALLBACK: appendDefclassLine", file=sys.stderr)
+        self.defclass.append(self.fsm.current_input)
+
+    def makeCommentBlock(self):
+        """Indents the current comment block with respect to the current
+        indentation level.
+
+        @returns a list of indented comment lines
+        """
+        doxyStart = "##"
+        commentLines = self.comment
+
+        commentLines = ["%s# %s" % (self.indent, x) for x in commentLines]
+        l = [self.indent + doxyStart]
+        l.extend(commentLines)
+
+        return l
+
+    def parse(self, input):
+        """Parses a python file given as input string and returns the doxygen-
+        compatible representation.
+
+        @param    input    the python code to parse
+        @returns the modified python code
+        """
+        lines = input.split("\n")
+
+        for line in lines:
+            self.fsm.makeTransition(line)
+
+        if self.fsm.current_state == "DEFCLASS":
+            self.__closeComment()
+
+        return "\n".join(self.output)
+
+    def parseFile(self, filename):
+        """Parses a python file given as input string and returns the doxygen-
+        compatible representation.
+
+        @param    input    the python code to parse
+        @returns the modified python code
+        """
+        f = open(filename, 'r')
+
+        for line in f:
+            self.parseLine(line.rstrip('\r\n'))
+        if self.fsm.current_state == "DEFCLASS":
+            self.__closeComment()
+            self.__flushBuffer()
+        f.close()
+
+    def parseLine(self, line):
+        """Parse one line of python and flush the resulting output to the
+        outstream.
+
+        @param    line    the python code line to parse
+        """
+        self.fsm.makeTransition(line)
+        self.__flushBuffer()
 
 def argParse():
-	"""Parses commandline args."""
-	parser = ArgumentParser(prog=__applicationName__)
-
-	parser.add_argument("--version", action="version",
-		version="%(prog)s " + __version__
-	)
-	parser.add_argument("--autobrief", action="store_true",
-		help="use the docstring summary line as \\brief description"
-	)
-	parser.add_argument("--debug", action="store_true",
-		help="enable debug output on stderr"
-	)
-	parser.add_argument("filename", metavar="FILENAME")
-
-	return parser.parse_args()
+    """Parses commandline args."""
+    parser = ArgumentParser(prog=__applicationName__)
+
+    parser.add_argument("--version", action="version",
+        version="%(prog)s " + __version__
+    )
+    parser.add_argument("--autobrief", action="store_true",
+        help="use the docstring summary line as \\brief description"
+    )
+    parser.add_argument("--debug", action="store_true",
+        help="enable debug output on stderr"
+    )
+    parser.add_argument("filename", metavar="FILENAME")
+
+    return parser.parse_args()
 
 def main():
-	"""Starts the parser on the file given by the filename as the first
-	argument on the commandline.
-	"""
-	global args
-	args = argParse()
-	fsm = Doxypy()
-	fsm.parseFile(args.filename)
+    """Starts the parser on the file given by the filename as the first
+    argument on the commandline.
+    """
+    global args
+    args = argParse()
+    fsm = Doxypy()
+    fsm.parseFile(args.filename)
 
 if __name__ == "__main__":
-	main()
+    main()
diff --git a/docs/doxygen/swig_doc.py b/docs/doxygen/swig_doc.py
index c9e89aec1b..307920d776 100644
--- a/docs/doxygen/swig_doc.py
+++ b/docs/doxygen/swig_doc.py
@@ -26,6 +26,7 @@ The file instructs SWIG to transfer the doxygen comments into the
 python docstrings.
 
 """
+from __future__ import unicode_literals
 
 import sys, time
 
@@ -84,8 +85,8 @@ def utoascii(text):
     if text is None:
         return ''
     out = text.encode('ascii', 'replace')
-    out = out.replace('"', '\\"')
-    return out
+    out = out.replace(b'"', b'\\"').decode('ascii')
+    return str(out)
 
 
 def combine_descriptions(obj):
@@ -301,7 +302,7 @@ def make_swig_interface_file(di, swigdocfilename, custom_output=None):
 
     output = "\n\n".join(output)
 
-    swig_doc = file(swigdocfilename, 'w')
+    swig_doc = open(swigdocfilename, 'w')
     swig_doc.write(output)
     swig_doc.close()
 
@@ -309,7 +310,7 @@ if __name__ == "__main__":
     # Parse command line options and set up doxyxml.
     err_msg = "Execute using: python swig_doc.py xml_path outputfilename"
     if len(sys.argv) != 3:
-        raise StandardError(err_msg)
+        raise Exception(err_msg)
     xml_path = sys.argv[1]
     swigdocfilename = sys.argv[2]
     di = DoxyIndex(xml_path)
diff --git a/docs/exploring-gnuradio/dial_tone.py b/docs/exploring-gnuradio/dial_tone.py
old mode 100755
new mode 100644
index ba43c43bfc..42cbf3c9d0
--- a/docs/exploring-gnuradio/dial_tone.py
+++ b/docs/exploring-gnuradio/dial_tone.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import audio
 from gnuradio import analog
@@ -40,5 +41,5 @@ def build_graph():
 if __name__ == '__main__':
     tb = build_graph()
     tb.start()
-    raw_input('Press Enter to quit: ')
+    eval(input('Press Enter to quit: '))
     tb.stop()
diff --git a/docs/exploring-gnuradio/fm_demod.py b/docs/exploring-gnuradio/fm_demod.py
old mode 100755
new mode 100644
index 8e8b6425f9..71d7f64c82
--- a/docs/exploring-gnuradio/fm_demod.py
+++ b/docs/exploring-gnuradio/fm_demod.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import blocks
 from gnuradio import filter
@@ -46,7 +48,7 @@ class build_graph(gr.top_block):
 
         # Set the demodulator using the same deviation as the receiver.
         max_dev = 75e3
-        fm_demod_gain = input_rate/(2*math.pi*max_dev/8.0)
+        fm_demod_gain = input_rate / (2*math.pi*max_dev/8.0)
         fm_demod = analog.quadrature_demod_cf(fm_demod_gain)
 
         # Create a filter for the resampler and filter the audio
@@ -80,7 +82,7 @@ class build_graph(gr.top_block):
 def main(args):
     tb = build_graph()
     tb.start()        # fork thread and return
-    raw_input('Press Enter to quit: ')
+    eval(input('Press Enter to quit: '))
     tb.stop()
 
 if __name__ == '__main__':
diff --git a/docs/sphinx/gnuradio_sphinx.py b/docs/sphinx/gnuradio_sphinx.py
index 22b96c32e7..cdfd46ceca 100644
--- a/docs/sphinx/gnuradio_sphinx.py
+++ b/docs/sphinx/gnuradio_sphinx.py
@@ -1,6 +1,7 @@
 """
 Customizations of sphinx for gnuradio use.
 """
+from __future__ import unicode_literals
 
 from sphinx.ext.autodoc import py_ext_sig_re
 from sphinx.ext.autodoc import ClassDocumenter, FunctionDocumenter, members_option
diff --git a/docs/sphinx/hieroglyph/__init__.py b/docs/sphinx/hieroglyph/__init__.py
index 25dea27fba..d6b00fc049 100644
--- a/docs/sphinx/hieroglyph/__init__.py
+++ b/docs/sphinx/hieroglyph/__init__.py
@@ -1,6 +1,7 @@
+from __future__ import unicode_literals
 # We only need to expose the setup function to Sphinx
 
 from .hieroglyph import setup
 from .version import __version__
 
-__author__ = 'Robert Smallshire'
\ No newline at end of file
+__author__ = 'Robert Smallshire'
diff --git a/docs/sphinx/hieroglyph/errors.py b/docs/sphinx/hieroglyph/errors.py
index 9c1d2213b2..9f7cde9570 100644
--- a/docs/sphinx/hieroglyph/errors.py
+++ b/docs/sphinx/hieroglyph/errors.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
 
 from sphinx.errors import ExtensionError
 
@@ -7,4 +8,4 @@ class HieroglyphError(ExtensionError):
     '''
     An exception type specific to the Hieroglyph Sphinx extension.
     '''
-    pass
\ No newline at end of file
+    pass
diff --git a/docs/sphinx/hieroglyph/hieroglyph.py b/docs/sphinx/hieroglyph/hieroglyph.py
index 0056d9ab8a..bb58a6e04b 100644
--- a/docs/sphinx/hieroglyph/hieroglyph.py
+++ b/docs/sphinx/hieroglyph/hieroglyph.py
@@ -1,9 +1,11 @@
 from __future__ import print_function
+from __future__ import absolute_import
+from __future__ import unicode_literals
 
 import re
 
-from errors import HieroglyphError
-from nodes import (Node, Raises, Except, Note, Warning, Returns, Arg,
+from .errors import HieroglyphError
+from .nodes import (Node, Raises, Except, Note, Warning, Returns, Arg,
                    ensure_terminal_blank)
 
 __author__ = 'Robert Smallshire'
diff --git a/docs/sphinx/hieroglyph/nodes.py b/docs/sphinx/hieroglyph/nodes.py
index f0c08b5621..1c091ab6a0 100644
--- a/docs/sphinx/hieroglyph/nodes.py
+++ b/docs/sphinx/hieroglyph/nodes.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
 __author__ = 'Robert Smallshire'
 
 class Node(object):
diff --git a/docs/sphinx/hieroglyph/test/__init__.py b/docs/sphinx/hieroglyph/test/__init__.py
index c9b674ead2..c568b0851f 100644
--- a/docs/sphinx/hieroglyph/test/__init__.py
+++ b/docs/sphinx/hieroglyph/test/__init__.py
@@ -1 +1,2 @@
+from __future__ import unicode_literals
 __author__ = 'rjs'
diff --git a/docs/sphinx/hieroglyph/test/test_comments.py b/docs/sphinx/hieroglyph/test/test_comments.py
index d1a1453ee1..1cc569605c 100644
--- a/docs/sphinx/hieroglyph/test/test_comments.py
+++ b/docs/sphinx/hieroglyph/test/test_comments.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
 import unittest
 
 from hieroglyph.hieroglyph import parse_hieroglyph_text
diff --git a/docs/sphinx/hieroglyph/test/test_hierglyph.py b/docs/sphinx/hieroglyph/test/test_hierglyph.py
index 4f86db5784..7815960905 100644
--- a/docs/sphinx/hieroglyph/test/test_hierglyph.py
+++ b/docs/sphinx/hieroglyph/test/test_hierglyph.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
 import unittest
 from hieroglyph.hieroglyph import first_paragraph_indent, gather_lines, unindent
 
diff --git a/docs/sphinx/hieroglyph/test/test_nodes.py b/docs/sphinx/hieroglyph/test/test_nodes.py
index 12cd25a03e..4b6003c91a 100644
--- a/docs/sphinx/hieroglyph/test/test_nodes.py
+++ b/docs/sphinx/hieroglyph/test/test_nodes.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
 import unittest
 from hieroglyph.nodes import Node, Arg, Raises, Except, Returns, Warning, Note
 
diff --git a/docs/sphinx/hieroglyph/version.py b/docs/sphinx/hieroglyph/version.py
index b35385b6b8..f823af4363 100644
--- a/docs/sphinx/hieroglyph/version.py
+++ b/docs/sphinx/hieroglyph/version.py
@@ -1,3 +1,4 @@
 '''Specification of the hieroglyph version'''
+from __future__ import unicode_literals
 
 __version__ = '0.6'
diff --git a/gnuradio-runtime/apps/evaluation_random_numbers.py b/gnuradio-runtime/apps/evaluation_random_numbers.py
index 069493c73e..30b61be858 100644
--- a/gnuradio-runtime/apps/evaluation_random_numbers.py
+++ b/gnuradio-runtime/apps/evaluation_random_numbers.py
@@ -20,6 +20,9 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio import gr
 import numpy as np
 from scipy.stats import norm, laplace, rayleigh
@@ -40,7 +43,7 @@ laplace_num_bins = 31
 
 rndm = gr.random() # instance of gnuradio random class (gr::random)
 
-print 'All histograms contain',num_tests,'realisations.'
+print('All histograms contain',num_tests,'realisations.')
 
 #*** GENERATE DATA ***#
 
@@ -73,7 +76,7 @@ rayleigh_expected = np.zeros(rayleigh_num_bins-1)
 laplace_expected = np.zeros(laplace_num_bins-1)
 
 for k in range(len(uniform_hist[0])):
-    uniform_expected[k] = num_tests/float(uniform_num_bins-1)
+    uniform_expected[k] = num_tests / float(uniform_num_bins-1)
 
 for k in range(len(gauss_hist[0])):
     gauss_expected[k] = float(norm.cdf(gauss_hist[1][k+1])-norm.cdf(gauss_hist[1][k]))*num_tests
@@ -86,10 +89,10 @@ for k in range(len(laplace_hist[0])):
 
 #*** PLOT HISTOGRAMS AND EXPECTATIONS TAKEN FROM SCIPY ***#
 
-uniform_bins_center = uniform_bins[0:-1]+(uniform_bins[1]-uniform_bins[0])/2.0
-gauss_bins_center = gauss_bins[0:-1]+(gauss_bins[1]-gauss_bins[0])/2.0
-rayleigh_bins_center = rayleigh_bins[0:-1]+(rayleigh_bins[1]-rayleigh_bins[0])/2.0
-laplace_bins_center = laplace_bins[0:-1]+(laplace_bins[1]-laplace_bins[0])/2.0
+uniform_bins_center = uniform_bins[0:-1]+(uniform_bins[1]-uniform_bins[0]) / 2.0
+gauss_bins_center = gauss_bins[0:-1]+(gauss_bins[1]-gauss_bins[0]) / 2.0
+rayleigh_bins_center = rayleigh_bins[0:-1]+(rayleigh_bins[1]-rayleigh_bins[0]) / 2.0
+laplace_bins_center = laplace_bins[0:-1]+(laplace_bins[1]-laplace_bins[0]) / 2.0
 
 plt.figure(1)
 
@@ -99,7 +102,7 @@ plt.xlabel('Bins'), plt.ylabel('Count'), plt.title('Uniform: Distribution')
 plt.legend(['histogram gr::random','calculation scipy'],loc=1)
 
 plt.subplot(2,1,2)
-plt.plot(uniform_bins_center,uniform_hist[0]/uniform_expected,'rs--')
+plt.plot(uniform_bins_center,uniform_hist[0] / uniform_expected,'rs--')
 plt.xlabel('Bins'), plt.ylabel('Relative deviation'), plt.title('Uniform: Relative deviation to scipy')
 
 plt.figure(2)
@@ -110,7 +113,7 @@ plt.xlabel('Bins'), plt.ylabel('Count'), plt.title('Gauss: Distribution')
 plt.legend(['histogram gr::random','calculation scipy'],loc=1)
 
 plt.subplot(2,1,2)
-plt.plot(gauss_bins_center,gauss_hist[0]/gauss_expected,'rs--')
+plt.plot(gauss_bins_center,gauss_hist[0] / gauss_expected,'rs--')
 plt.xlabel('Bins'), plt.ylabel('Relative deviation'), plt.title('Gauss: Relative deviation to scipy')
 
 plt.figure(3)
@@ -122,7 +125,7 @@ plt.legend(['histogram gr::random','calculation scipy'],loc=1)
 
 
 plt.subplot(2,1,2)
-plt.plot(rayleigh_bins_center,rayleigh_hist[0]/rayleigh_expected,'rs--')
+plt.plot(rayleigh_bins_center,rayleigh_hist[0] / rayleigh_expected,'rs--')
 plt.xlabel('Bins'), plt.ylabel('Relative deviation'), plt.title('Rayleigh: Relative deviation to scipy')
 
 plt.figure(4)
@@ -133,7 +136,7 @@ plt.xlabel('Bins'), plt.ylabel('Count'), plt.title('Laplace: Distribution')
 plt.legend(['histogram gr::random','calculation scipy'],loc=1)
 
 plt.subplot(2,1,2)
-plt.plot(laplace_bins_center,laplace_hist[0]/laplace_expected,'rs--')
+plt.plot(laplace_bins_center,laplace_hist[0] / laplace_expected,'rs--')
 plt.xlabel('Bins'), plt.ylabel('Relative deviation'), plt.title('Laplace: Relative deviation to scipy')
 
 plt.show()
diff --git a/gnuradio-runtime/examples/mp-sched/affinity_set.py b/gnuradio-runtime/examples/mp-sched/affinity_set.py
old mode 100755
new mode 100644
index e6637b44bf..b717e1e506
--- a/gnuradio-runtime/examples/mp-sched/affinity_set.py
+++ b/gnuradio-runtime/examples/mp-sched/affinity_set.py
@@ -4,6 +4,8 @@
 # Title: Affinity Set Test
 ##################################################
 
+from __future__ import print_function
+from __future__ import unicode_literals
 from gnuradio import eng_notation
 from gnuradio import gr
 from gnuradio import blocks
@@ -57,7 +59,7 @@ if __name__ == '__main__':
     tb.start()
 
     while(1):
-        ret = raw_input('Enter a new Core # or Press Enter to quit: ')
+        ret = eval(input('Enter a new Core # or Press Enter to quit: '))
 	if(len(ret) == 0):
             tb.stop()
 	    sys.exit(0)
@@ -67,6 +69,6 @@ if __name__ == '__main__':
             try:
                 n = int(ret)
 	    except ValueError:
-                print "Invalid number"
+                print("Invalid number")
 	    else:
                 tb.filter_filt_0.set_processor_affinity([n,])
diff --git a/gnuradio-runtime/examples/mp-sched/plot_flops.py b/gnuradio-runtime/examples/mp-sched/plot_flops.py
old mode 100755
new mode 100644
index 9bd2ff12bb..e71770aee3
--- a/gnuradio-runtime/examples/mp-sched/plot_flops.py
+++ b/gnuradio-runtime/examples/mp-sched/plot_flops.py
@@ -23,6 +23,7 @@
 Reads output from run_synthetic.py and runs gnuplot showing
 GFLOPS as f(npipes, nstages)
 """
+from __future__ import unicode_literals
 
 import re
 import sys
diff --git a/gnuradio-runtime/examples/mp-sched/run_synthetic.py b/gnuradio-runtime/examples/mp-sched/run_synthetic.py
old mode 100755
new mode 100644
index 802fb9fd34..684f95bd87
--- a/gnuradio-runtime/examples/mp-sched/run_synthetic.py
+++ b/gnuradio-runtime/examples/mp-sched/run_synthetic.py
@@ -22,6 +22,8 @@
 """
 Run synthetic.py for npipes in [1,16], nstages in [1,16]
 """
+from __future__ import division
+from __future__ import unicode_literals
 
 import re
 import sys
@@ -49,7 +51,7 @@ def write_shell_script(f, data_filename, description, ncores, gflops, max_pipes_
             # We'd like each run of synthetic to take ~10 seconds
             desired_time_per_run = 10
             est_gflops_avail = min(nstages * npipes, ncores) * gflops
-            nsamples = (est_gflops_avail * desired_time_per_run)/(512.0 * nstages * npipes)
+            nsamples = (est_gflops_avail * desired_time_per_run) / (512.0 * nstages * npipes)
             nsamples = int(nsamples * 1e9)
 
             cmd = "./synthetic.py -m -s %d -p %d -N %d\n" % (nstages, npipes, nsamples)
diff --git a/gnuradio-runtime/examples/mp-sched/synthetic.py b/gnuradio-runtime/examples/mp-sched/synthetic.py
old mode 100755
new mode 100644
index 16e39734ae..0f0b7b37cc
--- a/gnuradio-runtime/examples/mp-sched/synthetic.py
+++ b/gnuradio-runtime/examples/mp-sched/synthetic.py
@@ -19,6 +19,9 @@
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 #
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio import gr, eng_notation
 from gnuradio import blocks, filter
 from gnuradio.eng_arg import eng_float, intx
@@ -35,7 +38,7 @@ class pipeline(gr.hier_block2):
         gr.hier_block2.__init__(self, "pipeline",
                                 gr.io_signature(1, 1, gr.sizeof_float),
                                 gr.io_signature(0, 0, 0))
-        taps = ntaps*[1.0/ntaps]
+        taps = ntaps*[1.0 / ntaps]
         upstream = self
         for i in range(nstages):
             op = filter.fir_filter_fff(1, taps)
@@ -85,23 +88,23 @@ def time_it(tb):
     start = os.times()
     tb.run()
     stop = os.times()
-    delta = map((lambda a, b: a-b), stop, start)
+    delta = list(map((lambda a, b: a-b), stop, start))
     user, sys, childrens_user, childrens_sys, real = delta
     total_user = user + childrens_user
     total_sys  = sys + childrens_sys
     if tb.machine_readable:
-        print "%3d %3d %.3e %7.3f %7.3f %7.3f %7.3f %.6e %.3e" % (
-            tb.npipes, tb.nstages, tb.nsamples, real, total_user, total_sys, (total_user+total_sys)/real, tb.flop, tb.flop/real)
+        print("%3d %3d %.3e %7.3f %7.3f %7.3f %7.3f %.6e %.3e" % (
+            tb.npipes, tb.nstages, tb.nsamples, real, total_user, total_sys, (total_user+total_sys) / real, tb.flop, tb.flop / real))
     else:
-        print "npipes           %7d"   % (tb.npipes,)
-        print "nstages          %7d"   % (tb.nstages,)
-        print "nsamples         %s"    % (eng_notation.num_to_str(tb.nsamples),)
-        print "real             %7.3f" % (real,)
-        print "user             %7.3f" % (total_user,)
-        print "sys              %7.3f" % (total_sys,)
-        print "(user+sys)/real  %7.3f" % ((total_user + total_sys)/real,)
-        print "pseudo_flop      %s"    % (eng_notation.num_to_str(tb.flop),)
-        print "pseudo_flop/real %s"    % (eng_notation.num_to_str(tb.flop/real),)
+        print("npipes           %7d"   % (tb.npipes,))
+        print("nstages          %7d"   % (tb.nstages,))
+        print("nsamples         %s"    % (eng_notation.num_to_str(tb.nsamples),))
+        print("real             %7.3f" % (real,))
+        print("user             %7.3f" % (total_user,))
+        print("sys              %7.3f" % (total_sys,))
+        print("(user+sys)/real  %7.3f" % ((total_user + total_sys) / real,))
+        print("pseudo_flop      %s"    % (eng_notation.num_to_str(tb.flop),))
+        print("pseudo_flop/real %s"    % (eng_notation.num_to_str(tb.flop / real),))
 
 
 if __name__ == "__main__":
@@ -109,7 +112,7 @@ if __name__ == "__main__":
         tb = top()
         time_it(tb)
     except KeyboardInterrupt:
-        raise SystemExit, 128
+        raise SystemExit(128)
 
 
 
diff --git a/gnuradio-runtime/examples/mp-sched/wfm_rcv_pll_to_wav.py b/gnuradio-runtime/examples/mp-sched/wfm_rcv_pll_to_wav.py
old mode 100755
new mode 100644
index bb3296d428..93f26c6637
--- a/gnuradio-runtime/examples/mp-sched/wfm_rcv_pll_to_wav.py
+++ b/gnuradio-runtime/examples/mp-sched/wfm_rcv_pll_to_wav.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio import gr, gru, eng_notation, filter
 from gnuradio import audio
 from gnuradio import analog
@@ -94,7 +96,7 @@ class wfm_rx_block (gr.top_block):
 
         if args.volume is None:
             g = self.volume_range()
-            args.volume = float(g[0]+g[1])/2
+            args.volume = float(g[0]+g[1]) / 2
 
         # set initial values
 
@@ -109,8 +111,8 @@ class wfm_rx_block (gr.top_block):
     def set_vol (self, vol):
         g = self.volume_range()
         self.vol = max(g[0], min(g[1], vol))
-        self.volume_control_l.set_k(10**(self.vol/10))
-        self.volume_control_r.set_k(10**(self.vol/10))
+        self.volume_control_l.set_k(10**(self.vol / 10))
+        self.volume_control_r.set_k(10**(self.vol / 10))
 
     def volume_range(self):
         return (-20.0, 0.0, 0.5)
diff --git a/gnuradio-runtime/examples/network/audio_sink.py b/gnuradio-runtime/examples/network/audio_sink.py
old mode 100755
new mode 100644
index 9b91db5d1e..9ebe8a4c80
--- a/gnuradio-runtime/examples/network/audio_sink.py
+++ b/gnuradio-runtime/examples/network/audio_sink.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import blocks
 from argparse import ArgumentParser
diff --git a/gnuradio-runtime/examples/network/audio_source.py b/gnuradio-runtime/examples/network/audio_source.py
old mode 100755
new mode 100644
index 6a464a8f28..cc4a34c63f
--- a/gnuradio-runtime/examples/network/audio_source.py
+++ b/gnuradio-runtime/examples/network/audio_source.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import blocks
 from argparse import ArgumentParser
diff --git a/gnuradio-runtime/examples/network/dial_tone_sink.py b/gnuradio-runtime/examples/network/dial_tone_sink.py
old mode 100755
new mode 100644
index 4b1db98649..e6acbb08d4
--- a/gnuradio-runtime/examples/network/dial_tone_sink.py
+++ b/gnuradio-runtime/examples/network/dial_tone_sink.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import unicode_literals
 from gnuradio import gr, audio
 from gnuradio import blocks
 from argparse import ArgumentParser
diff --git a/gnuradio-runtime/examples/network/dial_tone_source.py b/gnuradio-runtime/examples/network/dial_tone_source.py
old mode 100755
new mode 100644
index ee2bc9529b..aa3ab9954f
--- a/gnuradio-runtime/examples/network/dial_tone_source.py
+++ b/gnuradio-runtime/examples/network/dial_tone_source.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import unicode_literals
 from gnuradio import gr
 from argparse import ArgumentParser
 import sys
diff --git a/gnuradio-runtime/examples/network/vector_sink.py b/gnuradio-runtime/examples/network/vector_sink.py
old mode 100755
new mode 100644
index 362f631380..a8850d8a01
--- a/gnuradio-runtime/examples/network/vector_sink.py
+++ b/gnuradio-runtime/examples/network/vector_sink.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import blocks
 from gnuradio.eng_arg import eng_float, intx
diff --git a/gnuradio-runtime/examples/network/vector_source.py b/gnuradio-runtime/examples/network/vector_source.py
old mode 100755
new mode 100644
index be40134bc0..cf8d0000c2
--- a/gnuradio-runtime/examples/network/vector_source.py
+++ b/gnuradio-runtime/examples/network/vector_source.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import blocks
 from argparse import ArgumentParser
diff --git a/gnuradio-runtime/examples/volk_benchmark/volk_math.py b/gnuradio-runtime/examples/volk_benchmark/volk_math.py
old mode 100755
new mode 100644
index 753257c237..6fc6cfa78d
--- 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
 
diff --git a/gnuradio-runtime/examples/volk_benchmark/volk_plot.py b/gnuradio-runtime/examples/volk_benchmark/volk_plot.py
old mode 100755
new mode 100644
index 48f9922054..2e02773e05
--- a/gnuradio-runtime/examples/volk_benchmark/volk_plot.py
+++ b/gnuradio-runtime/examples/volk_benchmark/volk_plot.py
@@ -1,5 +1,7 @@
 #!/usr/bin/env python
 
+from __future__ import division
+from __future__ import unicode_literals
 import sys, math
 import argparse
 from volk_test_funcs import *
@@ -100,7 +102,7 @@ def main():
 
 
     # Plot the results
-    x0 = xrange(len(name_reg))
+    x0 = list(range(len(name_reg)))
     i = 0
     for t in (table_data):
         ydata = []
@@ -119,7 +121,7 @@ def main():
             if(args.percent != t):
                 # makes x values for this data set placement
                 # width of bars depends on number of comparisons
-                wdth = 0.80/(M-1)
+                wdth = 0.80 / (M-1)
                 x1 = [x + i*wdth for x in x0]
                 i += 1
 
@@ -130,7 +132,7 @@ def main():
         else:
             # makes x values for this data set placement
             # width of bars depends on number of comparisons
-            wdth = 0.80/M
+            wdth = 0.80 / M
             x1 = [x + i*wdth for x in x0]
             i += 1
 
diff --git a/gnuradio-runtime/examples/volk_benchmark/volk_test_funcs.py b/gnuradio-runtime/examples/volk_benchmark/volk_test_funcs.py
index 0f2c84100a..eb39ca7ae1 100644
--- a/gnuradio-runtime/examples/volk_benchmark/volk_test_funcs.py
+++ b/gnuradio-runtime/examples/volk_benchmark/volk_test_funcs.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 math, sys, os, time
@@ -122,18 +124,18 @@ class helper(gr.top_block):
         self.snks = []
         self.head = blocks.head(isizeof, N)
 
-        for n in xrange(nsrcs):
+        for n in range(nsrcs):
             self.srcs.append(blocks.null_source(isizeof))
 
-        for n in xrange(nsnks):
+        for n in range(nsnks):
             self.snks.append(blocks.null_sink(osizeof))
 
         self.connect(self.srcs[0], self.head, (self.op,0))
 
-        for n in xrange(1, nsrcs):
+        for n in range(1, nsrcs):
             self.connect(self.srcs[n], (self.op,n))
 
-        for n in xrange(nsnks):
+        for n in range(nsnks):
             self.connect((self.op,n), self.snks[n])
 
 def timeit(tb, iterations):
@@ -143,10 +145,10 @@ def timeit(tb, iterations):
     '''
     r = gr.enable_realtime_scheduling()
     if r != gr.RT_OK:
-        print "Warning: failed to enable realtime scheduling"
+        print("Warning: failed to enable realtime scheduling")
 
     times = []
-    for i in xrange(iterations):
+    for i in range(iterations):
         start_time = time.time()
         tb.run()
         end_time = time.time()
diff --git a/gnuradio-runtime/examples/volk_benchmark/volk_types.py b/gnuradio-runtime/examples/volk_benchmark/volk_types.py
old mode 100755
new mode 100644
index 546e9629c0..697ec213c1
--- a/gnuradio-runtime/examples/volk_benchmark/volk_types.py
+++ b/gnuradio-runtime/examples/volk_benchmark/volk_types.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
@@ -105,7 +107,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():
@@ -143,7 +145,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',
@@ -153,8 +155,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)
@@ -165,7 +167,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
 
diff --git a/gnuradio-runtime/include/gnuradio/sptr_magic.h b/gnuradio-runtime/include/gnuradio/sptr_magic.h
index 6deb3062ae..d5e587186a 100644
--- a/gnuradio-runtime/include/gnuradio/sptr_magic.h
+++ b/gnuradio-runtime/include/gnuradio/sptr_magic.h
@@ -40,7 +40,7 @@ namespace gnuradio {
       static void create_and_stash_initial_sptr(gr::hier_block2 *p);
       static void cancel_initial_sptr(gr::hier_block2 *p);
     };
-  };
+  }
 
   /*
    * \brief New!  Improved!  Standard method to get/create the
diff --git a/gnuradio-runtime/lib/CMakeLists.txt b/gnuradio-runtime/lib/CMakeLists.txt
index c6e42876ce..e461889858 100644
--- a/gnuradio-runtime/lib/CMakeLists.txt
+++ b/gnuradio-runtime/lib/CMakeLists.txt
@@ -24,7 +24,7 @@ GR_CHECK_HDR_N_DEF(sys/resource.h HAVE_SYS_RESOURCE_H)
 # Handle the generated constants
 ########################################################################
 execute_process(COMMAND ${PYTHON_EXECUTABLE} -c
-    "import time;print time.strftime('%a, %d %b %Y %H:%M:%S', time.gmtime())"
+    "import time;print(time.strftime('%a, %d %b %Y %H:%M:%S', time.gmtime()))"
     OUTPUT_VARIABLE BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE
 )
 message(STATUS "Loading build date ${BUILD_DATE} into constants...")
@@ -53,8 +53,8 @@ list(APPEND gnuradio_runtime_sources ${CMAKE_CURRENT_BINARY_DIR}/constants.cc)
 ########################################################################
 include_directories(${GNURADIO_RUNTIME_INCLUDE_DIRS}
                     ${CMAKE_CURRENT_SOURCE_DIR}
-		    ${CMAKE_CURRENT_BINARY_DIR}/../include/
-		    ${VOLK_INCLUDE_DIRS}
+            ${CMAKE_CURRENT_BINARY_DIR}/../include/
+            ${VOLK_INCLUDE_DIRS}
                     ${Boost_INCLUDE_DIRS}
 )
 
diff --git a/gnuradio-runtime/lib/math/gen_sine_table.py b/gnuradio-runtime/lib/math/gen_sine_table.py
old mode 100755
new mode 100644
index d7d11eff11..75e3a0c58f
--- a/gnuradio-runtime/lib/math/gen_sine_table.py
+++ b/gnuradio-runtime/lib/math/gen_sine_table.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+from __future__ import unicode_literals
 import math
 import sys
 
@@ -38,8 +40,8 @@ def gen_approx_table (f, nentries, min_x, max_x):
     for i in range (nentries):
         a = (i * incx) + min_x
         b = ((i + 1) * incx) + min_x
-        m = (f(b)-f(a))/(b-a)
-        c = (3*a+b)*(f(a)-f(b))/(4*(b-a)) + (f((a+b)/2) + f(a))/2
+        m = (f(b)-f(a)) / (b-a)
+        c = (3*a+b)*(f(a)-f(b))/(4*(b-a)) + (f(old_div((a+b) / 2) + f(a)),2)
         abs_error = c+m*a-f(a)
         r.append ((m, c, abs_error))
     return r
diff --git a/gnuradio-runtime/lib/pmt/CMakeLists.txt b/gnuradio-runtime/lib/pmt/CMakeLists.txt
index e5c8f2f47e..85b2a4d6e0 100644
--- a/gnuradio-runtime/lib/pmt/CMakeLists.txt
+++ b/gnuradio-runtime/lib/pmt/CMakeLists.txt
@@ -66,7 +66,7 @@ add_custom_command(
         ${CMAKE_CURRENT_SOURCE_DIR}/unv_template.h.t
         ${CMAKE_CURRENT_SOURCE_DIR}/unv_template.cc.t
         ${CMAKE_CURRENT_SOURCE_DIR}/unv_qa_template.cc.t
-    COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} -c
+    COMMAND ${PYTHON_EXECUTABLE} -B -c
     "import os, sys; srcdir='${CMAKE_CURRENT_SOURCE_DIR}'; sys.path.append(srcdir); os.environ['srcdir']=srcdir; from generate_unv import main; main()"
     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     VERBATIM
diff --git a/gnuradio-runtime/lib/pmt/gen-serial-tags.py b/gnuradio-runtime/lib/pmt/gen-serial-tags.py
index 18e927beb5..2ff2240a47 100644
--- a/gnuradio-runtime/lib/pmt/gen-serial-tags.py
+++ b/gnuradio-runtime/lib/pmt/gen-serial-tags.py
@@ -32,11 +32,14 @@ enum pst_tags {
 #endif /* INCLUDED_PMT_SERIAL_TAGS_H */
 """
 
+from __future__ import print_function
+from __future__ import unicode_literals
+
 import sys, os, re
 
 if __name__ == '__main__':
     if len(sys.argv) != 3:
-        print "Usage %s <input_scm_file> <output_hdr_file>"%__file__
+        print("Usage %s <input_scm_file> <output_hdr_file>"%__file__)
         exit()
     input_scm_file, output_hdr_file = sys.argv[1:]
     enums = list()
diff --git a/gnuradio-runtime/lib/pmt/generate_unv.py b/gnuradio-runtime/lib/pmt/generate_unv.py
old mode 100755
new mode 100644
index 6218099fc1..45c57a3fb8
--- a/gnuradio-runtime/lib/pmt/generate_unv.py
+++ b/gnuradio-runtime/lib/pmt/generate_unv.py
@@ -23,6 +23,7 @@
 """
 Generate code for uniform numeric vectors
 """
+from __future__ import unicode_literals
 
 import re, os, os.path
 
@@ -93,7 +94,7 @@ using namespace pmt;
 # set srcdir to the directory that contains Makefile.am
 try:
     srcdir = os.environ['srcdir']
-except KeyError, e:
+except KeyError as e:
     srcdir = "."
 srcdir = srcdir + '/'
 
diff --git a/gnuradio-runtime/lib/sptr_magic.cc b/gnuradio-runtime/lib/sptr_magic.cc
index e5e83722fc..bffef04756 100644
--- a/gnuradio-runtime/lib/sptr_magic.cc
+++ b/gnuradio-runtime/lib/sptr_magic.cc
@@ -102,4 +102,4 @@ namespace gnuradio {
     s_map.erase(pos);
     return sptr;
   }
-};
+}
diff --git a/gnuradio-runtime/python/build_utils.py b/gnuradio-runtime/python/build_utils.py
index cf58a97637..82a2265cc2 100644
--- a/gnuradio-runtime/python/build_utils.py
+++ b/gnuradio-runtime/python/build_utils.py
@@ -21,6 +21,7 @@
 
 """Misc utilities used at build time
 """
+from __future__ import unicode_literals
 
 import re, os, os.path
 from build_utils_codes import *
@@ -29,7 +30,7 @@ from build_utils_codes import *
 # set srcdir to the directory that contains Makefile.am
 try:
     srcdir = os.environ['srcdir']
-except KeyError, e:
+except KeyError as e:
     srcdir = "."
 srcdir = srcdir + '/'
 
@@ -39,7 +40,7 @@ try:
         do_makefile = False
     else:
         do_makefile = True
-except KeyError, e:
+except KeyError as e:
     do_makefile = False
 
 # set do_sources to either true or false dependeing on the environment
@@ -48,7 +49,7 @@ try:
         do_sources = False
     else:
         do_sources = True
-except KeyError, e:
+except KeyError as e:
     do_sources = True
 
 name_dict = {}
@@ -127,7 +128,7 @@ def extract_extension (template_name):
     # we return everything between the penultimate . and .t
     mo = re.search (r'\.([a-z]+)\.t$', template_name)
     if not mo:
-        raise ValueError, "Incorrectly formed template_name '%s'" % (template_name,)
+        raise ValueError("Incorrectly formed template_name '%s'" % (template_name,))
     return mo.group (1)
 
 def open_src (name, mode):
diff --git a/gnuradio-runtime/python/build_utils_codes.py b/gnuradio-runtime/python/build_utils_codes.py
index 9ea96baae4..22a6bdb99b 100644
--- a/gnuradio-runtime/python/build_utils_codes.py
+++ b/gnuradio-runtime/python/build_utils_codes.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
 #
 # Copyright 2004 Free Software Foundation, Inc.
 #
diff --git a/gnuradio-runtime/python/gnuradio/__init__.py b/gnuradio-runtime/python/gnuradio/__init__.py
index 062450cb5f..c1735c3d8b 100644
--- a/gnuradio-runtime/python/gnuradio/__init__.py
+++ b/gnuradio-runtime/python/gnuradio/__init__.py
@@ -7,6 +7,7 @@ While not primarily a simulation tool, GNU Radio does support development of sig
 
 GNU Radio is licensed under the GNU General Public License (GPL) version 3. All of the code is copyright of the Free Software Foundation.
 """
+from __future__ import unicode_literals
 
 # This file makes gnuradio a package
 # The docstring will be associated with the top level of the package.
diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/GNURadioControlPortClient.py b/gnuradio-runtime/python/gnuradio/ctrlport/GNURadioControlPortClient.py
index 87d2cf5658..beec500023 100644
--- a/gnuradio-runtime/python/gnuradio/ctrlport/GNURadioControlPortClient.py
+++ b/gnuradio-runtime/python/gnuradio/ctrlport/GNURadioControlPortClient.py
@@ -27,6 +27,8 @@ Remote Procedure Call (RPC) transports, the Apache Thrift middle-ware RPC
 is currently the only supported transport.
 
 """
+from __future__ import print_function
+from __future__ import unicode_literals
 
 import exceptions
 
@@ -38,7 +40,7 @@ Two constructors are provided for creating a connection to ControlPort.
 
 """
 
-class GNURadioControlPortClient():
+class GNURadioControlPortClient(object):
     """
     Constructor for creating a ControlPort connection to a specified host / port
 
@@ -113,7 +115,7 @@ class GNURadioControlPortClient():
         self.client = None
 
         from gnuradio.ctrlport.RPCConnection import RPCMethods
-        if RPCMethods.has_key(rpcmethod):
+        if rpcmethod in RPCMethods:
             from gnuradio.ctrlport.RPCConnectionThrift import RPCConnectionThrift
             if rpcmethod == 'thrift':
                 #print("making RPCConnectionThrift")
@@ -128,5 +130,5 @@ class GNURadioControlPortClient():
                 if not blockingcallback is None:
                     blockingcallback()
         else:
-            print("Unsupported RPC method: ", rpcmethod)
+            print(("Unsupported RPC method: ", rpcmethod))
             raise exceptions.ValueError()
diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/GrDataPlotter.py b/gnuradio-runtime/python/gnuradio/ctrlport/GrDataPlotter.py
index c5bfd0a8cb..56604d4fac 100644
--- a/gnuradio-runtime/python/gnuradio/ctrlport/GrDataPlotter.py
+++ b/gnuradio-runtime/python/gnuradio/ctrlport/GrDataPlotter.py
@@ -20,6 +20,9 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import unicode_literals
+
 from gnuradio import gr
 from gnuradio import blocks
 from gnuradio import filter
@@ -31,7 +34,7 @@ try:
     from PyQt4 import QtGui, QtCore
     import sip
 except ImportError:
-    print "Error: Program requires PyQt4 and gr-qtgui."
+    print("Error: Program requires PyQt4 and gr-qtgui.")
     sys.exit(1)
 
 class GrDataPlotParent(gr.top_block, QtGui.QWidget):
@@ -62,7 +65,7 @@ class GrDataPlotParent(gr.top_block, QtGui.QWidget):
             self.layout.removeWidget(self.py_window)
             self.disconnect(self.thr, (self.snk, 0))
             self.disconnect(self.src[0], self.thr)
-            for n in xrange(1, self._ncons):
+            for n in range(1, self._ncons):
                 self.disconnect(self.src[n], (self.snk,n))
 
         self._ncons = nconnections
@@ -75,7 +78,7 @@ class GrDataPlotParent(gr.top_block, QtGui.QWidget):
 
         self._last_data = []
         self.src = []
-        for n in xrange(self._ncons):
+        for n in range(self._ncons):
             self.set_line_label(n, self.knobnames[n])
 
             self._last_data.append(int(self._npts)*[0,])
@@ -142,7 +145,7 @@ class GrDataPlotParent(gr.top_block, QtGui.QWidget):
         if(self._npts != npts):
 
             # Adjust buffers to accomodate new settings
-            for n in xrange(self._ncons):
+            for n in range(self._ncons):
                 if(npts < self._npts):
                     if(self._data_len[n] < npts):
                         self._last_data[n] = self._last_data[n][0:npts]
@@ -156,7 +159,7 @@ class GrDataPlotParent(gr.top_block, QtGui.QWidget):
 
         if(self._stripchart):
             # Update the plot data depending on type
-            for n in xrange(self._ncons):
+            for n in range(self._ncons):
                 if(type(data[n]) == list):
                     data[n] = self.data_to_complex(data[n])
                     if(len(data[n]) > self._npts):
@@ -179,7 +182,7 @@ class GrDataPlotParent(gr.top_block, QtGui.QWidget):
                         self._last_data[n].append(data[n])
                     self.src[n].set_data(self._last_data[n])
         else:
-            for n in xrange(self._ncons):
+            for n in range(self._ncons):
                 if(type(data[n]) != list):
                     data[n] = [data[n],]
                 data[n] = self.data_to_complex(data[n])
@@ -407,11 +410,11 @@ class GrTimeRasterB(GrDataPlotParent):
         self.snk.set_line_label(n, self.knobnames[n])
 
 
-class GrDataPlotterValueTable:
+class GrDataPlotterValueTable(object):
     def __init__(self, uid, parent, x, y, xsize, ysize,
                  headers=['Statistic Key ( Source Block :: Stat Name )  ',
                           'Curent Value', 'Units', 'Description']):
-	# must encapsulate, cuz Qt's bases are not classes
+        # must encapsulate, cuz Qt's bases are not classes
         self.uid = uid
         self.treeWidget = QtGui.QTreeWidget(parent)
         self.treeWidget.setColumnCount(len(headers))
@@ -434,7 +437,7 @@ class GrDataPlotterValueTable:
 
             # itemKey is the text in the first column of a QTreeWidgetItem
             itemKey = str(item.text(0))
-            if itemKey in knobs.keys():
+            if itemKey in list(knobs.keys()):
 
                 # This key was found in the tree, update its values.
                 foundKeys.append(itemKey)
@@ -465,7 +468,7 @@ class GrDataPlotterValueTable:
                 deleteKeys.append(itemKey)
 
         # Add items to tree that are not currently in the tree.
-        for k in knobs.keys():
+        for k in list(knobs.keys()):
             if k not in foundKeys:
                 v = knobs[k].value
                 if(type(v) == ControlPort.complex):
diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/RPCConnection.py b/gnuradio-runtime/python/gnuradio/ctrlport/RPCConnection.py
index 1b129534c9..b85c827f72 100644
--- a/gnuradio-runtime/python/gnuradio/ctrlport/RPCConnection.py
+++ b/gnuradio-runtime/python/gnuradio/ctrlport/RPCConnection.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
 #
 # Copyright 2015 Free Software Foundation, Inc.
 #
diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/RPCConnectionThrift.py b/gnuradio-runtime/python/gnuradio/ctrlport/RPCConnectionThrift.py
index 522c74117b..466fc9fc04 100644
--- a/gnuradio-runtime/python/gnuradio/ctrlport/RPCConnectionThrift.py
+++ b/gnuradio-runtime/python/gnuradio/ctrlport/RPCConnectionThrift.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import unicode_literals
 from thrift import Thrift
 from thrift.transport import TSocket
 from thrift.transport import TTransport
@@ -30,7 +31,7 @@ from gnuradio import gr
 import pmt
 import sys
 
-class ThriftRadioClient:
+class ThriftRadioClient(object):
     def __init__(self, host, port):
         self.tsocket = TSocket.TSocket(host, port)
         self.transport = TTransport.TBufferedTransport(self.tsocket)
@@ -55,7 +56,7 @@ Args:
 """
 
 class RPCConnectionThrift(RPCConnection.RPCConnection):
-    class Knob():
+    class Knob(object):
         def __init__(self, key, value=None, ktype=0):
             (self.key, self.value, self.ktype) = (key, value, ktype)
 
@@ -144,7 +145,7 @@ class RPCConnectionThrift(RPCConnection.RPCConnection):
 
     def properties(self, *args):
         knobprops = self.thriftclient.radio.properties(*args)
-        for key, knobprop in knobprops.iteritems():
+        for key, knobprop in list(knobprops.items()):
             #print("key:", key, "value:", knobprop, "type:", knobprop.type)
             knobprops[key].min = self.unpackKnob(key, knobprop.min)
             knobprops[key].max = self.unpackKnob(key, knobprop.max)
@@ -153,28 +154,28 @@ class RPCConnectionThrift(RPCConnection.RPCConnection):
 
     def getKnobs(self, *args):
         result = {}
-        for key, knob in self.thriftclient.radio.getKnobs(*args).iteritems():
+        for key, knob in list(self.thriftclient.radio.getKnobs(*args).items()):
             #print("key:", key, "value:", knob, "type:", knob.type)
             result[key] = self.unpackKnob(key, knob)
 
             # If complex, convert to Python complex
             # FIXME: better list iterator way to handle this?
             if(knob.type == self.BaseTypes.C32VECTOR):
-                for i in xrange(len(result[key].value)):
+                for i in range(len(result[key].value)):
                     result[key].value[i] = complex(result[key].value[i].re,
                                                    result[key].value[i].im)
         return result
 
     def getKnobsRaw(self, *args):
         result = {}
-        for key, knob in self.thriftclient.radio.getKnobs(*args).iteritems():
+        for key, knob in list(self.thriftclient.radio.getKnobs(*args).items()):
             #print("key:", key, "value:", knob, "type:", knob.type)
             result[key] = knob
         return result
 
     def getRe(self,*args):
         result = {}
-        for key, knob in self.thriftclient.radio.getRe(*args).iteritems():
+        for key, knob in list(self.thriftclient.radio.getRe(*args).items()):
             result[key] = self.unpackKnob(key, knob)
         return result
 
@@ -182,7 +183,7 @@ class RPCConnectionThrift(RPCConnection.RPCConnection):
         if(type(*args) == dict):
             a = dict(*args)
             result = {}
-            for key, knob in a.iteritems():
+            for key, knob in list(a.items()):
                 result[key] = self.packKnob(knob)
             self.thriftclient.radio.setKnobs(result)
         elif(type(*args) == list or type(*args) == tuple):
diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/__init__.py b/gnuradio-runtime/python/gnuradio/ctrlport/__init__.py
index 8f33d65bbc..363d42a68e 100644
--- a/gnuradio-runtime/python/gnuradio/ctrlport/__init__.py
+++ b/gnuradio-runtime/python/gnuradio/ctrlport/__init__.py
@@ -1,3 +1,5 @@
+from __future__ import absolute_import
+from __future__ import unicode_literals
 #
 # Copyright 2012 Free Software Foundation, Inc.
 #
@@ -22,7 +24,7 @@
 
 # import swig generated symbols into the ctrlport namespace
 #from ctrlport_swig import *
-from monitor import *
+from .monitor import *
 
 # import any pure python here
 #import GNURadio
diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx b/gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx
index 15a2153a0f..302275feb1 100644
--- a/gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx
+++ b/gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+
 import sys, time, re, pprint
 import random,math,operator
 try:
@@ -36,14 +38,14 @@ try:
         try:
             from matplotlib.backends.backend_qt4agg import NavigationToolbar2QT as NavigationToolbar
         except ImportError:
-            print sys.argv[0], "could not load QTAgg backend."
+            print(sys.argv[0], "could not load QTAgg backend.")
             sys.exit(1)
 
 
     from matplotlib.figure import Figure
 except ImportError:
-    print sys.argv[0], "requires networkx and matplotlib.", \
-       "Please check that they are installed and try again."
+    print(sys.argv[0], "requires networkx and matplotlib.",
+       "Please check that they are installed and try again.")
     sys.exit(1)
 
 from PyQt4 import QtCore,Qt
@@ -282,7 +284,7 @@ class ConInfoDialog(QtGui.QDialog):
 
 class DataTable(QtGui.QWidget):
     def update(self):
-        print "update"
+        print("update")
 
     def closeEvent(self, event):
         self.timer = None
@@ -498,7 +500,7 @@ class MForm(QtGui.QWidget):
                 self.clockSel.setCurrentIndex(self.clockSelIdx)
                 self.prevent_clock_change = False
             except:
-                print "WARNING: Failed to get current clock setting!"
+                print("WARNING: Failed to get current clock setting!")
 
             nodes_stream = self.G_stream.nodes()
             nodes_msg = self.G_msg.nodes()
@@ -571,7 +573,7 @@ class MForm(QtGui.QWidget):
             self.parent.statusBar().showMessage("Current GNU Radio Control Port Query Latency: %f ms"%\
                                                     (latency*1000))
 
-        except Exception, e:
+        except Exception as e:
             sys.stderr.write("gr-perf-monitorx: radio.getKnobs threw exception ({0}).\n".format(e))
             if(type(self.parent) is MAINWindow):
                 # Find window of connection
@@ -625,7 +627,7 @@ class MForm(QtGui.QWidget):
             return;
         idx = self.clockSel.currentIndex();
         clk = self.clocks.values()[idx]
-#        print "UPDATE CLOCK!!! %d -> %d"%(idx,clk);
+#        print("UPDATE CLOCK!!! %d -> %d"%(idx,clk);)
         k = self.radioclient.getKnobs([self.clockKey]);
         k[self.clockKey].value = clk;
         km = {};
diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/monitor.py b/gnuradio-runtime/python/gnuradio/ctrlport/monitor.py
index f651be2449..49b66e9830 100644
--- a/gnuradio-runtime/python/gnuradio/ctrlport/monitor.py
+++ b/gnuradio-runtime/python/gnuradio/ctrlport/monitor.py
@@ -20,12 +20,15 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import unicode_literals
+
 import sys, subprocess, re, signal, time, atexit, os
 from gnuradio import gr
 
-class monitor:
+class monitor(object):
     def __init__(self,tool="gr-ctrlport-monitor"):
-        print "ControlPort Monitor running."
+        print("ControlPort Monitor running.")
         self.started = False
         self.tool = tool
         atexit.register(self.shutdown)
@@ -38,35 +41,35 @@ class monitor:
                 gr.prefs().singleton().set_bool("PerfCounters","on",True);
                 gr.prefs().singleton().set_bool("PerfCounters","export",True);
         except:
-            print "no support for gr.prefs setting"
+            print("no support for gr.prefs setting")
 
     def __del__(self):
         if(self.started):
             self.stop()
 
     def start(self):
-        print "monitor::endpoints() = %s" % (gr.rpcmanager_get().endpoints())
+        print("monitor::endpoints() = %s" % (gr.rpcmanager_get().endpoints()))
         try:
             cmd = map(lambda a: [self.tool,
                                  re.search("-h (\S+|\d+\.\d+\.\d+\.\d+)",a).group(1),
                                  re.search("-p (\d+)",a).group(1)],
                       gr.rpcmanager_get().endpoints())[0]
-            print "running: %s"%(str(cmd))
+            print("running: %s"%(str(cmd)))
             self.proc = subprocess.Popen(cmd);
             self.started = True
         except:
             self.proc = None
-            print "failed to to start ControlPort Monitor on specified port"
+            print("failed to to start ControlPort Monitor on specified port")
 
     def stop(self):
         if(self.proc):
             if(self.proc.returncode == None):
-                print "\tcalling stop on shutdown"
+                print("\tcalling stop on shutdown")
                 self.proc.terminate()
         else:
-            print "\tno proc to shut down, exiting"
+            print("\tno proc to shut down, exiting")
 
     def shutdown(self):
-        print "ctrlport.monitor received shutdown signal"
+        print("ctrlport.monitor received shutdown signal")
         if(self.started):
             self.stop()
diff --git a/gnuradio-runtime/python/gnuradio/eng_arg.py b/gnuradio-runtime/python/gnuradio/eng_arg.py
index 05cd8a1f2a..5983352443 100644
--- a/gnuradio-runtime/python/gnuradio/eng_arg.py
+++ b/gnuradio-runtime/python/gnuradio/eng_arg.py
@@ -22,6 +22,7 @@
 '''
 Add support for engineering notation to argparse.ArgumentParser
 '''
+from __future__ import unicode_literals
 
 import argparse
 from gnuradio import eng_notation
diff --git a/gnuradio-runtime/python/gnuradio/eng_notation.py b/gnuradio-runtime/python/gnuradio/eng_notation.py
index d23f9005f0..5a3a216ee4 100644
--- a/gnuradio-runtime/python/gnuradio/eng_notation.py
+++ b/gnuradio-runtime/python/gnuradio/eng_notation.py
@@ -21,6 +21,7 @@
 """
 Display numbers as strings using engineering notation.
 """
+from __future__ import unicode_literals
 
 scale_factor = {}
 scale_factor['E'] = 1e18
@@ -66,7 +67,7 @@ def str_to_num (value):
     try:
         scale = 1.0
         suffix = value[-1]
-        if scale_factor.has_key (suffix):
+        if suffix in scale_factor:
             return float (value[0:-1]) * scale_factor[suffix]
         return float (value)
     except:
diff --git a/gnuradio-runtime/python/gnuradio/eng_option.py b/gnuradio-runtime/python/gnuradio/eng_option.py
index ae000fe442..565780be28 100644
--- a/gnuradio-runtime/python/gnuradio/eng_option.py
+++ b/gnuradio-runtime/python/gnuradio/eng_option.py
@@ -20,10 +20,12 @@
 #
 
 '''Add support for engineering notation to optparse.OptionParser'''
+from __future__ import absolute_import
+from __future__ import unicode_literals
 
 from copy import copy
 from optparse import Option, OptionValueError
-import eng_notation
+from . import eng_notation
 
 def check_eng_float (option, opt, value):
     try:
diff --git a/gnuradio-runtime/python/gnuradio/gr/CMakeLists.txt b/gnuradio-runtime/python/gnuradio/gr/CMakeLists.txt
index fc966b8ece..7c82b1df35 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
+    exceptions.py
     tag_utils.py
     packet_utils.py
     gateway.py
@@ -48,6 +49,6 @@ if(ENABLE_TESTING)
   file(GLOB py_qa_test_files "qa_*.py")
   foreach(py_qa_test_file ${py_qa_test_files})
     get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE)
-    GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${py_qa_test_file})
+    GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} -B ${py_qa_test_file})
   endforeach(py_qa_test_file)
 endif(ENABLE_TESTING)
diff --git a/gnuradio-runtime/python/gnuradio/gr/__init__.py b/gnuradio-runtime/python/gnuradio/gr/__init__.py
index 9717390e3e..72f54e9f42 100644
--- a/gnuradio-runtime/python/gnuradio/gr/__init__.py
+++ b/gnuradio-runtime/python/gnuradio/gr/__init__.py
@@ -24,6 +24,8 @@
 """
 Core contents.
 """
+from __future__ import absolute_import
+from __future__ import unicode_literals
 
 # This is the main GNU Radio python module.
 # We pull the swig output and the other modules into the gnuradio.gr namespace
@@ -31,20 +33,20 @@ Core contents.
 # If gnuradio is installed then the swig output will be in this directory.
 # Otherwise it will reside in ../../../swig.
 
-import os
+import os, sys
 
 try:
-    from runtime_swig import *
+    from .runtime_swig import *
 except ImportError:
     dirname, filename = os.path.split(os.path.abspath(__file__))
     __path__.append(os.path.join(dirname, "..", "..", "..", "swig"))
-    from runtime_swig import *
+    from .runtime_swig import *
 
-from exceptions import *
-from top_block import *
-from hier_block2 import *
-from tag_utils import *
-from gateway import basic_block, sync_block, decim_block, interp_block
+from .exceptions import *
+from .top_block import *
+from .hier_block2 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
diff --git a/gnuradio-runtime/python/gnuradio/gr/exceptions.py b/gnuradio-runtime/python/gnuradio/gr/exceptions.py
index dba04750bc..1b7fd025b7 100644
--- a/gnuradio-runtime/python/gnuradio/gr/exceptions.py
+++ b/gnuradio-runtime/python/gnuradio/gr/exceptions.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
 #
 # Copyright 2004 Free Software Foundation, Inc.
 #
diff --git a/gnuradio-runtime/python/gnuradio/gr/gateway.py b/gnuradio-runtime/python/gnuradio/gr/gateway.py
index 2e46bca430..2bc1b21591 100644
--- a/gnuradio-runtime/python/gnuradio/gr/gateway.py
+++ b/gnuradio-runtime/python/gnuradio/gr/gateway.py
@@ -19,18 +19,23 @@
 # Boston, MA 02110-1301, USA.
 #
 
-import runtime_swig as gr
-from runtime_swig import io_signature, io_signaturev
-from runtime_swig import block_gw_message_type
-from runtime_swig import block_gateway
+from __future__ import print_function
+from __future__ import unicode_literals
+
+
 import numpy
 
+from . import runtime_swig as gr
+from .runtime_swig import io_signature, io_signaturev
+from .runtime_swig import block_gw_message_type
+from .runtime_swig import block_gateway
+
 ########################################################################
 # Magic to turn pointers into numpy arrays
 # http://docs.scipy.org/doc/numpy/reference/arrays.interface.html
 ########################################################################
 def pointer_to_ndarray(addr, dtype, nitems):
-    class array_like:
+    class array_like(object):
         __array_interface__ = {
             'data' : (int(addr), False),
             'typestr' : dtype.base.str,
@@ -87,13 +92,13 @@ class gateway_block(object):
         #ensure that the sigs are iterable dtypes
         def sig_to_dtype_sig(sig):
             if sig is None: sig = ()
-            return map(numpy.dtype, sig)
+            return list(map(numpy.dtype, sig))
         self.__in_sig = sig_to_dtype_sig(in_sig)
         self.__out_sig = sig_to_dtype_sig(out_sig)
 
         #cache the ranges to iterate when dispatching work
-        self.__in_indexes = range(len(self.__in_sig))
-        self.__out_indexes = range(len(self.__out_sig))
+        self.__in_indexes = list(range(len(self.__in_sig)))
+        self.__out_indexes = list(range(len(self.__out_sig)))
 
         #convert the signatures into gr.io_signatures
         def sig_to_gr_io_sigv(sig):
diff --git a/gnuradio-runtime/python/gnuradio/gr/gr_threading.py b/gnuradio-runtime/python/gnuradio/gr/gr_threading.py
index 5d6f0fdaf9..cb0519f6f6 100644
--- a/gnuradio-runtime/python/gnuradio/gr/gr_threading.py
+++ b/gnuradio-runtime/python/gnuradio/gr/gr_threading.py
@@ -1,3 +1,5 @@
+from __future__ import absolute_import
+from __future__ import unicode_literals
 #
 # Copyright 2005 Free Software Foundation, Inc.
 #
@@ -25,10 +27,10 @@ from sys import version_info as _version_info
 
 if _version_info[0:2] == (2, 3):
     #print "Importing gr_threading_23"
-    from gr_threading_23 import *
+    from .gr_threading_23 import *
 elif _version_info[0:2] == (2, 4):
     #print "Importing gr_threading_24"
-    from gr_threading_24 import *
+    from .gr_threading_24 import *
 else:
     # assume the patch was applied...
     #print "Importing system provided threading"
diff --git a/gnuradio-runtime/python/gnuradio/gr/gr_threading_23.py b/gnuradio-runtime/python/gnuradio/gr/gr_threading_23.py
index dee8034c1c..ff33224d58 100644
--- a/gnuradio-runtime/python/gnuradio/gr/gr_threading_23.py
+++ b/gnuradio-runtime/python/gnuradio/gr/gr_threading_23.py
@@ -4,15 +4,18 @@
 # It's been patched to fix a problem with join, where a KeyboardInterrupt
 # caused a lock to be left in the acquired state.
 
+from __future__ import print_function
+from __future__ import unicode_literals
+
 import sys as _sys
 
 try:
-    import thread
+    import _thread
 except ImportError:
     del _sys.modules[__name__]
     raise
 
-from StringIO import StringIO as _StringIO
+from io import StringIO as _StringIO
 from time import time as _time, sleep as _sleep
 from traceback import print_exc as _print_exc
 
@@ -21,11 +24,11 @@ __all__ = ['activeCount', 'Condition', 'currentThread', 'enumerate', 'Event',
            'Lock', 'RLock', 'Semaphore', 'BoundedSemaphore', 'Thread',
            'Timer', 'setprofile', 'settrace']
 
-_start_new_thread = thread.start_new_thread
-_allocate_lock = thread.allocate_lock
-_get_ident = thread.get_ident
-ThreadError = thread.error
-del thread
+_start_new_thread = _thread.start_new_thread
+_allocate_lock = _thread.allocate_lock
+_get_ident = _thread.get_ident
+ThreadError = _thread.error
+del _thread
 
 
 # Debug support (adapted from ihooks.py).
@@ -127,8 +130,9 @@ class _RLock(_Verbose):
 
     # Internal methods used by condition variables
 
-    def _acquire_restore(self, (count, owner)):
+    def _acquire_restore(self, lock):
         self.__block.acquire()
+        count, owner = lock
         self.__count = count
         self.__owner = owner
         if __debug__:
@@ -313,7 +317,7 @@ class _BoundedSemaphore(_Semaphore):
 
     def release(self):
         if self._Semaphore__value >= self._initial_value:
-            raise ValueError, "Semaphore released too many times"
+            raise ValueError("Semaphore released too many times")
         return _Semaphore.release(self)
 
 
@@ -627,7 +631,7 @@ def activeCount():
 
 def enumerate():
     _active_limbo_lock.acquire()
-    active = _active.values() + _limbo.values()
+    active = list(_active.values()) + list(_limbo.values())
     _active_limbo_lock.release()
     return active
 
@@ -698,7 +702,7 @@ def _test():
         def run(self):
             while self.count > 0:
                 item = self.queue.get()
-                print item
+                print(item)
                 self.count = self.count - 1
 
     NP = 3
diff --git a/gnuradio-runtime/python/gnuradio/gr/gr_threading_24.py b/gnuradio-runtime/python/gnuradio/gr/gr_threading_24.py
index 8539bfc047..efb20dca59 100644
--- a/gnuradio-runtime/python/gnuradio/gr/gr_threading_24.py
+++ b/gnuradio-runtime/python/gnuradio/gr/gr_threading_24.py
@@ -4,10 +4,13 @@
 # It's been patched to fix a problem with join, where a KeyboardInterrupt
 # caused a lock to be left in the acquired state.
 
+from __future__ import print_function
+from __future__ import unicode_literals
+
 import sys as _sys
 
 try:
-    import thread
+    import _thread
 except ImportError:
     del _sys.modules[__name__]
     raise
@@ -21,11 +24,11 @@ __all__ = ['activeCount', 'Condition', 'currentThread', 'enumerate', 'Event',
            'Lock', 'RLock', 'Semaphore', 'BoundedSemaphore', 'Thread',
            'Timer', 'setprofile', 'settrace', 'local']
 
-_start_new_thread = thread.start_new_thread
-_allocate_lock = thread.allocate_lock
-_get_ident = thread.get_ident
-ThreadError = thread.error
-del thread
+_start_new_thread = _thread.start_new_thread
+_allocate_lock = _thread.allocate_lock
+_get_ident = _thread.get_ident
+ThreadError = _thread.error
+del _thread
 
 
 # Debug support (adapted from ihooks.py).
@@ -127,8 +130,9 @@ class _RLock(_Verbose):
 
     # Internal methods used by condition variables
 
-    def _acquire_restore(self, (count, owner)):
+    def _acquire_restore(self, lock):
         self.__block.acquire()
+        count, owner = lock
         self.__count = count
         self.__owner = owner
         if __debug__:
@@ -311,7 +315,7 @@ class _BoundedSemaphore(_Semaphore):
 
     def release(self):
         if self._Semaphore__value >= self._initial_value:
-            raise ValueError, "Semaphore released too many times"
+            raise ValueError("Semaphore released too many times")
         return _Semaphore.release(self)
 
 
@@ -688,7 +692,7 @@ def activeCount():
 
 def enumerate():
     _active_limbo_lock.acquire()
-    active = _active.values() + _limbo.values()
+    active = list(_active.values()) + list(_limbo.values())
     _active_limbo_lock.release()
     return active
 
@@ -700,7 +704,7 @@ _MainThread()
 # module, or from the python fallback
 
 try:
-    from thread import _local as local
+    from _thread import _local as local
 except ImportError:
     from _threading_local import local
 
@@ -767,7 +771,7 @@ def _test():
         def run(self):
             while self.count > 0:
                 item = self.queue.get()
-                print item
+                print(item)
                 self.count = self.count - 1
 
     NP = 3
diff --git a/gnuradio-runtime/python/gnuradio/gr/hier_block2.py b/gnuradio-runtime/python/gnuradio/gr/hier_block2.py
index 3f4c6aa9c7..8d0533c71c 100644
--- a/gnuradio-runtime/python/gnuradio/gr/hier_block2.py
+++ b/gnuradio-runtime/python/gnuradio/gr/hier_block2.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
 #
 # Copyright 2006,2007,2014 Free Software Foundation, Inc.
 #
@@ -21,7 +22,7 @@
 
 import functools
 
-from runtime_swig import hier_block2_swig, dot_graph
+from .runtime_swig import hier_block2_swig, dot_graph
 import pmt
 
 
diff --git a/gnuradio-runtime/python/gnuradio/gr/packet_utils.py b/gnuradio-runtime/python/gnuradio/gr/packet_utils.py
index 720cfd962f..770a5c0b36 100644
--- a/gnuradio-runtime/python/gnuradio/gr/packet_utils.py
+++ b/gnuradio-runtime/python/gnuradio/gr/packet_utils.py
@@ -20,6 +20,9 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio import gr
 import pmt
 
@@ -28,9 +31,9 @@ def make_lengthtags(lengths, offsets, tagname='length', vlen=1):
     assert(len(offsets) == len(lengths))
     for offset, length in zip(offsets, lengths):
         tag = gr.tag_t()
-        tag.offset = offset/vlen
+        tag.offset = offset // vlen
         tag.key = pmt.string_to_symbol(tagname)
-        tag.value = pmt.from_long(length/vlen)
+        tag.value = pmt.from_long(length // vlen)
         tags.append(tag)
     return tags
 
@@ -73,7 +76,7 @@ def count_bursts(data, tags, tsb_tag_key, vlen=1):
         if pos in lengths:
             if in_packet:
                 print("Got tag at pos {0} current packet_pos is {1}".format(pos, packet_pos))
-                raise StandardError("Received packet tag while in packet.")
+                raise Exception("Received packet tag while in packet.")
             packet_pos = -1
             packet_length = lengths[pos]
             in_packet = True
@@ -128,9 +131,9 @@ def packets_to_vectors(packets, tsb_tag_key, vlen=1):
     for packet in packets:
         data.extend(packet)
         tag = gr.tag_t()
-        tag.offset = offset/vlen
+        tag.offset = offset // vlen
         tag.key = pmt.string_to_symbol(tsb_tag_key)
-        tag.value = pmt.from_long(len(packet)/vlen)
+        tag.value = pmt.from_long(len(packet) // vlen)
         tags.append(tag)
         offset = offset + len(packet)
     return data, tags
diff --git a/gnuradio-runtime/python/gnuradio/gr/pubsub.py b/gnuradio-runtime/python/gnuradio/gr/pubsub.py
index 90568418fc..25108b8f70 100644
--- a/gnuradio-runtime/python/gnuradio/gr/pubsub.py
+++ b/gnuradio-runtime/python/gnuradio/gr/pubsub.py
@@ -26,43 +26,46 @@ Abstract GNU Radio publisher/subscriber interface
 This is a proof of concept implementation, will likely change significantly.
 """
 
+from __future__ import print_function
+from __future__ import unicode_literals
+
 class pubsub(dict):
     def __init__(self):
-	self._publishers = { }
-	self._subscribers = { }
-	self._proxies = { }
+        self._publishers = { }
+        self._subscribers = { }
+        self._proxies = { }
 
     def __missing__(self, key, value=None):
-	dict.__setitem__(self, key, value)
-	self._publishers[key] = None
-	self._subscribers[key] = []
-	self._proxies[key] = None
+        dict.__setitem__(self, key, value)
+        self._publishers[key] = None
+        self._subscribers[key] = []
+        self._proxies[key] = None
 
     def __setitem__(self, key, val):
-	if not self.has_key(key):
-	    self.__missing__(key, val)
-	elif self._proxies[key] is not None:
-	    (p, newkey) = self._proxies[key]
-	    p[newkey] = val
-	else:
-	    dict.__setitem__(self, key, val)
-	for sub in self._subscribers[key]:
-	    # Note this means subscribers will get called in the thread
-	    # context of the 'set' caller.
-	    sub(val)
+        if key not in self:
+            self.__missing__(key, val)
+        elif self._proxies[key] is not None:
+            (p, newkey) = self._proxies[key]
+            p[newkey] = val
+        else:
+            dict.__setitem__(self, key, val)
+        for sub in self._subscribers[key]:
+            # Note this means subscribers will get called in the thread
+            # context of the 'set' caller.
+            sub(val)
 
     def __getitem__(self, key):
-	if not self.has_key(key): self.__missing__(key)
-	if self._proxies[key] is not None:
-	    (p, newkey) = self._proxies[key]
-	    return p[newkey]
-	elif self._publishers[key] is not None:
-	    return self._publishers[key]()
-	else:
-	    return dict.__getitem__(self, key)
+        if key not in self: self.__missing__(key)
+        if self._proxies[key] is not None:
+            (p, newkey) = self._proxies[key]
+            return p[newkey]
+        elif self._publishers[key] is not None:
+            return self._publishers[key]()
+        else:
+            return dict.__getitem__(self, key)
 
     def publish(self, key, publisher):
-	if not self.has_key(key): self.__missing__(key)
+        if key not in self: self.__missing__(key)
         if self._proxies[key] is not None:
             (p, newkey) = self._proxies[key]
             p.publish(newkey, publisher)
@@ -70,7 +73,7 @@ class pubsub(dict):
             self._publishers[key] = publisher
 
     def subscribe(self, key, subscriber):
-	if not self.has_key(key): self.__missing__(key)
+        if key not in self: self.__missing__(key)
         if self._proxies[key] is not None:
             (p, newkey) = self._proxies[key]
             p.subscribe(newkey, subscriber)
@@ -92,9 +95,9 @@ class pubsub(dict):
             self._subscribers[key].remove(subscriber)
 
     def proxy(self, key, p, newkey=None):
-	if not self.has_key(key): self.__missing__(key)
-	if newkey is None: newkey = key
-	self._proxies[key] = (p, newkey)
+        if key not in self: self.__missing__(key)
+        if newkey is None: newkey = key
+        self._proxies[key] = (p, newkey)
 
     def unproxy(self, key):
         self._proxies[key] = None
@@ -105,49 +108,49 @@ if __name__ == "__main__":
     o = pubsub()
 
     # Non-existent key gets auto-created with None value
-    print "Auto-created key 'foo' value:", o['foo']
+    print("Auto-created key 'foo' value:", o['foo'])
 
     # Add some subscribers
     # First is a bare function
     def print_len(x):
-	print "len=%i" % (len(x), )
+        print("len=%i" % (len(x), ))
     o.subscribe('foo', print_len)
 
     # The second is a class member function
     class subber(object):
-	def __init__(self, param):
-	    self._param = param
-	def printer(self, x):
-	    print self._param, `x`
+        def __init__(self, param):
+            self._param = param
+        def printer(self, x):
+            print(self._param, repr(x))
     s = subber('param')
     o.subscribe('foo', s.printer)
 
     # The third is a lambda function
-    o.subscribe('foo', lambda x: sys.stdout.write('val='+`x`+'\n'))
+    o.subscribe('foo', lambda x: sys.stdout.write('val='+repr(x)+'\n'))
 
     # Update key 'foo', will notify subscribers
-    print "Updating 'foo' with three subscribers:"
+    print("Updating 'foo' with three subscribers:")
     o['foo'] = 'bar';
 
     # Remove first subscriber
     o.unsubscribe('foo', print_len)
 
     # Update now will only trigger second and third subscriber
-    print "Updating 'foo' after removing a subscriber:"
+    print("Updating 'foo' after removing a subscriber:")
     o['foo'] = 'bar2';
 
     # Publish a key as a function, in this case, a lambda function
     o.publish('baz', lambda : 42)
-    print "Published value of 'baz':", o['baz']
+    print("Published value of 'baz':", o['baz'])
 
     # Unpublish the key
     o.unpublish('baz')
 
     # This will return None, as there is no publisher
-    print "Value of 'baz' with no publisher:", o['baz']
+    print("Value of 'baz' with no publisher:", o['baz'])
 
     # Set 'baz' key, it gets cached
     o['baz'] = 'bazzz'
 
     # Now will return cached value, since no provider
-    print "Cached value of 'baz' after being set:", o['baz']
+    print("Cached value of 'baz' after being set:", o['baz'])
diff --git a/gnuradio-runtime/python/gnuradio/gr/qa_feval.py b/gnuradio-runtime/python/gnuradio/gr/qa_feval.py
old mode 100755
new mode 100644
index 9018e12f36..078e2bf789
--- a/gnuradio-runtime/python/gnuradio/gr/qa_feval.py
+++ b/gnuradio-runtime/python/gnuradio/gr/qa_feval.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest
 
 class my_add2_dd(gr.feval_dd):
diff --git a/gnuradio-runtime/python/gnuradio/gr/qa_flowgraph.py b/gnuradio-runtime/python/gnuradio/gr/qa_flowgraph.py
old mode 100755
new mode 100644
index fa4fd4910e..f5802c51bc
--- a/gnuradio-runtime/python/gnuradio/gr/qa_flowgraph.py
+++ b/gnuradio-runtime/python/gnuradio/gr/qa_flowgraph.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 import time
 import pmt
 from gnuradio import gr, gr_unittest, blocks
diff --git a/gnuradio-runtime/python/gnuradio/gr/qa_hier_block2.py b/gnuradio-runtime/python/gnuradio/gr/qa_hier_block2.py
index 005331c2ec..c8f3d1a5f9 100644
--- a/gnuradio-runtime/python/gnuradio/gr/qa_hier_block2.py
+++ b/gnuradio-runtime/python/gnuradio/gr/qa_hier_block2.py
@@ -19,9 +19,12 @@
 # Boston, MA 02110-1301, USA.
 #
 
-import pmt, time
+import time
+
 from gnuradio import gr_unittest, blocks, gr, analog
 from gnuradio.gr.hier_block2 import _multiple_endpoints, _optional_endpoints
+import pmt
+
 
 class test_hblk(gr.hier_block2):
     def __init__(self, io_sig=1*[gr.sizeof_gr_complex], ndebug=2):
@@ -126,7 +129,7 @@ class test_hier_block2(gr_unittest.TestCase):
         time.sleep(1)
         tb.stop()
         tb.wait()
-    
+
     def test_012(self):
         s, st, h, k = analog.sig_source_c(44100, analog.GR_COS_WAVE, 440, 1.0, 0.0), blocks.message_strobe(pmt.PMT_NIL, 100), blocks.head(gr.sizeof_gr_complex, 1000), test_hblk([gr.sizeof_gr_complex], 16)
         tb = gr.top_block()
@@ -139,4 +142,3 @@ class test_hier_block2(gr_unittest.TestCase):
 
 if __name__ == '__main__':
     gr_unittest.run(test_hier_block2, "test_hier_block2.xml")
-
diff --git a/gnuradio-runtime/python/gnuradio/gr/qa_kludged_imports.py b/gnuradio-runtime/python/gnuradio/gr/qa_kludged_imports.py
old mode 100755
new mode 100644
index f80188c9fc..e2e9047c9b
--- a/gnuradio-runtime/python/gnuradio/gr/qa_kludged_imports.py
+++ b/gnuradio-runtime/python/gnuradio/gr/qa_kludged_imports.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest
 
 class test_kludged_imports (gr_unittest.TestCase):
diff --git a/gnuradio-runtime/python/gnuradio/gr/qa_random.py b/gnuradio-runtime/python/gnuradio/gr/qa_random.py
index d3e5410454..6fbf5e478a 100644
--- a/gnuradio-runtime/python/gnuradio/gr/qa_random.py
+++ b/gnuradio-runtime/python/gnuradio/gr/qa_random.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest
 import numpy as np
 
diff --git a/gnuradio-runtime/python/gnuradio/gr/qa_tag_utils.py b/gnuradio-runtime/python/gnuradio/gr/qa_tag_utils.py
old mode 100755
new mode 100644
index 55b62a12ac..3d7b99d12c
--- a/gnuradio-runtime/python/gnuradio/gr/qa_tag_utils.py
+++ b/gnuradio-runtime/python/gnuradio/gr/qa_tag_utils.py
@@ -20,12 +20,12 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+
+
 from gnuradio import gr, gr_unittest
+import pmt
 
-try:
-    import pmt_swig as pmt
-except ImportError:
-    import pmt
 
 class test_tag_utils (gr_unittest.TestCase):
 
@@ -111,6 +111,6 @@ class test_tag_utils (gr_unittest.TestCase):
 
 
 if __name__ == '__main__':
-    print 'hi'
+    print('hi')
     gr_unittest.run(test_tag_utils, "test_tag_utils.xml")
 
diff --git a/gnuradio-runtime/python/gnuradio/gr/tag_utils.py b/gnuradio-runtime/python/gnuradio/gr/tag_utils.py
index a7745428c7..d054865c22 100644
--- a/gnuradio-runtime/python/gnuradio/gr/tag_utils.py
+++ b/gnuradio-runtime/python/gnuradio/gr/tag_utils.py
@@ -1,6 +1,7 @@
+from __future__ import unicode_literals
 import pmt
 
-import runtime_swig as gr
+from . import runtime_swig as gr
 
 class PythonTag(object):
     " Python container for tags "
@@ -51,54 +52,54 @@ def python_to_tag(tag_struct):
     good = False
     tag = gr.tag_t()
     if(type(tag_struct) == dict):
-        if(tag_struct.has_key('offset')):
-            if(isinstance(tag_struct['offset'], (int,long))):
+        if('offset' in tag_struct):
+            if(isinstance(tag_struct['offset'], int)):
                 tag.offset = tag_struct['offset']
                 good = True
 
-        if(tag_struct.has_key('key')):
-            if(isinstance(tag_struct['key'], pmt.pmt_swig.swig_int_ptr)):
+        if('key' in tag_struct):
+            if(isinstance(tag_struct['key'], pmt.swig_int_ptr)):
                 tag.key = tag_struct['key']
                 good = True
 
-        if(tag_struct.has_key('value')):
-            if(isinstance(tag_struct['value'], pmt.pmt_swig.swig_int_ptr)):
+        if('value' in tag_struct):
+            if(isinstance(tag_struct['value'], pmt.swig_int_ptr)):
                 tag.value = tag_struct['value']
                 good = True
 
-        if(tag_struct.has_key('srcid')):
-            if(isinstance(tag_struct['srcid'], pmt.pmt_swig.swig_int_ptr)):
+        if('srcid' in tag_struct):
+            if(isinstance(tag_struct['srcid'], pmt.swig_int_ptr)):
                 tag.srcid = tag_struct['srcid']
                 good = True
 
     elif(type(tag_struct) == list or type(tag_struct) == tuple):
         if(len(tag_struct) == 4):
-            if(isinstance(tag_struct[0], (int,long))):
+            if(isinstance(tag_struct[0], int)):
                 tag.offset = tag_struct[0]
                 good = True
 
-            if(isinstance(tag_struct[1], pmt.pmt_swig.swig_int_ptr)):
+            if(isinstance(tag_struct[1], pmt.swig_int_ptr)):
                 tag.key = tag_struct[1]
                 good = True
 
-            if(isinstance(tag_struct[2], pmt.pmt_swig.swig_int_ptr)):
+            if(isinstance(tag_struct[2], pmt.swig_int_ptr)):
                 tag.value = tag_struct[2]
                 good = True
 
-            if(isinstance(tag_struct[3], pmt.pmt_swig.swig_int_ptr)):
+            if(isinstance(tag_struct[3], pmt.swig_int_ptr)):
                 tag.srcid = tag_struct[3]
                 good = True
 
         elif(len(tag_struct) == 3):
-            if(isinstance(tag_struct[0], (int,long))):
+            if(isinstance(tag_struct[0], int)):
                 tag.offset = tag_struct[0]
                 good = True
 
-            if(isinstance(tag_struct[1], pmt.pmt_swig.swig_int_ptr)):
+            if(isinstance(tag_struct[1], pmt.swig_int_ptr)):
                 tag.key = tag_struct[1]
                 good = True
 
-            if(isinstance(tag_struct[2], pmt.pmt_swig.swig_int_ptr)):
+            if(isinstance(tag_struct[2], pmt.swig_int_ptr)):
                 tag.value = tag_struct[2]
                 good = True
 
diff --git a/gnuradio-runtime/python/gnuradio/gr/top_block.py b/gnuradio-runtime/python/gnuradio/gr/top_block.py
index 2efcbd9aae..e7608bf5e9 100644
--- a/gnuradio-runtime/python/gnuradio/gr/top_block.py
+++ b/gnuradio-runtime/python/gnuradio/gr/top_block.py
@@ -19,15 +19,18 @@
 # Boston, MA 02110-1301, USA.
 #
 
-from runtime_swig import top_block_swig, \
-    top_block_wait_unlocked, top_block_run_unlocked, \
-    top_block_start_unlocked, top_block_stop_unlocked, \
-    top_block_unlock_unlocked, dot_graph_tb
+from __future__ import absolute_import
+from __future__ import unicode_literals
+
+from .runtime_swig import (top_block_swig,
+    top_block_wait_unlocked, top_block_run_unlocked,
+    top_block_start_unlocked, top_block_stop_unlocked,
+    top_block_unlock_unlocked, dot_graph_tb)
 
 #import gnuradio.gr.gr_threading as _threading
-import gr_threading as _threading
+from . import gr_threading as _threading
 
-from hier_block2 import hier_block2
+from .hier_block2 import hier_block2
 
 class _top_block_waiter(_threading.Thread):
     """
diff --git a/gnuradio-runtime/python/gnuradio/gr_unittest.py b/gnuradio-runtime/python/gnuradio/gr_unittest.py
old mode 100755
new mode 100644
index c729566e88..e9d35d6869
--- a/gnuradio-runtime/python/gnuradio/gr_unittest.py
+++ b/gnuradio-runtime/python/gnuradio/gr_unittest.py
@@ -22,10 +22,16 @@
 """
 GNU radio specific extension of unittest.
 """
+from __future__ import absolute_import
+from __future__ import unicode_literals
+from __future__ import division
+
+import os
+import stat
 
 import unittest
-import gr_xmlrunner
-import sys, os, stat
+from . import gr_xmlrunner
+
 
 class TestCase(unittest.TestCase):
     """A subclass of unittest.TestCase that adds additional assertions
@@ -43,11 +49,12 @@ class TestCase(unittest.TestCase):
            as significant digits (measured from the most signficant digit).
        """
         if round(second.real-first.real, places) != 0:
-            raise self.failureException, \
-                  (msg or '%s != %s within %s places' % (`first`, `second`, `places` ))
+            raise self.failureException(
+                msg or '%r != %r within %r places' % (first, second, places))
         if round(second.imag-first.imag, places) != 0:
-            raise self.failureException, \
-                  (msg or '%s != %s within %s places' % (`first`, `second`, `places` ))
+            raise self.failureException(
+                msg or '%r != %r within %r places' % (first, second, places)
+            )
 
     def assertComplexAlmostEqual2 (self, ref, x, abs_eps=1e-12, rel_eps=1e-6, msg=None):
         """
@@ -57,48 +64,52 @@ class TestCase(unittest.TestCase):
             return
 
         if abs(ref) > abs_eps:
-            if abs(ref-x)/abs(ref) > rel_eps:
-                raise self.failureException, \
-                      (msg or '%s != %s rel_error = %s rel_limit = %s' % (
-                    `ref`, `x`, abs(ref-x)/abs(ref), `rel_eps` ))
+            if abs(ref-x) / abs(ref) > rel_eps:
+                raise self.failureException(
+                    msg or '%r != %r rel_error = %r rel_limit = %r' % (
+                        ref, x, abs(ref-x) / abs(ref), rel_eps
+                    )
+                )
         else:
-            raise self.failureException, \
-                      (msg or '%s != %s rel_error = %s rel_limit = %s' % (
-                    `ref`, `x`, abs(ref-x)/abs(ref), `rel_eps` ))
+            raise self.failureException(
+                msg or '%r != %r rel_error = %r rel_limit = %r' % (
+                    ref, x, abs(ref-x) / abs(ref), rel_eps
+                )
+            )
 
 
 
     def assertComplexTuplesAlmostEqual (self, a, b, places=7, msg=None):
         self.assertEqual (len(a), len(b))
-        for i in xrange (len(a)):
+        for i in range (len(a)):
             self.assertComplexAlmostEqual (a[i], b[i], places, msg)
 
     def assertComplexTuplesAlmostEqual2 (self, ref, x,
                                          abs_eps=1e-12, rel_eps=1e-6, msg=None):
         self.assertEqual (len(ref), len(x))
-        for i in xrange (len(ref)):
+        for i in range (len(ref)):
             try:
                 self.assertComplexAlmostEqual2 (ref[i], x[i], abs_eps, rel_eps, msg)
-            except self.failureException, e:
+            except self.failureException as e:
                 #sys.stderr.write("index = %d " % (i,))
-                #sys.stderr.write("%s\n" % (e,))
+                #sys.stderr.write("%r\n" % (e,))
                 raise
 
     def assertFloatTuplesAlmostEqual (self, a, b, places=7, msg=None):
         self.assertEqual (len(a), len(b))
-        for i in xrange (len(a)):
+        for i in range (len(a)):
             self.assertAlmostEqual (a[i], b[i], places, msg)
 
 
     def assertFloatTuplesAlmostEqual2 (self, ref, x,
                                        abs_eps=1e-12, rel_eps=1e-6, msg=None):
         self.assertEqual (len(ref), len(x))
-        for i in xrange (len(ref)):
+        for i in range (len(ref)):
             try:
                 self.assertComplexAlmostEqual2 (ref[i], x[i], abs_eps, rel_eps, msg)
-            except self.failureException, e:
+            except self.failureException as e:
                 #sys.stderr.write("index = %d " % (i,))
-                #sys.stderr.write("%s\n" % (e,))
+                #sys.stderr.write("%r\n" % (e,))
                 raise
 
 
@@ -124,7 +135,7 @@ def run(PUT, filename=None):
         path = basepath + "/python"
 
         if not os.path.exists(basepath):
-            os.makedirs(basepath, 0750)
+            os.makedirs(basepath, mode=0o750)
 
         xmlrunner = None
         # only proceed if .unittests is writable
@@ -132,13 +143,13 @@ def run(PUT, filename=None):
         if(st & stat.S_IWUSR > 0):
             # Test if path exists; if not, build it
             if not os.path.exists(path):
-                os.makedirs(path, 0750)
+                os.makedirs(path, mode=0o750)
 
             # Just for safety: make sure we can write here, too
             st = os.stat(path)[stat.ST_MODE]
             if(st & stat.S_IWUSR > 0):
                 # Create an XML runner to filename
-                fout = file(path+"/"+filename, "w")
+                fout = open(path+"/"+filename, "w")
                 xmlrunner = gr_xmlrunner.XMLTestRunner(fout)
 
         txtrunner = TextTestRunner(verbosity=1)
@@ -148,7 +159,7 @@ def run(PUT, filename=None):
         suite = TestLoader().loadTestsFromTestCase(PUT)
 
         # use the xmlrunner if we can write the the directory
-        if(xmlrunner is not None):
+        if xmlrunner is not None:
             xmlrunner.run(suite)
 
         main()
diff --git a/gnuradio-runtime/python/gnuradio/gr_xmlrunner.py b/gnuradio-runtime/python/gnuradio/gr_xmlrunner.py
index 31298197ff..fccb1b76f0 100644
--- a/gnuradio-runtime/python/gnuradio/gr_xmlrunner.py
+++ b/gnuradio-runtime/python/gnuradio/gr_xmlrunner.py
@@ -1,25 +1,56 @@
 """
 XML Test Runner for PyUnit
 """
-
 # Written by Sebastian Rittau <srittau@jroger.in-berlin.de> and placed in
 # the Public Domain. With contributions by Paolo Borelli and others.
 # Added to GNU Radio Oct. 3, 2010
 
-__version__ = "0.1"
+from __future__ import unicode_literals
 
 import os.path
 import re
 import sys
 import time
-import traceback
 import unittest
+import linecache
 from xml.sax.saxutils import escape
+from io import StringIO
+
+
+__version__ = "0.1"
 
-try:
-    from StringIO import StringIO
-except ImportError:
-    from io import StringIO
+
+# inline trackeback.print_tb so that py2 uses unicode literals (py2/3 compat)
+def print_tb(tb, limit=None, out=None):
+    """Print up to 'limit' stack trace entries from the traceback 'tb'.
+
+    If 'limit' is omitted or None, all entries are printed.  If 'file'
+    is omitted or None, the output goes to sys.stderr; otherwise
+    'file' should be an open file or file-like object with a write()
+    method.
+    """
+    def _print(out, s='', terminator='\n'):
+        out.write(s+terminator)
+
+    if out is None:
+        out = sys.stderr
+    if limit is None:
+        if hasattr(sys, 'tracebacklimit'):
+            limit = sys.tracebacklimit
+    n = 0
+    while tb is not None and (limit is None or n < limit):
+        f = tb.tb_frame
+        lineno = tb.tb_lineno
+        co = f.f_code
+        filename = co.co_filename
+        name = co.co_name
+        _print(out, '  Out "%s", line %d, in %s' % (filename, lineno, name))
+        linecache.checkcache(filename)
+        line = linecache.getline(filename, lineno, f.f_globals)
+        if line:
+            _print(out, '    ' + line.strip())
+        tb = tb.tb_next
+        n = n+1
 
 
 class _TestInfo(object):
@@ -60,12 +91,12 @@ class _TestInfo(object):
         supplied stream.
 
         """
-        stream.write('  <testcase classname="%(class)s" name="%(method)s" time="%(time).4f">' % \
-            {
-                "class": self._class,
-                "method": self._method,
-                "time": self._time,
-            })
+        stream.write('  <testcase classname="%(class)s" name="%(method)s" time="%(time).4f">' %
+                     {
+                         'class': self._class,
+                         'method': self._method,
+                         'time': self._time,
+                     })
         if self._failure is not None:
             self._print_error(stream, 'failure', self._failure)
         if self._error is not None:
@@ -76,10 +107,10 @@ class _TestInfo(object):
         """Print information from a failure or error to the supplied stream."""
         text = escape(str(error[1]))
         stream.write('\n')
-        stream.write('    <%s type="%s">%s\n' \
-            % (tagname, _clsname(error[0]), text))
+        stream.write('    <%s type="%s">%s\n'
+                     % (tagname, _clsname(error[0]), text))
         tb_stream = StringIO()
-        traceback.print_tb(error[2], None, tb_stream)
+        print_tb(error[2], None, tb_stream)
         stream.write(escape(tb_stream.getvalue()))
         stream.write('    </%s>\n' % tagname)
         stream.write('  ')
@@ -137,14 +168,17 @@ class _XMLTestResult(unittest.TestResult):
         output and standard error streams must be passed in.a
 
         """
-        stream.write('<testsuite errors="%(e)d" failures="%(f)d" ' % \
-            { "e": len(self.errors), "f": len(self.failures) })
-        stream.write('name="%(n)s" tests="%(t)d" time="%(time).3f">\n' % \
-            {
-                "n": self._test_name,
-                "t": self.testsRun,
-                "time": time_taken,
-            })
+        stream.write('<testsuite errors="%(e)d" failures="%(f)d" ' %
+                     {
+                         "e": len(self.errors),
+                         "f": len(self.failures)
+                     })
+        stream.write('name="%(n)s" tests="%(t)d" time="%(time).3f">\n' %
+                     {
+                         "n": self._test_name,
+                         "t": self.testsRun,
+                         "time": time_taken
+                     })
         for info in self._tests:
             info.print_report(stream)
         stream.write('  <system-out><![CDATA[%s]]></system-out>\n' % out)
@@ -173,9 +207,9 @@ class XMLTestRunner(object):
         """Run the given test case or test suite."""
         class_ = test.__class__
         classname = class_.__module__ + "." + class_.__name__
-        if self._stream == None:
+        if self._stream is None:
             filename = "TEST-%s.xml" % classname
-            stream = file(os.path.join(self._path, filename), "w")
+            stream = open(os.path.join(self._path, filename), "w")
             stream.write('<?xml version="1.0" encoding="utf-8"?>\n')
         else:
             stream = self._stream
diff --git a/gnuradio-runtime/python/gnuradio/gru/__init__.py b/gnuradio-runtime/python/gnuradio/gru/__init__.py
index 4e41d03a74..0948edb17f 100644
--- a/gnuradio-runtime/python/gnuradio/gru/__init__.py
+++ b/gnuradio-runtime/python/gnuradio/gru/__init__.py
@@ -1,13 +1,15 @@
+from __future__ import absolute_import
+from __future__ import unicode_literals
 # make this a package
 
 # Import gru stuff
-from daemon import *
-from freqz import *
-from gnuplot_freqz import *
-from hexint import *
-from listmisc import *
-from mathmisc import *
-from msgq_runner import *
-from os_read_exactly import *
-from seq_with_cursor import *
-from socket_stuff import *
+from .daemon import *
+from .freqz import *
+from .gnuplot_freqz import *
+from .hexint import *
+from .listmisc import *
+from .mathmisc import *
+from .msgq_runner import *
+from .os_read_exactly import *
+from .seq_with_cursor import *
+from .socket_stuff import *
diff --git a/gnuradio-runtime/python/gnuradio/gru/daemon.py b/gnuradio-runtime/python/gnuradio/gru/daemon.py
index e04702152d..14138f9730 100644
--- a/gnuradio-runtime/python/gnuradio/gru/daemon.py
+++ b/gnuradio-runtime/python/gnuradio/gru/daemon.py
@@ -18,6 +18,10 @@
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
 #
+
+from __future__ import print_function
+from __future__ import unicode_literals
+
 import os, sys, signal
 
 # Turn application into a background daemon process.
@@ -55,38 +59,38 @@ import os, sys, signal
 def daemonize(pidfile=None, logfile=None):
     # fork() into background
     try:
-	pid = os.fork()
-    except OSError, e:
-	raise Exception, "%s [%d]" % (e.strerror, e.errno)
+        pid = os.fork()
+    except OSError as e:
+        raise Exception("%s [%d]" % (e.strerror, e.errno))
 
     if pid == 0:	# First child of first fork()
-	# Become session leader of new session
-	os.setsid()
+        # Become session leader of new session
+        os.setsid()
 
-	# fork() into background again
-	try:
-	    pid = os.fork()
-	except OSError, e:
-	    raise Exception, "%s [%d]" % (e.strerror, e.errno)
+        # fork() into background again
+        try:
+            pid = os.fork()
+        except OSError as e:
+            raise Exception("%s [%d]" % (e.strerror, e.errno))
 
-	if pid != 0:
-	    os._exit(0) # Second child of second fork()
+        if pid != 0:
+            os._exit(0) # Second child of second fork()
 
-    else:		# Second child of first fork()
-	os._exit(0)
+    else:                # Second child of first fork()
+        os._exit(0)
 
-    os.umask(0111)
+    os.umask(0o111)
 
     # Write pid
     pid = os.getpid()
     if pidfile is not None:
-	open(pidfile, 'w').write('%d\n'%pid)
+        open(pidfile, 'w').write('%d\n'%pid)
 
     # Redirect streams
     if logfile is not None:
-	lf = open(logfile, 'a+')
-	sys.stdout = lf
-	sys.stderr = lf
+        lf = open(logfile, 'a+')
+        sys.stdout = lf
+        sys.stderr = lf
 
     # Prevent pinning any filesystem mounts
     os.chdir('/')
@@ -97,6 +101,6 @@ def daemonize(pidfile=None, logfile=None):
 if __name__ == "__main__":
     import time
     daemonize()
-    print "Hello, world, from daemon process."
+    print("Hello, world, from daemon process.")
     time.sleep(20)
-    print "Goodbye, world, from daemon process."
+    print("Goodbye, world, from daemon process.")
diff --git a/gnuradio-runtime/python/gnuradio/gru/freqz.py b/gnuradio-runtime/python/gnuradio/gru/freqz.py
index 6d8b94db8b..7ce25e2de1 100644
--- a/gnuradio-runtime/python/gnuradio/gru/freqz.py
+++ b/gnuradio-runtime/python/gnuradio/gru/freqz.py
@@ -52,6 +52,8 @@
 # DAMAGE.
 #
 
+from __future__ import division
+from __future__ import unicode_literals
 __all__ = ['freqz']
 
 import numpy
@@ -106,7 +108,7 @@ def polyval(p,x):
         y = x * y + p[i]
     return y
 
-class poly1d:
+class poly1d(object):
     """A one-dimensional polynomial class.
 
     p = poly1d([1,2,3]) constructs the polynomial x**2 + 2 x + 3
@@ -125,14 +127,14 @@ class poly1d:
     """
     def __init__(self, c_or_r, r=0):
         if isinstance(c_or_r,poly1d):
-            for key in c_or_r.__dict__.keys():
+            for key in list(c_or_r.__dict__.keys()):
                 self.__dict__[key] = c_or_r.__dict__[key]
             return
         if r:
             c_or_r = poly(c_or_r)
         c_or_r = atleast_1d(c_or_r)
         if len(c_or_r.shape) > 1:
-            raise ValueError, "Polynomial must be 1d only."
+            raise ValueError("Polynomial must be 1d only.")
         c_or_r = trim_zeros(c_or_r, trim='f')
         if len(c_or_r) == 0:
             c_or_r = numpy.array([0])
@@ -227,7 +229,7 @@ class poly1d:
 
     def __pow__(self, val):
         if not isscalar(val) or int(val) != val or val < 0:
-            raise ValueError, "Power to non-negative integers only."
+            raise ValueError("Power to non-negative integers only.")
         res = [1]
         for k in range(val):
             res = polymul(self.coeffs, res)
@@ -243,20 +245,20 @@ class poly1d:
 
     def __div__(self, other):
         if isscalar(other):
-            return poly1d(self.coeffs/other)
+            return poly1d(self.coeffs / other)
         else:
             other = poly1d(other)
-            return map(poly1d,polydiv(self.coeffs, other.coeffs))
+            return list(map(poly1d,polydiv(self.coeffs, other.coeffs)))
 
     def __rdiv__(self, other):
         if isscalar(other):
-            return poly1d(other/self.coeffs)
+            return poly1d(other / self.coeffs)
         else:
             other = poly1d(other)
-            return map(poly1d,polydiv(other.coeffs, self.coeffs))
+            return list(map(poly1d,polydiv(other.coeffs, self.coeffs)))
 
     def __setattr__(self, key, val):
-        raise ValueError, "Attributes cannot be changed this way."
+        raise ValueError("Attributes cannot be changed this way.")
 
     def __getattr__(self, key):
         if key in ['r','roots']:
@@ -279,7 +281,7 @@ class poly1d:
     def __setitem__(self, key, val):
         ind = self.order - key
         if key < 0:
-            raise ValueError, "Does not support negative powers."
+            raise ValueError("Does not support negative powers.")
         if key > self.order:
             zr = numpy.zeros(key-self.order,self.coeffs.typecode())
             self.__dict__['coeffs'] = numpy.concatenate((zr,self.coeffs))
@@ -323,22 +325,22 @@ def freqz(b, a, worN=None, whole=0, plot=None):
        h -- The frequency response.
        w -- The frequencies at which h was computed.
     """
-    b, a = map(atleast_1d, (b,a))
+    b, a = list(map(atleast_1d, (b,a)))
     if whole:
         lastpoint = 2*pi
     else:
         lastpoint = pi
     if worN is None:
         N = 512
-        w = Num.arange(0,lastpoint,lastpoint/N)
-    elif isinstance(worN, types.IntType):
+        w = Num.arange(0,lastpoint,lastpoint / N)
+    elif isinstance(worN, int):
         N = worN
-        w = Num.arange(0,lastpoint,lastpoint/N)
+        w = Num.arange(0,lastpoint,lastpoint / N)
     else:
         w = worN
     w = atleast_1d(w)
     zm1 = exp(-1j*w)
-    h = polyval(b[::-1], zm1) / polyval(a[::-1], zm1)
+    h = polyval(b[::-1] / zm1, polyval(a[::-1], zm1))
     # if not plot is None:
     #    plot(w, h)
     return h, w
diff --git a/gnuradio-runtime/python/gnuradio/gru/gnuplot_freqz.py b/gnuradio-runtime/python/gnuradio/gru/gnuplot_freqz.py
old mode 100755
new mode 100644
index dd483e4277..5a1ea91cad
--- a/gnuradio-runtime/python/gnuradio/gru/gnuplot_freqz.py
+++ b/gnuradio-runtime/python/gnuradio/gru/gnuplot_freqz.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+from __future__ import unicode_literals
 __all__ = ['gnuplot_freqz']
 
 import tempfile
@@ -46,10 +48,10 @@ def gnuplot_freqz (hw, Fs=None, logfreq=False):
 
     h, w = hw
     ampl = 20 * numpy.log10 (numpy.absolute (h) + 1e-9)
-    phase = map (lambda x: math.atan2 (x.imag, x.real), h)
+    phase = [math.atan2 (x.imag, x.real) for x in h]
 
     if Fs:
-        w *= (Fs/(2*math.pi))
+        w *= (Fs / (2*math.pi))
 
     for freq, a, ph in zip (w, ampl, phase):
         data_file.write ("%g\t%g\t%g\n" % (freq, a, ph))
@@ -99,4 +101,4 @@ def test_plot ():
 
 if __name__ == '__main__':
     handle = test_plot ()
-    raw_input ('Press Enter to continue: ')
+    eval(input ('Press Enter to continue: '))
diff --git a/gnuradio-runtime/python/gnuradio/gru/hexint.py b/gnuradio-runtime/python/gnuradio/gru/hexint.py
index 0fb5ecde04..096b876701 100644
--- a/gnuradio-runtime/python/gnuradio/gru/hexint.py
+++ b/gnuradio-runtime/python/gnuradio/gru/hexint.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
 #
 # Copyright 2005 Free Software Foundation, Inc.
 #
diff --git a/gnuradio-runtime/python/gnuradio/gru/listmisc.py b/gnuradio-runtime/python/gnuradio/gru/listmisc.py
index 9e70eb863c..a981147337 100644
--- a/gnuradio-runtime/python/gnuradio/gru/listmisc.py
+++ b/gnuradio-runtime/python/gnuradio/gru/listmisc.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
 #
 # Copyright 2005 Free Software Foundation, Inc.
 #
diff --git a/gnuradio-runtime/python/gnuradio/gru/mathmisc.py b/gnuradio-runtime/python/gnuradio/gru/mathmisc.py
index 7e6f23a346..790d7c993c 100644
--- a/gnuradio-runtime/python/gnuradio/gru/mathmisc.py
+++ b/gnuradio-runtime/python/gnuradio/gru/mathmisc.py
@@ -1,3 +1,5 @@
+from __future__ import division
+from __future__ import unicode_literals
 #
 # Copyright 2005 Free Software Foundation, Inc.
 #
@@ -30,4 +32,4 @@ def lcm(a,b):
     return a * b / gcd(a, b)
 
 def log2(x):
-    return math.log(x)/math.log(2)
+    return math.log(x) / math.log(2)
diff --git a/gnuradio-runtime/python/gnuradio/gru/msgq_runner.py b/gnuradio-runtime/python/gnuradio/gru/msgq_runner.py
index 767a74a717..2d58480f5f 100644
--- a/gnuradio-runtime/python/gnuradio/gru/msgq_runner.py
+++ b/gnuradio-runtime/python/gnuradio/gru/msgq_runner.py
@@ -40,6 +40,7 @@ To manually stop the runner, call stop() on the object.
 
 To determine if the runner has exited, call exited() on the object.
 """
+from __future__ import unicode_literals
 
 from gnuradio import gr
 import gnuradio.gr.gr_threading as _threading
@@ -66,7 +67,7 @@ class msgq_runner(_threading.Thread):
             else:
                 try:
                     self._callback(msg)
-                except Exception, e:
+                except Exception as e:
                     if self._exit_on_error:
                         self._exit_error = e
                         self.stop()
diff --git a/gnuradio-runtime/python/gnuradio/gru/os_read_exactly.py b/gnuradio-runtime/python/gnuradio/gru/os_read_exactly.py
index 40b053770e..c079fc4e11 100644
--- a/gnuradio-runtime/python/gnuradio/gru/os_read_exactly.py
+++ b/gnuradio-runtime/python/gnuradio/gru/os_read_exactly.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
 #
 # Copyright 2005 Free Software Foundation, Inc.
 #
diff --git a/gnuradio-runtime/python/gnuradio/gru/seq_with_cursor.py b/gnuradio-runtime/python/gnuradio/gru/seq_with_cursor.py
index def3299b69..0aefbf83bb 100644
--- a/gnuradio-runtime/python/gnuradio/gru/seq_with_cursor.py
+++ b/gnuradio-runtime/python/gnuradio/gru/seq_with_cursor.py
@@ -21,8 +21,12 @@
 
 # misc utilities
 
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import unicode_literals
+
 import types
-import exceptions
+
 
 class seq_with_cursor (object):
     __slots__ = [ 'items', 'index' ]
@@ -40,7 +44,7 @@ class seq_with_cursor (object):
         elif initial_index >= 0 and initial_index < len (self.items):
             self.index = initial_index
         else:
-            raise exceptions.ValueError
+            raise ValueError
 
     def set_index_by_value(self, v):
         """
@@ -51,9 +55,9 @@ class seq_with_cursor (object):
         cv = self.current()
         more = True
         while cv < v and more:
-            cv, more = self.next()      # side effect!
+            cv, more = next(self)      # side effect!
 
-    def next (self):
+    def __next__ (self):
         new_index = self.index + 1
         if new_index < len (self.items):
             self.index = new_index
@@ -74,4 +78,3 @@ class seq_with_cursor (object):
 
     def get_seq (self):
         return self.items[:]            # copy of items
-
diff --git a/gnuradio-runtime/python/gnuradio/gru/socket_stuff.py b/gnuradio-runtime/python/gnuradio/gru/socket_stuff.py
index b7c5ac2fe1..ce08ce1e10 100644
--- a/gnuradio-runtime/python/gnuradio/gru/socket_stuff.py
+++ b/gnuradio-runtime/python/gnuradio/gru/socket_stuff.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
 #
 # Copyright 2005 Free Software Foundation, Inc.
 #
@@ -37,7 +38,7 @@ def tcp_connect_or_die(sock_addr):
     s = socket.socket (socket.AF_INET, socket.SOCK_STREAM)
     try:
         s.connect(sock_addr)
-    except socket.error, err:
+    except socket.error as err:
         sys.stderr.write('Failed to connect to %s: %s\n' %
                          (sock_addr, os.strerror (err.args[0]),))
         sys.exit(1)
@@ -55,7 +56,7 @@ def udp_connect_or_die(sock_addr):
     s = socket.socket (socket.AF_INET, socket.SOCK_DGRAM)
     try:
         s.connect(sock_addr)
-    except socket.error, err:
+    except socket.error as err:
         sys.stderr.write('Failed to connect to %s: %s\n' %
                          (sock_addr, os.strerror (err.args[0]),))
         sys.exit(1)
diff --git a/gnuradio-runtime/python/pmt/CMakeLists.txt b/gnuradio-runtime/python/pmt/CMakeLists.txt
index 1ddfc2a46f..7afac956cb 100644
--- a/gnuradio-runtime/python/pmt/CMakeLists.txt
+++ b/gnuradio-runtime/python/pmt/CMakeLists.txt
@@ -41,6 +41,6 @@ foreach(py_qa_test_file ${py_qa_test_files})
         ${CMAKE_BINARY_DIR}/gnuradio-runtime/swig
     )
     set(GR_TEST_TARGET_DEPS gnuradio-runtime)
-    GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${py_qa_test_file})
+    GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} -B ${py_qa_test_file})
 endforeach(py_qa_test_file)
 endif(ENABLE_TESTING)
diff --git a/gnuradio-runtime/python/pmt/__init__.py b/gnuradio-runtime/python/pmt/__init__.py
index 399fae8701..89eb555823 100644
--- a/gnuradio-runtime/python/pmt/__init__.py
+++ b/gnuradio-runtime/python/pmt/__init__.py
@@ -39,14 +39,17 @@ bool, symbol (string), integer, real, complex, null, pair, list,
 vector, dict, uniform_vector, any (boost::any cast)
 '''
 
+from __future__ import absolute_import
+from __future__ import unicode_literals
+
 import os
 
 try:
-    from pmt_swig import *
+    from .pmt_swig import *
 except ImportError:
     dirname, filename = os.path.split(os.path.abspath(__file__))
     __path__.append(os.path.join(dirname, "..", "..", "swig"))
-    from pmt_swig import *
+    from .pmt_swig import *
 
 # due to changes in the PMT_NIL singleton for static builds, we force
 # this into Python here.
@@ -55,5 +58,5 @@ PMT_T = get_PMT_T()
 PMT_F = get_PMT_F()
 PMT_EOF = get_PMT_EOF()
 
-from pmt_to_python import pmt_to_python as to_python
-from pmt_to_python import python_to_pmt as to_pmt
+from .pmt_to_python import pmt_to_python as to_python
+from .pmt_to_python import python_to_pmt as to_pmt
diff --git a/gnuradio-runtime/python/pmt/pmt_to_python.py b/gnuradio-runtime/python/pmt/pmt_to_python.py
index f9000ec279..918e2f9872 100644
--- a/gnuradio-runtime/python/pmt/pmt_to_python.py
+++ b/gnuradio-runtime/python/pmt/pmt_to_python.py
@@ -17,8 +17,9 @@
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
 
-try: import pmt_swig as pmt
-except: import pmt
+from __future__ import unicode_literals
+
+from . import pmt_swig as pmt
 import numpy
 
 # SWIG isn't taking in the #define PMT_NIL;
@@ -34,7 +35,7 @@ def pmt_to_tuple(p):
     return tuple(elems)
 
 def pmt_from_tuple(p):
-    args = map(python_to_pmt, p)
+    args = list(map(python_to_pmt, p))
     return pmt.make_tuple(*args)
 
 def pmt_to_vector(p):
@@ -62,7 +63,7 @@ def pmt_to_dict(p):
 
 def pmt_from_dict(p):
     d = pmt.make_dict()
-    for k, v in p.iteritems():
+    for k, v in list(p.items()):
         #dict is immutable -> therefore pmt_dict_add returns the new dict
         d = pmt.dict_add(d, python_to_pmt(k), python_to_pmt(v))
     return d
@@ -88,27 +89,27 @@ uvector_mappings = dict([ (numpy_mappings[key][3], (numpy_mappings[key][2], key)
 def numpy_to_uvector(numpy_array):
     try:
         mapping = numpy_mappings[numpy_array.dtype]
-        pc = map(mapping[1], numpy.ravel(numpy_array))
+        pc = list(map(mapping[1], numpy.ravel(numpy_array)))
         return mapping[0](numpy_array.size, pc)
     except KeyError:
         raise ValueError("unsupported numpy array dtype for converstion to pmt %s"%(numpy_array.dtype))
 
 def uvector_to_numpy(uvector):
-	match = None
-	for test_func in uvector_mappings.keys():
-		if test_func(uvector):
-			match = uvector_mappings[test_func]
-			return numpy.array(match[0](uvector), dtype = match[1])
-	else:
-		raise ValueError("unsupported uvector data type for conversion to numpy array %s"%(uvector))
+        match = None
+        for test_func in list(uvector_mappings.keys()):
+                if test_func(uvector):
+                        match = uvector_mappings[test_func]
+                        return numpy.array(match[0](uvector), dtype = match[1])
+        else:
+                raise ValueError("unsupported uvector data type for conversion to numpy array %s"%(uvector))
 
 type_mappings = ( #python type, check pmt type, to python, from python
     (None, pmt.is_null, lambda x: None, lambda x: PMT_NIL),
     (bool, pmt.is_bool, pmt.to_bool, pmt.from_bool),
     (str, pmt.is_symbol, pmt.symbol_to_string, pmt.string_to_symbol),
-    (unicode, lambda x: False, None, lambda x: pmt.string_to_symbol(x.encode('utf-8'))),
+    (str, lambda x: False, None, lambda x: pmt.string_to_symbol(x.encode('utf-8'))),
     (int, pmt.is_integer, pmt.to_long, pmt.from_long),
-    (long, pmt.is_uint64, lambda x: long(pmt.to_uint64(x)), pmt.from_uint64),
+    (int, pmt.is_uint64, lambda x: int(pmt.to_uint64(x)), pmt.from_uint64),
     (float, pmt.is_real, pmt.to_double, pmt.from_double),
     (complex, pmt.is_complex, pmt.to_complex, pmt.from_complex),
     (tuple, pmt.is_tuple, pmt_to_tuple, pmt_from_tuple),
diff --git a/gnuradio-runtime/python/pmt/qa_pmt.py b/gnuradio-runtime/python/pmt/qa_pmt.py
old mode 100755
new mode 100644
index 32cff62f44..0d87676a30
--- a/gnuradio-runtime/python/pmt/qa_pmt.py
+++ b/gnuradio-runtime/python/pmt/qa_pmt.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+
 import unittest
 import pmt
 
@@ -30,7 +32,7 @@ class test_pmt(unittest.TestCase):
         b = pmt.from_double(123765)
         d1 = pmt.make_dict()
         d2 = pmt.dict_add(d1, a, b)
-        print d2
+        print(d2)
 
     def test02(self):
         const = 123765
diff --git a/gnuradio-runtime/python/pmt/qa_pmt_to_python.py b/gnuradio-runtime/python/pmt/qa_pmt_to_python.py
old mode 100755
new mode 100644
index e63ade1843..18a8e2bcf5
--- a/gnuradio-runtime/python/pmt/qa_pmt_to_python.py
+++ b/gnuradio-runtime/python/pmt/qa_pmt_to_python.py
@@ -20,16 +20,19 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import absolute_import
+
+
 import unittest
 import pmt
-import pmt_to_python as pmt2py
+from pmt import pmt_to_python as pmt2py
 
 class test_pmt_to_python(unittest.TestCase):
 
     def test_pmt_from_double(self):
         b = pmt.from_double(123765)
         self.assertEqual(pmt.to_python(b), 123765)
-        t = pmt.to_pmt(range(5))
+        t = pmt.to_pmt(list(range(5)))
 
     def test_numpy_to_uvector_and_reverse(self):
         import numpy as np
diff --git a/gnuradio-runtime/swig/basic_block.i b/gnuradio-runtime/swig/basic_block.i
index cf75479bb8..363e121bc6 100644
--- a/gnuradio-runtime/swig/basic_block.i
+++ b/gnuradio-runtime/swig/basic_block.i
@@ -31,6 +31,10 @@ namespace std {
   %template(x_vector_basic_block_sptr) vector<gr::basic_block_sptr>;
 };
 
+%begin %{
+#define SWIG_PYTHON_2_UNICODE
+%}
+
 namespace gr {
 
   class gr::basic_block
@@ -60,6 +64,8 @@ namespace gr {
 }
 
 #ifdef SWIGPYTHON
+%import py3compat.i
+
 %pythoncode %{
 basic_block_sptr.__repr__ = lambda self: "<basic_block %s (%d)>" % (self.name(), self.unique_id ())
 %}
diff --git a/gnuradio-runtime/swig/gnuradio.i b/gnuradio-runtime/swig/gnuradio.i
index 7056d28ff5..6e8a3093f2 100644
--- a/gnuradio-runtime/swig/gnuradio.i
+++ b/gnuradio-runtime/swig/gnuradio.i
@@ -77,3 +77,14 @@
 %}
 
 %include <gnuradio/high_res_timer.h>
+
+////////////////////////////////////////////////////////////////////////
+// Python 2/3 compatibilty
+
+%begin %{
+#define SWIG_PYTHON_2_UNICODE
+%}
+
+#ifdef SWIGPYTHON
+%import py3compat.i
+#endif
diff --git a/gnuradio-runtime/swig/pmt_swig.i b/gnuradio-runtime/swig/pmt_swig.i
index 2063a5c972..c627b7d3e6 100644
--- a/gnuradio-runtime/swig/pmt_swig.i
+++ b/gnuradio-runtime/swig/pmt_swig.i
@@ -25,6 +25,10 @@
 %include "std_string.i"
 %include "stdint.i"
 
+%begin %{
+#define SWIG_PYTHON_2_UNICODE
+%}
+
 %{
 #include <boost/intrusive_ptr.hpp>
 #include <boost/shared_ptr.hpp>
@@ -58,6 +62,8 @@
 %template(pmt_vector_cfloat) std::vector< std::complex<float> >;
 %template(pmt_vector_cdouble) std::vector< std::complex<double> >;
 
+%import py3compat.i
+
 ////////////////////////////////////////////////////////////////////////
 // Language independent exception handler
 ////////////////////////////////////////////////////////////////////////
diff --git a/gnuradio-runtime/swig/py3compat.i b/gnuradio-runtime/swig/py3compat.i
new file mode 100644
index 0000000000..6e726c294f
--- /dev/null
+++ b/gnuradio-runtime/swig/py3compat.i
@@ -0,0 +1,7 @@
+%begin %{
+#define SWIG_PYTHON_2_UNICODE
+%}
+
+%pythonbegin %{
+from __future__ import absolute_import
+%}
diff --git a/gr-analog/examples/fmtest.py b/gr-analog/examples/fmtest.py
old mode 100755
new mode 100644
index 7ed08cafbe..04218a4472
--- a/gr-analog/examples/fmtest.py
+++ b/gr-analog/examples/fmtest.py
@@ -20,6 +20,9 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import blocks
 from gnuradio import filter
@@ -31,13 +34,13 @@ try:
     import scipy
     from scipy import fftpack
 except ImportError:
-    print "Error: Program requires scipy (see: www.scipy.org)."
+    print("Error: Program requires scipy (see: www.scipy.org).")
     sys.exit(1)
 
 try:
     import pylab
 except ImportError:
-    print "Error: Program requires matplotlib (see: matplotlib.sourceforge.net)."
+    print("Error: Program requires matplotlib (see: matplotlib.sourceforge.net).")
     sys.exit(1)
 
 
@@ -80,7 +83,7 @@ class fmtest(gr.top_block):
 
         # Create a signal source and frequency modulate it
         self.sum = blocks.add_cc()
-        for n in xrange(self._N):
+        for n in range(self._N):
             sig = analog.sig_source_f(self._audio_rate, analog.GR_SIN_WAVE, freq[n], 0.5)
             fm = fmtx(f_lo[n], self._audio_rate, self._if_rate)
             self.connect(sig, fm)
@@ -95,17 +98,17 @@ class fmtest(gr.top_block):
 
         # Design the channlizer
         self._M = 10
-        bw = chspacing/2.0
-        t_bw = chspacing/10.0
+        bw = chspacing / 2.0
+        t_bw = chspacing / 10.0
         self._chan_rate = self._if_rate / self._M
         self._taps = filter.firdes.low_pass_2(1, self._if_rate, bw, t_bw,
                                               attenuation_dB=100,
                                               window=filter.firdes.WIN_BLACKMAN_hARRIS)
-        tpc = math.ceil(float(len(self._taps)) /  float(self._M))
+        tpc = math.ceil(float(len(self._taps)) / float(self._M))
 
-        print "Number of taps:     ", len(self._taps)
-        print "Number of channels: ", self._M
-        print "Taps per channel:   ", tpc
+        print("Number of taps:     ", len(self._taps))
+        print("Number of channels: ", self._M)
+        print("Taps per channel:   ", tpc)
 
         self.pfb = filter.pfb.channelizer_ccf(self._M, self._taps)
 
@@ -115,7 +118,7 @@ class fmtest(gr.top_block):
         self.fmdet = list()
         self.squelch = list()
         self.snks = list()
-        for i in xrange(self._M):
+        for i in range(self._M):
             self.fmdet.append(analog.nbfm_rx(self._audio_rate, self._chan_rate))
             self.squelch.append(analog.standard_squelch(self._audio_rate*10))
             self.snks.append(blocks.vector_sink_f())
@@ -152,11 +155,11 @@ def main():
         d = fm.snk_tx.data()[Ns:Ns+Ne]
         sp1_f = fig1.add_subplot(2, 1, 1)
 
-        X,freq = sp1_f.psd(d, NFFT=fftlen, noverlap=fftlen/4, Fs=fs,
+        X,freq = sp1_f.psd(d, NFFT=fftlen, noverlap=fftlen / 4, Fs=fs,
                            window = lambda d: d*winfunc(fftlen),
                            visible=False)
         X_in = 10.0*scipy.log10(abs(fftpack.fftshift(X)))
-        f_in = scipy.arange(-fs/2.0, fs/2.0, fs/float(X_in.size))
+        f_in = scipy.arange(-fs / 2.0, fs / 2.0, fs / float(X_in.size))
         p1_f = sp1_f.plot(f_in, X_in, "b")
         sp1_f.set_xlim([min(f_in), max(f_in)+1])
         sp1_f.set_ylim([-120.0, 20.0])
@@ -165,7 +168,7 @@ def main():
         sp1_f.set_xlabel("Frequency (Hz)")
         sp1_f.set_ylabel("Power (dBW)")
 
-        Ts = 1.0/fs
+        Ts = 1.0 / fs
         Tmax = len(d)*Ts
 
         t_in = scipy.arange(0, Tmax, Ts)
@@ -184,20 +187,20 @@ def main():
         # Plot each of the channels outputs. Frequencies on Figure 2 and
         # time signals on Figure 3
         fs_o = fm._audio_rate
-        for i in xrange(len(fm.snks)):
+        for i in range(len(fm.snks)):
             # remove issues with the transients at the beginning
             # also remove some corruption at the end of the stream
             #    this is a bug, probably due to the corner cases
             d = fm.snks[i].data()[Ns:Ne]
 
             sp2_f = fig2.add_subplot(Nrows, Ncols, 1+i)
-            X,freq = sp2_f.psd(d, NFFT=fftlen, noverlap=fftlen/4, Fs=fs_o,
+            X,freq = sp2_f.psd(d, NFFT=fftlen, noverlap=fftlen / 4, Fs=fs_o,
                                window = lambda d: d*winfunc(fftlen),
                                visible=False)
             #X_o = 10.0*scipy.log10(abs(fftpack.fftshift(X)))
             X_o = 10.0*scipy.log10(abs(X))
             #f_o = scipy.arange(-fs_o/2.0, fs_o/2.0, fs_o/float(X_o.size))
-            f_o = scipy.arange(0, fs_o/2.0, fs_o/2.0/float(X_o.size))
+            f_o = scipy.arange(0, fs_o / 2.0, fs_o/2.0/float(X_o.size))
             p2_f = sp2_f.plot(f_o, X_o, "b")
             sp2_f.set_xlim([min(f_o), max(f_o)+0.1])
             sp2_f.set_ylim([-120.0, 20.0])
@@ -208,7 +211,7 @@ def main():
             sp2_f.set_ylabel("Power (dBW)")
 
 
-            Ts = 1.0/fs_o
+            Ts = 1.0 / fs_o
             Tmax = len(d)*Ts
             t_o = scipy.arange(0, Tmax, Ts)
 
diff --git a/gr-analog/examples/tags/uhd_burst_detector.py b/gr-analog/examples/tags/uhd_burst_detector.py
old mode 100755
new mode 100644
index 5aa80b2549..d3d221a45c
--- a/gr-analog/examples/tags/uhd_burst_detector.py
+++ b/gr-analog/examples/tags/uhd_burst_detector.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import unicode_literals
 from gnuradio import eng_notation
 from gnuradio import gr
 from gnuradio import filter, analog, blocks
diff --git a/gr-analog/python/analog/CMakeLists.txt b/gr-analog/python/analog/CMakeLists.txt
index 1fed9d1890..ba3dfb5fc3 100644
--- a/gr-analog/python/analog/CMakeLists.txt
+++ b/gr-analog/python/analog/CMakeLists.txt
@@ -53,7 +53,7 @@ if(ENABLE_TESTING)
   file(GLOB py_qa_test_files "qa_*.py")
   foreach(py_qa_test_file ${py_qa_test_files})
     get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE)
-    GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${py_qa_test_file})
+    GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} -B ${py_qa_test_file})
   endforeach(py_qa_test_file)
 endif(ENABLE_TESTING)
 
diff --git a/gr-analog/python/analog/__init__.py b/gr-analog/python/analog/__init__.py
index 3c4a0ff624..79c19e1e3e 100644
--- a/gr-analog/python/analog/__init__.py
+++ b/gr-analog/python/analog/__init__.py
@@ -21,24 +21,26 @@
 '''
 Blocks and utilities for analog modulation and demodulation.
 '''
+from __future__ import absolute_import
+from __future__ import unicode_literals
 
 # The presence of this file turns this directory into a Python package
 import os
 
 try:
-    from analog_swig import *
+    from .analog_swig import *
 except ImportError:
     dirname, filename = os.path.split(os.path.abspath(__file__))
     __path__.append(os.path.join(dirname, "..", "..", "swig"))
-    from analog_swig import *
+    from .analog_swig import *
 
-from am_demod import *
-from fm_demod import *
-from fm_emph import *
-from nbfm_rx import *
-from nbfm_tx import *
-from standard_squelch import *
-from wfm_rcv import *
-from wfm_rcv_fmdet import *
-from wfm_rcv_pll import *
-from wfm_tx import *
+from .am_demod import *
+from .fm_demod import *
+from .fm_emph import *
+from .nbfm_rx import *
+from .nbfm_tx import *
+from .standard_squelch import *
+from .wfm_rcv import *
+from .wfm_rcv_fmdet import *
+from .wfm_rcv_pll import *
+from .wfm_tx import *
diff --git a/gr-analog/python/analog/am_demod.py b/gr-analog/python/analog/am_demod.py
index 3459e825f4..eeb8964f34 100644
--- a/gr-analog/python/analog/am_demod.py
+++ b/gr-analog/python/analog/am_demod.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
 #
 # Copyright 2006,2007,2012 Free Software Foundation, Inc.
 #
@@ -39,22 +40,22 @@ class am_demod_cf(gr.hier_block2):
         audio_stop: audio low pass filter stop frequency (float)
     """
     def __init__(self, channel_rate, audio_decim, audio_pass, audio_stop):
-	gr.hier_block2.__init__(self, "am_demod_cf",
-				gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
-				gr.io_signature(1, 1, gr.sizeof_float))      # Input signature
+        gr.hier_block2.__init__(self, "am_demod_cf",
+                                gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
+                                gr.io_signature(1, 1, gr.sizeof_float))      # Input signature
 
-	MAG = blocks.complex_to_mag()
-	DCR = blocks.add_const_ff(-1.0)
+        MAG = blocks.complex_to_mag()
+        DCR = blocks.add_const_ff(-1.0)
 
-	audio_taps = filter.optfir.low_pass(0.5, 	  # Filter gain
+        audio_taps = filter.optfir.low_pass(0.5,          # Filter gain
                                             channel_rate, # Sample rate
                                             audio_pass,   # Audio passband
                                             audio_stop,   # Audio stopband
-                                            0.1, 	  # Passband ripple
-                                            60)	          # Stopband attenuation
-	LPF = filter.fir_filter_fff(audio_decim, audio_taps)
+                                            0.1,          # Passband ripple
+                                            60)           # Stopband attenuation
+        LPF = filter.fir_filter_fff(audio_decim, audio_taps)
 
-	self.connect(self, MAG, DCR, LPF, self)
+        self.connect(self, MAG, DCR, LPF, self)
 
 class demod_10k0a3e_cf(am_demod_cf):
     """
@@ -68,6 +69,6 @@ class demod_10k0a3e_cf(am_demod_cf):
         audio_decim: input to output decimation rate (integer)
     """
     def __init__(self, channel_rate, audio_decim):
-    	am_demod_cf.__init__(self, channel_rate, audio_decim,
-    	                     5000, # Audio passband
-    	                     5500) # Audio stopband
+        am_demod_cf.__init__(self, channel_rate, audio_decim,
+                             5000, # Audio passband
+                             5500) # Audio stopband
diff --git a/gr-analog/python/analog/fm_demod.py b/gr-analog/python/analog/fm_demod.py
index 4e3c01d194..1344db831c 100644
--- a/gr-analog/python/analog/fm_demod.py
+++ b/gr-analog/python/analog/fm_demod.py
@@ -19,14 +19,15 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import unicode_literals
+
 from gnuradio import gr, filter
-from fm_emph import fm_deemph
+from .fm_emph import fm_deemph
 from math import pi
 
-try:
-    from gnuradio import analog
-except ImportError:
-    import analog_swig as analog
+from . import analog_swig as analog
 
 
 class fm_demod_cf(gr.hier_block2):
@@ -54,7 +55,7 @@ class fm_demod_cf(gr.hier_block2):
                                 gr.io_signature(1, 1, gr.sizeof_gr_complex),  # Input signature
                                 gr.io_signature(1, 1, gr.sizeof_float))       # Output signature
 
-        k = channel_rate/(2*pi*deviation)
+        k = channel_rate / (2*pi*deviation)
         QUAD = analog.quadrature_demod_cf(k)
 
         audio_taps = filter.optfir.low_pass(
diff --git a/gr-analog/python/analog/fm_emph.py b/gr-analog/python/analog/fm_emph.py
index bfa4742ace..a4a83bd217 100644
--- a/gr-analog/python/analog/fm_emph.py
+++ b/gr-analog/python/analog/fm_emph.py
@@ -19,6 +19,10 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
+
 from gnuradio import gr, filter
 import math
 import cmath
@@ -132,8 +136,8 @@ class fm_deemph(gr.hier_block2):
         # Since H(s = 0) = 1.0, then H(z = 1) = 1.0 and has 0 dB gain at DC
 
         if 0:
-            print "btaps =", btaps
-            print "ataps =", ataps
+            print("btaps =", btaps)
+            print("ataps =", ataps)
             global plot1
             plot1 = gru.gnuplot_freqz(gru.freqz(btaps, ataps), fs, True)
 
@@ -149,11 +153,11 @@ class fm_deemph(gr.hier_block2):
 #  o------+             +-----+--------o
 #         |      R1     |     |
 #         +----/\/\/\/--+     \
-#                             /
+    #                             /
 #                             \ R2
 #                             /
 #                             \
-#                             |
+    #                             |
 #  o--------------------------+--------o
 #
 #  (This fine ASCII rendition is based on Figure 5-15
@@ -263,44 +267,43 @@ class fm_preemph(gr.hier_block2):
                                 gr.io_signature(1, 1, gr.sizeof_float),  # Input signature
                                 gr.io_signature(1, 1, gr.sizeof_float))  # Output signature
 
-	# Set fh to something sensible, if needed.
-	# N.B. fh == fs/2.0 or fh == 0.0 results in a pole on the unit circle
-	# at z = -1.0 or z = 1.0 respectively.  That makes the filter unstable
-	# and useless.
-	if fh <= 0.0 or fh >= fs/2.0:
-		fh = 0.925 * fs/2.0
+        # Set fh to something sensible, if needed.
+        # N.B. fh == fs/2.0 or fh == 0.0 results in a pole on the unit circle
+        # at z = -1.0 or z = 1.0 respectively.  That makes the filter unstable
+        # and useless.
+        if fh <= 0.0 or fh >= fs / 2.0:
+            fh = 0.925 * fs/2.0
 
-	# Digital corner frequencies
-	w_cl = 1.0 / tau
-	w_ch = 2.0 * math.pi * fh
+        # Digital corner frequencies
+        w_cl = 1.0 / tau
+        w_ch = 2.0 * math.pi * fh
 
-	# Prewarped analog corner frequencies
-	w_cla = 2.0 * fs * math.tan(w_cl / (2.0 * fs))
-	w_cha = 2.0 * fs * math.tan(w_ch / (2.0 * fs))
+        # Prewarped analog corner frequencies
+        w_cla = 2.0 * fs * math.tan(w_cl / (2.0 * fs))
+        w_cha = 2.0 * fs * math.tan(w_ch / (2.0 * fs))
 
-	# Resulting digital pole, zero, and gain term from the bilinear
-	# transformation of H(s) = (s + w_cla) / (s + w_cha) to
-	# H(z) = b0 (1 - z1 z^-1)/(1 - p1 z^-1)
-	kl = -w_cla / (2.0 * fs)
-	kh = -w_cha / (2.0 * fs)
-	z1 = (1.0 + kl) / (1.0 - kl)
-	p1 = (1.0 + kh) / (1.0 - kh)
-	b0 = (1.0 - kl) / (1.0 - kh)
+        # Resulting digital pole, zero, and gain term from the bilinear
+        # transformation of H(s) = (s + w_cla) / (s + w_cha) to
+        # H(z) = b0 (1 - z1 z^-1)/(1 - p1 z^-1)
+        kl = -w_cla / (2.0 * fs)
+        kh = -w_cha / (2.0 * fs)
+        z1 = (1.0 + kl) / (1.0 - kl)
+        p1 = (1.0 + kh) / (1.0 - kh)
+        b0 = (1.0 - kl) / (1.0 - kh)
 
-	# Since H(s = infinity) = 1.0, then H(z = -1) = 1.0 and
-	# this filter  has 0 dB gain at fs/2.0.
-	# That isn't what users are going to expect, so adjust with a
-	# gain, g, so that H(z = 1) = 1.0 for 0 dB gain at DC.
-	w_0dB = 2.0 * math.pi * 0.0
-	g =        abs(1.0 - p1 * cmath.rect(1.0, -w_0dB))  \
-	   / (b0 * abs(1.0 - z1 * cmath.rect(1.0, -w_0dB)))
+        # Since H(s = infinity) = 1.0, then H(z = -1) = 1.0 and
+        # this filter  has 0 dB gain at fs/2.0.
+        # That isn't what users are going to expect, so adjust with a
+        # gain, g, so that H(z = 1) = 1.0 for 0 dB gain at DC.
+        w_0dB = 2.0 * math.pi * 0.0
+        g =        abs(1.0 - p1 * cmath.rect(1.0 / -w_0dB), (b0 * abs(1.0 - z1 * cmath.rect(1.0, -w_0dB))))
 
-	btaps = [ g * b0 * 1.0, g * b0 * -z1 ]
-	ataps = [          1.0,          -p1 ]
+        btaps = [ g * b0 * 1.0, g * b0 * -z1 ]
+        ataps = [          1.0,          -p1 ]
 
         if 0:
-            print "btaps =", btaps
-            print "ataps =", ataps
+            print("btaps =", btaps)
+            print("ataps =", ataps)
             global plot2
             plot2 = gru.gnuplot_freqz(gru.freqz(btaps, ataps), fs, True)
 
diff --git a/gr-analog/python/analog/nbfm_rx.py b/gr-analog/python/analog/nbfm_rx.py
index 38fbf803c8..3e8dcd5287 100644
--- a/gr-analog/python/analog/nbfm_rx.py
+++ b/gr-analog/python/analog/nbfm_rx.py
@@ -19,15 +19,19 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import unicode_literals
+
 import math
+
 from gnuradio import gr
 from gnuradio import filter
-from fm_emph import fm_deemph
 
-try:
-    from gnuradio import analog
-except ImportError:
-    import analog_swig as analog
+from . import analog_swig as analog
+from .fm_emph import fm_deemph
+
 
 class nbfm_rx(gr.hier_block2):
     def __init__(self, audio_rate, quad_rate, tau=75e-6, max_dev=5e3):
@@ -52,22 +56,22 @@ class nbfm_rx(gr.hier_block2):
           audio_filter
         """
 
-	gr.hier_block2.__init__(self, "nbfm_rx",
-				gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
-				gr.io_signature(1, 1, gr.sizeof_float))      # Output signature
+        gr.hier_block2.__init__(self, "nbfm_rx",
+                                gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
+                                gr.io_signature(1, 1, gr.sizeof_float))      # Output signature
 
         # FIXME audio_rate and quad_rate ought to be exact rationals
         self._audio_rate = audio_rate = int(audio_rate)
         self._quad_rate = quad_rate = int(quad_rate)
 
         if quad_rate % audio_rate != 0:
-            raise ValueError, "quad_rate is not an integer multiple of audio_rate"
+            raise ValueError("quad_rate is not an integer multiple of audio_rate")
 
-        squelch_threshold = 20		# dB
+        squelch_threshold = 20        # dB
         #self.squelch = analog.simple_squelch_cc(squelch_threshold, 0.001)
 
         # FM Demodulator  input: complex; output: float
-        k = quad_rate/(2*math.pi*max_dev)
+        k = quad_rate / (2*math.pi*max_dev)
         self.quad_demod = analog.quadrature_demod_cf(k)
 
         # FM Deemphasis IIR filter
@@ -81,7 +85,7 @@ class nbfm_rx(gr.hier_block2):
                                             0.5e3,          # Transition band
                                             filter.firdes.WIN_HAMMING)  # filter type
 
-        print "len(audio_taps) =", len(audio_taps)
+        print("len(audio_taps) =", len(audio_taps))
 
         # Decimating audio filter
         # input: float; output: float; taps: float
@@ -90,5 +94,5 @@ class nbfm_rx(gr.hier_block2):
         self.connect(self, self.quad_demod, self.deemph, self.audio_filter, self)
 
     def set_max_deviation(self, max_dev):
-        k = self._quad_rate/(2*math.pi*max_dev)
+        k = self._quad_rate / (2*math.pi*max_dev)
         self.quad_demod.set_gain(k)
diff --git a/gr-analog/python/analog/nbfm_tx.py b/gr-analog/python/analog/nbfm_tx.py
index aa6c1eccc7..a7620451eb 100644
--- a/gr-analog/python/analog/nbfm_tx.py
+++ b/gr-analog/python/analog/nbfm_tx.py
@@ -19,14 +19,18 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import unicode_literals
+
 import math
+
 from gnuradio import gr, filter
-from fm_emph import fm_preemph
+from .fm_emph import fm_preemph
+
+from . import analog_swig as analog
 
-try:
-    from gnuradio import analog
-except ImportError:
-    import analog_swig as analog
 
 class nbfm_tx(gr.hier_block2):
     def __init__(self, audio_rate, quad_rate, tau=75e-6, max_dev=5e3, fh=-1.0):
@@ -46,16 +50,16 @@ class nbfm_tx(gr.hier_block2):
         quad_rate must be an integer multiple of audio_rate.
         """
 
-	gr.hier_block2.__init__(self, "nbfm_tx",
-				gr.io_signature(1, 1, gr.sizeof_float),      # Input signature
-				gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature
+        gr.hier_block2.__init__(self, "nbfm_tx",
+                                gr.io_signature(1, 1, gr.sizeof_float),      # Input signature
+                                gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature
 
         # FIXME audio_rate and quad_rate ought to be exact rationals
         self._audio_rate = audio_rate = int(audio_rate)
         self._quad_rate = quad_rate = int(quad_rate)
 
         if quad_rate % audio_rate != 0:
-            raise ValueError, "quad_rate is not an integer multiple of audio_rate"
+            raise ValueError("quad_rate is not an integer multiple of audio_rate")
 
 
         do_interp = audio_rate != quad_rate
@@ -66,10 +70,10 @@ class nbfm_tx(gr.hier_block2):
                                                  quad_rate,       # Fs
                                                  4500,            # passband cutoff
                                                  7000,            # stopband cutoff
-                                                 0.1,   	  # passband ripple dB
+                                                 0.1,             # passband ripple dB
                                                  40)              # stopband atten dB
 
-            #print "len(interp_taps) =", len(interp_taps)
+            #print("len(interp_taps) =", len(interp_taps))
             self.interpolator = filter.interp_fir_filter_fff (interp_factor, interp_taps)
 
         self.preemph = fm_preemph(quad_rate, tau=tau, fh=fh)
@@ -90,10 +94,10 @@ class nbfm_tx(gr.hier_block2):
 
 class ctcss_gen_f(gr.hier_block2):
     def __init__(self, sample_rate, tone_freq):
-	gr.hier_block2.__init__(self, "ctcss_gen_f",
-				gr.io_signature(0, 0, 0),               # Input signature
-				gr.io_signature(1, 1, gr.sizeof_float)) # Output signature
+        gr.hier_block2.__init__(self, "ctcss_gen_f",
+                                gr.io_signature(0, 0, 0),               # Input signature
+                                gr.io_signature(1, 1, gr.sizeof_float)) # Output signature
 
         self.plgen = analog.sig_source_f(sample_rate, analog.GR_SIN_WAVE,
                                          tone_freq, 0.1, 0.0)
-	self.connect(self.plgen, self)
+        self.connect(self.plgen, self)
diff --git a/gr-analog/python/analog/qa_agc.py b/gr-analog/python/analog/qa_agc.py
old mode 100755
new mode 100644
index 70c9ba578c..bac661f8b2
--- a/gr-analog/python/analog/qa_agc.py
+++ b/gr-analog/python/analog/qa_agc.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, analog, blocks
 
 class test_agc(gr_unittest.TestCase):
@@ -33,10 +34,10 @@ class test_agc(gr_unittest.TestCase):
     def test_001_sets(self):
         agc = analog.agc_cc(1e-3, 1, 1)
 
-	agc.set_rate(1)
-	agc.set_reference(1.1)
-	agc.set_gain(1.1)
-	agc.set_max_gain(100)
+        agc.set_rate(1)
+        agc.set_reference(1.1)
+        agc.set_gain(1.1)
+        agc.set_max_gain(100)
 
         self.assertAlmostEqual(agc.rate(), 1)
         self.assertAlmostEqual(agc.reference(), 1.1)
@@ -118,10 +119,10 @@ class test_agc(gr_unittest.TestCase):
     def test_002_sets(self):
         agc = analog.agc_ff(1e-3, 1, 1)
 
-	agc.set_rate(1)
-	agc.set_reference(1.1)
-	agc.set_gain(1.1)
-	agc.set_max_gain(100)
+        agc.set_rate(1)
+        agc.set_reference(1.1)
+        agc.set_gain(1.1)
+        agc.set_max_gain(100)
 
         self.assertAlmostEqual(agc.rate(), 1)
         self.assertAlmostEqual(agc.reference(), 1.1)
@@ -203,11 +204,11 @@ class test_agc(gr_unittest.TestCase):
     def test_003_sets(self):
         agc = analog.agc2_cc(1e-3, 1e-1, 1, 1)
 
-	agc.set_attack_rate(1)
-	agc.set_decay_rate(2)
-	agc.set_reference(1.1)
-	agc.set_gain(1.1)
-	agc.set_max_gain(100)
+        agc.set_attack_rate(1)
+        agc.set_decay_rate(2)
+        agc.set_reference(1.1)
+        agc.set_gain(1.1)
+        agc.set_max_gain(100)
 
         self.assertAlmostEqual(agc.attack_rate(), 1)
         self.assertAlmostEqual(agc.decay_rate(), 2)
@@ -290,11 +291,11 @@ class test_agc(gr_unittest.TestCase):
     def test_004_sets(self):
         agc = analog.agc2_ff(1e-3, 1e-1, 1, 1)
 
-	agc.set_attack_rate(1)
-	agc.set_decay_rate(2)
-	agc.set_reference(1.1)
-	agc.set_gain(1.1)
-	agc.set_max_gain(100)
+        agc.set_attack_rate(1)
+        agc.set_decay_rate(2)
+        agc.set_reference(1.1)
+        agc.set_gain(1.1)
+        agc.set_max_gain(100)
 
         self.assertAlmostEqual(agc.attack_rate(), 1)
         self.assertAlmostEqual(agc.decay_rate(), 2)
@@ -450,10 +451,10 @@ class test_agc(gr_unittest.TestCase):
     def test_006_sets(self):
         agc = analog.agc3_cc(1e-3, 1e-1, 1)
 
-	agc.set_attack_rate(1)
-	agc.set_decay_rate(2)
-	agc.set_reference(1.1)
-	agc.set_gain(1.1)
+        agc.set_attack_rate(1)
+        agc.set_decay_rate(2)
+        agc.set_reference(1.1)
+        agc.set_gain(1.1)
 
         self.assertAlmostEqual(agc.attack_rate(), 1)
         self.assertAlmostEqual(agc.decay_rate(), 2)
@@ -481,7 +482,7 @@ class test_agc(gr_unittest.TestCase):
         tb.run()
         dst_data = dst1.data()
         M = 100
-        result = map(lambda x: abs(x), dst_data[N-M:])
+        result = [abs(x) for x in dst_data[N-M:]]
         self.assertFloatTuplesAlmostEqual(result, M*[ref,], 4)
 
     def test_100(self):
diff --git a/gr-analog/python/analog/qa_cpfsk.py b/gr-analog/python/analog/qa_cpfsk.py
old mode 100755
new mode 100644
index be2e0a9b7e..ef8ea0cb3f
--- a/gr-analog/python/analog/qa_cpfsk.py
+++ b/gr-analog/python/analog/qa_cpfsk.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 import math
 
 from gnuradio import gr, gr_unittest, analog, blocks
@@ -50,7 +51,7 @@ class test_cpfsk_bc(gr_unittest.TestCase):
 
     def test_cpfsk_bc_002(self):
         src_data = 10*[0, 1]
-        expected_result = map(lambda x: complex(2*x-1,0), src_data)
+        expected_result = [complex(2*x-1,0) for x in src_data]
 
         src = blocks.vector_source_b(src_data)
         op = analog.cpfsk_bc(2, 1, 2)
diff --git a/gr-analog/python/analog/qa_ctcss_squelch.py b/gr-analog/python/analog/qa_ctcss_squelch.py
old mode 100755
new mode 100644
index 3be1e9de3b..f3db194f5d
--- a/gr-analog/python/analog/qa_ctcss_squelch.py
+++ b/gr-analog/python/analog/qa_ctcss_squelch.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+
 from gnuradio import gr, gr_unittest, analog, blocks
 
 class test_ctcss_squelch(gr_unittest.TestCase):
@@ -63,7 +65,7 @@ class test_ctcss_squelch(gr_unittest.TestCase):
         ramp = 1
         gate = True
 
-        src_data = map(lambda x: float(x)/10.0, range(1, 40))
+        src_data = [float(x) / 10.0 for x in range(1, 40)]
         expected_result = src_data
         expected_result[0] = 0
 
@@ -88,7 +90,7 @@ class test_ctcss_squelch(gr_unittest.TestCase):
         ramp = 1
         gate = False
 
-        src_data = map(lambda x: float(x)/10.0, range(1, 40))
+        src_data = [float(x) / 10.0 for x in range(1, 40)]
         src = blocks.vector_source_f(src_data)
         op = analog.ctcss_squelch_ff(rate, freq, level,
                                      length, ramp, gate)
diff --git a/gr-analog/python/analog/qa_dpll.py b/gr-analog/python/analog/qa_dpll.py
old mode 100755
new mode 100644
index 3ae8a3684b..2d215e3d9d
--- a/gr-analog/python/analog/qa_dpll.py
+++ b/gr-analog/python/analog/qa_dpll.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+
 from gnuradio import gr, gr_unittest, analog, blocks
 
 class test_dpll_bb(gr_unittest.TestCase):
@@ -42,7 +44,7 @@ class test_dpll_bb(gr_unittest.TestCase):
         self.assertAlmostEqual(g, 0.2)
 
         f = op.freq()
-        self.assertEqual(1/period, f)
+        self.assertEqual(1 / period, f)
 
         d0 = 1.0 - 0.5*f;
         d1 = op.decision_threshold()
diff --git a/gr-analog/python/analog/qa_fastnoise.py b/gr-analog/python/analog/qa_fastnoise.py
index 91e1cb87b7..e90fcfd96e 100644
--- a/gr-analog/python/analog/qa_fastnoise.py
+++ b/gr-analog/python/analog/qa_fastnoise.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, analog
 
 class test_fastnoise_source(gr_unittest.TestCase):
diff --git a/gr-analog/python/analog/qa_fmdet.py b/gr-analog/python/analog/qa_fmdet.py
old mode 100755
new mode 100644
index a9c88c3b95..77ad213411
--- a/gr-analog/python/analog/qa_fmdet.py
+++ b/gr-analog/python/analog/qa_fmdet.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, analog, blocks
 
 class test_fmdet_cf(gr_unittest.TestCase):
diff --git a/gr-analog/python/analog/qa_frequency_modulator.py b/gr-analog/python/analog/qa_frequency_modulator.py
old mode 100755
new mode 100644
index 0f5c45b11a..29282b0ea6
--- a/gr-analog/python/analog/qa_frequency_modulator.py
+++ b/gr-analog/python/analog/qa_frequency_modulator.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+
 import math
 
 from gnuradio import gr, gr_unittest, analog, blocks
@@ -38,9 +40,9 @@ class test_frequency_modulator(gr_unittest.TestCase):
 
     def test_fm_001(self):
         pi = math.pi
-        sensitivity = pi/4
-        src_data = (1.0/4, 1.0/2, 1.0/4, -1.0/4, -1.0/2, -1/4.0)
-        running_sum = (pi/16, 3*pi/16, pi/4, 3*pi/16, pi/16, 0)
+        sensitivity = pi / 4
+        src_data = (1.0 / 4, 1.0 / 2, 1.0 / 4, -1.0 / 4, -1.0 / 2, -1 / 4.0)
+        running_sum = (pi / 16, 3*pi/16, pi / 4, 3*pi/16, pi / 16, 0)
         expected_result = tuple([sincos(x) for x in running_sum])
         src = blocks.vector_source_f(src_data)
         op = analog.frequency_modulator_fc(sensitivity)
diff --git a/gr-analog/python/analog/qa_noise.py b/gr-analog/python/analog/qa_noise.py
old mode 100755
new mode 100644
index 5576773f23..cf2e9e607f
--- a/gr-analog/python/analog/qa_noise.py
+++ b/gr-analog/python/analog/qa_noise.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, analog
 
 class test_noise_source(gr_unittest.TestCase):
diff --git a/gr-analog/python/analog/qa_phase_modulator.py b/gr-analog/python/analog/qa_phase_modulator.py
old mode 100755
new mode 100644
index c6223e5cd4..7f7d57fa75
--- a/gr-analog/python/analog/qa_phase_modulator.py
+++ b/gr-analog/python/analog/qa_phase_modulator.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+
 import math
 
 from gnuradio import gr, gr_unittest, analog, blocks
@@ -38,8 +40,8 @@ class test_phase_modulator(gr_unittest.TestCase):
 
     def test_fm_001(self):
         pi = math.pi
-        sensitivity = pi/4
-        src_data = (1.0/4, 1.0/2, 1.0/4, -1.0/4, -1.0/2, -1/4.0)
+        sensitivity = pi / 4
+        src_data = (1.0 / 4, 1.0 / 2, 1.0 / 4, -1.0 / 4, -1.0 / 2, -1 / 4.0)
         expected_result = tuple([sincos(sensitivity*x) for x in src_data])
 
         src = blocks.vector_source_f(src_data)
diff --git a/gr-analog/python/analog/qa_pll_carriertracking.py b/gr-analog/python/analog/qa_pll_carriertracking.py
old mode 100755
new mode 100644
index 10ad414644..56bb14d2cb
--- a/gr-analog/python/analog/qa_pll_carriertracking.py
+++ b/gr-analog/python/analog/qa_pll_carriertracking.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+
 import math
 
 from gnuradio import gr, gr_unittest, analog, blocks
@@ -137,7 +139,7 @@ class test_pll_carriertracking(gr_unittest.TestCase):
         sampling_freq = 10e3
         freq = sampling_freq / 100
 
-        loop_bw = math.pi/100.0
+        loop_bw = math.pi / 100.0
         maxf = 1
         minf = -1
 
diff --git a/gr-analog/python/analog/qa_pll_freqdet.py b/gr-analog/python/analog/qa_pll_freqdet.py
old mode 100755
new mode 100644
index c7a8aa8363..2006dd7360
--- a/gr-analog/python/analog/qa_pll_freqdet.py
+++ b/gr-analog/python/analog/qa_pll_freqdet.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+
 import math
 
 from gnuradio import gr, gr_unittest, analog, blocks
@@ -137,7 +139,7 @@ class test_pll_freqdet(gr_unittest.TestCase):
         sampling_freq = 10e3
         freq = sampling_freq / 100
 
-        loop_bw = math.pi/100.0
+        loop_bw = math.pi / 100.0
         maxf = 1
         minf = -1
 
@@ -153,7 +155,7 @@ class test_pll_freqdet(gr_unittest.TestCase):
         dst_data = dst.data()
 
         # convert it from normalized frequency to absolute frequency (Hz)
-        dst_data = [i*(sampling_freq/(2*math.pi)) for i in dst_data]
+        dst_data = [i*(sampling_freq / (2*math.pi)) for i in dst_data]
 
         self.assertFloatTuplesAlmostEqual(expected_result, dst_data, 3)
 
diff --git a/gr-analog/python/analog/qa_pll_refout.py b/gr-analog/python/analog/qa_pll_refout.py
old mode 100755
new mode 100644
index 835b6a4522..ac1139cc03
--- a/gr-analog/python/analog/qa_pll_refout.py
+++ b/gr-analog/python/analog/qa_pll_refout.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+
 import math
 
 from gnuradio import gr, gr_unittest, analog, blocks
@@ -137,7 +139,7 @@ class test_pll_refout(gr_unittest.TestCase):
         sampling_freq = 10e3
         freq = sampling_freq / 100
 
-        loop_bw = math.pi/100.0
+        loop_bw = math.pi / 100.0
         maxf = 1
         minf = -1
 
diff --git a/gr-analog/python/analog/qa_probe_avg_mag_sqrd.py b/gr-analog/python/analog/qa_probe_avg_mag_sqrd.py
old mode 100755
new mode 100644
index a52c0806e3..68652eb364
--- a/gr-analog/python/analog/qa_probe_avg_mag_sqrd.py
+++ b/gr-analog/python/analog/qa_probe_avg_mag_sqrd.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 import math
 
 from gnuradio import gr, gr_unittest, analog, blocks
diff --git a/gr-analog/python/analog/qa_pwr_squelch.py b/gr-analog/python/analog/qa_pwr_squelch.py
old mode 100755
new mode 100644
index 561ca79a7c..9f84a61402
--- a/gr-analog/python/analog/qa_pwr_squelch.py
+++ b/gr-analog/python/analog/qa_pwr_squelch.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+
 from gnuradio import gr, gr_unittest, analog, blocks
 
 class test_pwr_squelch(gr_unittest.TestCase):
@@ -61,7 +63,7 @@ class test_pwr_squelch(gr_unittest.TestCase):
         alpha = 0.0001
         thr = -25
 
-        src_data = map(lambda x: float(x)/10.0, range(1, 40))
+        src_data = [float(x) / 10.0 for x in range(1, 40)]
         src = blocks.vector_source_c(src_data)
         op = analog.pwr_squelch_cc(thr, alpha)
         dst = blocks.vector_sink_c()
@@ -107,7 +109,7 @@ class test_pwr_squelch(gr_unittest.TestCase):
         alpha = 0.0001
         thr = -25
 
-        src_data = map(lambda x: float(x)/10.0, range(1, 40))
+        src_data = [float(x) / 10.0 for x in range(1, 40)]
         src = blocks.vector_source_f(src_data)
         op = analog.pwr_squelch_ff(thr, alpha)
         dst = blocks.vector_sink_f()
diff --git a/gr-analog/python/analog/qa_quadrature_demod.py b/gr-analog/python/analog/qa_quadrature_demod.py
old mode 100755
new mode 100644
index 08f3f4600e..e3a513b9ab
--- a/gr-analog/python/analog/qa_quadrature_demod.py
+++ b/gr-analog/python/analog/qa_quadrature_demod.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+
 import cmath
 
 from gnuradio import gr, gr_unittest, analog, blocks
@@ -37,13 +39,13 @@ class test_quadrature_demod(gr_unittest.TestCase):
         fs = 8000.0
 
         src_data = []
-        for i in xrange(200):
-            ti = i/fs
+        for i in range(200):
+            ti = i / fs
             src_data.append(cmath.exp(2j*cmath.pi*f*ti))
 
         # f/fs is a quarter turn per sample.
         # Set the gain based on this to get 1 out.
-        gain = 1.0/(cmath.pi/4)
+        gain = 1.0 / (cmath.pi / 4)
 
         expected_result = [0,] + 199*[1.0]
 
diff --git a/gr-analog/python/analog/qa_rail_ff.py b/gr-analog/python/analog/qa_rail_ff.py
old mode 100755
new mode 100644
index e3990dfd3a..93cde00a97
--- a/gr-analog/python/analog/qa_rail_ff.py
+++ b/gr-analog/python/analog/qa_rail_ff.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, analog, blocks
 
 def clip(x, lo, hi):
@@ -60,7 +61,7 @@ class test_rail(gr_unittest.TestCase):
         lo = -0.75
         hi = 0.90
         src_data = [-2, -1, -0.5, -0.25, 0, 0.25, 0.5, 1, 2]
-        expected_result = map(lambda x: clip(x, lo, hi), src_data)
+        expected_result = [clip(x, lo, hi) for x in src_data]
 
         src = blocks.vector_source_f(src_data)
         op = analog.rail_ff(lo, hi)
diff --git a/gr-analog/python/analog/qa_random_uniform_source.py b/gr-analog/python/analog/qa_random_uniform_source.py
old mode 100755
new mode 100644
index 474c5716c7..d02ea7ea87
--- a/gr-analog/python/analog/qa_random_uniform_source.py
+++ b/gr-analog/python/analog/qa_random_uniform_source.py
@@ -21,6 +21,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest
 from gnuradio import blocks, analog
 import numpy as np
diff --git a/gr-analog/python/analog/qa_sig_source.py b/gr-analog/python/analog/qa_sig_source.py
old mode 100755
new mode 100644
index 8d050fa72b..a38db29280
--- a/gr-analog/python/analog/qa_sig_source.py
+++ b/gr-analog/python/analog/qa_sig_source.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+
 import math
 import pmt
 from gnuradio import gr, gr_unittest, analog, blocks
diff --git a/gr-analog/python/analog/qa_simple_squelch.py b/gr-analog/python/analog/qa_simple_squelch.py
old mode 100755
new mode 100644
index b09a3b2a87..a0b09e7198
--- a/gr-analog/python/analog/qa_simple_squelch.py
+++ b/gr-analog/python/analog/qa_simple_squelch.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+
 from gnuradio import gr, gr_unittest, analog, blocks
 
 class test_simple_squelch(gr_unittest.TestCase):
@@ -48,7 +50,7 @@ class test_simple_squelch(gr_unittest.TestCase):
         alpha = 0.0001
         thr = -25
 
-        src_data = map(lambda x: float(x)/10.0, range(1, 40))
+        src_data = [float(x) / 10.0 for x in range(1, 40)]
         src = blocks.vector_source_c(src_data)
         op = analog.simple_squelch_cc(thr, alpha)
         dst = blocks.vector_sink_c()
diff --git a/gr-analog/python/analog/standard_squelch.py b/gr-analog/python/analog/standard_squelch.py
index 3ed9ebceaa..9609f2449e 100644
--- a/gr-analog/python/analog/standard_squelch.py
+++ b/gr-analog/python/analog/standard_squelch.py
@@ -1,3 +1,5 @@
+from __future__ import division
+from __future__ import unicode_literals
 #
 # Copyright 2005,2007,2012 Free Software Foundation, Inc.
 #
@@ -26,29 +28,29 @@ from gnuradio import filter
 
 class standard_squelch(gr.hier_block2):
     def __init__(self, audio_rate):
-	gr.hier_block2.__init__(self, "standard_squelch",
-				gr.io_signature(1, 1, gr.sizeof_float), # Input signature
-				gr.io_signature(1, 1, gr.sizeof_float)) # Output signature
+        gr.hier_block2.__init__(self, "standard_squelch",
+                                gr.io_signature(1, 1, gr.sizeof_float), # Input signature
+                                gr.io_signature(1, 1, gr.sizeof_float)) # Output signature
 
         self.input_node = blocks.add_const_ff(0)          # FIXME kludge
 
         self.low_iir = filter.iir_filter_ffd((0.0193,0,-0.0193),(1,1.9524,-0.9615))
         self.low_square = blocks.multiply_ff()
-        self.low_smooth = filter.single_pole_iir_filter_ff(1/(0.01*audio_rate))   # 100ms time constant
+        self.low_smooth = filter.single_pole_iir_filter_ff(1 / (0.01*audio_rate))   # 100ms time constant
 
         self.hi_iir = filter.iir_filter_ffd((0.0193,0,-0.0193),(1,1.3597,-0.9615))
         self.hi_square = blocks.multiply_ff()
-        self.hi_smooth = filter.single_pole_iir_filter_ff(1/(0.01*audio_rate))
+        self.hi_smooth = filter.single_pole_iir_filter_ff(1 / (0.01*audio_rate))
 
         self.sub = blocks.sub_ff();
         self.add = blocks.add_ff();
         self.gate = blocks.threshold_ff(0.3,0.43,0)
-        self.squelch_lpf = filter.single_pole_iir_filter_ff(1/(0.01*audio_rate))
+        self.squelch_lpf = filter.single_pole_iir_filter_ff(1 / (0.01*audio_rate))
 
         self.div = blocks.divide_ff()
         self.squelch_mult = blocks.multiply_ff()
 
-	self.connect(self, self.input_node)
+        self.connect(self, self.input_node)
         self.connect(self.input_node, (self.squelch_mult, 0))
 
         self.connect(self.input_node,self.low_iir)
@@ -66,7 +68,7 @@ class standard_squelch(gr.hier_block2):
         self.connect(self.sub, (self.div, 0))
         self.connect(self.add, (self.div, 1))
         self.connect(self.div, self.gate, self.squelch_lpf, (self.squelch_mult,1))
-	self.connect(self.squelch_mult, self)
+        self.connect(self.squelch_mult, self)
 
     def set_threshold(self, threshold):
         self.gate.set_hi(threshold)
@@ -75,4 +77,4 @@ class standard_squelch(gr.hier_block2):
         return self.gate.hi()
 
     def squelch_range(self):
-        return (0.0, 1.0, 1.0/100)
+        return (0.0, 1.0, 1.0 / 100)
diff --git a/gr-analog/python/analog/wfm_rcv.py b/gr-analog/python/analog/wfm_rcv.py
index d35d219275..c1f6dea339 100644
--- a/gr-analog/python/analog/wfm_rcv.py
+++ b/gr-analog/python/analog/wfm_rcv.py
@@ -19,14 +19,17 @@
 # Boston, MA 02110-1301, USA.
 #
 
-from gnuradio import gr, filter
-from fm_emph import fm_deemph
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import unicode_literals
+
 import math
 
-try:
-    from gnuradio import analog
-except ImportError:
-    import analog_swig as analog
+from gnuradio import gr, filter
+
+from . import analog_swig as analog
+from .fm_emph import fm_deemph
+
 
 class wfm_rcv(gr.hier_block2):
     def __init__ (self, quad_rate, audio_decimation):
@@ -40,14 +43,14 @@ class wfm_rcv(gr.hier_block2):
             quad_rate: input sample rate of complex baseband input. (float)
             audio_decimation: how much to decimate quad_rate to get to audio. (integer)
         """
-	gr.hier_block2.__init__(self, "wfm_rcv",
-				gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
-				gr.io_signature(1, 1, gr.sizeof_float))      # Output signature
+        gr.hier_block2.__init__(self, "wfm_rcv",
+                                gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
+                                gr.io_signature(1, 1, gr.sizeof_float))      # Output signature
 
         volume = 20.
 
         max_dev = 75e3
-        fm_demod_gain = quad_rate/(2*math.pi*max_dev)
+        fm_demod_gain = quad_rate / (2*math.pi*max_dev)
         audio_rate = quad_rate / audio_decimation
 
 
@@ -64,7 +67,7 @@ class wfm_rcv(gr.hier_block2):
         width_of_transition_band = audio_rate / 32
         audio_coeffs = filter.firdes.low_pass(1.0,            # gain
                                               quad_rate,      # sampling rate
-                                              audio_rate/2 - width_of_transition_band,
+                                              audio_rate / 2 - width_of_transition_band,
                                               width_of_transition_band,
                                               filter.firdes.WIN_HAMMING)
         # input: float; output: float
diff --git a/gr-analog/python/analog/wfm_rcv_fmdet.py b/gr-analog/python/analog/wfm_rcv_fmdet.py
index b7cd1458fb..fe91465a3b 100644
--- a/gr-analog/python/analog/wfm_rcv_fmdet.py
+++ b/gr-analog/python/analog/wfm_rcv_fmdet.py
@@ -19,16 +19,19 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import unicode_literals
+
+import math
+
 from gnuradio import gr
 from gnuradio import blocks
 from gnuradio import filter
-from fm_emph import fm_deemph
-import math
 
-try:
-    from gnuradio import analog
-except ImportError:
-    import analog_swig as analog
+from . import analog_swig as analog
+from .fm_emph import fm_deemph
+
 
 class wfm_rcv_fmdet(gr.hier_block2):
     def __init__ (self, demod_rate, audio_decimation):
@@ -43,11 +46,11 @@ class wfm_rcv_fmdet(gr.hier_block2):
             demod_rate: input sample rate of complex baseband input. (float)
             audio_decimation: how much to decimate demod_rate to get to audio. (integer)
         """
-	gr.hier_block2.__init__(self, "wfm_rcv_fmdet",
-				gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
-				gr.io_signature(2, 2, gr.sizeof_float))      # Output signature
-        lowfreq = -125e3/demod_rate
-	highfreq = 125e3/demod_rate
+        gr.hier_block2.__init__(self, "wfm_rcv_fmdet",
+                                gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
+                                gr.io_signature(2, 2, gr.sizeof_float))      # Output signature
+        lowfreq = -125e3 / demod_rate
+        highfreq = 125e3 / demod_rate
         audio_rate = demod_rate / audio_decimation
 
         # We assign to self so that outsiders can grab the demodulator
@@ -98,8 +101,8 @@ class wfm_rcv_fmdet(gr.hier_block2):
             stereo_dsbsc_filter_coeffs = \
                 filter.firdes.complex_band_pass(20.0,
                                                 demod_rate,
-                                                38000-15000/2,
-                                                38000+15000/2,
+                                                38000-15000 / 2,
+                                                38000+15000 / 2,
                                                 width_of_transition_band,
                                                 filter.firdes.WIN_HAMMING)
             #print "len stereo dsbsc filter = ",len(stereo_dsbsc_filter_coeffs)
@@ -127,12 +130,12 @@ class wfm_rcv_fmdet(gr.hier_block2):
             #print "stereo dsbsc filter ", stereo_dsbsc_filter_coeffs
             # construct overlap add filter system from coefficients for stereo carrier
 
-	    self.rds_signal_filter = \
+            self.rds_signal_filter = \
                 filter.fir_filter_fcc(audio_decimation,
                                       stereo_rds_filter_coeffs)
-	    self.rds_carrier_generator = blocks.multiply_cc();
-	    self.rds_signal_generator = blocks.multiply_cc();
-	    self_rds_signal_processor = blocks.null_sink(gr.sizeof_gr_complex);
+            self.rds_carrier_generator = blocks.multiply_cc();
+            self.rds_signal_generator = blocks.multiply_cc();
+            self_rds_signal_processor = blocks.null_sink(gr.sizeof_gr_complex);
 
             loop_bw = 2*math.pi/100.0
             max_freq = -2.0*math.pi*18990/audio_rate;
@@ -191,21 +194,21 @@ class wfm_rcv_fmdet(gr.hier_block2):
             #send it to negative side of a subtracter
             self.connect(self.LmR_real,(self.Make_Right,1))
 
-	    # Make rds carrier by taking the squared pilot tone and
-	    # multiplying by pilot tone
-	    self.connect(self.stereo_basebander,(self.rds_carrier_generator,0))
+            # Make rds carrier by taking the squared pilot tone and
+            # multiplying by pilot tone
+            self.connect(self.stereo_basebander,(self.rds_carrier_generator,0))
             self.connect(self.stereo_carrier_pll_recovery,(self.rds_carrier_generator,1))
 
-	    # take signal, filter off rds, send into mixer 0 channel
-	    self.connect(self.fm_demod,self.rds_signal_filter,(self.rds_signal_generator,0))
+            # take signal, filter off rds, send into mixer 0 channel
+            self.connect(self.fm_demod,self.rds_signal_filter,(self.rds_signal_generator,0))
 
             # take rds_carrier_generator output and send into mixer 1
             # channel
-	    self.connect(self.rds_carrier_generator,(self.rds_signal_generator,1))
+            self.connect(self.rds_carrier_generator,(self.rds_signal_generator,1))
 
-	    # send basebanded rds signal and send into "processor"
-	    # which for now is a null sink
-	    self.connect(self.rds_signal_generator,self_rds_signal_processor)
+            # send basebanded rds signal and send into "processor"
+            # which for now is a null sink
+            self.connect(self.rds_signal_generator,self_rds_signal_processor)
 
 
         if 1:
diff --git a/gr-analog/python/analog/wfm_rcv_pll.py b/gr-analog/python/analog/wfm_rcv_pll.py
index 282e2b14be..b6ca7fe7c2 100644
--- a/gr-analog/python/analog/wfm_rcv_pll.py
+++ b/gr-analog/python/analog/wfm_rcv_pll.py
@@ -19,16 +19,19 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import unicode_literals
+
+import math
+
 from gnuradio import gr
 from gnuradio import blocks
 from gnuradio import filter
-from fm_emph import fm_deemph
-import math
 
-try:
-    from gnuradio import analog
-except ImportError:
-    import analog_swig as analog
+from . import analog_swig as analog
+from .fm_emph import fm_deemph
+
 
 class wfm_rcv_pll(gr.hier_block2):
     def __init__(self, demod_rate, audio_decimation):
@@ -42,9 +45,9 @@ class wfm_rcv_pll(gr.hier_block2):
             demod_rate: input sample rate of complex baseband input. (float)
             audio_decimation: how much to decimate demod_rate to get to audio. (integer)
         """
-	gr.hier_block2.__init__(self, "wfm_rcv_pll",
-				gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
-				gr.io_signature(2, 2, gr.sizeof_float))      # Output signature
+        gr.hier_block2.__init__(self, "wfm_rcv_pll",
+                                gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
+                                gr.io_signature(2, 2, gr.sizeof_float))      # Output signature
         bandwidth = 250e3
         audio_rate = demod_rate / audio_decimation
 
@@ -92,8 +95,8 @@ class wfm_rcv_pll(gr.hier_block2):
             stereo_dsbsc_filter_coeffs = \
                 filter.firdes.complex_band_pass(20.0,
                                                 demod_rate,
-                                                38000-15000/2,
-                                                38000+15000/2,
+                                                38000-15000 / 2,
+                                                38000+15000 / 2,
                                                 width_of_transition_band,
                                                 filter.firdes.WIN_HAMMING)
             #print "len stereo dsbsc filter = ",len(stereo_dsbsc_filter_coeffs)
@@ -120,12 +123,12 @@ class wfm_rcv_pll(gr.hier_block2):
             #print "stereo dsbsc filter ", stereo_dsbsc_filter_coeffs
             # construct overlap add filter system from coefficients for stereo carrier
 
-	    self.rds_signal_filter = \
+            self.rds_signal_filter = \
                 filter.fir_filter_fcc(audio_decimation, stereo_rds_filter_coeffs)
 
-	    self.rds_carrier_generator = blocks.multiply_cc();
-	    self.rds_signal_generator = blocks.multiply_cc();
-	    self_rds_signal_processor = blocks.null_sink(gr.sizeof_gr_complex);
+            self.rds_carrier_generator = blocks.multiply_cc();
+            self.rds_signal_generator = blocks.multiply_cc();
+            self_rds_signal_processor = blocks.null_sink(gr.sizeof_gr_complex);
 
             loop_bw = 2*math.pi/100.0
             max_freq = -2.0*math.pi*18990/audio_rate;
@@ -169,15 +172,15 @@ class wfm_rcv_pll(gr.hier_block2):
             #take the same real part of the DSBSC baseband signal and send it to negative side of a subtracter
             self.connect(self.LmR_real,(self.Make_Right,1))
 
-	    # Make rds carrier by taking the squared pilot tone and multiplying by pilot tone
-	    self.connect(self.stereo_basebander,(self.rds_carrier_generator,0))
+            # Make rds carrier by taking the squared pilot tone and multiplying by pilot tone
+            self.connect(self.stereo_basebander,(self.rds_carrier_generator,0))
             self.connect(self.stereo_carrier_pll_recovery,(self.rds_carrier_generator,1))
-	    # take signal, filter off rds,  send into mixer 0 channel
-	    self.connect(self.fm_demod,self.rds_signal_filter,(self.rds_signal_generator,0))
+            # take signal, filter off rds,  send into mixer 0 channel
+            self.connect(self.fm_demod,self.rds_signal_filter,(self.rds_signal_generator,0))
             # take rds_carrier_generator output and send into mixer 1 channel
-	    self.connect(self.rds_carrier_generator,(self.rds_signal_generator,1))
-	    # send basebanded rds signal and send into "processor" which for now is a null sink
-	    self.connect(self.rds_signal_generator,self_rds_signal_processor)
+            self.connect(self.rds_carrier_generator,(self.rds_signal_generator,1))
+            # send basebanded rds signal and send into "processor" which for now is a null sink
+            self.connect(self.rds_signal_generator,self_rds_signal_processor)
 
 
         if 1:
diff --git a/gr-analog/python/analog/wfm_tx.py b/gr-analog/python/analog/wfm_tx.py
index a1b589350d..9f49ca3ca2 100644
--- a/gr-analog/python/analog/wfm_tx.py
+++ b/gr-analog/python/analog/wfm_tx.py
@@ -19,15 +19,19 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import unicode_literals
+
 import math
+
 from gnuradio import gr
 from gnuradio import filter
-from fm_emph import fm_preemph
 
-try:
-    from gnuradio import analog
-except ImportError:
-    import analog_swig as analog
+from . import analog_swig as analog
+from .fm_emph import fm_preemph
+
 
 class wfm_tx(gr.hier_block2):
     def __init__(self, audio_rate, quad_rate, tau=75e-6, max_dev=75e3, fh=-1.0):
@@ -46,16 +50,16 @@ class wfm_tx(gr.hier_block2):
 
         quad_rate must be an integer multiple of audio_rate.
         """
-	gr.hier_block2.__init__(self, "wfm_tx",
-				gr.io_signature(1, 1, gr.sizeof_float),      # Input signature
-				gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature
+        gr.hier_block2.__init__(self, "wfm_tx",
+                                gr.io_signature(1, 1, gr.sizeof_float),      # Input signature
+                                gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature
 
         # FIXME audio_rate and quad_rate ought to be exact rationals
         audio_rate = int(audio_rate)
         quad_rate = int(quad_rate)
 
         if quad_rate % audio_rate != 0:
-            raise ValueError, "quad_rate is not an integer multiple of audio_rate"
+            raise ValueError("quad_rate is not an integer multiple of audio_rate")
 
 
         do_interp = audio_rate != quad_rate
@@ -66,10 +70,10 @@ class wfm_tx(gr.hier_block2):
                                                  quad_rate,       # Fs
                                                  16000,           # passband cutoff
                                                  18000,           # stopband cutoff
-                                                 0.1,   	  # passband ripple dB
+                                                 0.1,             # passband ripple dB
                                                  40)              # stopband atten dB
 
-            print "len(interp_taps) =", len(interp_taps)
+            print("len(interp_taps) =", len(interp_taps))
             self.interpolator = filter.interp_fir_filter_fff (interp_factor, interp_taps)
 
         self.preemph = fm_preemph(quad_rate, tau=tau, fh=fh)
diff --git a/gr-audio/examples/python/audio_copy.py b/gr-audio/examples/python/audio_copy.py
old mode 100755
new mode 100644
index b68e949497..5909be6508
--- a/gr-audio/examples/python/audio_copy.py
+++ b/gr-audio/examples/python/audio_copy.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import audio
 from gnuradio.eng_arg import eng_float
diff --git a/gr-audio/examples/python/audio_play.py b/gr-audio/examples/python/audio_play.py
old mode 100755
new mode 100644
index 367d7bd201..7d551cc18a
--- a/gr-audio/examples/python/audio_play.py
+++ b/gr-audio/examples/python/audio_play.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import audio
 from gnuradio import blocks
diff --git a/gr-audio/examples/python/audio_to_file.py b/gr-audio/examples/python/audio_to_file.py
old mode 100755
new mode 100644
index b385abf925..e35bb70382
--- a/gr-audio/examples/python/audio_to_file.py
+++ b/gr-audio/examples/python/audio_to_file.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import audio
 from gnuradio import blocks
diff --git a/gr-audio/examples/python/dial_tone.py b/gr-audio/examples/python/dial_tone.py
old mode 100755
new mode 100644
index ebef8c01cb..98a75e6bb5
--- a/gr-audio/examples/python/dial_tone.py
+++ b/gr-audio/examples/python/dial_tone.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import audio
 from gnuradio.eng_arg import eng_float
diff --git a/gr-audio/examples/python/dial_tone_daemon.py b/gr-audio/examples/python/dial_tone_daemon.py
old mode 100755
new mode 100644
index 9919e367a6..932ae07d4f
--- a/gr-audio/examples/python/dial_tone_daemon.py
+++ b/gr-audio/examples/python/dial_tone_daemon.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import unicode_literals
 from gnuradio import gr, gru
 from gnuradio import audio
 from gnuradio.eng_arg import eng_float
@@ -54,5 +56,5 @@ class my_top_block(gr.top_block):
 
 if __name__ == '__main__':
     pid = gru.daemonize()
-    print "To stop this program, enter 'kill %d'" % pid
+    print("To stop this program, enter 'kill %d'" % pid)
     my_top_block().run()
diff --git a/gr-audio/examples/python/dial_tone_wav.py b/gr-audio/examples/python/dial_tone_wav.py
old mode 100755
new mode 100644
index 351ca94e78..b9cf6bc510
--- a/gr-audio/examples/python/dial_tone_wav.py
+++ b/gr-audio/examples/python/dial_tone_wav.py
@@ -22,6 +22,7 @@
 
 # GNU Radio example program to record a dial tone to a WAV file
 
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import blocks
 from gnuradio.eng_arg import eng_float
diff --git a/gr-audio/examples/python/mono_tone.py b/gr-audio/examples/python/mono_tone.py
old mode 100755
new mode 100644
index 653fd575fc..be86a4f6f4
--- a/gr-audio/examples/python/mono_tone.py
+++ b/gr-audio/examples/python/mono_tone.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import audio
 from gnuradio.eng_arg import eng_float
diff --git a/gr-audio/examples/python/multi_tone.py b/gr-audio/examples/python/multi_tone.py
old mode 100755
new mode 100644
index 00c052794a..a2e8702a7a
--- a/gr-audio/examples/python/multi_tone.py
+++ b/gr-audio/examples/python/multi_tone.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import audio
 from gnuradio.eng_arg import eng_float, intx
@@ -59,11 +61,11 @@ class my_top_block(gr.top_block):
         # See "Genesis of a Music".  He was into some very wild tunings...
         base = 392
         ratios = { 1 : 1.0,
-                   3 : 3.0/2,
-                   5 : 5.0/4,
-                   7 : 7.0/4,
-                   9 : 9.0/8,
-                   11 : 11.0/8 }
+                   3 : 3.0 / 2,
+                   5 : 5.0 / 4,
+                   7 : 7.0 / 4,
+                   9 : 9.0 / 8,
+                   11 : 11.0 / 8 }
 
         # progression = (1, 5, 3, 7)
         # progression = (1, 9, 3, 7)
diff --git a/gr-audio/examples/python/noise.py b/gr-audio/examples/python/noise.py
old mode 100755
new mode 100644
index 31fdb16fe5..ee4e7f213c
--- a/gr-audio/examples/python/noise.py
+++ b/gr-audio/examples/python/noise.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import audio
 from gnuradio import digital
diff --git a/gr-audio/examples/python/spectrum_inversion.py b/gr-audio/examples/python/spectrum_inversion.py
old mode 100755
new mode 100644
index 163668e450..f5d5a05b90
--- a/gr-audio/examples/python/spectrum_inversion.py
+++ b/gr-audio/examples/python/spectrum_inversion.py
@@ -26,6 +26,7 @@
 # to a SSB signal on the wrong sideband.
 #
 
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import audio
 from gnuradio import blocks
diff --git a/gr-audio/examples/python/test_resampler.py b/gr-audio/examples/python/test_resampler.py
old mode 100755
new mode 100644
index 4d8a9233e7..daca7fc717
--- a/gr-audio/examples/python/test_resampler.py
+++ b/gr-audio/examples/python/test_resampler.py
@@ -20,6 +20,9 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio import gr, gru
 from gnuradio import audio
 from gnuradio import filter
@@ -54,11 +57,11 @@ class my_top_block(gr.top_block):
         input_rate = int(args.input_rate)
         output_rate = int(args.output_rate)
 
-        interp = gru.lcm(input_rate, output_rate) / input_rate
-        decim = gru.lcm(input_rate, output_rate) / output_rate
+        interp = gru.lcm(input_rate / output_rate, input_rate)
+        decim = gru.lcm(input_rate / output_rate, output_rate)
 
-        print "interp =", interp
-        print "decim  =", decim
+        print("interp =", interp)
+        print("decim  =", decim)
 
         ampl = 0.1
         src0 = analog.sig_source_f(input_rate, analog.GR_SIN_WAVE, 650, ampl)
diff --git a/gr-audio/python/audio/CMakeLists.txt b/gr-audio/python/audio/CMakeLists.txt
index 2edbf21cf4..2f1fee57f5 100644
--- a/gr-audio/python/audio/CMakeLists.txt
+++ b/gr-audio/python/audio/CMakeLists.txt
@@ -41,6 +41,6 @@ if(ENABLE_TESTING)
   file(GLOB py_qa_test_files "qa_*.py")
   foreach(py_qa_test_file ${py_qa_test_files})
     get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE)
-    GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${py_qa_test_file})
+    GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} -B ${py_qa_test_file})
   endforeach(py_qa_test_file)
 endif(ENABLE_TESTING)
diff --git a/gr-audio/python/audio/__init__.py b/gr-audio/python/audio/__init__.py
index 8674c26030..03f5d6a93b 100644
--- a/gr-audio/python/audio/__init__.py
+++ b/gr-audio/python/audio/__init__.py
@@ -26,6 +26,7 @@ ports on a computer.
 The underlying hardware driver is system and OS dependent and this
 module should automatically discover the correct one to use.
 '''
+from __future__ import unicode_literals
 import os
 
 try:
diff --git a/gr-blocks/examples/ctrlport/simple_copy_controller.py b/gr-blocks/examples/ctrlport/simple_copy_controller.py
old mode 100755
new mode 100644
index 7bd05006f5..0f907eef67
--- a/gr-blocks/examples/ctrlport/simple_copy_controller.py
+++ b/gr-blocks/examples/ctrlport/simple_copy_controller.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import unicode_literals
 import sys
 import pmt
 from gnuradio.ctrlport.GNURadioControlPortClient import GNURadioControlPortClient
diff --git a/gr-blocks/examples/ctrlport/usrp_sink_controller.py b/gr-blocks/examples/ctrlport/usrp_sink_controller.py
old mode 100755
new mode 100644
index ec687d80e1..a5dc200705
--- a/gr-blocks/examples/ctrlport/usrp_sink_controller.py
+++ b/gr-blocks/examples/ctrlport/usrp_sink_controller.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import unicode_literals
 import sys
 import pmt
 from gnuradio.ctrlport.GNURadioControlPortClient import GNURadioControlPortClient
diff --git a/gr-blocks/examples/ctrlport/usrp_source_controller.py b/gr-blocks/examples/ctrlport/usrp_source_controller.py
old mode 100755
new mode 100644
index 78c5ae66aa..ec27c84a1b
--- a/gr-blocks/examples/ctrlport/usrp_source_controller.py
+++ b/gr-blocks/examples/ctrlport/usrp_source_controller.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import unicode_literals
 import sys
 import pmt
 from gnuradio.ctrlport.GNURadioControlPortClient import GNURadioControlPortClient
diff --git a/gr-blocks/examples/tags/test_file_tags.py b/gr-blocks/examples/tags/test_file_tags.py
old mode 100755
new mode 100644
index cc11cf594e..0837bcc2ae
--- a/gr-blocks/examples/tags/test_file_tags.py
+++ b/gr-blocks/examples/tags/test_file_tags.py
@@ -20,6 +20,9 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import unicode_literals
+
 from gnuradio import gr
 from gnuradio import blocks
 import sys
@@ -27,7 +30,7 @@ import sys
 try:
     import scipy
 except ImportError:
-    print "Error: Program requires scipy (see: www.scipy.org)."
+    print("Error: Program requires scipy (see: www.scipy.org).")
     sys.exit(1)
 
 def main():
@@ -52,5 +55,3 @@ def main():
 
 if __name__ == "__main__":
     main()
-
-
diff --git a/gr-blocks/python/blocks/CMakeLists.txt b/gr-blocks/python/blocks/CMakeLists.txt
index afb860a075..aa6de297b2 100644
--- a/gr-blocks/python/blocks/CMakeLists.txt
+++ b/gr-blocks/python/blocks/CMakeLists.txt
@@ -53,7 +53,7 @@ if(ENABLE_TESTING)
 
   foreach(py_qa_test_file ${py_qa_test_files})
     get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE)
-    GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${py_qa_test_file})
+    GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} -B ${py_qa_test_file})
   endforeach(py_qa_test_file)
 
 endif(ENABLE_TESTING)
diff --git a/gr-blocks/python/blocks/__init__.py b/gr-blocks/python/blocks/__init__.py
index fc4cc7ab66..148479a21e 100644
--- a/gr-blocks/python/blocks/__init__.py
+++ b/gr-blocks/python/blocks/__init__.py
@@ -22,16 +22,20 @@
 '''
 Processing blocks common to many flowgraphs.
 '''
+
+from __future__ import absolute_import
+from __future__ import unicode_literals
+
 import os
 
 try:
-    from blocks_swig import *
+    from .blocks_swig import *
 except ImportError:
     dirname, filename = os.path.split(os.path.abspath(__file__))
     __path__.append(os.path.join(dirname, "..", "..", "swig"))
-    from blocks_swig import *
+    from .blocks_swig import *
 
-from stream_to_vector_decimator import *
+from .stream_to_vector_decimator import *
 
 #alias old add_vXX and multiply_vXX
 add_vcc = add_cc
diff --git a/gr-blocks/python/blocks/parse_file_metadata.py b/gr-blocks/python/blocks/parse_file_metadata.py
index 7d8d41d166..39092d8abd 100644
--- a/gr-blocks/python/blocks/parse_file_metadata.py
+++ b/gr-blocks/python/blocks/parse_file_metadata.py
@@ -20,6 +20,10 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
+
 import sys
 from gnuradio import gr, blocks
 import pmt
@@ -65,7 +69,7 @@ def parse_header(p, VERBOSE=False):
         r = pmt.dict_ref(p, pmt.string_to_symbol("version"), dump)
         version = pmt.to_long(r)
         if(VERBOSE):
-            print "Version Number: {0}".format(version)
+            print("Version Number: {0}".format(version))
     else:
         sys.stderr.write("Could not find key 'version': invalid or corrupt data file.\n")
         sys.exit(1)
@@ -76,7 +80,7 @@ def parse_header(p, VERBOSE=False):
         samp_rate = pmt.to_double(r)
         info["rx_rate"] = samp_rate
         if(VERBOSE):
-            print "Sample Rate: {0:.2f} sps".format(samp_rate)
+            print("Sample Rate: {0:.2f} sps".format(samp_rate))
     else:
         sys.stderr.write("Could not find key 'sr': invalid or corrupt data file.\n")
         sys.exit(1)
@@ -91,7 +95,7 @@ def parse_header(p, VERBOSE=False):
         t = secs + fracs
         info["rx_time"] = t
         if(VERBOSE):
-            print "Seconds: {0:.6f}".format(t)
+            print("Seconds: {0:.6f}".format(t))
     else:
         sys.stderr.write("Could not find key 'time': invalid or corrupt data file.\n")
         sys.exit(1)
@@ -102,7 +106,7 @@ def parse_header(p, VERBOSE=False):
         dsize = pmt.to_long(r)
         info["size"] = dsize
         if(VERBOSE):
-            print "Item size: {0}".format(dsize)
+            print("Item size: {0}".format(dsize))
     else:
         sys.stderr.write("Could not find key 'size': invalid or corrupt data file.\n")
         sys.exit(1)
@@ -114,7 +118,7 @@ def parse_header(p, VERBOSE=False):
         stype = ftype_to_string[dtype]
         info["type"] = stype
         if(VERBOSE):
-            print "Data Type: {0} ({1})".format(stype, dtype)
+            print("Data Type: {0} ({1})".format(stype, dtype))
     else:
         sys.stderr.write("Could not find key 'type': invalid or corrupt data file.\n")
         sys.exit(1)
@@ -125,7 +129,7 @@ def parse_header(p, VERBOSE=False):
         cplx = pmt.to_bool(r)
         info["cplx"] = cplx
         if(VERBOSE):
-            print "Complex? {0}".format(cplx)
+            print("Complex? {0}".format(cplx))
     else:
         sys.stderr.write("Could not find key 'cplx': invalid or corrupt data file.\n")
         sys.exit(1)
@@ -138,9 +142,9 @@ def parse_header(p, VERBOSE=False):
         info["extra_len"] = seg_start - HEADER_LENGTH
         info["has_extra"] = info["extra_len"] > 0
         if(VERBOSE):
-            print "Header Length: {0} bytes".format(info["hdr_len"])
-            print "Extra Length:  {0}".format((info["extra_len"]))
-            print "Extra Header?  {0}".format(info["has_extra"])
+            print("Header Length: {0} bytes".format(info["hdr_len"]))
+            print("Extra Length:  {0}".format((info["extra_len"])))
+            print("Extra Header?  {0}".format(info["has_extra"]))
     else:
         sys.stderr.write("Could not find key 'strt': invalid or corrupt data file.\n")
         sys.exit(1)
@@ -150,13 +154,13 @@ def parse_header(p, VERBOSE=False):
         r = pmt.dict_ref(p, pmt.string_to_symbol("bytes"), dump)
         nbytes = pmt.to_uint64(r)
 
-        nitems = nbytes/dsize
+        nitems = nbytes / dsize
         info["nitems"] = nitems
         info["nbytes"] = nbytes
 
         if(VERBOSE):
-            print "Size of Data: {0} bytes".format(nbytes)
-            print "              {0} items".format(nitems)
+            print("Size of Data: {0} bytes".format(nbytes))
+            print("              {0} items".format(nitems))
     else:
         sys.stderr.write("Could not find key 'size': invalid or corrupt data file.\n")
         sys.exit(1)
@@ -171,12 +175,12 @@ def parse_extra_dict(p, info, VERBOSE=False):
 
     items = pmt.dict_items(p)
     nitems = pmt.length(items)
-    for i in xrange(nitems):
+    for i in range(nitems):
         item = pmt.nth(i, items)
         key = pmt.symbol_to_string(pmt.car(item))
         val = pmt.cdr(item)
         info[key] = val
         if(VERBOSE):
-            print "{0}: {1}".format(key, val)
+            print("{0}: {1}".format(key, val))
 
     return info
diff --git a/gr-blocks/python/blocks/qa_add_mult_div_sub.py b/gr-blocks/python/blocks/qa_add_mult_div_sub.py
old mode 100755
new mode 100644
index 8699b3a085..f90609f9e0
--- a/gr-blocks/python/blocks/qa_add_mult_div_sub.py
+++ b/gr-blocks/python/blocks/qa_add_mult_div_sub.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 
 class test_add_mult_div_sub(gr_unittest.TestCase):
@@ -31,7 +32,7 @@ class test_add_mult_div_sub(gr_unittest.TestCase):
         self.tb = None
 
     def help_ii(self, src_data, exp_data, op):
-        for s in zip(range(len(src_data)), src_data):
+        for s in zip(list(range(len(src_data))), src_data):
             src = blocks.vector_source_i(s[1])
             self.tb.connect(src, (op, s[0]))
         dst = blocks.vector_sink_i()
@@ -41,7 +42,7 @@ class test_add_mult_div_sub(gr_unittest.TestCase):
         self.assertEqual(exp_data, result_data)
 
     def help_ss(self, src_data, exp_data, op):
-        for s in zip(range(len(src_data)), src_data):
+        for s in zip(list(range(len(src_data))), src_data):
             src = blocks.vector_source_s(s[1])
             self.tb.connect(src, (op, s[0]))
         dst = blocks.vector_sink_s()
@@ -51,7 +52,7 @@ class test_add_mult_div_sub(gr_unittest.TestCase):
         self.assertEqual(exp_data, result_data)
 
     def help_ff(self, src_data, exp_data, op):
-        for s in zip(range(len(src_data)), src_data):
+        for s in zip(list(range(len(src_data))), src_data):
             src = blocks.vector_source_f(s[1])
             self.tb.connect(src, (op, s[0]))
         dst = blocks.vector_sink_f()
@@ -61,7 +62,7 @@ class test_add_mult_div_sub(gr_unittest.TestCase):
         self.assertEqual(exp_data, result_data)
 
     def help_cc(self, src_data, exp_data, op):
-        for s in zip(range(len(src_data)), src_data):
+        for s in zip(list(range(len(src_data))), src_data):
             src = blocks.vector_source_c(s[1])
             self.tb.connect(src, (op, s[0]))
         dst = blocks.vector_sink_c()
diff --git a/gr-blocks/python/blocks/qa_add_mult_v.py b/gr-blocks/python/blocks/qa_add_mult_v.py
old mode 100755
new mode 100644
index 721ee4eca6..eaa33755b7
--- a/gr-blocks/python/blocks/qa_add_mult_v.py
+++ b/gr-blocks/python/blocks/qa_add_mult_v.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 
 class test_add_mult_v(gr_unittest.TestCase):
@@ -31,12 +32,13 @@ class test_add_mult_v(gr_unittest.TestCase):
         self.tb = None
 
     def help_ss(self, size, src_data, exp_data, op):
-        for s in zip(range (len (src_data)), src_data):
+        for s in zip(list(range(len (src_data))), src_data):
             src = blocks.vector_source_s(s[1])
-	    srcv = blocks.stream_to_vector(gr.sizeof_short, size)
-	    self.tb.connect(src, srcv)
+            srcv = blocks.stream_to_vector(gr.sizeof_short, size)
+            self.tb.connect(src, srcv)
             self.tb.connect(srcv, (op, s[0]))
-	rhs = blocks.vector_to_stream(gr.sizeof_short, size)
+
+        rhs = blocks.vector_to_stream(gr.sizeof_short, size)
         dst = blocks.vector_sink_s()
         self.tb.connect(op, rhs, dst)
         self.tb.run()
@@ -44,12 +46,13 @@ class test_add_mult_v(gr_unittest.TestCase):
         self.assertEqual(exp_data, result_data)
 
     def help_ii(self, size, src_data, exp_data, op):
-        for s in zip(range (len (src_data)), src_data):
+        for s in zip(list(range(len (src_data))), src_data):
             src = blocks.vector_source_i(s[1])
-	    srcv = blocks.stream_to_vector(gr.sizeof_int, size)
-	    self.tb.connect(src, srcv)
+            srcv = blocks.stream_to_vector(gr.sizeof_int, size)
+            self.tb.connect(src, srcv)
             self.tb.connect(srcv, (op, s[0]))
-	rhs = blocks.vector_to_stream(gr.sizeof_int, size)
+
+        rhs = blocks.vector_to_stream(gr.sizeof_int, size)
         dst = blocks.vector_sink_i()
         self.tb.connect(op, rhs, dst)
         self.tb.run()
@@ -57,12 +60,13 @@ class test_add_mult_v(gr_unittest.TestCase):
         self.assertEqual(exp_data, result_data)
 
     def help_ff(self, size, src_data, exp_data, op):
-        for s in zip(range (len (src_data)), src_data):
+        for s in zip(list(range(len (src_data))), src_data):
             src = blocks.vector_source_f(s[1])
-	    srcv = blocks.stream_to_vector(gr.sizeof_float, size)
-	    self.tb.connect(src, srcv)
+            srcv = blocks.stream_to_vector(gr.sizeof_float, size)
+            self.tb.connect(src, srcv)
             self.tb.connect(srcv, (op, s[0]))
-	rhs = blocks.vector_to_stream(gr.sizeof_float, size)
+
+        rhs = blocks.vector_to_stream(gr.sizeof_float, size)
         dst = blocks.vector_sink_f()
         self.tb.connect(op, rhs, dst)
         self.tb.run()
@@ -70,12 +74,13 @@ class test_add_mult_v(gr_unittest.TestCase):
         self.assertEqual(exp_data, result_data)
 
     def help_cc(self, size, src_data, exp_data, op):
-        for s in zip(range (len (src_data)), src_data):
+        for s in zip(list(range(len (src_data))), src_data):
             src = blocks.vector_source_c(s[1])
-	    srcv = blocks.stream_to_vector(gr.sizeof_gr_complex, size)
-	    self.tb.connect(src, srcv)
+            srcv = blocks.stream_to_vector(gr.sizeof_gr_complex, size)
+            self.tb.connect(src, srcv)
             self.tb.connect(srcv, (op, s[0]))
-	rhs = blocks.vector_to_stream(gr.sizeof_gr_complex, size)
+
+        rhs = blocks.vector_to_stream(gr.sizeof_gr_complex, size)
         dst = blocks.vector_sink_c()
         self.tb.connect(op, rhs, dst)
         self.tb.run()
@@ -83,9 +88,9 @@ class test_add_mult_v(gr_unittest.TestCase):
         self.assertEqual(exp_data, result_data)
 
     def help_const_ss(self, src_data, exp_data, op):
-	src = blocks.vector_source_s(src_data)
-	srcv = blocks.stream_to_vector(gr.sizeof_short, len(src_data))
-	rhs = blocks.vector_to_stream(gr.sizeof_short, len(src_data))
+        src = blocks.vector_source_s(src_data)
+        srcv = blocks.stream_to_vector(gr.sizeof_short, len(src_data))
+        rhs = blocks.vector_to_stream(gr.sizeof_short, len(src_data))
         dst = blocks.vector_sink_s()
         self.tb.connect(src, srcv, op, rhs, dst)
         self.tb.run()
@@ -93,9 +98,9 @@ class test_add_mult_v(gr_unittest.TestCase):
         self.assertEqual(exp_data, result_data)
 
     def help_const_ii(self, src_data, exp_data, op):
-	src = blocks.vector_source_i(src_data)
-	srcv = blocks.stream_to_vector(gr.sizeof_int, len(src_data))
-	rhs = blocks.vector_to_stream(gr.sizeof_int, len(src_data))
+        src = blocks.vector_source_i(src_data)
+        srcv = blocks.stream_to_vector(gr.sizeof_int, len(src_data))
+        rhs = blocks.vector_to_stream(gr.sizeof_int, len(src_data))
         dst = blocks.vector_sink_i()
         self.tb.connect(src, srcv, op, rhs, dst)
         self.tb.run()
@@ -103,9 +108,9 @@ class test_add_mult_v(gr_unittest.TestCase):
         self.assertEqual(exp_data, result_data)
 
     def help_const_ff(self, src_data, exp_data, op):
-	src = blocks.vector_source_f(src_data)
-	srcv = blocks.stream_to_vector(gr.sizeof_float, len(src_data))
-	rhs = blocks.vector_to_stream(gr.sizeof_float, len(src_data))
+        src = blocks.vector_source_f(src_data)
+        srcv = blocks.stream_to_vector(gr.sizeof_float, len(src_data))
+        rhs = blocks.vector_to_stream(gr.sizeof_float, len(src_data))
         dst = blocks.vector_sink_f()
         self.tb.connect(src, srcv, op, rhs, dst)
         self.tb.run()
@@ -113,9 +118,9 @@ class test_add_mult_v(gr_unittest.TestCase):
         self.assertEqual(exp_data, result_data)
 
     def help_const_cc(self, src_data, exp_data, op):
-	src = blocks.vector_source_c(src_data)
-	srcv = blocks.stream_to_vector(gr.sizeof_gr_complex, len(src_data))
-	rhs = blocks.vector_to_stream(gr.sizeof_gr_complex, len(src_data))
+        src = blocks.vector_source_c(src_data)
+        srcv = blocks.stream_to_vector(gr.sizeof_gr_complex, len(src_data))
+        rhs = blocks.vector_to_stream(gr.sizeof_gr_complex, len(src_data))
         dst = blocks.vector_sink_c()
         self.tb.connect(src, srcv, op, rhs, dst)
         self.tb.run()
@@ -125,234 +130,234 @@ class test_add_mult_v(gr_unittest.TestCase):
     # add_vXX
 
     def test_add_vss_one(self):
-	src1_data = (1,)
-	src2_data = (2,)
-	src3_data = (3,)
-	expected_result = (6,)
-	op = blocks.add_ss(1)
-	self.help_ss(1, (src1_data, src2_data, src3_data), expected_result, op)
+        src1_data = (1,)
+        src2_data = (2,)
+        src3_data = (3,)
+        expected_result = (6,)
+        op = blocks.add_ss(1)
+        self.help_ss(1, (src1_data, src2_data, src3_data), expected_result, op)
 
     def test_add_vss_five(self):
-	src1_data = (1, 2, 3, 4, 5)
-	src2_data = (6, 7, 8, 9, 10)
-	src3_data = (11, 12, 13, 14, 15)
-	expected_result = (18, 21, 24, 27, 30)
-	op = blocks.add_ss(5)
-	self.help_ss(5, (src1_data, src2_data, src3_data), expected_result, op)
+        src1_data = (1, 2, 3, 4, 5)
+        src2_data = (6, 7, 8, 9, 10)
+        src3_data = (11, 12, 13, 14, 15)
+        expected_result = (18, 21, 24, 27, 30)
+        op = blocks.add_ss(5)
+        self.help_ss(5, (src1_data, src2_data, src3_data), expected_result, op)
 
     def test_add_vii_one(self):
-	src1_data = (1,)
-	src2_data = (2,)
-	src3_data = (3,)
-	expected_result = (6,)
-	op = blocks.add_ii(1)
-	self.help_ii(1, (src1_data, src2_data, src3_data), expected_result, op)
+        src1_data = (1,)
+        src2_data = (2,)
+        src3_data = (3,)
+        expected_result = (6,)
+        op = blocks.add_ii(1)
+        self.help_ii(1, (src1_data, src2_data, src3_data), expected_result, op)
 
     def test_add_vii_five(self):
-	src1_data = (1, 2, 3, 4, 5)
-	src2_data = (6, 7, 8, 9, 10)
-	src3_data = (11, 12, 13, 14, 15)
-	expected_result = (18, 21, 24, 27, 30)
-	op = blocks.add_ii(5)
-	self.help_ii(5, (src1_data, src2_data, src3_data), expected_result, op)
+        src1_data = (1, 2, 3, 4, 5)
+        src2_data = (6, 7, 8, 9, 10)
+        src3_data = (11, 12, 13, 14, 15)
+        expected_result = (18, 21, 24, 27, 30)
+        op = blocks.add_ii(5)
+        self.help_ii(5, (src1_data, src2_data, src3_data), expected_result, op)
 
     def test_add_vff_one(self):
-	src1_data = (1.0,)
-	src2_data = (2.0,)
-	src3_data = (3.0,)
-	expected_result = (6.0,)
-	op = blocks.add_ff(1)
-	self.help_ff(1, (src1_data, src2_data, src3_data), expected_result, op)
+        src1_data = (1.0,)
+        src2_data = (2.0,)
+        src3_data = (3.0,)
+        expected_result = (6.0,)
+        op = blocks.add_ff(1)
+        self.help_ff(1, (src1_data, src2_data, src3_data), expected_result, op)
 
     def test_add_vff_five(self):
-	src1_data = (1.0, 2.0, 3.0, 4.0, 5.0)
-	src2_data = (6.0, 7.0, 8.0, 9.0, 10.0)
-	src3_data = (11.0, 12.0, 13.0, 14.0, 15.0)
-	expected_result = (18.0, 21.0, 24.0, 27.0, 30.0)
-	op = blocks.add_ff(5)
-	self.help_ff(5, (src1_data, src2_data, src3_data), expected_result, op)
+        src1_data = (1.0, 2.0, 3.0, 4.0, 5.0)
+        src2_data = (6.0, 7.0, 8.0, 9.0, 10.0)
+        src3_data = (11.0, 12.0, 13.0, 14.0, 15.0)
+        expected_result = (18.0, 21.0, 24.0, 27.0, 30.0)
+        op = blocks.add_ff(5)
+        self.help_ff(5, (src1_data, src2_data, src3_data), expected_result, op)
 
     def test_add_vcc_one(self):
-	src1_data = (1.0+2.0j,)
-	src2_data = (3.0+4.0j,)
-	src3_data = (5.0+6.0j,)
-	expected_result = (9.0+12j,)
-	op = blocks.add_cc(1)
-	self.help_cc(1, (src1_data, src2_data, src3_data), expected_result, op)
+        src1_data = (1.0+2.0j,)
+        src2_data = (3.0+4.0j,)
+        src3_data = (5.0+6.0j,)
+        expected_result = (9.0+12j,)
+        op = blocks.add_cc(1)
+        self.help_cc(1, (src1_data, src2_data, src3_data), expected_result, op)
 
     def test_add_vcc_five(self):
-	src1_data = (1.0+2.0j, 3.0+4.0j, 5.0+6.0j, 7.0+8.0j, 9.0+10.0j)
-	src2_data = (11.0+12.0j, 13.0+14.0j, 15.0+16.0j, 17.0+18.0j, 19.0+20.0j)
-	src3_data = (21.0+22.0j, 23.0+24.0j, 25.0+26.0j, 27.0+28.0j, 29.0+30.0j)
-	expected_result = (33.0+36.0j, 39.0+42.0j, 45.0+48.0j, 51.0+54.0j, 57.0+60.0j)
-	op = blocks.add_cc(5)
-	self.help_cc(5, (src1_data, src2_data, src3_data), expected_result, op)
+        src1_data = (1.0+2.0j, 3.0+4.0j, 5.0+6.0j, 7.0+8.0j, 9.0+10.0j)
+        src2_data = (11.0+12.0j, 13.0+14.0j, 15.0+16.0j, 17.0+18.0j, 19.0+20.0j)
+        src3_data = (21.0+22.0j, 23.0+24.0j, 25.0+26.0j, 27.0+28.0j, 29.0+30.0j)
+        expected_result = (33.0+36.0j, 39.0+42.0j, 45.0+48.0j, 51.0+54.0j, 57.0+60.0j)
+        op = blocks.add_cc(5)
+        self.help_cc(5, (src1_data, src2_data, src3_data), expected_result, op)
 
     # add_const_vXX
 
     def test_add_const_vss_one(self):
-	src_data = (1,)
-	op = blocks.add_const_vss((2,))
-	exp_data = (3,)
-	self.help_const_ss(src_data, exp_data, op)
+        src_data = (1,)
+        op = blocks.add_const_vss((2,))
+        exp_data = (3,)
+        self.help_const_ss(src_data, exp_data, op)
 
     def test_add_const_vss_five(self):
-	src_data = (1, 2, 3, 4, 5)
-	op = blocks.add_const_vss((6, 7, 8, 9, 10))
-	exp_data = (7, 9, 11, 13, 15)
-	self.help_const_ss(src_data, exp_data, op)
+        src_data = (1, 2, 3, 4, 5)
+        op = blocks.add_const_vss((6, 7, 8, 9, 10))
+        exp_data = (7, 9, 11, 13, 15)
+        self.help_const_ss(src_data, exp_data, op)
 
     def test_add_const_vii_one(self):
-	src_data = (1,)
-	op = blocks.add_const_vii((2,))
-	exp_data = (3,)
-	self.help_const_ii(src_data, exp_data, op)
+        src_data = (1,)
+        op = blocks.add_const_vii((2,))
+        exp_data = (3,)
+        self.help_const_ii(src_data, exp_data, op)
 
     def test_add_const_vii_five(self):
-	src_data = (1, 2, 3, 4, 5)
-	op = blocks.add_const_vii((6, 7, 8, 9, 10))
-	exp_data = (7, 9, 11, 13, 15)
-	self.help_const_ii(src_data, exp_data, op)
+        src_data = (1, 2, 3, 4, 5)
+        op = blocks.add_const_vii((6, 7, 8, 9, 10))
+        exp_data = (7, 9, 11, 13, 15)
+        self.help_const_ii(src_data, exp_data, op)
 
     def test_add_const_vff_one(self):
-	src_data = (1.0,)
-	op = blocks.add_const_vff((2.0,))
-	exp_data = (3.0,)
-	self.help_const_ff(src_data, exp_data, op)
+        src_data = (1.0,)
+        op = blocks.add_const_vff((2.0,))
+        exp_data = (3.0,)
+        self.help_const_ff(src_data, exp_data, op)
 
     def test_add_const_vff_five(self):
-	src_data = (1.0, 2.0, 3.0, 4.0, 5.0)
-	op = blocks.add_const_vff((6.0, 7.0, 8.0, 9.0, 10.0))
-	exp_data = (7.0, 9.0, 11.0, 13.0, 15.0)
-	self.help_const_ff(src_data, exp_data, op)
+        src_data = (1.0, 2.0, 3.0, 4.0, 5.0)
+        op = blocks.add_const_vff((6.0, 7.0, 8.0, 9.0, 10.0))
+        exp_data = (7.0, 9.0, 11.0, 13.0, 15.0)
+        self.help_const_ff(src_data, exp_data, op)
 
     def test_add_const_vcc_one(self):
-	src_data = (1.0+2.0j,)
-	op = blocks.add_const_vcc((2.0+3.0j,))
-	exp_data = (3.0+5.0j,)
-	self.help_const_cc(src_data, exp_data, op)
+        src_data = (1.0+2.0j,)
+        op = blocks.add_const_vcc((2.0+3.0j,))
+        exp_data = (3.0+5.0j,)
+        self.help_const_cc(src_data, exp_data, op)
 
     def test_add_const_vcc_five(self):
-	src_data = (1.0+2.0j, 3.0+4.0j, 5.0+6.0j, 7.0+8.0j, 9.0+10.0j)
-	op = blocks.add_const_vcc((11.0+12.0j, 13.0+14.0j, 15.0+16.0j, 17.0+18.0j, 19.0+20.0j))
-	exp_data = (12.0+14.0j, 16.0+18.0j, 20.0+22.0j, 24.0+26.0j, 28.0+30.0j)
-	self.help_const_cc(src_data, exp_data, op)
+        src_data = (1.0+2.0j, 3.0+4.0j, 5.0+6.0j, 7.0+8.0j, 9.0+10.0j)
+        op = blocks.add_const_vcc((11.0+12.0j, 13.0+14.0j, 15.0+16.0j, 17.0+18.0j, 19.0+20.0j))
+        exp_data = (12.0+14.0j, 16.0+18.0j, 20.0+22.0j, 24.0+26.0j, 28.0+30.0j)
+        self.help_const_cc(src_data, exp_data, op)
 
     # multiply_vXX
 
     def test_multiply_vss_one(self):
-	src1_data = (1,)
-	src2_data = (2,)
-	src3_data = (3,)
-	expected_result = (6,)
-	op = blocks.multiply_ss(1)
-	self.help_ss(1, (src1_data, src2_data, src3_data), expected_result, op)
+        src1_data = (1,)
+        src2_data = (2,)
+        src3_data = (3,)
+        expected_result = (6,)
+        op = blocks.multiply_ss(1)
+        self.help_ss(1, (src1_data, src2_data, src3_data), expected_result, op)
 
     def test_multiply_vss_five(self):
-	src1_data = (1, 2, 3, 4, 5)
-	src2_data = (6, 7, 8, 9, 10)
-	src3_data = (11, 12, 13, 14, 15)
-	expected_result = (66, 168, 312, 504, 750)
-	op = blocks.multiply_ss(5)
-	self.help_ss(5, (src1_data, src2_data, src3_data), expected_result, op)
+        src1_data = (1, 2, 3, 4, 5)
+        src2_data = (6, 7, 8, 9, 10)
+        src3_data = (11, 12, 13, 14, 15)
+        expected_result = (66, 168, 312, 504, 750)
+        op = blocks.multiply_ss(5)
+        self.help_ss(5, (src1_data, src2_data, src3_data), expected_result, op)
 
     def test_multiply_vii_one(self):
-	src1_data = (1,)
-	src2_data = (2,)
-	src3_data = (3,)
-	expected_result = (6,)
-	op = blocks.multiply_ii(1)
-	self.help_ii(1, (src1_data, src2_data, src3_data), expected_result, op)
+        src1_data = (1,)
+        src2_data = (2,)
+        src3_data = (3,)
+        expected_result = (6,)
+        op = blocks.multiply_ii(1)
+        self.help_ii(1, (src1_data, src2_data, src3_data), expected_result, op)
 
     def test_multiply_vii_five(self):
-	src1_data = (1, 2, 3, 4, 5)
-	src2_data = (6, 7, 8, 9, 10)
-	src3_data = (11, 12, 13, 14, 15)
-	expected_result = (66, 168, 312, 504, 750)
-	op = blocks.multiply_ii(5)
-	self.help_ii(5, (src1_data, src2_data, src3_data), expected_result, op)
+        src1_data = (1, 2, 3, 4, 5)
+        src2_data = (6, 7, 8, 9, 10)
+        src3_data = (11, 12, 13, 14, 15)
+        expected_result = (66, 168, 312, 504, 750)
+        op = blocks.multiply_ii(5)
+        self.help_ii(5, (src1_data, src2_data, src3_data), expected_result, op)
 
     def test_multiply_vff_one(self):
-	src1_data = (1.0,)
-	src2_data = (2.0,)
-	src3_data = (3.0,)
-	expected_result = (6.0,)
-	op = blocks.multiply_ff(1)
-	self.help_ff(1, (src1_data, src2_data, src3_data), expected_result, op)
+        src1_data = (1.0,)
+        src2_data = (2.0,)
+        src3_data = (3.0,)
+        expected_result = (6.0,)
+        op = blocks.multiply_ff(1)
+        self.help_ff(1, (src1_data, src2_data, src3_data), expected_result, op)
 
     def test_multiply_vff_five(self):
-	src1_data = (1.0, 2.0, 3.0, 4.0, 5.0)
-	src2_data = (6.0, 7.0, 8.0, 9.0, 10.0)
-	src3_data = (11.0, 12.0, 13.0, 14.0, 15.0)
-	expected_result = (66.0, 168.0, 312.0, 504.0, 750.0)
-	op = blocks.multiply_ff(5)
-	self.help_ff(5, (src1_data, src2_data, src3_data), expected_result, op)
+        src1_data = (1.0, 2.0, 3.0, 4.0, 5.0)
+        src2_data = (6.0, 7.0, 8.0, 9.0, 10.0)
+        src3_data = (11.0, 12.0, 13.0, 14.0, 15.0)
+        expected_result = (66.0, 168.0, 312.0, 504.0, 750.0)
+        op = blocks.multiply_ff(5)
+        self.help_ff(5, (src1_data, src2_data, src3_data), expected_result, op)
 
     def test_multiply_vcc_one(self):
-	src1_data = (1.0+2.0j,)
-	src2_data = (3.0+4.0j,)
-	src3_data = (5.0+6.0j,)
-	expected_result = (-85+20j,)
-	op = blocks.multiply_cc(1)
-	self.help_cc(1, (src1_data, src2_data, src3_data), expected_result, op)
+        src1_data = (1.0+2.0j,)
+        src2_data = (3.0+4.0j,)
+        src3_data = (5.0+6.0j,)
+        expected_result = (-85+20j,)
+        op = blocks.multiply_cc(1)
+        self.help_cc(1, (src1_data, src2_data, src3_data), expected_result, op)
 
     def test_multiply_vcc_five(self):
-	src1_data = (1.0+2.0j, 3.0+4.0j, 5.0+6.0j, 7.0+8.0j, 9.0+10.0j)
-	src2_data = (11.0+12.0j, 13.0+14.0j, 15.0+16.0j, 17.0+18.0j, 19.0+20.0j)
-	src3_data = (21.0+22.0j, 23.0+24.0j, 25.0+26.0j, 27.0+28.0j, 29.0+30.0j)
-	expected_result = (-1021.0+428.0j, -2647.0+1754.0j, -4945.0+3704.0j, -8011.0+6374.0j, -11941.0+9860.0j)
-	op = blocks.multiply_cc(5)
-	self.help_cc(5, (src1_data, src2_data, src3_data), expected_result, op)
+        src1_data = (1.0+2.0j, 3.0+4.0j, 5.0+6.0j, 7.0+8.0j, 9.0+10.0j)
+        src2_data = (11.0+12.0j, 13.0+14.0j, 15.0+16.0j, 17.0+18.0j, 19.0+20.0j)
+        src3_data = (21.0+22.0j, 23.0+24.0j, 25.0+26.0j, 27.0+28.0j, 29.0+30.0j)
+        expected_result = (-1021.0+428.0j, -2647.0+1754.0j, -4945.0+3704.0j, -8011.0+6374.0j, -11941.0+9860.0j)
+        op = blocks.multiply_cc(5)
+        self.help_cc(5, (src1_data, src2_data, src3_data), expected_result, op)
 
     # multiply_const_vXX
 
     def test_multiply_const_vss_one(self):
-	src_data = (2,)
-	op = blocks.multiply_const_vss((3,))
-	exp_data = (6,)
-	self.help_const_ss(src_data, exp_data, op)
+        src_data = (2,)
+        op = blocks.multiply_const_vss((3,))
+        exp_data = (6,)
+        self.help_const_ss(src_data, exp_data, op)
 
     def test_multiply_const_vss_five(self):
-	src_data = (1, 2, 3, 4, 5)
-	op = blocks.multiply_const_vss((6, 7, 8, 9, 10))
-	exp_data = (6, 14, 24, 36, 50)
-	self.help_const_ss(src_data, exp_data, op)
+        src_data = (1, 2, 3, 4, 5)
+        op = blocks.multiply_const_vss((6, 7, 8, 9, 10))
+        exp_data = (6, 14, 24, 36, 50)
+        self.help_const_ss(src_data, exp_data, op)
 
     def test_multiply_const_vii_one(self):
-	src_data = (2,)
-	op = blocks.multiply_const_vii((3,))
-	exp_data = (6,)
-	self.help_const_ii(src_data, exp_data, op)
+        src_data = (2,)
+        op = blocks.multiply_const_vii((3,))
+        exp_data = (6,)
+        self.help_const_ii(src_data, exp_data, op)
 
     def test_multiply_const_vii_five(self):
-	src_data = (1, 2, 3, 4, 5)
-	op = blocks.multiply_const_vii((6, 7, 8, 9, 10))
-	exp_data = (6, 14, 24, 36, 50)
-	self.help_const_ii(src_data, exp_data, op)
+        src_data = (1, 2, 3, 4, 5)
+        op = blocks.multiply_const_vii((6, 7, 8, 9, 10))
+        exp_data = (6, 14, 24, 36, 50)
+        self.help_const_ii(src_data, exp_data, op)
 
     def test_multiply_const_vff_one(self):
-	src_data = (2.0,)
-	op = blocks.multiply_const_vff((3.0,))
-	exp_data = (6.0,)
-	self.help_const_ff(src_data, exp_data, op)
+        src_data = (2.0,)
+        op = blocks.multiply_const_vff((3.0,))
+        exp_data = (6.0,)
+        self.help_const_ff(src_data, exp_data, op)
 
     def test_multiply_const_vff_five(self):
-	src_data = (1.0, 2.0, 3.0, 4.0, 5.0)
-	op = blocks.multiply_const_vff((6.0, 7.0, 8.0, 9.0, 10.0))
-	exp_data = (6.0, 14.0, 24.0, 36.0, 50.0)
-	self.help_const_ff(src_data, exp_data, op)
+        src_data = (1.0, 2.0, 3.0, 4.0, 5.0)
+        op = blocks.multiply_const_vff((6.0, 7.0, 8.0, 9.0, 10.0))
+        exp_data = (6.0, 14.0, 24.0, 36.0, 50.0)
+        self.help_const_ff(src_data, exp_data, op)
 
     def test_multiply_const_vcc_one(self):
-	src_data = (1.0+2.0j,)
-	op = blocks.multiply_const_vcc((2.0+3.0j,))
-	exp_data = (-4.0+7.0j,)
-	self.help_const_cc(src_data, exp_data, op)
+        src_data = (1.0+2.0j,)
+        op = blocks.multiply_const_vcc((2.0+3.0j,))
+        exp_data = (-4.0+7.0j,)
+        self.help_const_cc(src_data, exp_data, op)
 
     def test_multiply_const_vcc_five(self):
-	src_data = (1.0+2.0j, 3.0+4.0j, 5.0+6.0j, 7.0+8.0j, 9.0+10.0j)
-	op = blocks.multiply_const_vcc((11.0+12.0j, 13.0+14.0j, 15.0+16.0j, 17.0+18.0j, 19.0+20.0j))
-	exp_data = (-13.0+34.0j, -17.0+94.0j, -21.0+170.0j, -25.0+262.0j, -29.0+370.0j)
-	self.help_const_cc(src_data, exp_data, op)
+        src_data = (1.0+2.0j, 3.0+4.0j, 5.0+6.0j, 7.0+8.0j, 9.0+10.0j)
+        op = blocks.multiply_const_vcc((11.0+12.0j, 13.0+14.0j, 15.0+16.0j, 17.0+18.0j, 19.0+20.0j))
+        exp_data = (-13.0+34.0j, -17.0+94.0j, -21.0+170.0j, -25.0+262.0j, -29.0+370.0j)
+        self.help_const_cc(src_data, exp_data, op)
 
 
 if __name__ == '__main__':
diff --git a/gr-blocks/python/blocks/qa_affinity.py b/gr-blocks/python/blocks/qa_affinity.py
index 98b5c44862..d80e50bc40 100644
--- a/gr-blocks/python/blocks/qa_affinity.py
+++ b/gr-blocks/python/blocks/qa_affinity.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 
 class test_affinity(gr_unittest.TestCase):
diff --git a/gr-blocks/python/blocks/qa_argmax.py b/gr-blocks/python/blocks/qa_argmax.py
index fead481c0f..9dea186fea 100644
--- a/gr-blocks/python/blocks/qa_argmax.py
+++ b/gr-blocks/python/blocks/qa_argmax.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 
 import math
diff --git a/gr-blocks/python/blocks/qa_bin_statistics.py b/gr-blocks/python/blocks/qa_bin_statistics.py
old mode 100755
new mode 100644
index 52b8585721..e6bdfaca5b
--- a/gr-blocks/python/blocks/qa_bin_statistics.py
+++ b/gr-blocks/python/blocks/qa_bin_statistics.py
@@ -20,17 +20,21 @@
 # Boston, MA 02110-1301, USA.
 #
 
-from gnuradio import gr, gr_unittest, blocks
-
-import random
-import struct
-
 """
 Note: There has been an issue with this block in the past, see Issue
 #199. This test is being enabled only on the 'next' branch for version
 v3.7 for now. TWR
 """
 
+from __future__ import print_function
+
+import struct
+
+import six
+
+from gnuradio import gr, gr_unittest, blocks
+
+
 class counter(gr.feval_dd):
     def __init__(self, step_size=1):
         gr.feval_dd.__init__(self)
@@ -57,8 +61,8 @@ class counter3(gr.feval_dd):
             t = self.count
             self.count = self.count + self.step_size
             self.f(self.count)
-        except Exception, e:
-            print "Exception: ", e
+        except Exception as e:
+            print("Exception: ", e)
         return t
 
 def foobar3(new_t):
@@ -79,8 +83,8 @@ class counter4(gr.feval_dd):
             t = self.count
             self.count = self.count + self.step_size
             self.obj_instance.foobar4(self.count)
-        except Exception, e:
-            print "Exception: ", e
+        except Exception as e:
+            print("Exception: ", e)
         return t
 
 
@@ -89,7 +93,8 @@ class parse_msg(object):
         self.center_freq = msg.arg1()
         self.vlen = int(msg.arg2())
         assert(msg.length() == self.vlen * gr.sizeof_float)
-        self.data = struct.unpack('%df' % (self.vlen,), msg.to_string())
+        self.data = struct.unpack(b'%df' % self.vlen, six.b(msg.to_string()))
+
 
 class test_bin_statistics(gr_unittest.TestCase):
 
diff --git a/gr-blocks/python/blocks/qa_block_behavior.py b/gr-blocks/python/blocks/qa_block_behavior.py
index a21e423b21..482e88a316 100644
--- a/gr-blocks/python/blocks/qa_block_behavior.py
+++ b/gr-blocks/python/blocks/qa_block_behavior.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 
 class test_block_behavior(gr_unittest.TestCase):
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
 
diff --git a/gr-blocks/python/blocks/qa_boolean_operators.py b/gr-blocks/python/blocks/qa_boolean_operators.py
old mode 100755
new mode 100644
index cbcd5688a1..e364aaaa04
--- a/gr-blocks/python/blocks/qa_boolean_operators.py
+++ b/gr-blocks/python/blocks/qa_boolean_operators.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 
 class test_boolean_operators (gr_unittest.TestCase):
@@ -31,7 +32,7 @@ class test_boolean_operators (gr_unittest.TestCase):
         self.tb = None
 
     def help_ss (self, src_data, exp_data, op):
-        for s in zip (range (len (src_data)), src_data):
+        for s in zip (list(range(len (src_data))), src_data):
             src = blocks.vector_source_s (s[1])
             self.tb.connect (src, (op, s[0]))
         dst = blocks.vector_sink_s ()
@@ -41,7 +42,7 @@ class test_boolean_operators (gr_unittest.TestCase):
         self.assertEqual (exp_data, result_data)
 
     def help_bb (self, src_data, exp_data, op):
-        for s in zip (range (len (src_data)), src_data):
+        for s in zip (list(range(len (src_data))), src_data):
             src = blocks.vector_source_b (s[1])
             self.tb.connect (src, (op, s[0]))
         dst = blocks.vector_sink_b ()
@@ -51,7 +52,7 @@ class test_boolean_operators (gr_unittest.TestCase):
         self.assertEqual (exp_data, result_data)
 
     def help_ii (self, src_data, exp_data, op):
-        for s in zip (range (len (src_data)), src_data):
+        for s in zip (list(range(len (src_data))), src_data):
             src = blocks.vector_source_i (s[1])
             self.tb.connect (src, (op, s[0]))
         dst = blocks.vector_sink_i ()
diff --git a/gr-blocks/python/blocks/qa_burst_tagger.py b/gr-blocks/python/blocks/qa_burst_tagger.py
index b1a4f942f1..a2b7b402ec 100644
--- a/gr-blocks/python/blocks/qa_burst_tagger.py
+++ b/gr-blocks/python/blocks/qa_burst_tagger.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 
 import pmt
diff --git a/gr-blocks/python/blocks/qa_conjugate.py b/gr-blocks/python/blocks/qa_conjugate.py
index 36172e30a0..d672c453c5 100644
--- a/gr-blocks/python/blocks/qa_conjugate.py
+++ b/gr-blocks/python/blocks/qa_conjugate.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 
 class test_conjugate (gr_unittest.TestCase):
diff --git a/gr-blocks/python/blocks/qa_copy.py b/gr-blocks/python/blocks/qa_copy.py
old mode 100755
new mode 100644
index 20914b51e3..c832c0ef04
--- a/gr-blocks/python/blocks/qa_copy.py
+++ b/gr-blocks/python/blocks/qa_copy.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 
 class test_copy(gr_unittest.TestCase):
@@ -46,7 +47,7 @@ class test_copy(gr_unittest.TestCase):
         expected_result = ()
         src = blocks.vector_source_b(src_data)
         op = blocks.copy(gr.sizeof_char)
-	op.set_enabled(False)
+        op.set_enabled(False)
         dst = blocks.vector_sink_b()
         self.tb.connect(src, op, dst)
         self.tb.run()
diff --git a/gr-blocks/python/blocks/qa_cpp_py_binding.py b/gr-blocks/python/blocks/qa_cpp_py_binding.py
index 23a5c9b826..f15bfddb29 100644
--- a/gr-blocks/python/blocks/qa_cpp_py_binding.py
+++ b/gr-blocks/python/blocks/qa_cpp_py_binding.py
@@ -24,6 +24,7 @@
 # This program tests mixed python and c++ ctrlport exports in a single app
 #
 
+
 import sys, time, random, numpy, re
 from gnuradio import gr, gr_unittest, blocks
 
@@ -37,7 +38,7 @@ def get1():
 def get2():
     return "failure"
 
-class inc_class:
+class inc_class(object):
     def __init__(self):
         self.val = 1
     def pp(self):
@@ -131,7 +132,7 @@ class test_cpp_py_binding(gr_unittest.TestCase):
         self.assertComplexTuplesAlmostEqual(val, rval, 5)
 
     def test_002(self):
-        data = range(1,9)
+        data = list(range(1,9))
 
         self.src = blocks.vector_source_c(data)
         self.p1 = blocks.ctrlport_probe_c("aaa","C++ exported variable")
@@ -163,7 +164,7 @@ class test_cpp_py_binding(gr_unittest.TestCase):
 
         # Get all exported knobs
         ret = radio.getKnobs([probe_name + "::bbb"])
-        for name in ret.keys():
+        for name in list(ret.keys()):
             result = ret[name].value
             self.assertEqual(result, expected_result)
 
diff --git a/gr-blocks/python/blocks/qa_cpp_py_binding_set.py b/gr-blocks/python/blocks/qa_cpp_py_binding_set.py
index 5b81de08f9..641f588faf 100644
--- a/gr-blocks/python/blocks/qa_cpp_py_binding_set.py
+++ b/gr-blocks/python/blocks/qa_cpp_py_binding_set.py
@@ -24,6 +24,7 @@
 # This program tests mixed python and c++ GRCP sets in a single app
 #
 
+
 import sys, time, random, numpy, re
 from gnuradio import gr, gr_unittest, blocks
 
@@ -31,7 +32,7 @@ from gnuradio.ctrlport import GNURadio
 from gnuradio import ctrlport
 import os
 
-class inc_class:
+class inc_class(object):
     def __init__(self,val):
         self.val = val;
 
@@ -108,7 +109,7 @@ class test_cpp_py_binding_set(gr_unittest.TestCase):
 
 
     def test_002(self):
-        data = range(1, 10)
+        data = list(range(1, 10))
 
         self.src = blocks.vector_source_c(data, True)
         self.p = blocks.nop(gr.sizeof_gr_complex)
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
diff --git a/gr-blocks/python/blocks/qa_delay.py b/gr-blocks/python/blocks/qa_delay.py
old mode 100755
new mode 100644
index 09200862bd..2fd3691424
--- a/gr-blocks/python/blocks/qa_delay.py
+++ b/gr-blocks/python/blocks/qa_delay.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 import pmt
 
diff --git a/gr-blocks/python/blocks/qa_endian_swap.py b/gr-blocks/python/blocks/qa_endian_swap.py
index dd6ee349b2..3e1e059608 100644
--- a/gr-blocks/python/blocks/qa_endian_swap.py
+++ b/gr-blocks/python/blocks/qa_endian_swap.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 import ctypes
 
diff --git a/gr-blocks/python/blocks/qa_file_metadata.py b/gr-blocks/python/blocks/qa_file_metadata.py
index 0d7628bbdc..3ee8409d6a 100644
--- a/gr-blocks/python/blocks/qa_file_metadata.py
+++ b/gr-blocks/python/blocks/qa_file_metadata.py
@@ -20,6 +20,9 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import absolute_import
+from __future__ import division
+
 import os, math
 
 from gnuradio import gr, gr_unittest, blocks
@@ -28,9 +31,9 @@ import pmt
 import parse_file_metadata
 
 def sig_source_c(samp_rate, freq, amp, N):
-    t = map(lambda x: float(x)/samp_rate, xrange(N))
-    y = map(lambda x: amp*math.cos(2.*math.pi*freq*x) + \
-                1j*amp*math.sin(2.*math.pi*freq*x), t)
+    t = [float(x) / samp_rate for x in range(N)]
+    y = [amp*math.cos(2.*math.pi*freq*x) + \
+                1j*amp*math.sin(2.*math.pi*freq*x) for x in t]
     return y
 
 class test_file_metadata(gr_unittest.TestCase):
@@ -44,7 +47,7 @@ class test_file_metadata(gr_unittest.TestCase):
 
     def test_001(self):
         N = 1000
-	outfile = "test_out.dat"
+        outfile = "test_out.dat"
 
         detached = False
         samp_rate = 200000
@@ -62,8 +65,8 @@ class test_file_metadata(gr_unittest.TestCase):
                                      1000000, extras_str, detached)
         fsnk.set_unbuffered(True)
 
-	self.tb.connect(src, fsnk)
-	self.tb.run()
+        self.tb.connect(src, fsnk)
+        self.tb.run()
         fsnk.close()
 
         handle = open(outfile, "rb")
@@ -118,12 +121,12 @@ class test_file_metadata(gr_unittest.TestCase):
         # Test that the data portion was extracted and received correctly.
         self.assertComplexTuplesAlmostEqual(vsnk.data(), ssnk.data(), 5)
 
-	os.remove(outfile)
+        os.remove(outfile)
 
     def test_002(self):
         N = 1000
-	outfile = "test_out.dat"
-	outfile_hdr = "test_out.dat.hdr"
+        outfile = "test_out.dat"
+        outfile_hdr = "test_out.dat.hdr"
 
         detached = True
         samp_rate = 200000
@@ -141,8 +144,8 @@ class test_file_metadata(gr_unittest.TestCase):
                                      1000000, extras_str, detached)
         fsnk.set_unbuffered(True)
 
-	self.tb.connect(src, fsnk)
-	self.tb.run()
+        self.tb.connect(src, fsnk)
+        self.tb.run()
         fsnk.close()
 
         # Open detached header for reading
@@ -199,8 +202,8 @@ class test_file_metadata(gr_unittest.TestCase):
         # Test that the data portion was extracted and received correctly.
         self.assertComplexTuplesAlmostEqual(vsnk.data(), ssnk.data(), 5)
 
-	os.remove(outfile)
-	os.remove(outfile_hdr)
+        os.remove(outfile)
+        os.remove(outfile_hdr)
 
 if __name__ == '__main__':
     gr_unittest.run(test_file_metadata, "test_file_metadata.xml")
diff --git a/gr-blocks/python/blocks/qa_file_source_sink.py b/gr-blocks/python/blocks/qa_file_source_sink.py
index 89841d3be6..2bc96afdc2 100644
--- a/gr-blocks/python/blocks/qa_file_source_sink.py
+++ b/gr-blocks/python/blocks/qa_file_source_sink.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 import os
 
@@ -33,8 +34,8 @@ class test_file_source_sink(gr_unittest.TestCase):
         self.tb = None
 
     def test_001(self):
-        src_data = range(1000)
-        expected_result = range(1000)
+        src_data = list(range(1000))
+        expected_result = list(range(1000))
 
         filename = "tmp.32f"
         src = blocks.vector_source_f(src_data)
@@ -57,8 +58,8 @@ class test_file_source_sink(gr_unittest.TestCase):
         self.assertFloatTuplesAlmostEqual(expected_result, result_data)
 
     def test_descriptor_001(self):
-        src_data = range(1000)
-        expected_result = range(1000)
+        src_data = list(range(1000))
+        expected_result = list(range(1000))
 
         filename = "tmp.32f"
         fhandle0 = open(filename, "wb")
@@ -89,7 +90,7 @@ class test_file_source_sink(gr_unittest.TestCase):
         self.assertFloatTuplesAlmostEqual(expected_result, result_data)
 
     def test_file_source_can_seek_after_open(self):
-        src_data = range(1000)
+        src_data = list(range(1000))
 
         filename = "tmp.32f"
         src = blocks.vector_source_f(src_data)
diff --git a/gr-blocks/python/blocks/qa_head.py b/gr-blocks/python/blocks/qa_head.py
old mode 100755
new mode 100644
index 9b5bca221b..b6167f9379
--- a/gr-blocks/python/blocks/qa_head.py
+++ b/gr-blocks/python/blocks/qa_head.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 
 class test_head(gr_unittest.TestCase):
diff --git a/gr-blocks/python/blocks/qa_hier_block2.py b/gr-blocks/python/blocks/qa_hier_block2.py
old mode 100755
new mode 100644
index 3e780806bc..20c6a7c180
--- a/gr-blocks/python/blocks/qa_hier_block2.py
+++ b/gr-blocks/python/blocks/qa_hier_block2.py
@@ -1,10 +1,13 @@
 #!/usr/bin/env python
 
-from gnuradio import gr, gr_unittest, blocks
-import numpy
 import threading
 import time
 
+import numpy
+
+from gnuradio import gr, gr_unittest, blocks
+
+
 class add_ff(gr.sync_block):
     def __init__(self):
         gr.sync_block.__init__(
@@ -29,88 +32,88 @@ class multiply_const_ff(gr.sync_block):
         self.k = k
 
     def work(self, input_items, output_items):
-        output_items[0][:] = map(lambda x: self.k*x, input_items[0])
+        output_items[0][:] = [self.k*x for x in input_items[0]]
         return len(output_items[0])
 
 class test_hier_block2(gr_unittest.TestCase):
 
     def setUp(self):
-	pass
+        pass
 
     def tearDown(self):
-    	pass
+            pass
 
     def test_001_make(self):
-	hblock = gr.hier_block2("test_block",
-				gr.io_signature(1,1,gr.sizeof_int),
-				gr.io_signature(1,1,gr.sizeof_int))
-	self.assertEqual("test_block", hblock.name())
-	self.assertEqual(1, hblock.input_signature().max_streams())
-	self.assertEqual(1, hblock.output_signature().min_streams())
-	self.assertEqual(1, hblock.output_signature().max_streams())
-	self.assertEqual(gr.sizeof_int, hblock.output_signature().sizeof_stream_item(0))
+        hblock = gr.hier_block2("test_block",
+                                gr.io_signature(1,1,gr.sizeof_int),
+                                gr.io_signature(1,1,gr.sizeof_int))
+        self.assertEqual("test_block", hblock.name())
+        self.assertEqual(1, hblock.input_signature().max_streams())
+        self.assertEqual(1, hblock.output_signature().min_streams())
+        self.assertEqual(1, hblock.output_signature().max_streams())
+        self.assertEqual(gr.sizeof_int, hblock.output_signature().sizeof_stream_item(0))
 
     def test_002_connect_input(self):
-	hblock = gr.hier_block2("test_block",
-				gr.io_signature(1,1,gr.sizeof_int),
-				gr.io_signature(1,1,gr.sizeof_int))
-	nop1 = blocks.nop(gr.sizeof_int)
-	hblock.connect(hblock, nop1)
+        hblock = gr.hier_block2("test_block",
+                                gr.io_signature(1,1,gr.sizeof_int),
+                                gr.io_signature(1,1,gr.sizeof_int))
+        nop1 = blocks.nop(gr.sizeof_int)
+        hblock.connect(hblock, nop1)
 
     def test_004_connect_output(self):
-	hblock = gr.hier_block2("test_block",
-				gr.io_signature(1,1,gr.sizeof_int),
-				gr.io_signature(1,1,gr.sizeof_int))
-	nop1 = blocks.nop(gr.sizeof_int)
-	hblock.connect(nop1, hblock)
+        hblock = gr.hier_block2("test_block",
+                                gr.io_signature(1,1,gr.sizeof_int),
+                                gr.io_signature(1,1,gr.sizeof_int))
+        nop1 = blocks.nop(gr.sizeof_int)
+        hblock.connect(nop1, hblock)
 
     def test_005_connect_output_in_use(self):
-	hblock = gr.hier_block2("test_block",
-				gr.io_signature(1,1,gr.sizeof_int),
-				gr.io_signature(1,1,gr.sizeof_int))
-	nop1 = blocks.nop(gr.sizeof_int)
-	nop2 = blocks.nop(gr.sizeof_int)
-	hblock.connect(nop1, hblock)
-	self.assertRaises(ValueError,
-	    lambda: hblock.connect(nop2, hblock))
+        hblock = gr.hier_block2("test_block",
+                                gr.io_signature(1,1,gr.sizeof_int),
+                                gr.io_signature(1,1,gr.sizeof_int))
+        nop1 = blocks.nop(gr.sizeof_int)
+        nop2 = blocks.nop(gr.sizeof_int)
+        hblock.connect(nop1, hblock)
+        self.assertRaises(ValueError,
+            lambda: hblock.connect(nop2, hblock))
 
     def test_006_connect_invalid_src_port_neg(self):
-	hblock = gr.hier_block2("test_block",
-				gr.io_signature(1,1,gr.sizeof_int),
-				gr.io_signature(1,1,gr.sizeof_int))
-	nop1 = blocks.nop(gr.sizeof_int)
-	self.assertRaises(ValueError,
-	    lambda: hblock.connect((hblock, -1), nop1))
+        hblock = gr.hier_block2("test_block",
+                                gr.io_signature(1,1,gr.sizeof_int),
+                                gr.io_signature(1,1,gr.sizeof_int))
+        nop1 = blocks.nop(gr.sizeof_int)
+        self.assertRaises(ValueError,
+            lambda: hblock.connect((hblock, -1), nop1))
 
     def test_005_connect_invalid_src_port_exceeds(self):
-	hblock = gr.hier_block2("test_block",
-				gr.io_signature(1,1,gr.sizeof_int),
-				gr.io_signature(1,1,gr.sizeof_int))
-	nop1 = blocks.nop(gr.sizeof_int)
-	self.assertRaises(ValueError,
-	    lambda: hblock.connect((hblock, 1), nop1))
+        hblock = gr.hier_block2("test_block",
+                                gr.io_signature(1,1,gr.sizeof_int),
+                                gr.io_signature(1,1,gr.sizeof_int))
+        nop1 = blocks.nop(gr.sizeof_int)
+        self.assertRaises(ValueError,
+            lambda: hblock.connect((hblock, 1), nop1))
 
     def test_007_connect_invalid_dst_port_neg(self):
-	hblock = gr.hier_block2("test_block",
-				gr.io_signature(1,1,gr.sizeof_int),
-				gr.io_signature(1,1,gr.sizeof_int))
-	nop1 = blocks.nop(gr.sizeof_int)
-	nop2 = blocks.nop(gr.sizeof_int)
-	self.assertRaises(ValueError,
-	    lambda: hblock.connect(nop1, (nop2, -1)))
+        hblock = gr.hier_block2("test_block",
+                                gr.io_signature(1,1,gr.sizeof_int),
+                                gr.io_signature(1,1,gr.sizeof_int))
+        nop1 = blocks.nop(gr.sizeof_int)
+        nop2 = blocks.nop(gr.sizeof_int)
+        self.assertRaises(ValueError,
+            lambda: hblock.connect(nop1, (nop2, -1)))
 
     def test_008_connect_invalid_dst_port_exceeds(self):
-	hblock = gr.hier_block2("test_block",
-				gr.io_signature(1,1,gr.sizeof_int),
-				gr.io_signature(1,1,gr.sizeof_int))
-	nop1 = blocks.null_sink(gr.sizeof_int)
-	nop2 = blocks.null_sink(gr.sizeof_int)
-	self.assertRaises(ValueError,
-	    lambda: hblock.connect(nop1, (nop2, 1)))
+        hblock = gr.hier_block2("test_block",
+                                gr.io_signature(1,1,gr.sizeof_int),
+                                gr.io_signature(1,1,gr.sizeof_int))
+        nop1 = blocks.null_sink(gr.sizeof_int)
+        nop2 = blocks.null_sink(gr.sizeof_int)
+        self.assertRaises(ValueError,
+            lambda: hblock.connect(nop1, (nop2, 1)))
 
     def test_009_check_topology(self):
-	hblock = gr.top_block("test_block")
-	hblock.check_topology(0, 0)
+        hblock = gr.top_block("test_block")
+        hblock.check_topology(0, 0)
 
     def test_010_run(self):
         expected = (1.0, 2.0, 3.0, 4.0)
@@ -123,89 +126,89 @@ class test_hier_block2(gr_unittest.TestCase):
         hblock.run()
         actual1 = sink1.data()
         actual2 = sink2.data()
-        self.assertEquals(expected, actual1)
-        self.assertEquals(expected, actual2)
+        self.assertEqual(expected, actual1)
+        self.assertEqual(expected, actual2)
 
     def test_012_disconnect_input(self):
-	hblock = gr.hier_block2("test_block",
-				gr.io_signature(1,1,gr.sizeof_int),
-				gr.io_signature(1,1,gr.sizeof_int))
-	nop1 = blocks.nop(gr.sizeof_int)
-	hblock.connect(hblock, nop1)
+        hblock = gr.hier_block2("test_block",
+                                gr.io_signature(1,1,gr.sizeof_int),
+                                gr.io_signature(1,1,gr.sizeof_int))
+        nop1 = blocks.nop(gr.sizeof_int)
+        hblock.connect(hblock, nop1)
         hblock.disconnect(hblock, nop1)
 
     def test_013_disconnect_input_not_connected(self):
-	hblock = gr.hier_block2("test_block",
-				gr.io_signature(1,1,gr.sizeof_int),
-				gr.io_signature(1,1,gr.sizeof_int))
-	nop1 = blocks.nop(gr.sizeof_int)
+        hblock = gr.hier_block2("test_block",
+                                gr.io_signature(1,1,gr.sizeof_int),
+                                gr.io_signature(1,1,gr.sizeof_int))
+        nop1 = blocks.nop(gr.sizeof_int)
         nop2 = blocks.nop(gr.sizeof_int)
-	hblock.connect(hblock, nop1)
+        hblock.connect(hblock, nop1)
         self.assertRaises(ValueError,
             lambda: hblock.disconnect(hblock, nop2))
 
     def test_014_disconnect_input_neg(self):
-	hblock = gr.hier_block2("test_block",
-				gr.io_signature(1,1,gr.sizeof_int),
-				gr.io_signature(1,1,gr.sizeof_int))
-	nop1 = blocks.nop(gr.sizeof_int)
-	hblock.connect(hblock, nop1)
+        hblock = gr.hier_block2("test_block",
+                                gr.io_signature(1,1,gr.sizeof_int),
+                                gr.io_signature(1,1,gr.sizeof_int))
+        nop1 = blocks.nop(gr.sizeof_int)
+        hblock.connect(hblock, nop1)
         self.assertRaises(ValueError,
             lambda: hblock.disconnect((hblock, -1), nop1))
 
     def test_015_disconnect_input_exceeds(self):
-	hblock = gr.hier_block2("test_block",
-				gr.io_signature(1,1,gr.sizeof_int),
-				gr.io_signature(1,1,gr.sizeof_int))
-	nop1 = blocks.nop(gr.sizeof_int)
-	hblock.connect(hblock, nop1)
+        hblock = gr.hier_block2("test_block",
+                                gr.io_signature(1,1,gr.sizeof_int),
+                                gr.io_signature(1,1,gr.sizeof_int))
+        nop1 = blocks.nop(gr.sizeof_int)
+        hblock.connect(hblock, nop1)
         self.assertRaises(ValueError,
             lambda: hblock.disconnect((hblock, 1), nop1))
 
     def test_016_disconnect_output(self):
-	hblock = gr.hier_block2("test_block",
-				gr.io_signature(1,1,gr.sizeof_int),
-				gr.io_signature(1,1,gr.sizeof_int))
-	nop1 = blocks.nop(gr.sizeof_int)
-	hblock.connect(nop1, hblock)
+        hblock = gr.hier_block2("test_block",
+                                gr.io_signature(1,1,gr.sizeof_int),
+                                gr.io_signature(1,1,gr.sizeof_int))
+        nop1 = blocks.nop(gr.sizeof_int)
+        hblock.connect(nop1, hblock)
         hblock.disconnect(nop1, hblock)
 
     def test_017_disconnect_output_not_connected(self):
-	hblock = gr.hier_block2("test_block",
-				gr.io_signature(1,1,gr.sizeof_int),
-				gr.io_signature(1,1,gr.sizeof_int))
-	nop1 = blocks.nop(gr.sizeof_int)
+        hblock = gr.hier_block2("test_block",
+                                gr.io_signature(1,1,gr.sizeof_int),
+                                gr.io_signature(1,1,gr.sizeof_int))
+        nop1 = blocks.nop(gr.sizeof_int)
         nop2 = blocks.nop(gr.sizeof_int)
-	hblock.connect(nop1, hblock)
+        hblock.connect(nop1, hblock)
         self.assertRaises(ValueError,
             lambda: hblock.disconnect(nop2, hblock))
 
     def test_018_disconnect_output_neg(self):
-	hblock = gr.hier_block2("test_block",
-				gr.io_signature(1,1,gr.sizeof_int),
-				gr.io_signature(1,1,gr.sizeof_int))
-	nop1 = blocks.nop(gr.sizeof_int)
-	hblock.connect(hblock, nop1)
+        hblock = gr.hier_block2("test_block",
+                                gr.io_signature(1,1,gr.sizeof_int),
+                                gr.io_signature(1,1,gr.sizeof_int))
+        nop1 = blocks.nop(gr.sizeof_int)
+        hblock.connect(hblock, nop1)
         self.assertRaises(ValueError,
             lambda: hblock.disconnect(nop1, (hblock, -1)))
 
     def test_019_disconnect_output_exceeds(self):
-	hblock = gr.hier_block2("test_block",
-				gr.io_signature(1,1,gr.sizeof_int),
-				gr.io_signature(1,1,gr.sizeof_int))
-	nop1 = blocks.nop(gr.sizeof_int)
-	hblock.connect(nop1, hblock)
+        hblock = gr.hier_block2("test_block",
+                                gr.io_signature(1,1,gr.sizeof_int),
+                                gr.io_signature(1,1,gr.sizeof_int))
+        nop1 = blocks.nop(gr.sizeof_int)
+        hblock.connect(nop1, hblock)
         self.assertRaises(ValueError,
             lambda: hblock.disconnect(nop1, (hblock, 1)))
 
     def test_020_run(self):
-	hblock = gr.top_block("test_block")
-	data = (1.0, 2.0, 3.0, 4.0)
-	src = blocks.vector_source_f(data, False)
-	dst = blocks.vector_sink_f()
-	hblock.connect(src, dst)
-	hblock.run()
-	self.assertEquals(data, dst.data())
+        hblock = gr.top_block("test_block")
+        data = (1.0, 2.0, 3.0, 4.0)
+        src = blocks.vector_source_f(data, False)
+        dst = blocks.vector_sink_f()
+        hblock.connect(src, dst)
+        hblock.run()
+        self.assertEqual(data, dst.data())
 
     def test_021_connect_single(self):
         hblock = gr.top_block("test_block")
@@ -258,7 +261,7 @@ class test_hier_block2(gr_unittest.TestCase):
         hb.connect(src, dst)
         tb.connect(hb)
         tb.run()
-        self.assertEquals(expected_data, dst.data())
+        self.assertEqual(expected_data, dst.data())
 
     def test_027a_internally_unconnected_input(self):
         tb = gr.top_block()
@@ -333,7 +336,7 @@ class test_hier_block2(gr_unittest.TestCase):
         tb.disconnect(src)   # Singleton disconnect
         tb.connect(src, dst)
         tb.run()
-        self.assertEquals(dst.data(), (1,))
+        self.assertEqual(dst.data(), (1,))
 
     def test_030_nested_input(self):
         tb = gr.top_block()
@@ -349,7 +352,7 @@ class test_hier_block2(gr_unittest.TestCase):
         hb1.connect(hb1, hb2)
         hb2.connect(hb2, blocks.copy(gr.sizeof_char), dst)
         tb.run()
-        self.assertEquals(dst.data(), (1,))
+        self.assertEqual(dst.data(), (1,))
 
     def test_031_multiple_internal_inputs(self):
         tb = gr.top_block()
@@ -368,7 +371,7 @@ class test_hier_block2(gr_unittest.TestCase):
         dst = blocks.vector_sink_f()
         tb.connect(src, hb, dst)
         tb.run()
-        self.assertEquals(dst.data(), (3.0,))
+        self.assertEqual(dst.data(), (3.0,))
 
     def test_032_nested_multiple_internal_inputs(self):
         tb = gr.top_block()
@@ -392,7 +395,7 @@ class test_hier_block2(gr_unittest.TestCase):
         dst = blocks.vector_sink_f()
         tb.connect(src, hb, dst)
         tb.run()
-        self.assertEquals(dst.data(), (3.0,))
+        self.assertEqual(dst.data(), (3.0,))
 
 
     def test_033a_set_affinity(self):
@@ -404,7 +407,7 @@ class test_hier_block2(gr_unittest.TestCase):
         hblock.set_processor_affinity([0,])
         hblock.run()
         actual = snk.data()
-        self.assertEquals(expected, actual)
+        self.assertEqual(expected, actual)
 
     def test_033b_unset_affinity(self):
         expected = (1.0, 2.0, 3.0, 4.0)
@@ -416,7 +419,7 @@ class test_hier_block2(gr_unittest.TestCase):
         hblock.unset_processor_affinity()
         hblock.run()
         actual = snk.data()
-        self.assertEquals(expected, actual)
+        self.assertEqual(expected, actual)
 
     def test_033c_get_affinity(self):
         expected = (1.0, 2.0, 3.0, 4.0)
@@ -426,7 +429,7 @@ class test_hier_block2(gr_unittest.TestCase):
         hblock.connect(src, snk)
         hblock.set_processor_affinity([0,])
         procs = hblock.processor_affinity()
-        self.assertEquals((0,), procs)
+        self.assertEqual((0,), procs)
 
     def test_34a_lock_unlock(self):
         hblock = gr.top_block("test_block")
diff --git a/gr-blocks/python/blocks/qa_hier_block2_message_connections.py b/gr-blocks/python/blocks/qa_hier_block2_message_connections.py
index 4283f537e8..e66a0dbdc8 100644
--- a/gr-blocks/python/blocks/qa_hier_block2_message_connections.py
+++ b/gr-blocks/python/blocks/qa_hier_block2_message_connections.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 import weakref
 
 from gnuradio import blocks, gr, gr_unittest
diff --git a/gr-blocks/python/blocks/qa_integrate.py b/gr-blocks/python/blocks/qa_integrate.py
old mode 100755
new mode 100644
index be4285ce95..4ecfbb5171
--- a/gr-blocks/python/blocks/qa_integrate.py
+++ b/gr-blocks/python/blocks/qa_integrate.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 
 class test_integrate (gr_unittest.TestCase):
@@ -31,66 +32,66 @@ class test_integrate (gr_unittest.TestCase):
         self.tb = None
 
     def test_000_ss(self):
-	src_data = (1, 2, 3, 4, 5, 6)
-	dst_data = (6, 15)
-	src = blocks.vector_source_s(src_data)
-	itg = blocks.integrate_ss(3)
-	dst = blocks.vector_sink_s()
-	self.tb.connect(src, itg, dst)
-	self.tb.run()
-	self.assertEqual(dst_data, dst.data())
+        src_data = (1, 2, 3, 4, 5, 6)
+        dst_data = (6, 15)
+        src = blocks.vector_source_s(src_data)
+        itg = blocks.integrate_ss(3)
+        dst = blocks.vector_sink_s()
+        self.tb.connect(src, itg, dst)
+        self.tb.run()
+        self.assertEqual(dst_data, dst.data())
 
     def test_001_ii(self):
-	src_data = (1, 2, 3, 4, 5, 6)
-	dst_data = (6, 15)
-	src = blocks.vector_source_i(src_data)
-	itg = blocks.integrate_ii(3)
-	dst = blocks.vector_sink_i()
-	self.tb.connect(src, itg, dst)
-	self.tb.run()
-	self.assertEqual(dst_data, dst.data())
+        src_data = (1, 2, 3, 4, 5, 6)
+        dst_data = (6, 15)
+        src = blocks.vector_source_i(src_data)
+        itg = blocks.integrate_ii(3)
+        dst = blocks.vector_sink_i()
+        self.tb.connect(src, itg, dst)
+        self.tb.run()
+        self.assertEqual(dst_data, dst.data())
 
     def test_002_ff(self):
-	src_data = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0]
-	dst_data = [6.0, 15.0]
-	src = blocks.vector_source_f(src_data)
-	itg = blocks.integrate_ff(3)
-	dst = blocks.vector_sink_f()
-	self.tb.connect(src, itg, dst)
-	self.tb.run()
-	self.assertFloatTuplesAlmostEqual(dst_data, dst.data(), 6)
+        src_data = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0]
+        dst_data = [6.0, 15.0]
+        src = blocks.vector_source_f(src_data)
+        itg = blocks.integrate_ff(3)
+        dst = blocks.vector_sink_f()
+        self.tb.connect(src, itg, dst)
+        self.tb.run()
+        self.assertFloatTuplesAlmostEqual(dst_data, dst.data(), 6)
 
     def test_003_cc(self):
-	src_data = [1.0+1.0j, 2.0+2.0j, 3.0+3.0j, 4.0+4.0j, 5.0+5.0j, 6.0+6.0j]
-	dst_data = [6.0+6.0j, 15.0+15.0j]
-	src = blocks.vector_source_c(src_data)
-	itg = blocks.integrate_cc(3)
-	dst = blocks.vector_sink_c()
-	self.tb.connect(src, itg, dst)
-	self.tb.run()
-	self.assertComplexTuplesAlmostEqual(dst_data, dst.data(), 6)
+        src_data = [1.0+1.0j, 2.0+2.0j, 3.0+3.0j, 4.0+4.0j, 5.0+5.0j, 6.0+6.0j]
+        dst_data = [6.0+6.0j, 15.0+15.0j]
+        src = blocks.vector_source_c(src_data)
+        itg = blocks.integrate_cc(3)
+        dst = blocks.vector_sink_c()
+        self.tb.connect(src, itg, dst)
+        self.tb.run()
+        self.assertComplexTuplesAlmostEqual(dst_data, dst.data(), 6)
 
     def test_004_ss_vec(self):
-	src_data = (1, 2, 3, 4, 5, 6)
-	dst_data = (9, 12)
-	vlen = 2
-	src = blocks.vector_source_s(src_data, False, vlen)
-	itg = blocks.integrate_ss(3, vlen)
-	dst = blocks.vector_sink_s(vlen)
-	self.tb.connect(src, itg, dst)
-	self.tb.run()
-	self.assertEqual(dst_data, dst.data())
+        src_data = (1, 2, 3, 4, 5, 6)
+        dst_data = (9, 12)
+        vlen = 2
+        src = blocks.vector_source_s(src_data, False, vlen)
+        itg = blocks.integrate_ss(3, vlen)
+        dst = blocks.vector_sink_s(vlen)
+        self.tb.connect(src, itg, dst)
+        self.tb.run()
+        self.assertEqual(dst_data, dst.data())
 
     def test_003_cc_vec(self):
-	src_data = [1.0+1.0j, 2.0+2.0j, 3.0+3.0j, 4.0+4.0j, 5.0+5.0j, 6.0+6.0j]
-	dst_data = [9.0+9.0j, 12.0+12.0j]
-	vlen = 2
-	src = blocks.vector_source_c(src_data, False, vlen)
-	itg = blocks.integrate_cc(3, vlen)
-	dst = blocks.vector_sink_c(vlen)
-	self.tb.connect(src, itg, dst)
-	self.tb.run()
-	self.assertComplexTuplesAlmostEqual(dst_data, dst.data(), 6)
+        src_data = [1.0+1.0j, 2.0+2.0j, 3.0+3.0j, 4.0+4.0j, 5.0+5.0j, 6.0+6.0j]
+        dst_data = [9.0+9.0j, 12.0+12.0j]
+        vlen = 2
+        src = blocks.vector_source_c(src_data, False, vlen)
+        itg = blocks.integrate_cc(3, vlen)
+        dst = blocks.vector_sink_c(vlen)
+        self.tb.connect(src, itg, dst)
+        self.tb.run()
+        self.assertComplexTuplesAlmostEqual(dst_data, dst.data(), 6)
 
 if __name__ == '__main__':
     gr_unittest.run(test_integrate, "test_integrate.xml")
diff --git a/gr-blocks/python/blocks/qa_interleave.py b/gr-blocks/python/blocks/qa_interleave.py
old mode 100755
new mode 100644
index 526e4a4e6f..9d334a465f
--- a/gr-blocks/python/blocks/qa_interleave.py
+++ b/gr-blocks/python/blocks/qa_interleave.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+
 from gnuradio import gr, gr_unittest, blocks
 
 class test_interleave (gr_unittest.TestCase):
@@ -32,10 +34,10 @@ class test_interleave (gr_unittest.TestCase):
 
     def test_int_001 (self):
         lenx = 64
-        src0 = blocks.vector_source_f (range (0, lenx, 4))
-        src1 = blocks.vector_source_f (range (1, lenx, 4))
-        src2 = blocks.vector_source_f (range (2, lenx, 4))
-        src3 = blocks.vector_source_f (range (3, lenx, 4))
+        src0 = blocks.vector_source_f (list(range(0, lenx, 4)))
+        src1 = blocks.vector_source_f (list(range(1, lenx, 4)))
+        src2 = blocks.vector_source_f (list(range(2, lenx, 4)))
+        src3 = blocks.vector_source_f (list(range(3, lenx, 4)))
         op = blocks.interleave (gr.sizeof_float)
         dst = blocks.vector_sink_f ()
 
@@ -54,13 +56,13 @@ class test_interleave (gr_unittest.TestCase):
         lenx = 64
         plusup_big = lambda a: a + (blksize * 4)
         plusup_little = lambda a: a + blksize
-        a_vec = range(0,blksize)
-        for i in range(0,(lenx/(4 * blksize)) - 1):
-            a_vec += map(plusup_big, a_vec[len(a_vec) - blksize:])
+        a_vec = list(range(0,blksize))
+        for i in range(0,(lenx // (4 * blksize)) - 1):
+            a_vec += list(map(plusup_big, a_vec[len(a_vec) - blksize:]))
 
-        b_vec = map(plusup_little, a_vec)
-        c_vec = map(plusup_little, b_vec)
-        d_vec = map(plusup_little, c_vec)
+        b_vec = list(map(plusup_little, a_vec))
+        c_vec = list(map(plusup_little, b_vec))
+        d_vec = list(map(plusup_little, c_vec))
 
         src0 = blocks.vector_source_f (a_vec)
         src1 = blocks.vector_source_f (b_vec)
@@ -82,7 +84,7 @@ class test_interleave (gr_unittest.TestCase):
 
     def test_deint_001 (self):
         lenx = 64
-        src = blocks.vector_source_f (range (lenx))
+        src = blocks.vector_source_f (list(range(lenx)))
         op = blocks.deinterleave (gr.sizeof_float)
         dst0 = blocks.vector_sink_f ()
         dst1 = blocks.vector_sink_f ()
@@ -109,7 +111,7 @@ class test_interleave (gr_unittest.TestCase):
     def test_deint_002 (self):
         blksize = 4
         lenx = 64
-        src = blocks.vector_source_f (range (lenx))
+        src = blocks.vector_source_f (list(range(lenx)))
         op = blocks.deinterleave (gr.sizeof_float, blksize)
         dst0 = blocks.vector_sink_f ()
         dst1 = blocks.vector_sink_f ()
@@ -125,13 +127,13 @@ class test_interleave (gr_unittest.TestCase):
 
         plusup_big = lambda a: a + (blksize * 4)
         plusup_little = lambda a: a + blksize
-        a_vec = range(0,blksize)
-        for i in range(0,(lenx/(4 * blksize)) - 1):
-            a_vec += map(plusup_big, a_vec[len(a_vec) - blksize:])
+        a_vec = list(range(0,blksize))
+        for i in range(0,(lenx // (4 * blksize)) - 1):
+            a_vec += list(map(plusup_big, a_vec[len(a_vec) - blksize:]))
 
-        b_vec = map(plusup_little, a_vec)
-        c_vec = map(plusup_little, b_vec)
-        d_vec = map(plusup_little, c_vec)
+        b_vec = list(map(plusup_little, a_vec))
+        c_vec = list(map(plusup_little, b_vec))
+        d_vec = list(map(plusup_little, c_vec))
 
         expected_result0 = tuple (a_vec)
         expected_result1 = tuple (b_vec)
diff --git a/gr-blocks/python/blocks/qa_keep_m_in_n.py b/gr-blocks/python/blocks/qa_keep_m_in_n.py
old mode 100755
new mode 100644
index 4db48335b2..30a15d9ded
--- a/gr-blocks/python/blocks/qa_keep_m_in_n.py
+++ b/gr-blocks/python/blocks/qa_keep_m_in_n.py
@@ -19,6 +19,7 @@
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 
 import sys
@@ -27,15 +28,15 @@ import random
 class test_keep_m_in_n(gr_unittest.TestCase):
 
     def setUp(self):
-	pass
+        pass
 
     def tearDown(self):
-	pass
+        pass
 
     def test_001(self):
         self.maxDiff = None;
         tb = gr.top_block()
-        src = blocks.vector_source_b( range(0,100) )
+        src = blocks.vector_source_b( list(range(0,100)) )
 
         # itemsize, M, N, offset
         km2 = blocks.keep_m_in_n( 1, 1, 2, 0 );
@@ -49,11 +50,10 @@ class test_keep_m_in_n(gr_unittest.TestCase):
         tb.connect(src,km7,snk7);
         tb.run();
 
-        self.assertEqual(range(0,100,2), list(snk2.data()));
-        self.assertEqual(range(1,100,3), list(snk3.data()));
-        self.assertEqual(range(2,100,7), list(snk7.data()));
+        self.assertEqual(list(range(0,100,2)), list(snk2.data()));
+        self.assertEqual(list(range(1,100,3)), list(snk3.data()));
+        self.assertEqual(list(range(2,100,7)), list(snk7.data()));
 
 
 if __name__ == '__main__':
     gr_unittest.run(test_keep_m_in_n, "test_keep_m_in_n.xml")
-
diff --git a/gr-blocks/python/blocks/qa_keep_one_in_n.py b/gr-blocks/python/blocks/qa_keep_one_in_n.py
old mode 100755
new mode 100644
index d8251fe611..fd7c122c62
--- a/gr-blocks/python/blocks/qa_keep_one_in_n.py
+++ b/gr-blocks/python/blocks/qa_keep_one_in_n.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 
 class test_keep_one_in_n(gr_unittest.TestCase):
diff --git a/gr-blocks/python/blocks/qa_logger.py b/gr-blocks/python/blocks/qa_logger.py
index d2b6b3ee5e..bdcd24cf0e 100644
--- a/gr-blocks/python/blocks/qa_logger.py
+++ b/gr-blocks/python/blocks/qa_logger.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 
 class test_logger (gr_unittest.TestCase):
diff --git a/gr-blocks/python/blocks/qa_max.py b/gr-blocks/python/blocks/qa_max.py
old mode 100755
new mode 100644
index 709dbee72e..45c2261ded
--- a/gr-blocks/python/blocks/qa_max.py
+++ b/gr-blocks/python/blocks/qa_max.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+
 from gnuradio import gr, gr_unittest, blocks
 
 import math
@@ -47,18 +49,18 @@ class test_max(gr_unittest.TestCase):
         self.assertEqual(expected_result, result_data)
 
     def stest_002(self):
-	src_data=(-100,-99,-98,-97,-96,-1)
-	expected_result = (float(max(src_data)),)
+        src_data=(-100,-99,-98,-97,-96,-1)
+        expected_result = (float(max(src_data)),)
 
-	src = blocks.vector_source_f(src_data)
-	s2v = blocks.stream_to_vector(gr.sizeof_float, len(src_data))
-	op = blocks.max_ff(len(src_data))
-	dst = blocks.vector_sink_f()
+        src = blocks.vector_source_f(src_data)
+        s2v = blocks.stream_to_vector(gr.sizeof_float, len(src_data))
+        op = blocks.max_ff(len(src_data))
+        dst = blocks.vector_sink_f()
 
-	self.tb.connect(src, s2v, op, dst)
-	self.tb.run()
-	result_data = dst.data()
-	self.assertEqual(expected_result, result_data)
+        self.tb.connect(src, s2v, op, dst)
+        self.tb.run()
+        result_data = dst.data()
+        self.assertEqual(expected_result, result_data)
 
     def stest_003(self):
         src_data0 = (0, 2, -3, 0, 12, 0)
@@ -85,7 +87,7 @@ class test_max(gr_unittest.TestCase):
 
         expected_data = []
         tmp = [float(max(x,y)) for x,y in zip(src_data0, src_data1)]
-        for i in xrange(len(tmp)/dim):
+        for i in range(len(tmp) / dim):
             expected_data.append(float(max(tmp[i*dim:(i+1)*dim])))
 
         src0 = blocks.vector_source_f(src_data0)
@@ -118,18 +120,18 @@ class test_max(gr_unittest.TestCase):
         self.assertEqual(expected_result, result_data)
 
     def stest_s002(self):
-	src_data=(-100,-99,-98,-97,-96,-1)
-	expected_result = (max(src_data),)
+        src_data=(-100,-99,-98,-97,-96,-1)
+        expected_result = (max(src_data),)
 
-	src = blocks.vector_source_s(src_data)
-	s2v = blocks.stream_to_vector(gr.sizeof_short, len(src_data))
-	op = blocks.max_ss(len(src_data))
-	dst = blocks.vector_sink_s()
+        src = blocks.vector_source_s(src_data)
+        s2v = blocks.stream_to_vector(gr.sizeof_short, len(src_data))
+        op = blocks.max_ss(len(src_data))
+        dst = blocks.vector_sink_s()
 
-	self.tb.connect(src, s2v, op, dst)
-	self.tb.run()
-	result_data = dst.data()
-	self.assertEqual(expected_result, result_data)
+        self.tb.connect(src, s2v, op, dst)
+        self.tb.run()
+        result_data = dst.data()
+        self.assertEqual(expected_result, result_data)
 
 
     def stest_s003(self):
@@ -157,7 +159,7 @@ class test_max(gr_unittest.TestCase):
 
         expected_data = []
         tmp = [max(x,y) for x,y in zip(src_data0, src_data1)]
-        for i in xrange(len(tmp)/dim):
+        for i in range(len(tmp) / dim):
             expected_data.append(max(tmp[i*dim:(i+1)*dim]))
 
         src0 = blocks.vector_source_s(src_data0)
diff --git a/gr-blocks/python/blocks/qa_message.py b/gr-blocks/python/blocks/qa_message.py
old mode 100755
new mode 100644
index 1d0380d44c..639001f09a
--- a/gr-blocks/python/blocks/qa_message.py
+++ b/gr-blocks/python/blocks/qa_message.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 import time
 
 from gnuradio import gr, gr_unittest, blocks
@@ -95,7 +96,7 @@ class test_message(gr_unittest.TestCase):
         input_data = (0,1,2,3,4,5,6,7,8,9)
         src = blocks.vector_source_b(input_data)
         dst = blocks.vector_sink_b()
-	tb = gr.top_block()
+        tb = gr.top_block()
         tb.connect(src, dst)
         tb.run()
         self.assertEquals(input_data, dst.data())
@@ -105,7 +106,7 @@ class test_message(gr_unittest.TestCase):
         src = blocks.message_strobe(msg, 500)
         snk = blocks.message_debug()
 
-	tb = gr.top_block()
+        tb = gr.top_block()
         tb.msg_connect(src, "strobe", snk, "store")
         tb.start()
         time.sleep(1)
diff --git a/gr-blocks/python/blocks/qa_min.py b/gr-blocks/python/blocks/qa_min.py
index 642782a1a1..374c15e319 100644
--- a/gr-blocks/python/blocks/qa_min.py
+++ b/gr-blocks/python/blocks/qa_min.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+
 from gnuradio import gr, gr_unittest, blocks
 
 import math
@@ -47,18 +49,18 @@ class test_min(gr_unittest.TestCase):
         self.assertEqual(expected_result, result_data)
 
     def stest_002(self):
-	src_data=(-100,-99,-98,-97,-96,-1)
-	expected_result = (float(min(src_data)),)
+        src_data=(-100,-99,-98,-97,-96,-1)
+        expected_result = (float(min(src_data)),)
 
-	src = blocks.vector_source_f(src_data)
-	s2v = blocks.stream_to_vector(gr.sizeof_float, len(src_data))
-	op = blocks.min_ff(len(src_data))
-	dst = blocks.vector_sink_f()
+        src = blocks.vector_source_f(src_data)
+        s2v = blocks.stream_to_vector(gr.sizeof_float, len(src_data))
+        op = blocks.min_ff(len(src_data))
+        dst = blocks.vector_sink_f()
 
-	self.tb.connect(src, s2v, op, dst)
-	self.tb.run()
-	result_data = dst.data()
-	self.assertEqual(expected_result, result_data)
+        self.tb.connect(src, s2v, op, dst)
+        self.tb.run()
+        result_data = dst.data()
+        self.assertEqual(expected_result, result_data)
 
     def stest_003(self):
         src_data0 = (0, 2, -3, 0, 12, 0)
@@ -85,7 +87,7 @@ class test_min(gr_unittest.TestCase):
 
         expected_data = []
         tmp = [float(min(x,y)) for x,y in zip(src_data0, src_data1)]
-        for i in xrange(len(tmp)/dim):
+        for i in range(len(tmp) / dim):
             expected_data.append(float(min(tmp[i*dim:(i+1)*dim])))
 
         src0 = blocks.vector_source_f(src_data0)
@@ -118,18 +120,18 @@ class test_min(gr_unittest.TestCase):
         self.assertEqual(expected_result, result_data)
 
     def stest_s002(self):
-	src_data=(-100,-99,-98,-97,-96,-1)
-	expected_result = (min(src_data),)
+        src_data=(-100,-99,-98,-97,-96,-1)
+        expected_result = (min(src_data),)
 
-	src = blocks.vector_source_s(src_data)
-	s2v = blocks.stream_to_vector(gr.sizeof_short, len(src_data))
-	op = blocks.min_ss(len(src_data))
-	dst = blocks.vector_sink_s()
+        src = blocks.vector_source_s(src_data)
+        s2v = blocks.stream_to_vector(gr.sizeof_short, len(src_data))
+        op = blocks.min_ss(len(src_data))
+        dst = blocks.vector_sink_s()
 
-	self.tb.connect(src, s2v, op, dst)
-	self.tb.run()
-	result_data = dst.data()
-	self.assertEqual(expected_result, result_data)
+        self.tb.connect(src, s2v, op, dst)
+        self.tb.run()
+        result_data = dst.data()
+        self.assertEqual(expected_result, result_data)
 
 
     def stest_s003(self):
@@ -157,7 +159,7 @@ class test_min(gr_unittest.TestCase):
 
         expected_data = []
         tmp = [min(x,y) for x,y in zip(src_data0, src_data1)]
-        for i in xrange(len(tmp)/dim):
+        for i in range(len(tmp) / dim):
             expected_data.append(min(tmp[i*dim:(i+1)*dim]))
 
         src0 = blocks.vector_source_s(src_data0)
diff --git a/gr-blocks/python/blocks/qa_moving_average.py b/gr-blocks/python/blocks/qa_moving_average.py
index 2c58805925..513861f007 100644
--- a/gr-blocks/python/blocks/qa_moving_average.py
+++ b/gr-blocks/python/blocks/qa_moving_average.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 
 import math, random
diff --git a/gr-blocks/python/blocks/qa_multiply_conjugate.py b/gr-blocks/python/blocks/qa_multiply_conjugate.py
index c2391f1410..dadea69ba2 100644
--- a/gr-blocks/python/blocks/qa_multiply_conjugate.py
+++ b/gr-blocks/python/blocks/qa_multiply_conjugate.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 
 class test_multiply_conjugate (gr_unittest.TestCase):
diff --git a/gr-blocks/python/blocks/qa_multiply_matrix_xx.py b/gr-blocks/python/blocks/qa_multiply_matrix_xx.py
old mode 100755
new mode 100644
index feee53d510..eb10535565
--- a/gr-blocks/python/blocks/qa_multiply_matrix_xx.py
+++ b/gr-blocks/python/blocks/qa_multiply_matrix_xx.py
@@ -21,6 +21,7 @@
 # Boston, MA 02110-1301, USA.
 # 
 
+
 import time
 import numpy
 import os
@@ -73,7 +74,7 @@ class test_multiply_matrix_xx (gr_unittest.TestCase):
             self.multiplier.set_A(A2)
             A = A2
             A_matrix = numpy.matrix(A)
-        for i in xrange(N):
+        for i in range(N):
             if tags is None:
                 these_tags = ()
             else:
@@ -83,17 +84,17 @@ class test_multiply_matrix_xx (gr_unittest.TestCase):
                     (self.multiplier, i)
             )
         sinks = []
-        for i in xrange(M):
+        for i in range(M):
             sinks.append(BLOCK_LOOKUP[datatype]['sink']())
             self.tb.connect((self.multiplier, i), sinks[i])
         # Run and check
         self.tb.run()
-        for i in xrange(X_in.shape[1]):
+        for i in range(X_in.shape[1]):
             Y_out_exp[:,i] = A_matrix * X_in[:,i]
         Y_out = [list(x.data()) for x in sinks]
         if tags is not None:
             self.the_tags = []
-            for i in xrange(M):
+            for i in range(M):
                 self.the_tags.append(sinks[i].tags())
         self.assertEqual(list(Y_out), Y_out_exp.tolist())
 
diff --git a/gr-blocks/python/blocks/qa_mute.py b/gr-blocks/python/blocks/qa_mute.py
old mode 100755
new mode 100644
index 97ee5bd821..d061954ef8
--- a/gr-blocks/python/blocks/qa_mute.py
+++ b/gr-blocks/python/blocks/qa_mute.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 
 class test_mute(gr_unittest.TestCase):
@@ -31,7 +32,7 @@ class test_mute(gr_unittest.TestCase):
         self.tb = None
 
     def help_ii(self, src_data, exp_data, op):
-        for s in zip(range(len(src_data)), src_data):
+        for s in zip(list(range(len(src_data))), src_data):
             src = blocks.vector_source_i(s[1])
             self.tb.connect(src, (op, s[0]))
         dst = blocks.vector_sink_i()
@@ -41,7 +42,7 @@ class test_mute(gr_unittest.TestCase):
         self.assertEqual(exp_data, result_data)
 
     def help_ff(self, src_data, exp_data, op):
-        for s in zip(range(len(src_data)), src_data):
+        for s in zip(list(range(len(src_data))), src_data):
             src = blocks.vector_source_f(s[1])
             self.tb.connect(src, (op, s[0]))
         dst = blocks.vector_sink_f()
@@ -51,7 +52,7 @@ class test_mute(gr_unittest.TestCase):
         self.assertEqual(exp_data, result_data)
 
     def help_cc(self, src_data, exp_data, op):
-        for s in zip(range(len(src_data)), src_data):
+        for s in zip(list(range(len(src_data))), src_data):
             src = blocks.vector_source_c(s[1])
             self.tb.connect(src, (op, s[0]))
         dst = blocks.vector_sink_c()
diff --git a/gr-blocks/python/blocks/qa_nlog10.py b/gr-blocks/python/blocks/qa_nlog10.py
old mode 100755
new mode 100644
index c925479f59..94269c34f0
--- a/gr-blocks/python/blocks/qa_nlog10.py
+++ b/gr-blocks/python/blocks/qa_nlog10.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 
 class test_nlog10(gr_unittest.TestCase):
diff --git a/gr-blocks/python/blocks/qa_null_sink_source.py b/gr-blocks/python/blocks/qa_null_sink_source.py
index 03d6ab14c1..8ddd8db6fc 100644
--- a/gr-blocks/python/blocks/qa_null_sink_source.py
+++ b/gr-blocks/python/blocks/qa_null_sink_source.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 import math
 
diff --git a/gr-blocks/python/blocks/qa_pack_k_bits.py b/gr-blocks/python/blocks/qa_pack_k_bits.py
old mode 100755
new mode 100644
index ab0b638a09..28285845b3
--- a/gr-blocks/python/blocks/qa_pack_k_bits.py
+++ b/gr-blocks/python/blocks/qa_pack_k_bits.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 import random
 
 from gnuradio import gr, gr_unittest, blocks
@@ -54,7 +55,7 @@ class test_pack(gr_unittest.TestCase):
         self.assertEqual(expected_results, dst.data())
 
     def test_003(self):
-        src_data = expected_results = map(lambda x: random.randint(0,3), range(10));
+        src_data = expected_results = [random.randint(0,3) for x in range(10)];
         src = blocks.vector_source_b( src_data );
         pack = blocks.pack_k_bits_bb(2);
         unpack = blocks.unpack_k_bits_bb(2);
diff --git a/gr-blocks/python/blocks/qa_packed_to_unpacked.py b/gr-blocks/python/blocks/qa_packed_to_unpacked.py
old mode 100755
new mode 100644
index 02dc872490..13e93a7136
--- a/gr-blocks/python/blocks/qa_packed_to_unpacked.py
+++ b/gr-blocks/python/blocks/qa_packed_to_unpacked.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 
 import random
@@ -139,7 +140,7 @@ class test_packing(gr_unittest.TestCase):
     def test_009(self):
         random.seed(0)
         src_data = []
-        for i in xrange(202):
+        for i in range(202):
             src_data.append((random.randint(0,255)))
         src_data = tuple(src_data)
         expected_results = src_data
@@ -158,7 +159,7 @@ class test_packing(gr_unittest.TestCase):
     def test_010(self):
         random.seed(0)
         src_data = []
-        for i in xrange(56):
+        for i in range(56):
             src_data.append((random.randint(0,255)))
         src_data = tuple(src_data)
         expected_results = src_data
@@ -176,7 +177,7 @@ class test_packing(gr_unittest.TestCase):
     def test_011(self):
         random.seed(0)
         src_data = []
-        for i in xrange(56):
+        for i in range(56):
             src_data.append((random.randint(0,255)))
         src_data = tuple(src_data)
         expected_results = src_data
@@ -196,7 +197,7 @@ class test_packing(gr_unittest.TestCase):
     def test_100a(self):
         random.seed(0)
         src_data = []
-        for i in xrange(100):
+        for i in range(100):
             src_data.append((random.randint(-2**15,2**15-1)))
         src_data = tuple(src_data)
         expected_results = src_data
@@ -214,7 +215,7 @@ class test_packing(gr_unittest.TestCase):
     def test_100b(self):
         random.seed(0)
         src_data = []
-        for i in xrange(100):
+        for i in range(100):
             src_data.append((random.randint(-2**15,2**15-1)))
         src_data = tuple(src_data)
         expected_results = src_data
@@ -232,7 +233,7 @@ class test_packing(gr_unittest.TestCase):
     def test_101a(self):
         random.seed(0)
         src_data = []
-        for i in xrange(100):
+        for i in range(100):
             src_data.append((random.randint(-2**15,2**15-1)))
         src_data = tuple(src_data)
         expected_results = src_data
@@ -250,7 +251,7 @@ class test_packing(gr_unittest.TestCase):
     def test_101b(self):
         random.seed(0)
         src_data = []
-        for i in xrange(100):
+        for i in range(100):
             src_data.append((random.randint(-2**15,2**15-1)))
         src_data = tuple(src_data)
         expected_results = src_data
@@ -270,7 +271,7 @@ class test_packing(gr_unittest.TestCase):
     def test_200a(self):
         random.seed(0)
         src_data = []
-        for i in xrange(100):
+        for i in range(100):
             src_data.append((random.randint(-2**31,2**31-1)))
         src_data = tuple(src_data)
         expected_results = src_data
@@ -288,7 +289,7 @@ class test_packing(gr_unittest.TestCase):
     def test_200b(self):
         random.seed(0)
         src_data = []
-        for i in xrange(100):
+        for i in range(100):
             src_data.append((random.randint(-2**31,2**31-1)))
         src_data = tuple(src_data)
         expected_results = src_data
@@ -306,7 +307,7 @@ class test_packing(gr_unittest.TestCase):
     def test_201a(self):
         random.seed(0)
         src_data = []
-        for i in xrange(100):
+        for i in range(100):
             src_data.append((random.randint(-2**31,2**31-1)))
         src_data = tuple(src_data)
         expected_results = src_data
@@ -324,7 +325,7 @@ class test_packing(gr_unittest.TestCase):
     def test_201b(self):
         random.seed(0)
         src_data = []
-        for i in xrange(100):
+        for i in range(100):
             src_data.append((random.randint(-2**31,2**31-1)))
         src_data = tuple(src_data)
         expected_results = src_data
diff --git a/gr-blocks/python/blocks/qa_patterned_interleaver.py b/gr-blocks/python/blocks/qa_patterned_interleaver.py
old mode 100755
new mode 100644
index 2d3168db40..300565210e
--- a/gr-blocks/python/blocks/qa_patterned_interleaver.py
+++ b/gr-blocks/python/blocks/qa_patterned_interleaver.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 
 import math
diff --git a/gr-blocks/python/blocks/qa_pdu.py b/gr-blocks/python/blocks/qa_pdu.py
old mode 100755
new mode 100644
index 79d39df48b..3ee5e576ea
--- a/gr-blocks/python/blocks/qa_pdu.py
+++ b/gr-blocks/python/blocks/qa_pdu.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 import time
 
 from gnuradio import gr, gr_unittest, blocks
@@ -79,7 +80,7 @@ class test_pdu(gr_unittest.TestCase):
 
         # Convert the PMT vector into a Python list
         msg_data = []
-        for i in xrange(16):
+        for i in range(16):
             msg_data.append(pmt.u8vector_ref(msg_vec, i))
 
         actual_data = 16*[0xFF,]
@@ -108,7 +109,7 @@ class test_pdu(gr_unittest.TestCase):
 
     def test_002_tags_plus_data(self):
         packet_len = 16
-        src_data = range(packet_len)
+        src_data = list(range(packet_len))
         tag1 = gr.tag_t()
         tag1.offset = 0
         tag1.key = pmt.string_to_symbol('spam')
diff --git a/gr-blocks/python/blocks/qa_peak_detector.py b/gr-blocks/python/blocks/qa_peak_detector.py
index c855e92530..cb253a5db6 100644
--- a/gr-blocks/python/blocks/qa_peak_detector.py
+++ b/gr-blocks/python/blocks/qa_peak_detector.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 
 class test_peak_detector(gr_unittest.TestCase):
diff --git a/gr-blocks/python/blocks/qa_peak_detector2.py b/gr-blocks/python/blocks/qa_peak_detector2.py
index d6fd4fe95f..a7de40200e 100644
--- a/gr-blocks/python/blocks/qa_peak_detector2.py
+++ b/gr-blocks/python/blocks/qa_peak_detector2.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 
 class test_peak_detector2(gr_unittest.TestCase):
diff --git a/gr-blocks/python/blocks/qa_pipe_fittings.py b/gr-blocks/python/blocks/qa_pipe_fittings.py
old mode 100755
new mode 100644
index bc29cc750e..b569157582
--- a/gr-blocks/python/blocks/qa_pipe_fittings.py
+++ b/gr-blocks/python/blocks/qa_pipe_fittings.py
@@ -20,13 +20,14 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 
 def calc_expected_result(src_data, n):
     assert (len(src_data) % n) == 0
     result = [list() for x in range(n)]
     #print "len(result) =", len(result)
-    for i in xrange(len(src_data)):
+    for i in range(len(src_data)):
         (result[i % n]).append(src_data[i])
     return [tuple(x) for x in result]
 
@@ -45,7 +46,7 @@ class test_pipe_fittings(gr_unittest.TestCase):
         """
         n = 8
         src_len = n * 8
-        src_data = range(src_len)
+        src_data = list(range(src_len))
 
         expected_results = calc_expected_result(src_data, n)
         #print "expected results: ", expected_results
diff --git a/gr-blocks/python/blocks/qa_plateau_detector_fb.py b/gr-blocks/python/blocks/qa_plateau_detector_fb.py
old mode 100755
new mode 100644
index 003c4ea74d..6a41a249e9
--- a/gr-blocks/python/blocks/qa_plateau_detector_fb.py
+++ b/gr-blocks/python/blocks/qa_plateau_detector_fb.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 
 class qa_plateau_detector_fb (gr_unittest.TestCase):
diff --git a/gr-blocks/python/blocks/qa_probe_signal.py b/gr-blocks/python/blocks/qa_probe_signal.py
index 8194cafdb0..b7fd6b061c 100644
--- a/gr-blocks/python/blocks/qa_probe_signal.py
+++ b/gr-blocks/python/blocks/qa_probe_signal.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 
 class test_probe_signal(gr_unittest.TestCase):
diff --git a/gr-blocks/python/blocks/qa_python_message_passing.py b/gr-blocks/python/blocks/qa_python_message_passing.py
index 7bb5fbe10e..49e2e5e481 100644
--- a/gr-blocks/python/blocks/qa_python_message_passing.py
+++ b/gr-blocks/python/blocks/qa_python_message_passing.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 import pmt
 import numpy
diff --git a/gr-blocks/python/blocks/qa_regenerate.py b/gr-blocks/python/blocks/qa_regenerate.py
old mode 100755
new mode 100644
index 52b6bdb515..65d76cfe16
--- a/gr-blocks/python/blocks/qa_regenerate.py
+++ b/gr-blocks/python/blocks/qa_regenerate.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 
 class test_regenerate(gr_unittest.TestCase):
diff --git a/gr-blocks/python/blocks/qa_repack_bits_bb.py b/gr-blocks/python/blocks/qa_repack_bits_bb.py
old mode 100755
new mode 100644
index 50e1506196..fa86c0ccac
--- a/gr-blocks/python/blocks/qa_repack_bits_bb.py
+++ b/gr-blocks/python/blocks/qa_repack_bits_bb.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 import random
 from gnuradio import gr, gr_unittest, blocks
 import pmt
diff --git a/gr-blocks/python/blocks/qa_repeat.py b/gr-blocks/python/blocks/qa_repeat.py
old mode 100755
new mode 100644
index eaf20d4e27..0054f8ce5e
--- a/gr-blocks/python/blocks/qa_repeat.py
+++ b/gr-blocks/python/blocks/qa_repeat.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 
 class test_repeat (gr_unittest.TestCase):
@@ -31,17 +32,17 @@ class test_repeat (gr_unittest.TestCase):
         self.tb = None
 
     def test_001_float(self):
-	src_data = [n*1.0 for n in range(100)];
-	dst_data = []
-	for n in range(100):
-	    dst_data += [1.0*n, 1.0*n, 1.0*n]
-
-	src = blocks.vector_source_f(src_data)
-	rpt = blocks.repeat(gr.sizeof_float, 3)
-	dst = blocks.vector_sink_f()
-	self.tb.connect(src, rpt, dst)
-	self.tb.run()
-	self.assertFloatTuplesAlmostEqual(dst_data, dst.data(), 6)
+        src_data = [n*1.0 for n in range(100)];
+        dst_data = []
+        for n in range(100):
+            dst_data += [1.0*n, 1.0*n, 1.0*n]
+
+        src = blocks.vector_source_f(src_data)
+        rpt = blocks.repeat(gr.sizeof_float, 3)
+        dst = blocks.vector_sink_f()
+        self.tb.connect(src, rpt, dst)
+        self.tb.run()
+        self.assertFloatTuplesAlmostEqual(dst_data, dst.data(), 6)
 
 if __name__ == '__main__':
     gr_unittest.run(test_repeat, "test_repeat.xml")
diff --git a/gr-blocks/python/blocks/qa_rms.py b/gr-blocks/python/blocks/qa_rms.py
index 0b07c37bdc..53c13b54d1 100644
--- a/gr-blocks/python/blocks/qa_rms.py
+++ b/gr-blocks/python/blocks/qa_rms.py
@@ -20,19 +20,21 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+
 from gnuradio import gr, gr_unittest, blocks
 
 import math
 
 def sig_source_f(samp_rate, freq, amp, N):
-    t = map(lambda x: float(x)/samp_rate, xrange(N))
-    y = map(lambda x: amp*math.cos(2.*math.pi*freq*x), t)
+    t = [float(x) / samp_rate for x in range(N)]
+    y = [amp*math.cos(2.*math.pi*freq*x) for x in t]
     return y
 
 def sig_source_c(samp_rate, freq, amp, N):
-    t = map(lambda x: float(x)/samp_rate, xrange(N))
-    y = map(lambda x: amp*math.cos(2.*math.pi*freq*x) + \
-                1j*amp*math.sin(2.*math.pi*freq*x), t)
+    t = [float(x) / samp_rate for x in range(N)]
+    y = [amp*math.cos(2.*math.pi*freq*x) + \
+                1j*amp*math.sin(2.*math.pi*freq*x) for x in t]
     return y
 
 class test_rms(gr_unittest.TestCase):
@@ -48,7 +50,7 @@ class test_rms(gr_unittest.TestCase):
         src_data = sig_source_f(1, 0.01, amp, 200)
         N = 750000
 
-        expected_data = amp/math.sqrt(2.0)
+        expected_data = amp / math.sqrt(2.0)
 
         src = blocks.vector_source_f(src_data, True)
         head = blocks.head(gr.sizeof_float, N)
diff --git a/gr-blocks/python/blocks/qa_sample_and_hold.py b/gr-blocks/python/blocks/qa_sample_and_hold.py
index f645148695..306151600a 100644
--- a/gr-blocks/python/blocks/qa_sample_and_hold.py
+++ b/gr-blocks/python/blocks/qa_sample_and_hold.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 import time
 from gnuradio import gr, gr_unittest, blocks
 
diff --git a/gr-blocks/python/blocks/qa_skiphead.py b/gr-blocks/python/blocks/qa_skiphead.py
old mode 100755
new mode 100644
index a9b6df40cf..6eed7b465f
--- a/gr-blocks/python/blocks/qa_skiphead.py
+++ b/gr-blocks/python/blocks/qa_skiphead.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 
 class test_skiphead(gr_unittest.TestCase):
diff --git a/gr-blocks/python/blocks/qa_socket_pdu.py b/gr-blocks/python/blocks/qa_socket_pdu.py
old mode 100755
new mode 100644
index db9f53c71e..60da3d6bdd
--- a/gr-blocks/python/blocks/qa_socket_pdu.py
+++ b/gr-blocks/python/blocks/qa_socket_pdu.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 import random
 import pmt
@@ -67,7 +68,7 @@ class qa_socket_pdu (gr_unittest.TestCase):
         received = self.dbg.get_message(0)
         received_data = pmt.cdr(received)
         msg_data = []
-        for i in xrange(4):
+        for i in range(4):
             msg_data.append(pmt.u8vector_ref(received_data, i))
         self.assertEqual(srcdata, tuple(msg_data))
 
diff --git a/gr-blocks/python/blocks/qa_stream_mux.py b/gr-blocks/python/blocks/qa_stream_mux.py
old mode 100755
new mode 100644
index 3b470afa4c..b09e6db762
--- a/gr-blocks/python/blocks/qa_stream_mux.py
+++ b/gr-blocks/python/blocks/qa_stream_mux.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 import pmt
 import os
@@ -49,8 +50,8 @@ class test_stream_mux (gr_unittest.TestCase):
         return dst.data ()
 
     def help_stream_ramp_2ff(self, N, stream_sizes):
-        r1 = range(N)
-        r2 = range(N)
+        r1 = list(range(N))
+        r2 = list(range(N))
         r2.reverse()
 
         v0 = blocks.vector_source_f(r1, False)
diff --git a/gr-blocks/python/blocks/qa_stream_to_tagged_stream.py b/gr-blocks/python/blocks/qa_stream_to_tagged_stream.py
old mode 100755
new mode 100644
index 0d3f503abd..27904ede01
--- a/gr-blocks/python/blocks/qa_stream_to_tagged_stream.py
+++ b/gr-blocks/python/blocks/qa_stream_to_tagged_stream.py
@@ -21,6 +21,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest
 from gnuradio import blocks
 
@@ -34,7 +35,7 @@ class qa_stream_to_tagged_stream (gr_unittest.TestCase):
 
     def test_001_t (self):
         src_data = (1, ) * 50
-        packet_len = 10L
+        packet_len = 10
         len_tag_key = 'packet_len'
         src = blocks.vector_source_f(src_data, False, 1)
         tagger = blocks.stream_to_tagged_stream(gr.sizeof_float, 1, packet_len, len_tag_key)
@@ -44,7 +45,7 @@ class qa_stream_to_tagged_stream (gr_unittest.TestCase):
         self.assertEqual(sink.data(), src_data)
         tags = [gr.tag_to_python(x) for x in sink.tags()]
         tags = sorted([(x.offset, x.key, x.value) for x in tags])
-        expected_tags = [(long(pos), 'packet_len', packet_len) for pos in range(0, 50, 10) ]
+        expected_tags = [(int(pos), 'packet_len', packet_len) for pos in range(0, 50, 10) ]
         self.assertEqual(tags, expected_tags)
 
 
diff --git a/gr-blocks/python/blocks/qa_stretch.py b/gr-blocks/python/blocks/qa_stretch.py
old mode 100755
new mode 100644
index e91a375abf..540d89c0c4
--- a/gr-blocks/python/blocks/qa_stretch.py
+++ b/gr-blocks/python/blocks/qa_stretch.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+
 from gnuradio import gr, gr_unittest, blocks
 
 class test_stretch(gr_unittest.TestCase):
@@ -34,8 +36,8 @@ class test_stretch(gr_unittest.TestCase):
         tb = self.tb
 
         data = 10*[1,]
-        data0 = map(lambda x: x/20.0, data)
-        data1 = map(lambda x: x/10.0, data)
+        data0 = [x / 20.0 for x in data]
+        data1 = [x / 10.0 for x in data]
 
         expected_result0 = 10*[0.05,]
         expected_result1 = 10*[0.1,]
diff --git a/gr-blocks/python/blocks/qa_tag_debug.py b/gr-blocks/python/blocks/qa_tag_debug.py
old mode 100755
new mode 100644
index 5ccb285a5d..68d131ac0b
--- a/gr-blocks/python/blocks/qa_tag_debug.py
+++ b/gr-blocks/python/blocks/qa_tag_debug.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 
 class test_tag_debug(gr_unittest.TestCase):
diff --git a/gr-blocks/python/blocks/qa_tag_file_sink.py b/gr-blocks/python/blocks/qa_tag_file_sink.py
index 250ad1addf..bd4ee54380 100644
--- a/gr-blocks/python/blocks/qa_tag_file_sink.py
+++ b/gr-blocks/python/blocks/qa_tag_file_sink.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 import os, struct
 
@@ -51,14 +52,14 @@ class test_tag_file_sink(gr_unittest.TestCase):
 
         # Open the files and read in the data, then remove the files
         # to clean up the directory.
-        outfile0 = file(file0, 'rb')
-	outfile1 = file(file1, 'rb')
-	data0 = outfile0.read(8)
-	data1 = outfile1.read(8)
+        outfile0 = open(file0, 'rb')
+        outfile1 = open(file1, 'rb')
+        data0 = outfile0.read(8)
+        data1 = outfile1.read(8)
         outfile0.close()
         outfile1.close()
-	os.remove(file0)
-	os.remove(file1)
+        os.remove(file0)
+        os.remove(file1)
 
         # Convert the 8 bytes from the files into a tuple of 2 ints.
         idata0 = struct.unpack('ii', data0)
diff --git a/gr-blocks/python/blocks/qa_tag_gate.py b/gr-blocks/python/blocks/qa_tag_gate.py
old mode 100755
new mode 100644
index acb2c68a82..d5b97787a0
--- a/gr-blocks/python/blocks/qa_tag_gate.py
+++ b/gr-blocks/python/blocks/qa_tag_gate.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 import pmt
 
@@ -37,7 +38,7 @@ class qa_tag_gate (gr_unittest.TestCase):
         tag.key = pmt.string_to_symbol('key')
         tag.value = pmt.from_long(42)
         tag.offset = 0
-        src = blocks.vector_source_f(range(20), False, 1, (tag,))
+        src = blocks.vector_source_f(list(range(20)), False, 1, (tag,))
         gate = blocks.tag_gate(gr.sizeof_float, False)
         sink = blocks.vector_sink_f()
         self.tb.run ()
diff --git a/gr-blocks/python/blocks/qa_tagged_stream_mux.py b/gr-blocks/python/blocks/qa_tagged_stream_mux.py
old mode 100755
new mode 100644
index 6f1c1c538a..aeedd16c4d
--- a/gr-blocks/python/blocks/qa_tagged_stream_mux.py
+++ b/gr-blocks/python/blocks/qa_tagged_stream_mux.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 import numpy
 import pmt
 from gnuradio import gr, gr_unittest, blocks
@@ -84,9 +85,9 @@ class qa_tagged_stream_mux (gr_unittest.TestCase):
         This will add a 'special' tag to item 0 on stream 1.
         It should be on item 0 of the output stream. """
         packet_len_0 = 5
-        data0 = range(packet_len_0)
+        data0 = list(range(packet_len_0))
         packet_len_1 = 3
-        data1 = range(packet_len_1)
+        data1 = list(range(packet_len_1))
         mux = blocks.tagged_stream_mux(
                 gr.sizeof_float,
                 self.tsb_key,
@@ -99,7 +100,7 @@ class qa_tagged_stream_mux (gr_unittest.TestCase):
             (mux, 0)
         )
         self.tb.connect(
-            blocks.vector_source_f(range(packet_len_1), tags=(make_tag('spam', 'eggs', 0),)),
+            blocks.vector_source_f(list(range(packet_len_1)), tags=(make_tag('spam', 'eggs', 0),)),
             blocks.stream_to_tagged_stream(gr.sizeof_float, 1, packet_len_1, self.tsb_key),
             (mux, 1)
         )
diff --git a/gr-blocks/python/blocks/qa_tags_strobe.py b/gr-blocks/python/blocks/qa_tags_strobe.py
index c4e1b5d8bc..e347e30c8e 100644
--- a/gr-blocks/python/blocks/qa_tags_strobe.py
+++ b/gr-blocks/python/blocks/qa_tags_strobe.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+
 from gnuradio import gr, gr_unittest, blocks
 import pmt
 import math
@@ -55,7 +57,7 @@ class test_tags_strobe(gr_unittest.TestCase):
     def test_002(self):
         N = 10000
         nsamps = 123
-        ntags = N / nsamps
+        ntags = N // nsamps
 
         src = blocks.tags_strobe(gr.sizeof_float,
                                  pmt.intern("TEST"), nsamps)
diff --git a/gr-blocks/python/blocks/qa_tcp_server_sink.py b/gr-blocks/python/blocks/qa_tcp_server_sink.py
index f7d3a0af92..96c6fcbe32 100644
--- a/gr-blocks/python/blocks/qa_tcp_server_sink.py
+++ b/gr-blocks/python/blocks/qa_tcp_server_sink.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 import os
 import socket
diff --git a/gr-blocks/python/blocks/qa_threshold.py b/gr-blocks/python/blocks/qa_threshold.py
index 49798426f3..5b92ca1a7e 100644
--- a/gr-blocks/python/blocks/qa_threshold.py
+++ b/gr-blocks/python/blocks/qa_threshold.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 
 class test_threshold(gr_unittest.TestCase):
diff --git a/gr-blocks/python/blocks/qa_throttle.py b/gr-blocks/python/blocks/qa_throttle.py
old mode 100755
new mode 100644
index 7d18e87ade..dae489fec8
--- a/gr-blocks/python/blocks/qa_throttle.py
+++ b/gr-blocks/python/blocks/qa_throttle.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 
 class test_throttle(gr_unittest.TestCase):
diff --git a/gr-blocks/python/blocks/qa_transcendental.py b/gr-blocks/python/blocks/qa_transcendental.py
index 1da56381f4..ba30a62e3d 100644
--- a/gr-blocks/python/blocks/qa_transcendental.py
+++ b/gr-blocks/python/blocks/qa_transcendental.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 
 import math
diff --git a/gr-blocks/python/blocks/qa_tsb_vector_sink_X.py b/gr-blocks/python/blocks/qa_tsb_vector_sink_X.py
old mode 100755
new mode 100644
index ac3cd38d45..dca47b321e
--- a/gr-blocks/python/blocks/qa_tsb_vector_sink_X.py
+++ b/gr-blocks/python/blocks/qa_tsb_vector_sink_X.py
@@ -21,6 +21,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 import pmt
 from gnuradio import gr, gr_unittest
 from gnuradio import blocks
@@ -36,7 +37,7 @@ class qa_tsb_vector_sink (gr_unittest.TestCase):
 
     def test_001_t (self):
         packet_len = 4
-        data = range(2 * packet_len)
+        data = list(range(2 * packet_len))
         tag = gr.tag_t()
         tag.key = pmt.intern("foo")
         tag.offset = 5
diff --git a/gr-blocks/python/blocks/qa_type_conversions.py b/gr-blocks/python/blocks/qa_type_conversions.py
old mode 100755
new mode 100644
index cd600de2be..6206542edb
--- a/gr-blocks/python/blocks/qa_type_conversions.py
+++ b/gr-blocks/python/blocks/qa_type_conversions.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 
 from math import sqrt, atan2
diff --git a/gr-blocks/python/blocks/qa_udp_source_sink.py b/gr-blocks/python/blocks/qa_udp_source_sink.py
index 905b9e08a0..f0418357fd 100644
--- a/gr-blocks/python/blocks/qa_udp_source_sink.py
+++ b/gr-blocks/python/blocks/qa_udp_source_sink.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 import os
 
diff --git a/gr-blocks/python/blocks/qa_unpack_k_bits.py b/gr-blocks/python/blocks/qa_unpack_k_bits.py
old mode 100755
new mode 100644
index 765c459dfa..f351e75d30
--- a/gr-blocks/python/blocks/qa_unpack_k_bits.py
+++ b/gr-blocks/python/blocks/qa_unpack_k_bits.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 
 import random
diff --git a/gr-blocks/python/blocks/qa_vco.py b/gr-blocks/python/blocks/qa_vco.py
index fdd1eb1001..a67fe36d62 100644
--- a/gr-blocks/python/blocks/qa_vco.py
+++ b/gr-blocks/python/blocks/qa_vco.py
@@ -20,18 +20,20 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+
 from gnuradio import gr, gr_unittest, blocks
 import math
 
 def sig_source_f(samp_rate, freq, amp, N):
-    t = map(lambda x: float(x)/samp_rate, xrange(N))
-    y = map(lambda x: amp*math.cos(2.*math.pi*freq*x), t)
+    t = [float(x) / samp_rate for x in range(N)]
+    y = [amp*math.cos(2.*math.pi*freq*x) for x in t]
     return y
 
 def sig_source_c(samp_rate, freq, amp, N):
-    t = map(lambda x: float(x)/samp_rate, xrange(N))
-    y = map(lambda x: math.cos(2.*math.pi*freq*x) + \
-                1j*math.sin(2.*math.pi*freq*x), t)
+    t = [float(x) / samp_rate for x in range(N)]
+    y = [math.cos(2.*math.pi*freq*x) + \
+                1j*math.sin(2.*math.pi*freq*x) for x in t]
     return y
 
 class test_vco(gr_unittest.TestCase):
@@ -49,7 +51,7 @@ class test_vco(gr_unittest.TestCase):
             sig_source_f(1, 0.25, 1, 200)
 
         src = blocks.vector_source_f(src_data)
-        op = blocks.vco_f(1, math.pi/2.0, 1)
+        op = blocks.vco_f(1, math.pi / 2.0, 1)
         dst = blocks.vector_sink_f()
 
         self.tb.connect(src, op, dst)
@@ -66,7 +68,7 @@ class test_vco(gr_unittest.TestCase):
             sig_source_c(1, 0.25, 1, 200)
 
         src = blocks.vector_source_f(src_data)
-        op = blocks.vco_c(1, math.pi/2.0, 1)
+        op = blocks.vco_c(1, math.pi / 2.0, 1)
         dst = blocks.vector_sink_c()
 
         self.tb.connect(src, op, dst)
diff --git a/gr-blocks/python/blocks/qa_vector_insert.py b/gr-blocks/python/blocks/qa_vector_insert.py
old mode 100755
new mode 100644
index b916e3d528..5913fee68a
--- a/gr-blocks/python/blocks/qa_vector_insert.py
+++ b/gr-blocks/python/blocks/qa_vector_insert.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 import math
 
diff --git a/gr-blocks/python/blocks/qa_vector_map.py b/gr-blocks/python/blocks/qa_vector_map.py
index 1c07de826f..1e7545c2f3 100644
--- a/gr-blocks/python/blocks/qa_vector_map.py
+++ b/gr-blocks/python/blocks/qa_vector_map.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 import math
 
@@ -34,7 +35,7 @@ class test_vector_map(gr_unittest.TestCase):
     def test_reversing(self):
         # Chunk data in blocks of N and reverse the block contents.
         N = 5
-        src_data = range(0, 20)
+        src_data = list(range(0, 20))
         expected_result = []
         for i in range(N-1, len(src_data), N):
             for j in range(0, N):
@@ -52,10 +53,10 @@ class test_vector_map(gr_unittest.TestCase):
         # Split an input vector into N streams.
         N = 5
         M = 20
-        src_data = range(0, M)
+        src_data = list(range(0, M))
         expected_results = []
         for n in range(0, N):
-            expected_results.append(range(n, M, N))
+            expected_results.append(list(range(n, M, N)))
         mapping = [[(0, n)] for n in range(0, N)]
         src = blocks.vector_source_f(src_data, False, N)
         vmap = blocks.vector_map(gr.sizeof_float, (N, ), mapping)
diff --git a/gr-blocks/python/blocks/qa_vector_sink_source.py b/gr-blocks/python/blocks/qa_vector_sink_source.py
old mode 100755
new mode 100644
index 026713f5f4..c9bdfb4b5b
--- a/gr-blocks/python/blocks/qa_vector_sink_source.py
+++ b/gr-blocks/python/blocks/qa_vector_sink_source.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 import pmt
 import math
diff --git a/gr-blocks/python/blocks/qa_wavfile.py b/gr-blocks/python/blocks/qa_wavfile.py
old mode 100755
new mode 100644
index 5c3a69e1d0..438da000ef
--- a/gr-blocks/python/blocks/qa_wavfile.py
+++ b/gr-blocks/python/blocks/qa_wavfile.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks
 
 import os
@@ -38,35 +39,35 @@ class test_wavefile(gr_unittest.TestCase):
         self.tb = None
 
     def test_001_checkwavread(self):
-	wf = blocks.wavfile_source(g_in_file)
-	self.assertEqual(wf.sample_rate(), 8000)
+        wf = blocks.wavfile_source(g_in_file)
+        self.assertEqual(wf.sample_rate(), 8000)
 
     def test_002_checkwavcopy(self):
-	infile  = g_in_file
-	outfile = "test_out.wav"
+        infile  = g_in_file
+        outfile = "test_out.wav"
 
-	wf_in  = blocks.wavfile_source(infile)
-	wf_out = blocks.wavfile_sink(outfile,
+        wf_in  = blocks.wavfile_source(infile)
+        wf_out = blocks.wavfile_sink(outfile,
                                      wf_in.channels(),
                                      wf_in.sample_rate(),
                                      wf_in.bits_per_sample())
-	self.tb.connect(wf_in, wf_out)
-	self.tb.run()
-	wf_out.close()
+        self.tb.connect(wf_in, wf_out)
+        self.tb.run()
+        wf_out.close()
 
-	# we're loosing all extra header chunks
-	self.assertEqual(getsize(infile) - g_extra_header_len, getsize(outfile))
+        # we're loosing all extra header chunks
+        self.assertEqual(getsize(infile) - g_extra_header_len, getsize(outfile))
 
-	in_f  = file(infile,  'rb')
-	out_f = file(outfile, 'rb')
+        in_f  = open(infile,  'rb')
+        out_f = open(outfile, 'rb')
 
-	in_data  = in_f.read()
-	out_data = out_f.read()
+        in_data  = in_f.read()
+        out_data = out_f.read()
         out_f.close()
-	os.remove(outfile)
-	# cut extra header chunks input file
-	self.assertEqual(in_data[:g_extra_header_offset] + \
-	                 in_data[g_extra_header_offset + g_extra_header_len:], out_data)
+        os.remove(outfile)
+        # cut extra header chunks input file
+        self.assertEqual(in_data[:g_extra_header_offset] + \
+                         in_data[g_extra_header_offset + g_extra_header_len:], out_data)
 
 if __name__ == '__main__':
     gr_unittest.run(test_wavefile, "test_wavefile.xml")
diff --git a/gr-blocks/python/blocks/stream_to_vector_decimator.py b/gr-blocks/python/blocks/stream_to_vector_decimator.py
index bcbfd96b8b..9896ab8d34 100644
--- a/gr-blocks/python/blocks/stream_to_vector_decimator.py
+++ b/gr-blocks/python/blocks/stream_to_vector_decimator.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
 #
 # Copyright 2008 Free Software Foundation, Inc.
 #
@@ -19,9 +20,11 @@
 # Boston, MA 02110-1301, USA.
 #
 
-import blocks_swig as blocks
 from gnuradio import gr
 
+from . 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/swig/blocks_swig.py.in b/gr-blocks/swig/blocks_swig.py.in
index a0bd574c18..387f0a5d4f 100644
--- a/gr-blocks/swig/blocks_swig.py.in
+++ b/gr-blocks/swig/blocks_swig.py.in
@@ -19,9 +19,11 @@
 # Boston, MA 02110-1301, USA.
 #
 
-from blocks_swig0 import *
-from blocks_swig1 import *
-from blocks_swig2 import *
-from blocks_swig3 import *
-from blocks_swig4 import *
-from blocks_swig5 import *
+from __future__ import absolute_import
+
+from .blocks_swig0 import *
+from .blocks_swig1 import *
+from .blocks_swig2 import *
+from .blocks_swig3 import *
+from .blocks_swig4 import *
+from .blocks_swig5 import *
diff --git a/gr-channels/python/channels/CMakeLists.txt b/gr-channels/python/channels/CMakeLists.txt
index a91033df75..391b868931 100644
--- a/gr-channels/python/channels/CMakeLists.txt
+++ b/gr-channels/python/channels/CMakeLists.txt
@@ -50,6 +50,6 @@ if(ENABLE_TESTING)
   file (GLOB py_qa_test_files "qa_*.py")
   foreach(py_qa_test_file ${py_qa_test_files})
     get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE)
-    GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${py_qa_test_file})
+    GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} -B ${py_qa_test_file})
   endforeach(py_qa_test_file)
 endif(ENABLE_TESTING)
diff --git a/gr-channels/python/channels/__init__.py b/gr-channels/python/channels/__init__.py
index ae4c4ab715..1bae9b44e2 100644
--- a/gr-channels/python/channels/__init__.py
+++ b/gr-channels/python/channels/__init__.py
@@ -22,23 +22,25 @@
 '''
 Blocks for channel models and related functions.
 '''
+from __future__ import absolute_import
+from __future__ import unicode_literals
 
 import os
 
 try:
-    from channels_swig import *
+    from .channels_swig import *
 except ImportError:
     dirname, filename = os.path.split(os.path.abspath(__file__))
     __path__.append(os.path.join(dirname, "..", "..", "swig"))
-    from channels_swig import *
+    from .channels_swig import *
 
 # Blocks for Hardware Impairments
-from amp_bal import *
-from conj_fs_iqcorr import *
-from distortion_2_gen import *
-from distortion_3_gen import *
-from iqbal_gen import *
-from impairments import *
-from phase_bal import *
-from phase_noise_gen import *
-from quantizer import *
+from .amp_bal import *
+from .conj_fs_iqcorr import *
+from .distortion_2_gen import *
+from .distortion_3_gen import *
+from .iqbal_gen import *
+from .impairments import *
+from .phase_bal import *
+from .phase_noise_gen import *
+from .quantizer import *
diff --git a/gr-channels/python/channels/amp_bal.py b/gr-channels/python/channels/amp_bal.py
index 30e0f0d8e2..0ec3db8ab5 100644
--- a/gr-channels/python/channels/amp_bal.py
+++ b/gr-channels/python/channels/amp_bal.py
@@ -7,6 +7,7 @@
 # Generated: Thu Aug  1 11:47:46 2013
 ##################################################
 
+from __future__ import unicode_literals
 from gnuradio import blocks
 from gnuradio import gr
 from gnuradio.filter import firdes
diff --git a/gr-channels/python/channels/conj_fs_iqcorr.py b/gr-channels/python/channels/conj_fs_iqcorr.py
index 700eb645c2..f9873f1606 100644
--- a/gr-channels/python/channels/conj_fs_iqcorr.py
+++ b/gr-channels/python/channels/conj_fs_iqcorr.py
@@ -7,6 +7,7 @@
 # Generated: Thu Aug  1 13:00:27 2013
 ##################################################
 
+from __future__ import unicode_literals
 from gnuradio import blocks
 from gnuradio import filter
 from gnuradio import gr
diff --git a/gr-channels/python/channels/distortion_2_gen.py b/gr-channels/python/channels/distortion_2_gen.py
index f8933cf7aa..cf44fd8d29 100644
--- a/gr-channels/python/channels/distortion_2_gen.py
+++ b/gr-channels/python/channels/distortion_2_gen.py
@@ -6,6 +6,7 @@
 # Generated: Thu Aug  1 12:30:23 2013
 ##################################################
 
+from __future__ import unicode_literals
 from gnuradio import blocks
 from gnuradio import gr
 from gnuradio.filter import firdes
diff --git a/gr-channels/python/channels/distortion_3_gen.py b/gr-channels/python/channels/distortion_3_gen.py
index 1607e01bf2..9cb388806e 100644
--- a/gr-channels/python/channels/distortion_3_gen.py
+++ b/gr-channels/python/channels/distortion_3_gen.py
@@ -6,6 +6,7 @@
 # Generated: Thu Aug  1 12:37:59 2013
 ##################################################
 
+from __future__ import unicode_literals
 from gnuradio import blocks
 from gnuradio import gr
 from gnuradio.filter import firdes
diff --git a/gr-channels/python/channels/impairments.py b/gr-channels/python/channels/impairments.py
index 3da838a902..5e2319a5d9 100644
--- a/gr-channels/python/channels/impairments.py
+++ b/gr-channels/python/channels/impairments.py
@@ -6,6 +6,9 @@
 # Generated: Thu Aug  1 12:46:10 2013
 ##################################################
 
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio import analog
 from gnuradio import blocks
 from gnuradio import gr
@@ -13,10 +16,10 @@ from gnuradio.filter import firdes
 import math
 
 #Import locally
-from phase_noise_gen import *
-from iqbal_gen import *
-from distortion_2_gen import *
-from distortion_3_gen import *
+from .phase_noise_gen import *
+from .iqbal_gen import *
+from .distortion_2_gen import *
+from .distortion_3_gen import *
 
 class impairments(gr.hier_block2):
 
@@ -42,7 +45,7 @@ class impairments(gr.hier_block2):
         ##################################################
         # Blocks
         ##################################################
-        self.channels_phase_noise_gen_0_0 = phase_noise_gen(math.pow(10.0,phase_noise_mag/20.0), .01)
+        self.channels_phase_noise_gen_0_0 = phase_noise_gen(math.pow(10.0,phase_noise_mag / 20.0), .01)
         self.channels_iqbal_gen_0 = iqbal_gen(magbal, phasebal)
         self.channels_distortion_3_gen_0 = distortion_3_gen(beta)
         self.channels_distortion_2_gen_0 = distortion_2_gen(gamma)
@@ -75,7 +78,7 @@ class impairments(gr.hier_block2):
 
     def set_phase_noise_mag(self, phase_noise_mag):
         self.phase_noise_mag = phase_noise_mag
-        self.channels_phase_noise_gen_0_0.set_noise_mag(math.pow(10.0,self.phase_noise_mag/20.0))
+        self.channels_phase_noise_gen_0_0.set_noise_mag(math.pow(10.0,self.phase_noise_mag / 20.0))
 
     def get_magbal(self):
         return self.magbal
diff --git a/gr-channels/python/channels/iqbal_gen.py b/gr-channels/python/channels/iqbal_gen.py
index d42ca22778..bfe439350f 100644
--- a/gr-channels/python/channels/iqbal_gen.py
+++ b/gr-channels/python/channels/iqbal_gen.py
@@ -6,6 +6,8 @@
 # Generated: Thu Aug  1 12:08:07 2013
 ##################################################
 
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio import blocks
 from gnuradio import gr
 from gnuradio.filter import firdes
@@ -29,7 +31,7 @@ class iqbal_gen(gr.hier_block2):
         ##################################################
         # Blocks
         ##################################################
-        self.mag = blocks.multiply_const_vff((math.pow(10,magnitude/20.0), ))
+        self.mag = blocks.multiply_const_vff((math.pow(10,magnitude / 20.0), ))
         self.blocks_multiply_const_vxx_0 = blocks.multiply_const_vff((math.sin(phase*math.pi/180.0), ))
         self.blocks_float_to_complex_0 = blocks.float_to_complex(1)
         self.blocks_complex_to_float_0 = blocks.complex_to_float(1)
@@ -55,7 +57,7 @@ class iqbal_gen(gr.hier_block2):
 
     def set_magnitude(self, magnitude):
         self.magnitude = magnitude
-        self.mag.set_k((math.pow(10,self.magnitude/20.0), ))
+        self.mag.set_k((math.pow(10,self.magnitude / 20.0), ))
 
     def get_phase(self):
         return self.phase
diff --git a/gr-channels/python/channels/phase_bal.py b/gr-channels/python/channels/phase_bal.py
index b760e6f439..2ebdebcc27 100644
--- a/gr-channels/python/channels/phase_bal.py
+++ b/gr-channels/python/channels/phase_bal.py
@@ -6,6 +6,7 @@
 # Generated: Thu Aug  1 11:49:41 2013
 ##################################################
 
+from __future__ import unicode_literals
 from gnuradio import blocks
 from gnuradio import filter
 from gnuradio import gr
diff --git a/gr-channels/python/channels/phase_noise_gen.py b/gr-channels/python/channels/phase_noise_gen.py
index 95c5676e40..5e05c0a100 100644
--- a/gr-channels/python/channels/phase_noise_gen.py
+++ b/gr-channels/python/channels/phase_noise_gen.py
@@ -6,6 +6,7 @@
 # Generated: Thu Aug  1 11:59:39 2013
 ##################################################
 
+from __future__ import unicode_literals
 from gnuradio import analog
 from gnuradio import blocks
 from gnuradio import filter
diff --git a/gr-channels/python/channels/qa_channel_model.py b/gr-channels/python/channels/qa_channel_model.py
old mode 100755
new mode 100644
index fed542f44f..53cc80f911
--- a/gr-channels/python/channels/qa_channel_model.py
+++ b/gr-channels/python/channels/qa_channel_model.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, analog, blocks, channels
 import math
 
diff --git a/gr-channels/python/channels/qa_fading_model.py b/gr-channels/python/channels/qa_fading_model.py
index 1e99312e82..84ca531d6d 100644
--- a/gr-channels/python/channels/qa_fading_model.py
+++ b/gr-channels/python/channels/qa_fading_model.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, analog, blocks, channels
 import math
 
diff --git a/gr-channels/python/channels/quantizer.py b/gr-channels/python/channels/quantizer.py
index a3d918c7c2..897a1eb432 100644
--- a/gr-channels/python/channels/quantizer.py
+++ b/gr-channels/python/channels/quantizer.py
@@ -5,6 +5,8 @@
 # Generated: Thu Aug  1 11:09:51 2013
 ##################################################
 
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio import blocks
 from gnuradio import gr
 from gnuradio.filter import firdes
@@ -27,7 +29,7 @@ class quantizer(gr.hier_block2):
         # Blocks
         ##################################################
         self.blocks_short_to_float_0 = blocks.short_to_float(1, 1)
-        self.blocks_multiply_const_vxx_0_0 = blocks.multiply_const_vff((1.0/pow(2.0,bits-1.0), ))
+        self.blocks_multiply_const_vxx_0_0 = blocks.multiply_const_vff((1.0 / pow(2.0,bits-1.0), ))
         self.blocks_multiply_const_vxx_0 = blocks.multiply_const_vff((pow(2,bits-1.0), ))
         self.blocks_float_to_short_0 = blocks.float_to_short(1, 1)
 
@@ -48,7 +50,7 @@ class quantizer(gr.hier_block2):
 
     def set_bits(self, bits):
         self.bits = bits
-        self.blocks_multiply_const_vxx_0_0.set_k((1.0/pow(2.0,self.bits-1.0), ))
+        self.blocks_multiply_const_vxx_0_0.set_k((1.0 / pow(2.0,self.bits-1.0), ))
         self.blocks_multiply_const_vxx_0.set_k((pow(2,self.bits-1.0), ))
 
 
diff --git a/gr-comedi/python/comedi/CMakeLists.txt b/gr-comedi/python/comedi/CMakeLists.txt
index e3f7031a23..b3e983e9bd 100644
--- a/gr-comedi/python/comedi/CMakeLists.txt
+++ b/gr-comedi/python/comedi/CMakeLists.txt
@@ -43,6 +43,6 @@ if(ENABLE_TESTING)
   file(GLOB py_qa_test_files "qa_*.py")
   foreach(py_qa_test_file ${py_qa_test_files})
     get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE)
-    GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${py_qa_test_file})
+    GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} -B ${py_qa_test_file})
   endforeach(py_qa_test_file)
 endif(ENABLE_TESTING)
diff --git a/gr-comedi/python/comedi/__init__.py b/gr-comedi/python/comedi/__init__.py
index 701b82af70..f9f1124e5a 100644
--- a/gr-comedi/python/comedi/__init__.py
+++ b/gr-comedi/python/comedi/__init__.py
@@ -21,13 +21,14 @@
 '''
 Blocks and utilities for COMEDI devices
 '''
+from __future__ import unicode_literals
 
 # The presence of this file turns this directory into a Python package
 import os
 
 try:
-    from comedi_swig import *
+    from .comedi_swig import *
 except ImportError:
     dirname, filename = os.path.split(os.path.abspath(__file__))
     __path__.append(os.path.join(dirname, "..", "..", "swig"))
-    from comedi_swig import *
+    from .comedi_swig import *
diff --git a/gr-comedi/python/comedi/qa_comedi.py b/gr-comedi/python/comedi/qa_comedi.py
old mode 100755
new mode 100644
index 08ec92dd13..f4dc7b7778
--- a/gr-comedi/python/comedi/qa_comedi.py
+++ b/gr-comedi/python/comedi/qa_comedi.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, comedi
 
 class test_comedi(gr_unittest.TestCase):
diff --git a/gr-digital/examples/berawgn.py b/gr-digital/examples/berawgn.py
old mode 100755
new mode 100644
index c47d99174a..886c93bdfe
--- a/gr-digital/examples/berawgn.py
+++ b/gr-digital/examples/berawgn.py
@@ -32,6 +32,10 @@ Of course, expect the maximum value for BER to be one order of
 magnitude below what you chose for N_BITS.
 """
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
+
 
 import math
 import numpy
@@ -43,13 +47,13 @@ import sys
 try:
     from scipy.special import erfc
 except ImportError:
-    print "Error: could not import scipy (http://www.scipy.org/)"
+    print("Error: could not import scipy (http://www.scipy.org/)")
     sys.exit(1)
 
 try:
     import pylab
 except ImportError:
-    print "Error: could not import pylab (http://matplotlib.sourceforge.net/)"
+    print("Error: could not import pylab (http://matplotlib.sourceforge.net/)")
     sys.exit(1)
 
 # Best to choose powers of 10
@@ -58,7 +62,7 @@ RAND_SEED = 42
 
 def berawgn(EbN0):
     """ Calculates theoretical bit error rate in AWGN (for BPSK and given Eb/N0) """
-    return 0.5 * erfc(math.sqrt(10**(float(EbN0)/10)))
+    return 0.5 * erfc(math.sqrt(10**(float(EbN0) / 10)))
 
 class BitErrors(gr.hier_block2):
     """ Two inputs: true and received bits. We compare them and
@@ -81,7 +85,7 @@ class BitErrors(gr.hier_block2):
                      blocks.unpack_k_bits_bb(bits_per_byte),
                      blocks.uchar_to_float(),
                      blocks.integrate_ff(intdump_decim),
-                     blocks.multiply_const_ff(1.0/N_BITS),
+                     blocks.multiply_const_ff(1.0 / N_BITS),
                      self)
         self.connect((self, 1), (comp, 1))
 
@@ -91,7 +95,7 @@ class BERAWGNSimu(gr.top_block):
         gr.top_block.__init__(self)
         self.const = digital.qpsk_constellation()
         # Source is N_BITS bits, non-repeated
-        data = map(int, numpy.random.randint(0, self.const.arity(), N_BITS/self.const.bits_per_symbol()))
+        data = list(map(int, numpy.random.randint(0, self.const.arity(), N_BITS / self.const.bits_per_symbol())))
         src   = blocks.vector_source_b(data, False)
         mod   = digital.chunks_to_symbols_bc((self.const.points()), 1)
         add   = blocks.add_vcc()
@@ -107,12 +111,12 @@ class BERAWGNSimu(gr.top_block):
 
     def EbN0_to_noise_voltage(self, EbN0):
         """ Converts Eb/N0 to a complex noise voltage (assuming unit symbol power) """
-        return 1.0 / math.sqrt(self.const.bits_per_symbol() * 10**(float(EbN0)/10))
+        return 1.0 / math.sqrt(self.const.bits_per_symbol( * 10**(float(EbN0) / 10)))
 
 
 def simulate_ber(EbN0):
     """ All the work's done here: create flow graph, run, read out BER """
-    print "Eb/N0 = %d dB" % EbN0
+    print("Eb/N0 = %d dB" % EbN0)
     fg = BERAWGNSimu(EbN0)
     fg.run()
     return numpy.sum(fg.sink.data())
@@ -120,9 +124,9 @@ def simulate_ber(EbN0):
 if __name__ == "__main__":
     EbN0_min = 0
     EbN0_max = 15
-    EbN0_range = range(EbN0_min, EbN0_max+1)
+    EbN0_range = list(range(EbN0_min, EbN0_max+1))
     ber_theory = [berawgn(x)      for x in EbN0_range]
-    print "Simulating..."
+    print("Simulating...")
     ber_simu   = [simulate_ber(x) for x in EbN0_range]
 
     f = pylab.figure()
@@ -135,4 +139,3 @@ if __name__ == "__main__":
     s.legend()
     s.grid()
     pylab.show()
-
diff --git a/gr-digital/examples/example_costas.py b/gr-digital/examples/example_costas.py
old mode 100755
new mode 100644
index 77495d944c..56fc419013
--- a/gr-digital/examples/example_costas.py
+++ b/gr-digital/examples/example_costas.py
@@ -20,6 +20,10 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
+
 from gnuradio import gr, digital, filter
 from gnuradio import blocks
 from gnuradio import channels
@@ -31,13 +35,13 @@ import sys
 try:
     import scipy
 except ImportError:
-    print "Error: could not import scipy (http://www.scipy.org/)"
+    print("Error: could not import scipy (http://www.scipy.org/)")
     sys.exit(1)
 
 try:
     import pylab
 except ImportError:
-    print "Error: could not import pylab (http://matplotlib.sourceforge.net/)"
+    print("Error: could not import pylab (http://matplotlib.sourceforge.net/)")
     sys.exit(1)
 
 class example_costas(gr.top_block):
diff --git a/gr-digital/examples/example_fll.py b/gr-digital/examples/example_fll.py
old mode 100755
new mode 100644
index cda92eaa78..2603f06342
--- a/gr-digital/examples/example_fll.py
+++ b/gr-digital/examples/example_fll.py
@@ -20,6 +20,10 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
+
 from gnuradio import gr, digital, filter
 from gnuradio import blocks
 from gnuradio import channels
@@ -31,13 +35,13 @@ import sys
 try:
     import scipy
 except ImportError:
-    print "Error: could not import scipy (http://www.scipy.org/)"
+    print("Error: could not import scipy (http://www.scipy.org/)")
     sys.exit(1)
 
 try:
     import pylab
 except ImportError:
-    print "Error: could not import pylab (http://matplotlib.sourceforge.net/)"
+    print("Error: could not import pylab (http://matplotlib.sourceforge.net/)")
     sys.exit(1)
 
 class example_fll(gr.top_block):
diff --git a/gr-digital/examples/example_timing.py b/gr-digital/examples/example_timing.py
old mode 100755
new mode 100644
index 9e8e3e07b4..93ce691cf7
--- a/gr-digital/examples/example_timing.py
+++ b/gr-digital/examples/example_timing.py
@@ -20,6 +20,10 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
+
 from gnuradio import gr, digital, filter
 from gnuradio import blocks
 from gnuradio import channels
@@ -31,13 +35,13 @@ import sys
 try:
     import scipy
 except ImportError:
-    print "Error: could not import scipy (http://www.scipy.org/)"
+    print("Error: could not import scipy (http://www.scipy.org/)")
     sys.exit(1)
 
 try:
     import pylab
 except ImportError:
-    print "Error: could not import pylab (http://matplotlib.sourceforge.net/)"
+    print("Error: could not import pylab (http://matplotlib.sourceforge.net/)")
     sys.exit(1)
 
 from scipy import fftpack
@@ -69,8 +73,8 @@ class example_timing(gr.top_block):
             self.taps = self.clk.taps()
             self.dtaps = self.clk.diff_taps()
 
-            self.delay = int(scipy.ceil(((len(rrc_taps)-1)/2 +
-                                         (len(self.taps[0])-1)/2)/float(sps))) + 1
+            self.delay = int(scipy.ceil((old_div((len(rrc_taps)-1) / 2 +
+                                         (len(self.taps[0])-1) / 2),float(sps)))) + 1
 
 
             self.vsnk_err = blocks.vector_sink_f()
diff --git a/gr-digital/examples/gen_whitener.py b/gr-digital/examples/gen_whitener.py
old mode 100755
new mode 100644
index 62345cee5d..4b4ecdb528
--- a/gr-digital/examples/gen_whitener.py
+++ b/gr-digital/examples/gen_whitener.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 # 
 
+from __future__ import unicode_literals
 from gnuradio import gr, gru
 from gnuradio import blocks
 from gnuradio.eng_arg import eng_float, intx
diff --git a/gr-digital/examples/narrowband/benchmark_add_channel.py b/gr-digital/examples/narrowband/benchmark_add_channel.py
old mode 100755
new mode 100644
index cd85f4e488..846caddd26
--- a/gr-digital/examples/narrowband/benchmark_add_channel.py
+++ b/gr-digital/examples/narrowband/benchmark_add_channel.py
@@ -1,24 +1,28 @@
 #!/usr/bin/env python
 #
 # Copyright 2010,2011 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
 
 from gnuradio import channels, gr
 from gnuradio import blocks
@@ -32,14 +36,14 @@ class my_top_block(gr.top_block):
     def __init__(self, ifile, ofile, options):
         gr.top_block.__init__(self)
 
-        SNR = 10.0**(options.snr/10.0)
+        SNR = 10.0**(options.snr / 10.0)
         frequency_offset = options.frequency_offset
         time_offset = options.time_offset
-        phase_offset = options.phase_offset*(math.pi/180.0)
+        phase_offset = options.phase_offset*(math.pi / 180.0)
 
         # calculate noise voltage from SNR
         power_in_signal = abs(options.tx_amplitude)**2
-        noise_power = power_in_signal/SNR
+        noise_power = power_in_signal / SNR
         noise_voltage = math.sqrt(noise_power)
 
         self.src = blocks.file_source(gr.sizeof_gr_complex, ifile)
@@ -52,7 +56,7 @@ class my_top_block(gr.top_block):
         self.snk = blocks.file_sink(gr.sizeof_gr_complex, ofile)
 
         self.connect(self.src, self.channel, self.phase, self.snk)
-        
+
 
 # /////////////////////////////////////////////////////////////////////////////
 #                                   main
@@ -86,13 +90,13 @@ def main():
 
     ifile = args[0]
     ofile = args[1]
-        
+
     # build the graph
     tb = my_top_block(ifile, ofile, options)
 
     r = gr.enable_realtime_scheduling()
     if r != gr.RT_OK:
-        print "Warning: Failed to enable realtime scheduling."
+        print("Warning: Failed to enable realtime scheduling.")
 
     tb.start()        # start flow graph
     tb.wait()         # wait for it to finish
diff --git a/gr-digital/examples/narrowband/benchmark_rx.py b/gr-digital/examples/narrowband/benchmark_rx.py
old mode 100755
new mode 100644
index 09d923fc6b..8467d376e7
--- a/gr-digital/examples/narrowband/benchmark_rx.py
+++ b/gr-digital/examples/narrowband/benchmark_rx.py
@@ -1,24 +1,28 @@
 #!/usr/bin/env python
 #
 # Copyright 2010,2011,2013 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
 
 from gnuradio import gr, gru
 from gnuradio import blocks
@@ -37,7 +41,7 @@ import struct
 import sys
 
 #import os
-#print os.getpid()
+#print(os.getpid())
 #raw_input('Attach and press enter: ')
 
 class my_top_block(gr.top_block):
@@ -47,10 +51,10 @@ class my_top_block(gr.top_block):
         if(options.rx_freq is not None):
             # Work-around to get the modulation's bits_per_symbol
             args = demodulator.extract_kwargs_from_options(options)
-            symbol_rate = options.bitrate / demodulator(**args).bits_per_symbol()
+            symbol_rate = options.bitrate / demodulator(**args.bits_per_symbol())
 
             self.source = uhd_receiver(options.args, symbol_rate,
-                                       options.samples_per_symbol, options.rx_freq, 
+                                       options.samples_per_symbol, options.rx_freq,
                                        options.lo_offset, options.rx_gain,
                                        options.spec, options.antenna,
                                        options.clock_source, options.verbose)
@@ -66,7 +70,7 @@ class my_top_block(gr.top_block):
         # Set up receive path
         # do this after for any adjustments to the options that may
         # occur in the sinks (specifically the UHD sink)
-        self.rxpath = receive_path(demodulator, rx_callback, options) 
+        self.rxpath = receive_path(demodulator, rx_callback, options)
 
         self.connect(self.source, self.rxpath)
 
@@ -82,7 +86,7 @@ def main():
 
     n_rcvd = 0
     n_right = 0
-    
+
     def rx_callback(ok, payload):
         global n_rcvd, n_right
         (pktno,) = struct.unpack('!H', payload[0:2])
@@ -90,8 +94,8 @@ def main():
         if ok:
             n_right += 1
 
-        print "ok = %5s  pktno = %4d  n_rcvd = %4d  n_right = %4d" % (
-            ok, pktno, n_rcvd, n_right)
+        print("ok = %5s  pktno = %4d  n_rcvd = %4d  n_right = %4d" % (
+            ok, pktno, n_rcvd, n_right))
 
     demods = digital.modulation_utils.type_1_demods()
 
@@ -99,17 +103,17 @@ def main():
     parser = OptionParser (option_class=eng_option, conflict_handler="resolve")
     expert_grp = parser.add_option_group("Expert")
 
-    parser.add_option("-m", "--modulation", type="choice", choices=demods.keys(), 
+    parser.add_option("-m", "--modulation", type="choice", choices=list(demods.keys()),
                       default='psk',
                       help="Select modulation from: %s [default=%%default]"
-                            % (', '.join(demods.keys()),))
+                            % (', '.join(list(demods.keys())),))
     parser.add_option("","--from-file", default=None,
                       help="input file of samples to demod")
 
     receive_path.add_options(parser, expert_grp)
     uhd_receiver.add_options(parser)
 
-    for mod in demods.values():
+    for mod in list(demods.values()):
         mod.add_options(expert_grp)
 
     (options, args) = parser.parse_args ()
@@ -130,7 +134,7 @@ def main():
 
     r = gr.enable_realtime_scheduling()
     if r != gr.RT_OK:
-        print "Warning: Failed to enable realtime scheduling."
+        print("Warning: Failed to enable realtime scheduling.")
 
     tb.start()        # start flow graph
     tb.wait()         # wait for it to finish
diff --git a/gr-digital/examples/narrowband/benchmark_tx.py b/gr-digital/examples/narrowband/benchmark_tx.py
old mode 100755
new mode 100644
index 2cb74d5a77..bf38f0bf12
--- a/gr-digital/examples/narrowband/benchmark_tx.py
+++ b/gr-digital/examples/narrowband/benchmark_tx.py
@@ -1,24 +1,28 @@
 #!/usr/bin/env python
 #
 # Copyright 2010,2011,2013 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
 
 from gnuradio import gr
 from gnuradio import blocks
@@ -35,8 +39,8 @@ from uhd_interface import uhd_transmitter
 
 import time, struct, sys
 
-#import os 
-#print os.getpid()
+#import os
+#print(os.getpid())
 #raw_input('Attach and press enter')
 
 class my_top_block(gr.top_block):
@@ -46,7 +50,7 @@ class my_top_block(gr.top_block):
         if(options.tx_freq is not None):
             # Work-around to get the modulation's bits_per_symbol
             args = modulator.extract_kwargs_from_options(options)
-            symbol_rate = options.bitrate / modulator(**args).bits_per_symbol()
+            symbol_rate = options.bitrate / modulator(**args.bits_per_symbol())
 
             self.sink = uhd_transmitter(options.args, symbol_rate,
                                         options.samples_per_symbol, options.tx_freq,
@@ -54,7 +58,7 @@ class my_top_block(gr.top_block):
                                         options.spec, options.antenna,
                                         options.clock_source, options.verbose)
             options.samples_per_symbol = self.sink._sps
-            
+
         elif(options.to_file is not None):
             sys.stderr.write(("Saving samples to '%s'.\n\n" % (options.to_file)))
             self.sink = blocks.file_sink(gr.sizeof_gr_complex, options.to_file)
@@ -82,10 +86,10 @@ def main():
     parser = OptionParser(option_class=eng_option, conflict_handler="resolve")
     expert_grp = parser.add_option_group("Expert")
 
-    parser.add_option("-m", "--modulation", type="choice", choices=mods.keys(),
+    parser.add_option("-m", "--modulation", type="choice", choices=list(mods.keys()),
                       default='psk',
                       help="Select modulation from: %s [default=%%default]"
-                            % (', '.join(mods.keys()),))
+                            % (', '.join(list(mods.keys())),))
 
     parser.add_option("-s", "--size", type="eng_float", default=1500,
                       help="set packet size [default=%default]")
@@ -101,7 +105,7 @@ def main():
     transmit_path.add_options(parser, expert_grp)
     uhd_transmitter.add_options(parser)
 
-    for mod in mods.values():
+    for mod in list(mods.values()):
         mod.add_options(expert_grp)
 
     (options, args) = parser.parse_args ()
@@ -109,7 +113,7 @@ def main():
     if len(args) != 0:
         parser.print_help()
         sys.exit(1)
-           
+
     if options.from_file is not None:
         source_file = open(options.from_file, 'r')
 
@@ -118,10 +122,10 @@ def main():
 
     r = gr.enable_realtime_scheduling()
     if r != gr.RT_OK:
-        print "Warning: failed to enable realtime scheduling"
+        print("Warning: failed to enable realtime scheduling")
 
     tb.start()                       # start flow graph
-        
+
     # generate and send packets
     nbytes = int(1e6 * options.megabytes)
     n = 0
@@ -130,7 +134,7 @@ def main():
 
     while n < nbytes:
         if options.from_file is None:
-            data = (pkt_size - 2) * chr(pktno & 0xff) 
+            data = (pkt_size - 2) * chr(pktno & 0xff)
         else:
             data = source_file.read(pkt_size - 2)
             if data == '':
@@ -143,7 +147,7 @@ def main():
         if options.discontinuous and pktno % 5 == 4:
             time.sleep(1)
         pktno += 1
-        
+
     send_pkt(eof=True)
 
     tb.wait()                       # wait for it to finish
diff --git a/gr-digital/examples/narrowband/digital_bert_rx.py b/gr-digital/examples/narrowband/digital_bert_rx.py
old mode 100755
new mode 100644
index c04c76762f..aaa8b3e9ea
--- a/gr-digital/examples/narrowband/digital_bert_rx.py
+++ b/gr-digital/examples/narrowband/digital_bert_rx.py
@@ -20,6 +20,10 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
+
 from gnuradio import gr, eng_notation
 from optparse import OptionParser
 from gnuradio.eng_option import eng_option
@@ -44,8 +48,8 @@ class status_thread(_threading.Thread):
 
     def run(self):
         while not self.done:
-            print "Freq. Offset: {0:5.0f} Hz  Timing Offset: {1:10.1f} ppm  Estimated SNR: {2:4.1f} dB  BER: {3:g}".format(
-                tb.frequency_offset(), tb.timing_offset()*1e6, tb.snr(), tb.ber())
+            print("Freq. Offset: {0:5.0f} Hz  Timing Offset: {1:10.1f} ppm  Estimated SNR: {2:4.1f} dB  BER: {3:g}".format(
+                tb.frequency_offset(), tb.timing_offset()*1e6, tb.snr(), tb.ber()))
             try:
                 time.sleep(1.0)
             except KeyboardInterrupt:
@@ -63,10 +67,10 @@ class bert_receiver(gr.hier_block2):
         gr.hier_block2.__init__(self, "bert_receive",
                                 gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
                                 gr.io_signature(0, 0, 0))                    # Output signature
-        
+
         self._bitrate = bitrate
 
-        self._demod = digital.generic_demod(constellation, differential, 
+        self._demod = digital.generic_demod(constellation, differential,
                                             samples_per_symbol,
                                             gray_coded, excess_bw,
                                             freq_bw, timing_bw, phase_bw,
@@ -77,15 +81,15 @@ class bert_receiver(gr.hier_block2):
 
         # Add an SNR probe on the demodulated constellation
         self._snr_probe = digital.probe_mpsk_snr_est_c(digital.SNR_EST_M2M4, 1000,
-                                                       alpha=10.0/self._symbol_rate)
+                                                       alpha=10.0 / self._symbol_rate)
         self.connect(self._demod.time_recov, self._snr_probe)
-        
+
         # Descramble BERT sequence.  A channel error will create 3 incorrect bits
         self._descrambler = digital.descrambler_bb(0x8A, 0x7F, 7) # CCSDS 7-bit descrambler
 
         # Measure BER by the density of 0s in the stream
-        self._ber = digital.probe_density_b(1.0/self._symbol_rate)
-        
+        self._ber = digital.probe_density_b(1.0 / self._symbol_rate)
+
         self.connect(self, self._demod, self._descrambler, self._ber)
 
     def frequency_offset(self):
@@ -98,22 +102,22 @@ class bert_receiver(gr.hier_block2):
         return self._snr_probe.snr()
 
     def ber(self):
-        return (1.0-self._ber.density())/3.0
+        return (1.0-self._ber.density()) / 3.0
 
 
 
 class rx_psk_block(gr.top_block):
     def __init__(self, demod, options):
 
-	gr.top_block.__init__(self, "rx_mpsk")
+        gr.top_block.__init__(self, "rx_mpsk")
 
         self._demodulator_class = demod
 
         # Get demod_kwargs
         demod_kwargs = self._demodulator_class.extract_kwargs_from_options(options)
-        
+
         # demodulator
-	self._demodulator = self._demodulator_class(**demod_kwargs)
+        self._demodulator = self._demodulator_class(**demod_kwargs)
 
         if(options.rx_freq is not None):
             symbol_rate = options.bitrate / self._demodulator.bits_per_symbol()
@@ -131,17 +135,17 @@ class rx_psk_block(gr.top_block):
 
         # Create the BERT receiver
         self._receiver = bert_receiver(options.bitrate,
-                                       self._demodulator._constellation, 
+                                       self._demodulator._constellation,
                                        options.samples_per_symbol,
-                                       options.differential, 
-                                       options.excess_bw, 
+                                       options.differential,
+                                       options.excess_bw,
                                        gray_coded=True,
                                        freq_bw=options.freq_bw,
                                        timing_bw=options.timing_bw,
                                        phase_bw=options.phase_bw,
                                        verbose=options.verbose,
                                        log=options.log)
-        
+
         self.connect(self._source, self._receiver)
 
     def snr(self):
@@ -149,7 +153,7 @@ class rx_psk_block(gr.top_block):
 
     def mag(self):
         return self._receiver.signal_mean()
-        
+
     def var(self):
         return self._receiver.noise_variance()
 
@@ -158,19 +162,19 @@ class rx_psk_block(gr.top_block):
 
     def frequency_offset(self):
         return self._receiver.frequency_offset()
-        
+
     def timing_offset(self):
         return self._receiver.timing_offset()
-            
+
 
 def get_options(demods):
     parser = OptionParser(option_class=eng_option, conflict_handler="resolve")
     parser.add_option("","--from-file", default=None,
                       help="input file of samples to demod")
-    parser.add_option("-m", "--modulation", type="choice", choices=demods.keys(), 
+    parser.add_option("-m", "--modulation", type="choice", choices=list(demods.keys()),
                       default='psk',
                       help="Select modulation from: %s [default=%%default]"
-                            % (', '.join(demods.keys()),))
+                            % (', '.join(list(demods.keys())),))
     parser.add_option("-r", "--bitrate", type="eng_float", default=250e3,
                       help="Select modulation bit rate (default=%default)")
     parser.add_option("-S", "--samples-per-symbol", type="float", default=2,
@@ -184,14 +188,14 @@ def get_options(demods):
     uhd_receiver.add_options(parser)
 
     demods = digital.modulation_utils.type_1_demods()
-    for mod in demods.values():
+    for mod in list(demods.values()):
         mod.add_options(parser)
-		      
+
     (options, args) = parser.parse_args()
     if len(args) != 0:
         parser.print_help()
         sys.exit(1)
-	
+
     return (options, args)
 
 
@@ -203,8 +207,8 @@ if __name__ == "__main__":
     demod = demods[options.modulation]
     tb = rx_psk_block(demod, options)
 
-    print "\n*** SNR estimator is inaccurate below about 7dB"
-    print "*** BER estimator is inaccurate above about 10%\n"
+    print("\n*** SNR estimator is inaccurate below about 7dB")
+    print("*** BER estimator is inaccurate above about 10%\n")
     updater = status_thread(tb)
 
     try:
diff --git a/gr-digital/examples/narrowband/digital_bert_tx.py b/gr-digital/examples/narrowband/digital_bert_tx.py
old mode 100755
new mode 100644
index 6859d2e7af..acc81b4492
--- a/gr-digital/examples/narrowband/digital_bert_tx.py
+++ b/gr-digital/examples/narrowband/digital_bert_tx.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio import gr, eng_notation
 from gnuradio.eng_option import eng_option
 from optparse import OptionParser
@@ -97,10 +99,10 @@ class tx_psk_block(gr.top_block):
 
 def get_options(mods):
     parser = OptionParser(option_class=eng_option, conflict_handler="resolve")
-    parser.add_option("-m", "--modulation", type="choice", choices=mods.keys(),
+    parser.add_option("-m", "--modulation", type="choice", choices=list(mods.keys()),
                       default='psk',
                       help="Select modulation from: %s [default=%%default]"
-                            % (', '.join(mods.keys()),))
+                            % (', '.join(list(mods.keys())),))
     parser.add_option("", "--amplitude", type="eng_float", default=0.2,
                       help="set Tx amplitude (0-1) (default=%default)")
     parser.add_option("-r", "--bitrate", type="eng_float", default=250e3,
@@ -116,7 +118,7 @@ def get_options(mods):
 
     uhd_transmitter.add_options(parser)
 
-    for mod in mods.values():
+    for mod in list(mods.values()):
         mod.add_options(parser)
 		      
     (options, args) = parser.parse_args()
diff --git a/gr-digital/examples/narrowband/receive_path.py b/gr-digital/examples/narrowband/receive_path.py
index 8bbfe92770..f4d0dcc1ea 100644
--- a/gr-digital/examples/narrowband/receive_path.py
+++ b/gr-digital/examples/narrowband/receive_path.py
@@ -1,24 +1,28 @@
 #!/usr/bin/env python
 #
 # Copyright 2005-2007,2011 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
 
 from gnuradio import gr, gru, filter
 from gnuradio import eng_notation
@@ -34,10 +38,10 @@ import sys
 
 class receive_path(gr.hier_block2):
     def __init__(self, demod_class, rx_callback, options):
-	gr.hier_block2.__init__(self, "receive_path",
-				gr.io_signature(1, 1, gr.sizeof_gr_complex),
-				gr.io_signature(0, 0, 0))
-        
+        gr.hier_block2.__init__(self, "receive_path",
+                                gr.io_signature(1, 1, gr.sizeof_gr_complex),
+                                gr.io_signature(0, 0, 0))
+
         options = copy.copy(options)    # make a copy so we can destructively modify
 
         self._verbose     = options.verbose
@@ -56,10 +60,10 @@ class receive_path(gr.hier_block2):
 
         # Make sure the channel BW factor is between 1 and sps/2
         # or the filter won't work.
-        if(self._chbw_factor < 1.0 or self._chbw_factor > self.samples_per_symbol()/2):
-            sys.stderr.write("Channel bandwidth factor ({0}) must be within the range [1.0, {1}].\n".format(self._chbw_factor, self.samples_per_symbol()/2))
+        if(self._chbw_factor < 1.0 or self._chbw_factor > self.samples_per_symbol() / 2):
+            sys.stderr.write("Channel bandwidth factor ({0}) must be within the range [1.0, {1}].\n".format(self._chbw_factor, self.samples_per_symbol() / 2))
             sys.exit(1)
-        
+
         # Design filter to get actual channel we want
         sw_decim = 1
         chan_coeffs = filter.firdes.low_pass(1.0,                  # gain
@@ -68,7 +72,7 @@ class receive_path(gr.hier_block2):
                                              0.5,                  # width of trans. band
                                              filter.firdes.WIN_HANN)   # filter type
         self.channel_filter = filter.fft_filter_ccc(sw_decim, chan_coeffs)
-        
+
         # receiver
         self.packet_receiver = \
             digital.demod_pkts(self.demodulator,
@@ -85,8 +89,8 @@ class receive_path(gr.hier_block2):
         if self._verbose:
             self._print_verbage()
 
-	# connect block input to channel filter
-	self.connect(self, self.channel_filter)
+        # connect block input to channel filter
+        self.connect(self, self.channel_filter)
 
         # connect the channel input filter to the carrier power detector
         self.connect(self.channel_filter, self.probe)
@@ -145,8 +149,8 @@ class receive_path(gr.hier_block2):
         """
         Prints information about the receive path
         """
-        print "\nReceive Path:"
-        print "modulation:      %s"    % (self._demod_class.__name__)
-        print "bitrate:         %sb/s" % (eng_notation.num_to_str(self._bitrate))
-        print "samples/symbol:  %.4f"    % (self.samples_per_symbol())
-        print "Differential:    %s"    % (self.differential())
+        print("\nReceive Path:")
+        print("modulation:      %s"    % (self._demod_class.__name__))
+        print("bitrate:         %sb/s" % (eng_notation.num_to_str(self._bitrate)))
+        print("samples/symbol:  %.4f"    % (self.samples_per_symbol()))
+        print("Differential:    %s"    % (self.differential()))
diff --git a/gr-digital/examples/narrowband/rx_voice.py b/gr-digital/examples/narrowband/rx_voice.py
old mode 100755
new mode 100644
index 8a0e9844be..16e4eb20ad
--- a/gr-digital/examples/narrowband/rx_voice.py
+++ b/gr-digital/examples/narrowband/rx_voice.py
@@ -1,24 +1,28 @@
 #!/usr/bin/env python
 #
 # Copyright 2005,2006,2009,2011,2013 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
 
 from gnuradio import gr, audio, uhd
 from gnuradio import blocks
@@ -40,24 +44,24 @@ from receive_path import receive_path
 from uhd_interface import uhd_receiver
 
 #import os
-#print os.getpid()
+#print(os.getpid())
 #raw_input('Attach and press enter')
 
 
 class audio_tx(gr.hier_block2):
     def __init__(self, audio_output_dev):
-	gr.hier_block2.__init__(self, "audio_tx",
-				gr.io_signature(0, 0, 0), # Input signature
-				gr.io_signature(0, 0, 0)) # Output signature
-				
+        gr.hier_block2.__init__(self, "audio_tx",
+                                gr.io_signature(0, 0, 0), # Input signature
+                                gr.io_signature(0, 0, 0)) # Output signature
+
         self.sample_rate = sample_rate = 8000
         self.packet_src = blocks.message_source(33)
         voice_decoder = vocoder.gsm_fr_decode_ps()
         s2f = blocks.short_to_float()
-        sink_scale = blocks.multiply_const_ff(1.0/32767.)
+        sink_scale = blocks.multiply_const_ff(1.0 / 32767.)
         audio_sink = audio.sink(sample_rate, audio_output_dev)
         self.connect(self.packet_src, voice_decoder, s2f, sink_scale, audio_sink)
-        
+
     def msgq(self):
         return self.packet_src.msgq()
 
@@ -79,7 +83,7 @@ class my_top_block(gr.top_block):
             usrp_rate = self.source.get_sample_rate()
             rrate = audio_rate / usrp_rate
             self.resampler = filter.pfb.arb_resampler_ccf(rrate)
-            
+
             self.connect(self.source, self.resampler, self.rxpath)
 
         elif(options.from_file is not None):
@@ -92,7 +96,7 @@ class my_top_block(gr.top_block):
             self.source = blocks.null_source(gr.sizeof_gr_complex)
             self.connect(self.source, self.thr, self.rxpath)
 
-	self.connect(self.audio_tx)        
+        self.connect(self.audio_tx)
 
 # /////////////////////////////////////////////////////////////////////////////
 #                                   main
@@ -105,7 +109,7 @@ def main():
 
     n_rcvd = 0
     n_right = 0
-    
+
     def rx_callback(ok, payload):
         global n_rcvd, n_right
         n_rcvd += 1
@@ -113,9 +117,8 @@ def main():
             n_right += 1
 
         tb.audio_tx.msgq().insert_tail(gr.message_from_string(payload))
-        
-        print "ok = %r  n_rcvd = %4d  n_right = %4d" % (
-            ok, n_rcvd, n_right)
+
+        print("ok = %r  n_rcvd = %4d  n_right = %4d" % (ok, n_rcvd, n_right))
 
     demods = digital.modulation_utils.type_1_demods()
 
@@ -123,10 +126,10 @@ def main():
     parser = OptionParser (option_class=eng_option, conflict_handler="resolve")
     expert_grp = parser.add_option_group("Expert")
 
-    parser.add_option("-m", "--modulation", type="choice", choices=demods.keys(), 
+    parser.add_option("-m", "--modulation", type="choice", choices=list(demods.keys()),
                       default='gmsk',
                       help="Select modulation from: %s [default=%%default]"
-                            % (', '.join(demods.keys()),))
+                            % (', '.join(list(demods.keys())),))
     parser.add_option("-O", "--audio-output", type="string", default="",
                       help="pcm output device name.  E.g., hw:0,0 or /dev/dsp")
     parser.add_option("","--from-file", default=None,
@@ -134,7 +137,7 @@ def main():
     receive_path.add_options(parser, expert_grp)
     uhd_receiver.add_options(parser)
 
-    for mod in demods.values():
+    for mod in list(demods.values()):
         mod.add_options(expert_grp)
 
     parser.set_defaults(bitrate=50e3)  # override default bitrate default
@@ -156,7 +159,7 @@ def main():
 
     r = gr.enable_realtime_scheduling()
     if r != gr.RT_OK:
-        print "Warning: Failed to enable realtime scheduling."
+        print("Warning: Failed to enable realtime scheduling.")
 
     tb.run()
 
diff --git a/gr-digital/examples/narrowband/transmit_path.py b/gr-digital/examples/narrowband/transmit_path.py
index 70b4044e52..c451f64365 100644
--- a/gr-digital/examples/narrowband/transmit_path.py
+++ b/gr-digital/examples/narrowband/transmit_path.py
@@ -1,23 +1,26 @@
 #
 # Copyright 2005-2007,2011 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
+
+from __future__ import print_function
+from __future__ import unicode_literals
 
 from gnuradio import gr
 from gnuradio import eng_notation
@@ -36,10 +39,10 @@ class transmit_path(gr.hier_block2):
         '''
         See below for what options should hold
         '''
-	gr.hier_block2.__init__(self, "transmit_path",
-				gr.io_signature(0,0,0),
-				gr.io_signature(1,1,gr.sizeof_gr_complex))
-        
+        gr.hier_block2.__init__(self, "transmit_path",
+                                gr.io_signature(0,0,0),
+                                gr.io_signature(1,1,gr.sizeof_gr_complex))
+
         options = copy.copy(options)    # make a copy so we can destructively modify
 
         self._verbose      = options.verbose
@@ -49,10 +52,10 @@ class transmit_path(gr.hier_block2):
 
         # Get mod_kwargs
         mod_kwargs = self._modulator_class.extract_kwargs_from_options(options)
-        
+
         # transmitter
-	self.modulator = self._modulator_class(**mod_kwargs)
-        
+        self.modulator = self._modulator_class(**mod_kwargs)
+
         self.packet_transmitter = \
             digital.mod_pkts(self.modulator,
                              access_code=None,
@@ -72,19 +75,19 @@ class transmit_path(gr.hier_block2):
     def set_tx_amplitude(self, ampl):
         """
         Sets the transmit amplitude sent to the USRP in volts
-        
+
         Args:
             : ampl 0 <= ampl < 1.
         """
         self._tx_amplitude = max(0.0, min(ampl, 1))
         self.amp.set_k(self._tx_amplitude)
-        
+
     def send_pkt(self, payload='', eof=False):
         """
         Calls the transmitter method to send a packet
         """
         return self.packet_transmitter.send_pkt(payload, eof)
-        
+
     def bitrate(self):
         return self._bitrate
 
@@ -120,8 +123,8 @@ class transmit_path(gr.hier_block2):
         """
         Prints information about the transmit path
         """
-        print "Tx amplitude     %s"    % (self._tx_amplitude)
-        print "modulation:      %s"    % (self._modulator_class.__name__)
-        print "bitrate:         %sb/s" % (eng_notation.num_to_str(self._bitrate))
-        print "samples/symbol:  %.4f"  % (self.samples_per_symbol())
-        print "Differential:    %s"    % (self.differential())
+        print("Tx amplitude     %s"    % (self._tx_amplitude))
+        print("modulation:      %s"    % (self._modulator_class.__name__))
+        print("bitrate:         %sb/s" % (eng_notation.num_to_str(self._bitrate)))
+        print("samples/symbol:  %.4f"  % (self.samples_per_symbol()))
+        print("Differential:    %s"    % (self.differential()))
diff --git a/gr-digital/examples/narrowband/tunnel.py b/gr-digital/examples/narrowband/tunnel.py
old mode 100755
new mode 100644
index 7b9b69cc8a..da00baa900
--- a/gr-digital/examples/narrowband/tunnel.py
+++ b/gr-digital/examples/narrowband/tunnel.py
@@ -1,24 +1,28 @@
 #!/usr/bin/env python
 #
 # Copyright 2005,2006,2009,2011 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
 
 
 # ////////////////////////////////////////////////////////////////////
@@ -49,7 +53,7 @@ from uhd_interface import uhd_receiver
 import os, sys
 import random, time, struct
 
-#print os.getpid()
+#print(os.getpid())
 #raw_input('Attach and press enter')
 
 # ////////////////////////////////////////////////////////////////////
@@ -71,7 +75,7 @@ IFF_ONE_QUEUE	= 0x2000   # beats me ;)
 
 def open_tun_interface(tun_device_filename):
     from fcntl import ioctl
-    
+
     mode = IFF_TAP | IFF_NO_PI
     TUNSETIFF = 0x400454ca
 
@@ -79,7 +83,7 @@ def open_tun_interface(tun_device_filename):
     ifs = ioctl(tun, TUNSETIFF, struct.pack("16sH", "gr%d", mode))
     ifname = ifs[:16].strip("\x00")
     return (tun, ifname)
-    
+
 
 # ////////////////////////////////////////////////////////////////////
 #                     the flow graph
@@ -94,20 +98,20 @@ class my_top_block(gr.top_block):
 
         # Get the modulation's bits_per_symbol
         args = mod_class.extract_kwargs_from_options(options)
-        symbol_rate = options.bitrate / mod_class(**args).bits_per_symbol()
+        symbol_rate = options.bitrate / mod_class(**args.bits_per_symbol())
 
         self.source = uhd_receiver(options.args, symbol_rate,
                                    options.samples_per_symbol,
                                    options.rx_freq, options.rx_gain,
                                    options.spec, options.antenna,
                                    options.verbose)
-        
+
         self.sink = uhd_transmitter(options.args, symbol_rate,
                                     options.samples_per_symbol,
                                     options.tx_freq, options.tx_gain,
                                     options.spec, options.antenna,
                                     options.verbose)
-        
+
         options.samples_per_symbol = self.source._sps
 
         self.txpath = transmit_path(mod_class, options)
@@ -131,7 +135,7 @@ class my_top_block(gr.top_block):
 
         self.sink.set_freq(target_freq)
         self.source.set_freq(target_freq)
-        
+
 
 # ////////////////////////////////////////////////////////////////////
 #                           Carrier Sense MAC
@@ -166,7 +170,7 @@ class cs_mac(object):
             payload: contents of the packet (string)
         """
         if self.verbose:
-            print "Rx: ok = %r  len(payload) = %4d" % (ok, len(payload))
+            print("Rx: ok = %r  len(payload) = %4d" % (ok, len(payload)))
         if ok:
             os.write(self.tun_fd, payload)
 
@@ -186,7 +190,7 @@ class cs_mac(object):
                 break
 
             if self.verbose:
-                print "Tx: len(payload) = %4d" % (len(payload),)
+                print("Tx: len(payload) = %4d" % (len(payload),))
 
             delay = min_delay
             while self.tb.carrier_sensed():
@@ -209,10 +213,10 @@ def main():
 
     parser = OptionParser (option_class=eng_option, conflict_handler="resolve")
     expert_grp = parser.add_option_group("Expert")
-    parser.add_option("-m", "--modulation", type="choice", choices=mods.keys(),
+    parser.add_option("-m", "--modulation", type="choice", choices=list(mods.keys()),
                       default='gmsk',
                       help="Select modulation from: %s [default=%%default]"
-                            % (', '.join(mods.keys()),))
+                            % (', '.join(list(mods.keys())),))
 
     parser.add_option("-s", "--size", type="eng_float", default=1500,
                       help="set packet size [default=%default]")
@@ -227,10 +231,10 @@ def main():
     uhd_receiver.add_options(parser)
     uhd_transmitter.add_options(parser)
 
-    for mod in mods.values():
+    for mod in list(mods.values()):
         mod.add_options(expert_grp)
 
-    for demod in demods.values():
+    for demod in list(demods.values()):
         demod.add_options(expert_grp)
 
     (options, args) = parser.parse_args ()
@@ -247,7 +251,7 @@ def main():
         realtime = True
     else:
         realtime = False
-        print "Note: failed to enable realtime scheduling"
+        print("Note: failed to enable realtime scheduling")
 
     # instantiate the MAC
     mac = cs_mac(tun_fd, verbose=True)
@@ -261,26 +265,26 @@ def main():
     mac.set_top_block(tb)    # give the MAC a handle for the PHY
 
     if tb.txpath.bitrate() != tb.rxpath.bitrate():
-        print "WARNING: Transmit bitrate = %sb/sec, Receive bitrate = %sb/sec" % (
+        print("WARNING: Transmit bitrate = %sb/sec, Receive bitrate = %sb/sec" % (
             eng_notation.num_to_str(tb.txpath.bitrate()),
-            eng_notation.num_to_str(tb.rxpath.bitrate()))
-             
-    print "modulation:     %s"   % (options.modulation,)
-    print "freq:           %s"      % (eng_notation.num_to_str(options.tx_freq))
-    print "bitrate:        %sb/sec" % (eng_notation.num_to_str(tb.txpath.bitrate()),)
-    print "samples/symbol: %3d" % (tb.txpath.samples_per_symbol(),)
+            eng_notation.num_to_str(tb.rxpath.bitrate())))
+
+    print("modulation:     %s"   % (options.modulation,))
+    print("freq:           %s"      % (eng_notation.num_to_str(options.tx_freq)))
+    print("bitrate:        %sb/sec" % (eng_notation.num_to_str(tb.txpath.bitrate()),))
+    print("samples/symbol: %3d" % (tb.txpath.samples_per_symbol(),))
 
     tb.rxpath.set_carrier_threshold(options.carrier_threshold)
-    print "Carrier sense threshold:", options.carrier_threshold, "dB"
-    
-    print
-    print "Allocated virtual ethernet interface: %s" % (tun_ifname,)
-    print "You must now use ifconfig to set its IP address. E.g.,"
-    print
-    print "  $ sudo ifconfig %s 192.168.200.1" % (tun_ifname,)
-    print
-    print "Be sure to use a different address in the same subnet for each machine."
-    print
+    print("Carrier sense threshold:", options.carrier_threshold, "dB")
+
+    print()
+    print("Allocated virtual ethernet interface: %s" % (tun_ifname,))
+    print("You must now use ifconfig to set its IP address. E.g.,")
+    print()
+    print("  $ sudo ifconfig %s 192.168.200.1" % (tun_ifname,))
+    print()
+    print("Be sure to use a different address in the same subnet for each machine.")
+    print()
 
 
     tb.start()    # Start executing the flow graph (runs in separate threads)
@@ -289,7 +293,7 @@ def main():
 
     tb.stop()     # but if it does, tell flow graph to stop.
     tb.wait()     # wait for it to finish
-                
+
 
 if __name__ == '__main__':
     try:
diff --git a/gr-digital/examples/narrowband/tx_voice.py b/gr-digital/examples/narrowband/tx_voice.py
old mode 100755
new mode 100644
index afdb4406e6..e65df64d25
--- a/gr-digital/examples/narrowband/tx_voice.py
+++ b/gr-digital/examples/narrowband/tx_voice.py
@@ -1,24 +1,28 @@
 #!/usr/bin/env python
 #
 # Copyright 2005-2007,2009,2011,2013 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
 
 from gnuradio import gr, audio, uhd
 from gnuradio import eng_notation
@@ -40,15 +44,15 @@ from transmit_path import transmit_path
 from uhd_interface import uhd_transmitter
 
 #import os
-#print os.getpid()
+#print(os.getpid())
 #raw_input('Attach and press enter')
 
 
 class audio_rx(gr.hier_block2):
     def __init__(self, audio_input_dev):
-	gr.hier_block2.__init__(self, "audio_rx",
-				gr.io_signature(0, 0, 0), # Input signature
-				gr.io_signature(0, 0, 0)) # Output signature
+        gr.hier_block2.__init__(self, "audio_rx",
+                                gr.io_signature(0, 0, 0), # Input signature
+                                gr.io_signature(0, 0, 0)) # Output signature
         self.sample_rate = sample_rate = 8000
         src = audio.source(sample_rate, audio_input_dev)
         src_scale = blocks.multiply_const_ff(32767)
@@ -60,7 +64,7 @@ class audio_rx(gr.hier_block2):
 
     def get_encoded_voice_packet(self):
         return self.packets_from_encoder.delete_head()
-        
+
 
 class my_top_block(gr.top_block):
 
@@ -78,7 +82,7 @@ class my_top_block(gr.top_block):
             audio_rate = self.audio_rx.sample_rate
             usrp_rate = self.sink.get_sample_rate()
             rrate = usrp_rate / audio_rate
-            
+
         elif(options.to_file is not None):
             self.sink = blocks.file_sink(gr.sizeof_gr_complex, options.to_file)
             rrate = 1
@@ -87,10 +91,10 @@ class my_top_block(gr.top_block):
             rrate = 1
 
         self.resampler = filter.pfb.arb_resampler_ccf(rrate)
-            
-	self.connect(self.audio_rx)
-	self.connect(self.txpath, self.resampler, self.sink)
-            
+
+        self.connect(self.audio_rx)
+        self.connect(self.txpath, self.resampler, self.sink)
+
 
 # /////////////////////////////////////////////////////////////////////////////
 #                                   main
@@ -102,17 +106,17 @@ def main():
         return tb.txpath.send_pkt(payload, eof)
 
     def rx_callback(ok, payload):
-        print "ok = %r, payload = '%s'" % (ok, payload)
+        print("ok = %r, payload = '%s'" % (ok, payload))
 
     mods = digital.modulation_utils.type_1_mods()
 
     parser = OptionParser(option_class=eng_option, conflict_handler="resolve")
     expert_grp = parser.add_option_group("Expert")
 
-    parser.add_option("-m", "--modulation", type="choice", choices=mods.keys(),
+    parser.add_option("-m", "--modulation", type="choice", choices=list(mods.keys()),
                       default='gmsk',
                       help="Select modulation from: %s [default=%%default]"
-                            % (', '.join(mods.keys()),))
+                            % (', '.join(list(mods.keys())),))
     parser.add_option("-M", "--megabytes", type="eng_float", default=0,
                       help="set megabytes to transmit [default=inf]")
     parser.add_option("-I", "--audio-input", type="string", default="",
@@ -123,7 +127,7 @@ def main():
     transmit_path.add_options(parser, expert_grp)
     uhd_transmitter.add_options(parser)
 
-    for mod in mods.values():
+    for mod in list(mods.values()):
         mod.add_options(expert_grp)
 
     parser.set_defaults(bitrate=50e3)  # override default bitrate default
@@ -144,7 +148,7 @@ def main():
 
     r = gr.enable_realtime_scheduling()
     if r != gr.RT_OK:
-        print "Warning: failed to enable realtime scheduling"
+        print("Warning: failed to enable realtime scheduling")
 
 
     tb.start()                       # start flow graph
@@ -161,7 +165,7 @@ def main():
         n += len(s)
         sys.stderr.write('.')
         pktno += 1
-        
+
     send_pkt(eof=True)
     tb.wait()                       # wait for it to finish
 
@@ -170,4 +174,4 @@ if __name__ == '__main__':
     try:
         main()
     except KeyboardInterrupt:
-	pass
+        pass
diff --git a/gr-digital/examples/narrowband/uhd_interface.py b/gr-digital/examples/narrowband/uhd_interface.py
index e7c7fe3af0..1da2bbb1bf 100644
--- a/gr-digital/examples/narrowband/uhd_interface.py
+++ b/gr-digital/examples/narrowband/uhd_interface.py
@@ -1,24 +1,28 @@
 #!/usr/bin/env python
 #
 # Copyright 2010,2011 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
 
 from gnuradio import gr, uhd
 from gnuradio import eng_notation
@@ -41,10 +45,10 @@ def add_freq_option(parser):
                           help="set Tx and/or Rx frequency to FREQ [default=%default]",
                           metavar="FREQ")
 
-class uhd_interface:
+class uhd_interface(object):
     def __init__(self, istx, args, sym_rate, sps, freq=None, lo_offset=None,
                  gain=None, spec=None, antenna=None, clock_source=None):
-        
+
         if(istx):
             self.u = uhd.usrp_sink(device_addr=args, stream_args=uhd.stream_args('fc32'))
         else:
@@ -61,15 +65,15 @@ class uhd_interface:
         # Set the antenna
         if(antenna):
             self.u.set_antenna(antenna, 0)
-        
+
         self._args = args
         self._ant  = antenna
         self._spec = spec
         self._gain = self.set_gain(gain)
-        self._lo_offset = lo_offset 
-        self._freq = self.set_freq(freq, lo_offset) 
+        self._lo_offset = lo_offset
+        self._freq = self.set_freq(freq, lo_offset)
         self._rate, self._sps = self.set_sample_rate(sym_rate, sps)
-        self._clock_source = clock_source 
+        self._clock_source = clock_source
 
     def set_sample_rate(self, sym_rate, req_sps):
         start_sps = req_sps
@@ -78,37 +82,37 @@ class uhd_interface:
             self.u.set_samp_rate(asked_samp_rate)
             actual_samp_rate = self.u.get_samp_rate()
 
-            sps = actual_samp_rate/sym_rate
+            sps = actual_samp_rate / sym_rate
             if(sps < 2):
                 req_sps +=1
             else:
                 actual_sps = sps
                 break
-        
+
         if(sps != req_sps):
-            print "\nSymbol Rate:         %f" % (sym_rate)
-            print "Requested sps:       %f" % (start_sps)
-            print "Given sample rate:   %f" % (actual_samp_rate)
-            print "Actual sps for rate: %f" % (actual_sps)
+            print("\nSymbol Rate:         %f" % (sym_rate))
+            print("Requested sps:       %f" % (start_sps))
+            print("Given sample rate:   %f" % (actual_samp_rate))
+            print("Actual sps for rate: %f" % (actual_sps))
 
         if(actual_samp_rate != asked_samp_rate):
-            print "\nRequested sample rate: %f" % (asked_samp_rate)
-            print "Actual sample rate: %f" % (actual_samp_rate)
+            print("\nRequested sample rate: %f" % (asked_samp_rate))
+            print("Actual sample rate: %f" % (actual_samp_rate))
 
         return (actual_samp_rate, actual_sps)
 
     def get_sample_rate(self):
         return self.u.get_samp_rate()
-    
+
     def set_gain(self, gain=None):
         if gain is None:
             # if no gain was specified, use the mid-point in dB
             g = self.u.get_gain_range()
-            gain = float(g.start()+g.stop())/2
-            print "\nNo gain specified."
-            print "Setting gain to %f (from [%f, %f])" % \
-                (gain, g.start(), g.stop())
-        
+            gain = float(g.start()+g.stop()) / 2
+            print("\nNo gain specified.")
+            print("Setting gain to %f (from [%f, %f])" %
+                (gain, g.start(), g.stop()))
+
         self.u.set_gain(gain, 0)
         return gain
 
@@ -116,7 +120,7 @@ class uhd_interface:
         if(freq is None):
             sys.stderr.write("You must specify -f FREQ or --freq FREQ\n")
             sys.exit(1)
-        
+
         r = self.u.set_center_freq(uhd.tune_request(freq, lo_offset))
         if r:
             return freq
@@ -163,22 +167,22 @@ class uhd_transmitter(uhd_interface, gr.hier_block2):
         parser.add_option("", "--tx-gain", type="eng_float", default=None,
                           help="set transmit gain in dB (default is midpoint)")
         parser.add_option("-C", "--clock-source", type="string", default=None,
-                          help="select clock source (e.g. 'external') [default=%default]") 
+                          help="select clock source (e.g. 'external') [default=%default]")
         parser.add_option("-v", "--verbose", action="store_true", default=False)
 
     def _print_verbage(self):
         """
         Prints information about the UHD transmitter
         """
-        print "\nUHD Transmitter:"
-        print "Args:     %s"    % (self._args)
-        print "Freq:        %sHz"  % (eng_notation.num_to_str(self._freq))
-        print "LO Offset:    %sHz"  % (eng_notation.num_to_str(self._lo_offset)) 
-        print "Gain:        %f dB" % (self._gain)
-        print "Sample Rate: %ssps" % (eng_notation.num_to_str(self._rate))
-        print "Antenna:     %s"    % (self._ant)
-        print "Subdev Spec:  %s"   % (self._spec)
-        print "Clock Source: %s"    % (self._clock_source)
+        print("\nUHD Transmitter:")
+        print("Args:     %s"    % (self._args))
+        print("Freq:        %sHz"  % (eng_notation.num_to_str(self._freq)))
+        print("LO Offset:    %sHz"  % (eng_notation.num_to_str(self._lo_offset)) )
+        print("Gain:        %f dB" % (self._gain))
+        print("Sample Rate: %ssps" % (eng_notation.num_to_str(self._rate)))
+        print("Antenna:     %s"    % (self._ant))
+        print("Subdev Spec:  %s"   % (self._spec))
+        print("Clock Source: %s"    % (self._clock_source))
 
 #-------------------------------------------------------------------#
 #   RECEIVER
@@ -191,7 +195,7 @@ class uhd_receiver(uhd_interface, gr.hier_block2):
         gr.hier_block2.__init__(self, "uhd_receiver",
                                 gr.io_signature(0,0,0),
                                 gr.io_signature(1,1,gr.sizeof_gr_complex))
-      
+
         # Set up the UHD interface as a receiver
         uhd_interface.__init__(self, False, args, sym_rate, sps,
                                freq, lo_offset, gain, spec, antenna, clock_source)
@@ -214,11 +218,11 @@ class uhd_receiver(uhd_interface, gr.hier_block2):
                           help="set receive frequency to FREQ [default=%default]",
                           metavar="FREQ")
         parser.add_option("", "--lo-offset", type="eng_float", default=0,
-                          help="set local oscillator offset in Hz (default is 0)") 
+                          help="set local oscillator offset in Hz (default is 0)")
         parser.add_option("", "--rx-gain", type="eng_float", default=None,
                           help="set receive gain in dB (default is midpoint)")
         parser.add_option("-C", "--clock-source", type="string", default=None,
-                          help="select clock source (e.g. 'external') [default=%default]") 
+                          help="select clock source (e.g. 'external') [default=%default]")
         if not parser.has_option("--verbose"):
             parser.add_option("-v", "--verbose", action="store_true", default=False)
 
@@ -226,13 +230,13 @@ class uhd_receiver(uhd_interface, gr.hier_block2):
         """
         Prints information about the UHD transmitter
         """
-        print "\nUHD Receiver:"
-        print "UHD Args:     %s"    % (self._args)
-        print "Freq:         %sHz"  % (eng_notation.num_to_str(self._freq))
-        print "LO Offset:    %sHz"  % (eng_notation.num_to_str(self._lo_offset)) 
-        print "Gain:         %f dB" % (self._gain)
-        print "Sample Rate:  %ssps" % (eng_notation.num_to_str(self._rate))
-        print "Antenna:      %s"    % (self._ant)
-        print "Spec:         %s"    % (self._spec)
-        print "Clock Source: %s"    % (self._clock_source) 
+        print("\nUHD Receiver:")
+        print("UHD Args:     %s"    % (self._args))
+        print("Freq:         %sHz"  % (eng_notation.num_to_str(self._freq)))
+        print("LO Offset:    %sHz"  % (eng_notation.num_to_str(self._lo_offset)) )
+        print("Gain:         %f dB" % (self._gain))
+        print("Sample Rate:  %ssps" % (eng_notation.num_to_str(self._rate)))
+        print("Antenna:      %s"    % (self._ant))
+        print("Spec:         %s"    % (self._spec))
+        print("Clock Source: %s"    % (self._clock_source))
 
diff --git a/gr-digital/examples/ofdm/benchmark_add_channel.py b/gr-digital/examples/ofdm/benchmark_add_channel.py
old mode 100755
new mode 100644
index 0ac46985a7..6fc7056dfb
--- a/gr-digital/examples/ofdm/benchmark_add_channel.py
+++ b/gr-digital/examples/ofdm/benchmark_add_channel.py
@@ -1,24 +1,28 @@
 #!/usr/bin/env python
 #
 # Copyright 2010,2011 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
 
 from gnuradio import gr, channels
 from gnuradio import blocks
@@ -32,15 +36,15 @@ class my_top_block(gr.top_block):
     def __init__(self, ifile, ofile, options):
         gr.top_block.__init__(self)
 
-        SNR = 10.0**(options.snr/10.0)
+        SNR = 10.0**(options.snr / 10.0)
         time_offset = options.time_offset
-        phase_offset = options.phase_offset*(math.pi/180.0)
+        phase_offset = options.phase_offset*(math.pi / 180.0)
 
         # calculate noise voltage from SNR
         power_in_signal = abs(options.tx_amplitude)**2
-        noise_power = power_in_signal/SNR
+        noise_power = power_in_signal / SNR
         noise_voltage = math.sqrt(noise_power)
-        print "Noise voltage: ", noise_voltage
+        print("Noise voltage: ", noise_voltage)
 
         frequency_offset = options.frequency_offset / options.fft_length
 
@@ -54,7 +58,7 @@ class my_top_block(gr.top_block):
         self.snk = blocks.file_sink(gr.sizeof_gr_complex, ofile)
 
         self.connect(self.src, self.channel, self.phase, self.snk)
-        
+
 
 # /////////////////////////////////////////////////////////////////////////////
 #                                   main
@@ -94,13 +98,13 @@ def main():
 
     ifile = args[0]
     ofile = args[1]
-        
+
     # build the graph
     tb = my_top_block(ifile, ofile, options)
 
     r = gr.enable_realtime_scheduling()
     if r != gr.RT_OK:
-        print "Warning: Failed to enable realtime scheduling."
+        print("Warning: Failed to enable realtime scheduling.")
 
     tb.start()        # start flow graph
     tb.wait()         # wait for it to finish
diff --git a/gr-digital/examples/ofdm/receive_path.py b/gr-digital/examples/ofdm/receive_path.py
index 0cb4479a2e..b9abe8cebc 100644
--- a/gr-digital/examples/ofdm/receive_path.py
+++ b/gr-digital/examples/ofdm/receive_path.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
 #
 # Copyright 2005,2006,2011 Free Software Foundation, Inc.
 # 
diff --git a/gr-digital/examples/ofdm/transmit_path.py b/gr-digital/examples/ofdm/transmit_path.py
index 98a81f3c1a..17adffab44 100644
--- a/gr-digital/examples/ofdm/transmit_path.py
+++ b/gr-digital/examples/ofdm/transmit_path.py
@@ -1,23 +1,26 @@
 #
 # Copyright 2005,2006,2011 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
+
+from __future__ import print_function
+from __future__ import unicode_literals
 
 from gnuradio import gr
 from gnuradio import eng_notation
@@ -31,15 +34,15 @@ import sys
 #                              transmit path
 # /////////////////////////////////////////////////////////////////////////////
 
-class transmit_path(gr.hier_block2): 
+class transmit_path(gr.hier_block2):
     def __init__(self, options):
         '''
         See below for what options should hold
         '''
 
-	gr.hier_block2.__init__(self, "transmit_path",
-				gr.io_signature(0, 0, 0),
-				gr.io_signature(1, 1, gr.sizeof_gr_complex))
+        gr.hier_block2.__init__(self, "transmit_path",
+                                gr.io_signature(0, 0, 0),
+                                gr.io_signature(1, 1, gr.sizeof_gr_complex))
 
         options = copy.copy(options)    # make a copy so we can destructively modify
 
@@ -63,13 +66,13 @@ class transmit_path(gr.hier_block2):
     def set_tx_amplitude(self, ampl):
         """
         Sets the transmit amplitude sent to the USRP
-        
+
         Args:
             : ampl 0 <= ampl < 1.0.  Try 0.10
         """
         self._tx_amplitude = max(0.0, min(ampl, 1))
         self.amp.set_k(self._tx_amplitude)
-        
+
     def send_pkt(self, payload='', eof=False):
         """
         Calls the transmitter method to send a packet
@@ -97,5 +100,5 @@ class transmit_path(gr.hier_block2):
         """
         Prints information about the transmit path
         """
-        print "Tx amplitude     %s" % (self._tx_amplitude)
-        
+        print("Tx amplitude     %s" % (self._tx_amplitude))
+
diff --git a/gr-digital/examples/ofdm/uhd_interface.py b/gr-digital/examples/ofdm/uhd_interface.py
index ac34d956ae..df5be60f30 100644
--- a/gr-digital/examples/ofdm/uhd_interface.py
+++ b/gr-digital/examples/ofdm/uhd_interface.py
@@ -1,24 +1,28 @@
 #!/usr/bin/env python
 #
 # Copyright 2010,2011 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
 
 from gnuradio import gr, uhd
 from gnuradio import eng_notation
@@ -41,17 +45,17 @@ def add_freq_option(parser):
                           help="set Tx and/or Rx frequency to FREQ [default=%default]",
                           metavar="FREQ")
 
-class uhd_interface:
+class uhd_interface(object):
     def __init__(self, istx, args, bandwidth, freq=None, lo_offset=None,
                  gain=None, spec=None, antenna=None, clock_source=None):
-        
+
         if(istx):
             self.u = uhd.usrp_sink(device_addr=args, stream_args=uhd.stream_args('fc32'))
         else:
             self.u = uhd.usrp_source(device_addr=args, stream_args=uhd.stream_args('fc32'))
 
         # Set clock source to external.
-        if(clock_source):        
+        if(clock_source):
             self.u.set_clock_source(clock_source, 0)
 
         # Set the subdevice spec
@@ -61,7 +65,7 @@ class uhd_interface:
         # Set the antenna
         if(antenna):
             self.u.set_antenna(antenna, 0)
-        
+
         self._args = args
         self._ant  = antenna
         self._spec = spec
@@ -74,21 +78,21 @@ class uhd_interface:
     def set_sample_rate(self, bandwidth):
         self.u.set_samp_rate(bandwidth)
         actual_bw = self.u.get_samp_rate()
-        
+
         return actual_bw
 
     def get_sample_rate(self):
         return self.u.get_samp_rate()
-    
+
     def set_gain(self, gain=None):
         if gain is None:
             # if no gain was specified, use the mid-point in dB
             g = self.u.get_gain_range()
-            gain = float(g.start()+g.stop())/2
-            print "\nNo gain specified."
-            print "Setting gain to %f (from [%f, %f])" % \
-                (gain, g.start(), g.stop())
-        
+            gain = float(g.start()+g.stop()) / 2
+            print("\nNo gain specified.")
+            print("Setting gain to %f (from [%f, %f])" %
+                (gain, g.start(), g.stop()))
+
         self.u.set_gain(gain, 0)
         return gain
 
@@ -96,7 +100,7 @@ class uhd_interface:
         if(freq is None):
             sys.stderr.write("You must specify -f FREQ or --freq FREQ\n")
             sys.exit(1)
-        
+
         r = self.u.set_center_freq(uhd.tune_request(freq, lo_offset))
 
         if r:
@@ -151,15 +155,15 @@ class uhd_transmitter(uhd_interface, gr.hier_block2):
         """
         Prints information about the UHD transmitter
         """
-        print "\nUHD Transmitter:"
-        print "UHD Args:     %s"    % (self._args)
-        print "Freq:         %sHz"  % (eng_notation.num_to_str(self._freq))
-        print "LO Offset:    %sHz"  % (eng_notation.num_to_str(self._lo_offset))
-        print "Gain:         %f dB" % (self._gain)
-        print "Sample Rate:  %ssps" % (eng_notation.num_to_str(self._rate))
-        print "Antenna:      %s"    % (self._ant)
-        print "Subdev Sec:   %s"    % (self._spec)
-        print "Clock Source: %s"    % (self._clock_source)
+        print("\nUHD Transmitter:")
+        print("UHD Args:     %s"    % (self._args))
+        print("Freq:         %sHz"  % (eng_notation.num_to_str(self._freq)))
+        print("LO Offset:    %sHz"  % (eng_notation.num_to_str(self._lo_offset)))
+        print("Gain:         %f dB" % (self._gain))
+        print("Sample Rate:  %ssps" % (eng_notation.num_to_str(self._rate)))
+        print("Antenna:      %s"    % (self._ant))
+        print("Subdev Sec:   %s"    % (self._spec))
+        print("Clock Source: %s"    % (self._clock_source))
 
 
 
@@ -174,7 +178,7 @@ class uhd_receiver(uhd_interface, gr.hier_block2):
         gr.hier_block2.__init__(self, "uhd_receiver",
                                 gr.io_signature(0,0,0),
                                 gr.io_signature(1,1,gr.sizeof_gr_complex))
-      
+
         # Set up the UHD interface as a receiver
         uhd_interface.__init__(self, False, args, bandwidth,
                                freq, lo_offset, gain, spec, antenna, clock_source)
@@ -209,13 +213,13 @@ class uhd_receiver(uhd_interface, gr.hier_block2):
         """
         Prints information about the UHD transmitter
         """
-        print "\nUHD Receiver:"
-        print "UHD Args:     %s"    % (self._args)
-        print "Freq:         %sHz"  % (eng_notation.num_to_str(self._freq))
-        print "LO Offset:    %sHz"  % (eng_notation.num_to_str(self._lo_offset))
-        print "Gain:         %f dB" % (self._gain)
-        print "Sample Rate:  %ssps" % (eng_notation.num_to_str(self._rate))
-        print "Antenna:      %s"    % (self._ant)
-        print "Subdev Sec:   %s"    % (self._spec)
-        print "Clock Source: %s"    % (self._clock_source)
+        print("\nUHD Receiver:")
+        print("UHD Args:     %s"    % (self._args))
+        print("Freq:         %sHz"  % (eng_notation.num_to_str(self._freq)))
+        print("LO Offset:    %sHz"  % (eng_notation.num_to_str(self._lo_offset)))
+        print("Gain:         %f dB" % (self._gain))
+        print("Sample Rate:  %ssps" % (eng_notation.num_to_str(self._rate)))
+        print("Antenna:      %s"    % (self._ant))
+        print("Subdev Sec:   %s"    % (self._spec))
+        print("Clock Source: %s"    % (self._clock_source))
 
diff --git a/gr-digital/examples/run_length.py b/gr-digital/examples/run_length.py
old mode 100755
new mode 100644
index 5020655dbb..a122a2b8eb
--- a/gr-digital/examples/run_length.py
+++ b/gr-digital/examples/run_length.py
@@ -1,24 +1,27 @@
 #!/usr/bin/env python
 #
 # Copyright 2007 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
+
+from __future__ import print_function
+from __future__ import unicode_literals
 
 from optparse import OptionParser
 import sys
@@ -30,9 +33,9 @@ def main():
     (options, args) = parser.parse_args()
 
     if options.file == None:
-        print "Must specify file to read from using '-f'."
+        print("Must specify file to read from using '-f'.")
         sys.exit(1)
-    print "Using", options.file, "for data."
+    print("Using", options.file, "for data.")
 
     f = open(options.file, 'r')
     runs = []
@@ -40,7 +43,7 @@ def main():
     current = 0
     bytes = 0
     bits = 0
-    
+
     for ch in f.read():
         x = ord(ch)
         bytes = bytes + 1
@@ -66,18 +69,16 @@ def main():
     runs[count-1] = runs[count-1] + 1
 
     chk = 0
-    print "Bytes read: ", bytes
-    print "Bits read:  ", bits
-    print
+    print("Bytes read: ", bytes)
+    print("Bits read:  ", bits)
+    print()
     for i in range(len(runs)):
         chk = chk + runs[i]*(i+1)
-        print "Runs of length", i+1, ":", runs[i]
-    print
-    print "Sum of runs:", chk, "bits"
-    print
-    print "Maximum run length is", len(runs), "bits"
+        print("Runs of length", i+1, ":", runs[i])
+    print()
+    print("Sum of runs:", chk, "bits")
+    print()
+    print("Maximum run length is", len(runs), "bits")
 
 if __name__ == "__main__":
     main()
-
-    
diff --git a/gr-digital/examples/snr_estimators.py b/gr-digital/examples/snr_estimators.py
old mode 100755
new mode 100644
index 31efe6b83e..b1decd84d8
--- a/gr-digital/examples/snr_estimators.py
+++ b/gr-digital/examples/snr_estimators.py
@@ -20,19 +20,23 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
+
 import sys
 
 try:
     import scipy
     from scipy import stats
 except ImportError:
-    print "Error: Program requires scipy (www.scipy.org)."
+    print("Error: Program requires scipy (www.scipy.org).")
     sys.exit(1)
 
 try:
     import pylab
 except ImportError:
-    print "Error: Program requires Matplotlib (matplotlib.sourceforge.net)."
+    print("Error: Program requires Matplotlib (matplotlib.sourceforge.net).")
     sys.exit(1)
 
 from gnuradio import gr, digital, filter
@@ -55,7 +59,7 @@ def online_skewness(data):
     M2 = 0
     M3 = 0
 
-    for n in xrange(len(data)):
+    for n in range(len(data)):
         delta = data[n] - mean
         delta_n = delta / (n+1)
         term1 = delta * delta_n * n
@@ -63,12 +67,12 @@ def online_skewness(data):
         M3 = M3 + term1 * delta_n * (n - 1) - 3 * delta_n * M2
         M2 = M2 + term1
 
-    return scipy.sqrt(len(data))*M3 / scipy.power(M2, 3.0/2.0);
+    return scipy.sqrt(len(data))*M3 / scipy.power(M2, 3.0 / 2.0);
 
 def snr_est_simple(signal):
     s = scipy.mean(abs(signal)**2)
     n = 2*scipy.var(abs(signal))
-    snr_rat = s/n
+    snr_rat = s / n
     return 10.0*scipy.log10(snr_rat), snr_rat
 
 def snr_est_skew(signal):
@@ -94,11 +98,11 @@ def snr_est_svr(signal):
     N = len(signal)
     ssum = 0
     msum = 0
-    for i in xrange(1, N):
+    for i in range(1, N):
         ssum += (abs(signal[i])**2)*(abs(signal[i-1])**2)
         msum += (abs(signal[i])**4)
-    savg = (1.0/(float(N)-1.0))*ssum
-    mavg = (1.0/(float(N)-1.0))*msum
+    savg = (1.0 / (float(N-1.0)))*ssum
+    mavg = (1.0 / (float(N-1.0)))*msum
     beta = savg / (mavg - savg)
 
     snr_rat = ((beta - 1) + scipy.sqrt(beta*(beta-1)))
@@ -126,9 +130,9 @@ def main():
     parser.add_option("", "--snr-step", type="float", default=0.5,
                       help="SNR step amount [default=%default]")
     parser.add_option("-t", "--type", type="choice",
-                      choices=gr_estimators.keys(), default="simple",
+                      choices=list(gr_estimators.keys()), default="simple",
                       help="Estimator type {0} [default=%default]".format(
-                            gr_estimators.keys()))
+                            list(gr_estimators.keys())))
     (options, args) = parser.parse_args ()
 
     N = options.nsamples
@@ -155,14 +159,14 @@ def main():
     SNR_step = options.snr_step
     SNR_dB = scipy.arange(SNR_min, SNR_max+SNR_step, SNR_step)
     for snr in SNR_dB:
-        SNR = 10.0**(snr/10.0)
+        SNR = 10.0**(snr / 10.0)
         scale = scipy.sqrt(2*SNR)
-        yy = bits + n_cpx/scale
-        print "SNR: ", snr
+        yy = bits + n_cpx / scale
+        print("SNR: ", snr)
 
         Sknown = scipy.mean(yy**2)
-        Nknown = scipy.var(n_cpx/scale)
-        snr0 = Sknown/Nknown
+        Nknown = scipy.var(n_cpx / scale)
+        snr0 = Sknown / Nknown
         snr0dB = 10.0*scipy.log10(snr0)
         snr_known.append(float(snr0dB))
 
@@ -171,7 +175,7 @@ def main():
 
         gr_src = blocks.vector_source_c(bits.tolist(), False)
         gr_snr = digital.mpsk_snr_est_cc(gr_est, ntag, 0.001)
-        gr_chn = channels.channel_model(1.0/scale)
+        gr_chn = channels.channel_model(1.0 / scale)
         gr_snk = blocks.null_sink(gr.sizeof_gr_complex)
         tb = gr.top_block()
         tb.connect(gr_src, gr_chn, gr_snr, gr_snk)
diff --git a/gr-digital/python/digital/CMakeLists.txt b/gr-digital/python/digital/CMakeLists.txt
index 8f88948a2e..e9d58491c4 100644
--- a/gr-digital/python/digital/CMakeLists.txt
+++ b/gr-digital/python/digital/CMakeLists.txt
@@ -78,6 +78,6 @@ if(ENABLE_TESTING)
   file(GLOB py_qa_test_files "qa_*.py")
   foreach(py_qa_test_file ${py_qa_test_files})
     get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE)
-    GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${py_qa_test_file})
+    GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} -B ${py_qa_test_file})
   endforeach(py_qa_test_file)
 endif(ENABLE_TESTING)
diff --git a/gr-digital/python/digital/__init__.py b/gr-digital/python/digital/__init__.py
index 79b740644d..90aa413a25 100644
--- a/gr-digital/python/digital/__init__.py
+++ b/gr-digital/python/digital/__init__.py
@@ -1,59 +1,63 @@
 # Copyright 2011-2013 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
 
 '''
 Blocks and utilities for digital modulation and demodulation.
 '''
 
+from __future__ import absolute_import
+from __future__ import unicode_literals
+
 # The presence of this file turns this directory into a Python package
 
 import os
 
 try:
-    from digital_swig import *
+    from .digital_swig import *
 except ImportError:
     dirname, filename = os.path.split(os.path.abspath(__file__))
     __path__.append(os.path.join(dirname, "..", "..", "swig"))
-    from digital_swig import *
-from psk import *
-from qam import *
-from qamlike import *
-from bpsk import *
-from qpsk import *
-from gmsk import *
-from gfsk import *
-from cpm import *
-from pkt import *
-from crc import *
-from modulation_utils import *
-from ofdm import *
-from ofdm_receiver import *
-from ofdm_sync_fixed import *
-from ofdm_sync_ml import *
-from ofdm_sync_pnac import *
-from ofdm_sync_pn import *
-from ofdm_txrx import ofdm_tx, ofdm_rx
-from soft_dec_lut_gen import *
-from psk_constellations import *
-from qam_constellations import *
-from constellation_map_generator import *
+    from .digital_swig import *
+
+from .psk import *
+from .qam import *
+from .qamlike import *
+from .bpsk import *
+from .qpsk import *
+from .gmsk import *
+from .gfsk import *
+from .cpm import *
+from .pkt import *
+from .crc import *
+from .modulation_utils import *
+from .ofdm import *
+from .ofdm_receiver import *
+from .ofdm_sync_fixed import *
+from .ofdm_sync_ml import *
+from .ofdm_sync_pnac import *
+from .ofdm_sync_pn import *
+from .ofdm_txrx import ofdm_tx, ofdm_rx
+from .soft_dec_lut_gen import *
+from .psk_constellations import *
+from .qam_constellations import *
+from .constellation_map_generator import *
 
-import packet_utils
-import ofdm_packet_utils
+from . import packet_utils
+from . import ofdm_packet_utils
diff --git a/gr-digital/python/digital/bpsk.py b/gr-digital/python/digital/bpsk.py
index 2ecaac3386..6193622be8 100644
--- a/gr-digital/python/digital/bpsk.py
+++ b/gr-digital/python/digital/bpsk.py
@@ -23,14 +23,17 @@
 BPSK modulation and demodulation.
 """
 
+from __future__ import absolute_import
+from __future__ import unicode_literals
+
 from math import pi, log
 from cmath import exp
 
 from gnuradio import gr
 from gnuradio.digital.generic_mod_demod import generic_mod, generic_demod
 from gnuradio.digital.generic_mod_demod import shared_mod_args, shared_demod_args
-import digital_swig
-import modulation_utils
+from . import digital_swig
+from . import modulation_utils
 
 # /////////////////////////////////////////////////////////////////////////////
 #                           BPSK constellation
diff --git a/gr-digital/python/digital/constellation_map_generator.py b/gr-digital/python/digital/constellation_map_generator.py
index 1dedd81280..bd4158194f 100644
--- a/gr-digital/python/digital/constellation_map_generator.py
+++ b/gr-digital/python/digital/constellation_map_generator.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import unicode_literals
 def constellation_map_generator(basis_cpoints, basis_symbols, k, pi):
     '''
     Uses the a basis constellation provided (e.g., from
diff --git a/gr-digital/python/digital/cpm.py b/gr-digital/python/digital/cpm.py
index 322c3f0bfc..0752f01d66 100644
--- a/gr-digital/python/digital/cpm.py
+++ b/gr-digital/python/digital/cpm.py
@@ -1,37 +1,44 @@
 #
-# CPM modulation and demodulation.  
+# CPM modulation and demodulation.
 #
 #
 # Copyright 2005-2007,2011 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
+
+from __future__ import print_function
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import unicode_literals
 
 # See gnuradio-examples/python/digital for examples
 
+
+from math import pi
+import numpy
+
 from gnuradio import gr, filter
 from gnuradio import analog
 from gnuradio import blocks
-from math import pi
-import numpy
+from . import digital_swig
+from . import modulation_utils
 
-import digital_swig
-import modulation_utils
 
 # default values (used in __init__ and add_options)
 _def_samples_per_symbol = 2
@@ -53,16 +60,16 @@ _def_log = False
 class cpm_mod(gr.hier_block2):
     """
     Hierarchical block for Continuous Phase modulation.
-    
+
     The input is a byte stream (unsigned char) representing packed
     bits and the output is the complex modulated signal at baseband.
-    
+
     See Proakis for definition of generic CPM signals:
     s(t)=exp(j phi(t))
     phi(t)= 2 pi h int_0^t f(t') dt'
     f(t)=sum_k a_k g(t-kT)
     (normalizing assumption: int_0^infty g(t) dt = 1/2)
-    
+
     Args:
         samples_per_symbol: samples per baud >= 2 (integer)
         bits_per_symbol: bits per symbol (integer)
@@ -76,21 +83,21 @@ class cpm_mod(gr.hier_block2):
         debug: Print modulation data to files? (boolean)
     """
 
-    def __init__(self, 
+    def __init__(self,
                  samples_per_symbol=_def_samples_per_symbol,
                  bits_per_symbol=_def_bits_per_symbol,
                  h_numerator=_def_h_numerator,
                  h_denominator=_def_h_denominator,
                  cpm_type=_def_cpm_type,
-		 bt=_def_bt,
-		 symbols_per_pulse=_def_symbols_per_pulse,
+                 bt=_def_bt,
+                 symbols_per_pulse=_def_symbols_per_pulse,
                  generic_taps=_def_generic_taps,
                  verbose=_def_verbose,
                  log=_def_log):
 
-	gr.hier_block2.__init__(self, "cpm_mod", 
-				gr.io_signature(1, 1, gr.sizeof_char),       # Input signature
-				gr.io_signature(1, 1, gr.sizeof_gr_complex)) #  Output signature
+        gr.hier_block2.__init__(self, "cpm_mod",
+                                gr.io_signature(1, 1, gr.sizeof_char),       # Input signature
+                                gr.io_signature(1, 1, gr.sizeof_gr_complex)) #  Output signature
 
         self._samples_per_symbol = samples_per_symbol
         self._bits_per_symbol = bits_per_symbol
@@ -99,29 +106,29 @@ class cpm_mod(gr.hier_block2):
         self._cpm_type = cpm_type
         self._bt=bt
         if cpm_type == 0 or cpm_type == 2 or cpm_type == 3: # CPFSK, RC, Generic
-	    self._symbols_per_pulse = symbols_per_pulse
+            self._symbols_per_pulse = symbols_per_pulse
         elif cpm_type == 1: # GMSK
-	    self._symbols_per_pulse = 4
+            self._symbols_per_pulse = 4
         else:
-            raise TypeError, ("cpm_type must be an integer in {0,1,2,3}, is %r" % (cpm_type,))
+            raise TypeError("cpm_type must be an integer in {0,1,2,3}, is %r" % (cpm_type,))
 
         self._generic_taps=numpy.array(generic_taps)
 
         if samples_per_symbol < 2:
-            raise TypeError, ("samples_per_symbol must be >= 2, is %r" % (samples_per_symbol,))
+            raise TypeError("samples_per_symbol must be >= 2, is %r" % (samples_per_symbol,))
 
         self.nsymbols = 2**bits_per_symbol
         self.sym_alphabet = numpy.arange(-(self.nsymbols-1),self.nsymbols,2).tolist()
 
 
-	self.ntaps = int(self._symbols_per_pulse * samples_per_symbol)
-	sensitivity = 2 * pi * h_numerator / h_denominator / samples_per_symbol
+        self.ntaps = int(self._symbols_per_pulse * samples_per_symbol)
+        sensitivity = 2 * pi * h_numerator / h_denominator / samples_per_symbol
 
         # Unpack Bytes into bits_per_symbol groups
         self.B2s = blocks.packed_to_unpacked_bb(bits_per_symbol,gr.GR_MSB_FIRST)
- 
- 
-	# Turn it into symmetric PAM data.
+
+
+        # Turn it into symmetric PAM data.
         self.pam = digital_swig.chunks_to_symbols_bf(self.sym_alphabet,1)
 
         # Generate pulse (sum of taps = samples_per_symbol/2)
@@ -129,72 +136,72 @@ class cpm_mod(gr.hier_block2):
             self.taps= (1.0/self._symbols_per_pulse/2,) * self.ntaps
         elif cpm_type == 1: # GMSK
             gaussian_taps = filter.firdes.gaussian(
-                1.0/2,                     # gain
+                1.0 / 2,                     # gain
                 samples_per_symbol,    # symbol_rate
                 bt,                    # bandwidth * symbol time
                 self.ntaps                  # number of taps
                 )
-	    sqwave = (1,) * samples_per_symbol       # rectangular window
-	    self.taps = numpy.convolve(numpy.array(gaussian_taps),numpy.array(sqwave))
+            sqwave = (1,) * samples_per_symbol       # rectangular window
+            self.taps = numpy.convolve(numpy.array(gaussian_taps),numpy.array(sqwave))
         elif cpm_type == 2: # Raised Cosine
             # generalize it for arbitrary roll-off factor
-            self.taps = (1-numpy.cos(2*pi*numpy.arange(0,self.ntaps)/samples_per_symbol/self._symbols_per_pulse))/(2*self._symbols_per_pulse)
+            self.taps = (1-numpy.cos(2*pi*numpy.arange(0 / self.ntaps/samples_per_symbol/self._symbols_per_pulse)),(2*self._symbols_per_pulse))
         elif cpm_type == 3: # Generic CPM
             self.taps = generic_taps
         else:
-            raise TypeError, ("cpm_type must be an integer in {0,1,2,3}, is %r" % (cpm_type,))
+            raise TypeError("cpm_type must be an integer in {0,1,2,3}, is %r" % (cpm_type,))
 
         self.filter = filter.pfb.arb_resampler_fff(samples_per_symbol, self.taps)
 
-	# FM modulation
-	self.fmmod = analog.frequency_modulator_fc(sensitivity)
-		
+        # FM modulation
+        self.fmmod = analog.frequency_modulator_fc(sensitivity)
+
         if verbose:
             self._print_verbage()
-         
+
         if log:
             self._setup_logging()
 
-	# Connect
-	self.connect(self, self.B2s, self.pam, self.filter, self.fmmod, self)
+        # Connect
+        self.connect(self, self.B2s, self.pam, self.filter, self.fmmod, self)
 
     def samples_per_symbol(self):
         return self._samples_per_symbol
-    
-    def bits_per_symbol(self):  
+
+    def bits_per_symbol(self):
         return self._bits_per_symbol
-    
-    def h_numerator(self):  
+
+    def h_numerator(self):
         return self._h_numerator
 
-    def h_denominator(self):  
+    def h_denominator(self):
         return self._h_denominator
 
-    def cpm_type(self):  
+    def cpm_type(self):
         return self._cpm_type
 
-    def bt(self):  
+    def bt(self):
         return self._bt
 
-    def symbols_per_pulse(self):  
+    def symbols_per_pulse(self):
         return self._symbols_per_pulse
 
 
     def _print_verbage(self):
-        print "Samples per symbol = %d" % self._samples_per_symbol
-        print "Bits per symbol = %d" % self._bits_per_symbol
-        print "h = " , self._h_numerator , " / " ,  self._h_denominator
-        print "Symbol alphabet = " , self.sym_alphabet
-        print "Symbols per pulse = %d" % self._symbols_per_pulse
-        print "taps = " , self.taps
-
-        print "CPM type = %d" % self._cpm_type
+        print("Samples per symbol = %d" % self._samples_per_symbol)
+        print("Bits per symbol = %d" % self._bits_per_symbol)
+        print("h = " , self._h_numerator , " / " ,  self._h_denominator)
+        print("Symbol alphabet = " , self.sym_alphabet)
+        print("Symbols per pulse = %d" % self._symbols_per_pulse)
+        print("taps = " , self.taps)
+
+        print("CPM type = %d" % self._cpm_type)
         if self._cpm_type == 1:
-             print "Gaussian filter BT = %.2f" % self._bt
+             print("Gaussian filter BT = %.2f" % self._bt)
 
 
     def _setup_logging(self):
-        print "Modulation logging turned on."
+        print("Modulation logging turned on.")
         self.connect(self.B2s,
                      blocks.file_sink(gr.sizeof_float, "symbols.dat"))
         self.connect(self.pam,
diff --git a/gr-digital/python/digital/crc.py b/gr-digital/python/digital/crc.py
index e228faaa98..31e98d368a 100644
--- a/gr-digital/python/digital/crc.py
+++ b/gr-digital/python/digital/crc.py
@@ -1,26 +1,27 @@
+from __future__ import unicode_literals
 #
 # Copyright 2005,2007,2011 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
 
 from gnuradio import gru
-import digital_swig as digital
+from . import digital_swig as digital
 import struct
 
 def gen_and_append_crc32(s):
diff --git a/gr-digital/python/digital/generic_mod_demod.py b/gr-digital/python/digital/generic_mod_demod.py
index 1b8e1149c9..ad487b27e9 100644
--- a/gr-digital/python/digital/generic_mod_demod.py
+++ b/gr-digital/python/digital/generic_mod_demod.py
@@ -19,32 +19,22 @@
 # Boston, MA 02110-1301, USA.
 #
 
-# See gnuradio-examples/python/digital for examples
-
 """
 Generic modulation and demodulation.
 """
 
-from gnuradio import gr
-from modulation_utils import extract_kwargs_from_options_for_class
-from utils import mod_codes
-import digital_swig as digital
-import math
+# See gnuradio-examples/python/digital for examples
 
-try:
-    from gnuradio import blocks
-except ImportError:
-    import blocks_swig as blocks
+from __future__ import print_function
+from __future__ import absolute_import
+from __future__ import unicode_literals
 
-try:
-    from gnuradio import filter
-except ImportError:
-    import filter_swig as filter
+from gnuradio import gr, blocks, filter, analog
+from .modulation_utils import extract_kwargs_from_options_for_class
+from .utils import mod_codes
+from . import digital_swig as digital
+import math
 
-try:
-    from gnuradio import analog
-except ImportError:
-    import analog_swig as analog
 
 # default values (used in __init__ and add_options)
 _def_samples_per_symbol = 2
@@ -113,9 +103,9 @@ class generic_mod(gr.hier_block2):
                  verbose=_def_verbose,
                  log=_def_log):
 
-	gr.hier_block2.__init__(self, "generic_mod",
-				gr.io_signature(1, 1, gr.sizeof_char),       # Input signature
-				gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature
+        gr.hier_block2.__init__(self, "generic_mod",
+                                gr.io_signature(1, 1, gr.sizeof_char),       # Input signature
+                                gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature
 
         self._constellation = constellation
         self._samples_per_symbol = samples_per_symbol
@@ -125,7 +115,7 @@ class generic_mod(gr.hier_block2):
         self.pre_diff_code = pre_diff_code and self._constellation.apply_pre_diff_code()
 
         if self._samples_per_symbol < 2:
-            raise TypeError, ("sps must be >= 2, is %f" % self._samples_per_symbol)
+            raise TypeError("sps must be >= 2, is %f" % self._samples_per_symbol)
 
         arity = pow(2,self.bits_per_symbol())
 
@@ -153,7 +143,7 @@ class generic_mod(gr.hier_block2):
         self.rrc_filter = filter.pfb_arb_resampler_ccf(self._samples_per_symbol,
                                                        self.rrc_taps)
 
-	# Connect
+        # Connect
         self._blocks = [self, self.bytes2chunks]
         if self.pre_diff_code:
             self._blocks.append(self.symbol_mapper)
@@ -191,12 +181,12 @@ class generic_mod(gr.hier_block2):
 
 
     def _print_verbage(self):
-        print "\nModulator:"
-        print "bits per symbol:     %d" % self.bits_per_symbol()
-        print "RRC roll-off factor: %.2f" % self._excess_bw
+        print("\nModulator:")
+        print("bits per symbol:     %d" % self.bits_per_symbol())
+        print("RRC roll-off factor: %.2f" % self._excess_bw)
 
     def _setup_logging(self):
-        print "Modulation logging turned on."
+        print("Modulation logging turned on.")
         self.connect(self.bytes2chunks,
                      blocks.file_sink(gr.sizeof_char, "tx_bytes2chunks.8b"))
         if self.pre_diff_code:
@@ -249,9 +239,9 @@ class generic_demod(gr.hier_block2):
                  verbose=_def_verbose,
                  log=_def_log):
 
-	gr.hier_block2.__init__(self, "generic_demod",
-				gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
-				gr.io_signature(1, 1, gr.sizeof_char))       # Output signature
+        gr.hier_block2.__init__(self, "generic_demod",
+                                gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
+                                gr.io_signature(1, 1, gr.sizeof_char))       # Output signature
 
         self._constellation = constellation
         self._samples_per_symbol = samples_per_symbol
@@ -263,7 +253,7 @@ class generic_demod(gr.hier_block2):
         self._differential = differential
 
         if self._samples_per_symbol < 2:
-            raise TypeError, ("sps must be >= 2, is %d" % self._samples_per_symbol)
+            raise TypeError("sps must be >= 2, is %d" % self._samples_per_symbol)
 
         # Only apply a predifferential coding if the constellation also supports it.
         self.pre_diff_code = pre_diff_code and self._constellation.apply_pre_diff_code()
@@ -328,15 +318,15 @@ class generic_demod(gr.hier_block2):
         return self._constellation.bits_per_symbol()
 
     def _print_verbage(self):
-        print "\nDemodulator:"
-        print "bits per symbol:     %d"   % self.bits_per_symbol()
-        print "RRC roll-off factor: %.2f" % self._excess_bw
-        print "FLL bandwidth:       %.2e" % self._freq_bw
-        print "Timing bandwidth:    %.2e" % self._timing_bw
-        print "Phase bandwidth:     %.2e" % self._phase_bw
+        print("\nDemodulator:")
+        print("bits per symbol:     %d"   % self.bits_per_symbol())
+        print("RRC roll-off factor: %.2f" % self._excess_bw)
+        print("FLL bandwidth:       %.2e" % self._freq_bw)
+        print("Timing bandwidth:    %.2e" % self._timing_bw)
+        print("Phase bandwidth:     %.2e" % self._phase_bw)
 
     def _setup_logging(self):
-        print "Modulation logging turned on."
+        print("Modulation logging turned on.")
         self.connect(self.agc,
                      blocks.file_sink(gr.sizeof_gr_complex, "rx_agc.32fc"))
         self.connect((self.freq_recov, 0),
diff --git a/gr-digital/python/digital/gfsk.py b/gr-digital/python/digital/gfsk.py
index 3569ffe6cf..5ce3e85812 100644
--- a/gr-digital/python/digital/gfsk.py
+++ b/gr-digital/python/digital/gfsk.py
@@ -1,43 +1,42 @@
 #
-# GFSK modulation and demodulation.  
+# GFSK modulation and demodulation.
 #
 #
 # Copyright 2005-2007,2012 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
+
+from __future__ import print_function
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import unicode_literals
 
 # See gnuradio-examples/python/digital for examples
 
+import numpy
+
 from gnuradio import gr
 from gnuradio import analog
-from gnuradio import blocks
-import modulation_utils
-import digital_swig as digital
-from math import pi
-import numpy
-from pprint import pprint
-import inspect
+from gnuradio import blocks, filter
+from . import modulation_utils
+from . import digital_swig as digital
 
-try:
-    from gnuradio import filter
-except ImportError:
-    import filter_swig as filter
 
 # default values (used in __init__ and add_options)
 _def_samples_per_symbol = 2
@@ -69,22 +68,22 @@ class gfsk_mod(gr.hier_block2):
                  verbose=_def_verbose,
                  log=_def_log):
         """
-	Hierarchical block for Gaussian Frequency Shift Key (GFSK)
-	modulation.
+        Hierarchical block for Gaussian Frequency Shift Key (GFSK)
+        modulation.
 
-	The input is a byte stream (unsigned char) and the
-	output is the complex modulated signal at baseband.
+        The input is a byte stream (unsigned char) and the
+        output is the complex modulated signal at baseband.
 
         Args:
             samples_per_symbol: samples per baud >= 2 (integer)
             bt: Gaussian filter bandwidth * symbol time (float)
             verbose: Print information about modulator? (bool)
             debug: Print modualtion data to files? (bool)
-	"""
+        """
 
-	gr.hier_block2.__init__(self, "gfsk_mod",
-				gr.io_signature(1, 1, gr.sizeof_char),       # Input signature
-				gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature
+        gr.hier_block2.__init__(self, "gfsk_mod",
+                                gr.io_signature(1, 1, gr.sizeof_char),       # Input signature
+                                gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature
 
         samples_per_symbol = int(samples_per_symbol)
         self._samples_per_symbol = samples_per_symbol
@@ -92,43 +91,43 @@ class gfsk_mod(gr.hier_block2):
         self._differential = False
 
         if not isinstance(samples_per_symbol, int) or samples_per_symbol < 2:
-            raise TypeError, ("samples_per_symbol must be an integer >= 2, is %r" % (samples_per_symbol,))
+            raise TypeError("samples_per_symbol must be an integer >= 2, is %r" % (samples_per_symbol,))
 
-	ntaps = 4 * samples_per_symbol			# up to 3 bits in filter at once
-	#sensitivity = (pi / 2) / samples_per_symbol	# phase change per bit = pi / 2
+        ntaps = 4 * samples_per_symbol			# up to 3 bits in filter at once
+        #sensitivity = (pi / 2) / samples_per_symbol	# phase change per bit = pi / 2
 
-	# Turn it into NRZ data.
-	#self.nrz = digital.bytes_to_syms()
+        # Turn it into NRZ data.
+        #self.nrz = digital.bytes_to_syms()
         self.unpack = blocks.packed_to_unpacked_bb(1, gr.GR_MSB_FIRST)
         self.nrz = digital.chunks_to_symbols_bf([-1, 1])
 
-	# Form Gaussian filter
+        # Form Gaussian filter
         # Generate Gaussian response (Needs to be convolved with window below).
-	self.gaussian_taps = filter.firdes.gaussian(
-		1.0,		       # gain
-		samples_per_symbol,    # symbol_rate
-		bt,		       # bandwidth * symbol time
-		ntaps	               # number of taps
-		)
-
-	self.sqwave = (1,) * samples_per_symbol       # rectangular window
-	self.taps = numpy.convolve(numpy.array(self.gaussian_taps),numpy.array(self.sqwave))
-	self.gaussian_filter = filter.interp_fir_filter_fff(samples_per_symbol, self.taps)
-
-	# FM modulation
-	self.fmmod = analog.frequency_modulator_fc(sensitivity)
-
-	# small amount of output attenuation to prevent clipping USRP sink
-	self.amp = blocks.multiply_const_cc(0.999)
-		
+        self.gaussian_taps = filter.firdes.gaussian(
+                1.0,		       # gain
+                samples_per_symbol,    # symbol_rate
+                bt,		       # bandwidth * symbol time
+                ntaps                  # number of taps
+                )
+
+        self.sqwave = (1,) * samples_per_symbol       # rectangular window
+        self.taps = numpy.convolve(numpy.array(self.gaussian_taps),numpy.array(self.sqwave))
+        self.gaussian_filter = filter.interp_fir_filter_fff(samples_per_symbol, self.taps)
+
+        # FM modulation
+        self.fmmod = analog.frequency_modulator_fc(sensitivity)
+
+        # small amount of output attenuation to prevent clipping USRP sink
+        self.amp = blocks.multiply_const_cc(0.999)
+
         if verbose:
             self._print_verbage()
-         
+
         if log:
             self._setup_logging()
 
-	# Connect & Initialize base class
-	self.connect(self, self.unpack, self.nrz, self.gaussian_filter, self.fmmod, self.amp, self)
+        # Connect & Initialize base class
+        self.connect(self, self.unpack, self.nrz, self.gaussian_filter, self.fmmod, self.amp, self)
 
     def samples_per_symbol(self):
         return self._samples_per_symbol
@@ -138,12 +137,12 @@ class gfsk_mod(gr.hier_block2):
         return 1
 
     def _print_verbage(self):
-        print "bits per symbol = %d" % self.bits_per_symbol()
-        print "Gaussian filter bt = %.2f" % self._bt
+        print("bits per symbol = %d" % self.bits_per_symbol())
+        print("Gaussian filter bt = %.2f" % self._bt)
 
 
     def _setup_logging(self):
-        print "Modulation logging turned on."
+        print("Modulation logging turned on.")
         self.connect(self.nrz,
                      blocks.file_sink(gr.sizeof_float, "nrz.dat"))
         self.connect(self.gaussian_filter,
@@ -184,11 +183,11 @@ class gfsk_demod(gr.hier_block2):
                  verbose=_def_verbose,
                  log=_def_log):
         """
-	Hierarchical block for Gaussian Minimum Shift Key (GFSK)
-	demodulation.
+        Hierarchical block for Gaussian Minimum Shift Key (GFSK)
+        demodulation.
 
-	The input is the complex modulated signal at baseband.
-	The output is a stream of bits packed 1 bit per byte (the LSB)
+        The input is the complex modulated signal at baseband.
+        The output is a stream of bits packed 1 bit per byte (the LSB)
 
         Args:
             samples_per_symbol: samples per baud (integer)
@@ -196,18 +195,18 @@ class gfsk_demod(gr.hier_block2):
             log: Print modualtion data to files? (bool)
 
         Clock recovery parameters.  These all have reasonble defaults.
-        
+
         Args:
             gain_mu: controls rate of mu adjustment (float)
             mu: fractional delay [0.0, 1.0] (float)
             omega_relative_limit: sets max variation in omega (float, typically 0.000200 (200 ppm))
             freq_error: bit rate error as a fraction
-            float: 
-	"""
+            float:
+        """
 
-	gr.hier_block2.__init__(self, "gfsk_demod",
-				gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
-				gr.io_signature(1, 1, gr.sizeof_char))       # Output signature
+        gr.hier_block2.__init__(self, "gfsk_demod",
+                                gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
+                                gr.io_signature(1, 1, gr.sizeof_char))       # Output signature
 
         self._samples_per_symbol = samples_per_symbol
         self._gain_mu = gain_mu
@@ -215,24 +214,24 @@ class gfsk_demod(gr.hier_block2):
         self._omega_relative_limit = omega_relative_limit
         self._freq_error = freq_error
         self._differential = False
-        
+
         if samples_per_symbol < 2:
-            raise TypeError, "samples_per_symbol >= 2, is %f" % samples_per_symbol
+            raise TypeError("samples_per_symbol >= 2, is %f" % samples_per_symbol)
 
         self._omega = samples_per_symbol*(1+self._freq_error)
 
         if not self._gain_mu:
             self._gain_mu = 0.175
-            
-	self._gain_omega = .25 * self._gain_mu * self._gain_mu        # critically damped
 
-	# Demodulate FM
-	#sensitivity = (pi / 2) / samples_per_symbol
-	self.fmdemod = analog.quadrature_demod_cf(1.0 / sensitivity)
+        self._gain_omega = .25 * self._gain_mu * self._gain_mu        # critically damped
 
-	# the clock recovery block tracks the symbol clock and resamples as needed.
-	# the output of the block is a stream of soft symbols (float)
-	self.clock_recovery = digital.clock_recovery_mm_ff(self._omega, self._gain_omega,
+        # Demodulate FM
+        #sensitivity = (pi / 2) / samples_per_symbol
+        self.fmdemod = analog.quadrature_demod_cf(1.0 / sensitivity)
+
+        # the clock recovery block tracks the symbol clock and resamples as needed.
+        # the output of the block is a stream of soft symbols (float)
+        self.clock_recovery = digital.clock_recovery_mm_ff(self._omega, self._gain_omega,
                                                            self._mu, self._gain_mu,
                                                            self._omega_relative_limit)
 
@@ -241,12 +240,12 @@ class gfsk_demod(gr.hier_block2):
 
         if verbose:
             self._print_verbage()
-         
+
         if log:
             self._setup_logging()
 
-	# Connect & Initialize base class
-	self.connect(self, self.fmdemod, self.clock_recovery, self.slicer, self)
+        # Connect & Initialize base class
+        self.connect(self, self.fmdemod, self.clock_recovery, self.slicer, self)
 
     def samples_per_symbol(self):
         return self._samples_per_symbol
@@ -256,16 +255,16 @@ class gfsk_demod(gr.hier_block2):
         return 1
 
     def _print_verbage(self):
-        print "bits per symbol = %d" % self.bits_per_symbol()
-        print "M&M clock recovery omega = %f" % self._omega
-        print "M&M clock recovery gain mu = %f" % self._gain_mu
-        print "M&M clock recovery mu = %f" % self._mu
-        print "M&M clock recovery omega rel. limit = %f" % self._omega_relative_limit
-        print "frequency error = %f" % self._freq_error
+        print("bits per symbol = %d" % self.bits_per_symbol())
+        print("M&M clock recovery omega = %f" % self._omega)
+        print("M&M clock recovery gain mu = %f" % self._gain_mu)
+        print("M&M clock recovery mu = %f" % self._mu)
+        print("M&M clock recovery omega rel. limit = %f" % self._omega_relative_limit)
+        print("frequency error = %f" % self._freq_error)
 
 
     def _setup_logging(self):
-        print "Demodulation logging turned on."
+        print("Demodulation logging turned on.")
         self.connect(self.fmdemod,
                     blocks.file_sink(gr.sizeof_float, "fmdemod.dat"))
         self.connect(self.clock_recovery,
diff --git a/gr-digital/python/digital/gmsk.py b/gr-digital/python/digital/gmsk.py
index e7a92a95db..5e25a3d3a1 100644
--- a/gr-digital/python/digital/gmsk.py
+++ b/gr-digital/python/digital/gmsk.py
@@ -1,26 +1,31 @@
 #
-# GMSK modulation and demodulation.  
+# GMSK modulation and demodulation.
 #
 #
 # Copyright 2005-2007,2012 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
+
+from __future__ import print_function
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import unicode_literals
 
 # See gnuradio-examples/python/digital for examples
 
@@ -31,8 +36,8 @@ import inspect
 import numpy
 
 from gnuradio import gr, blocks, analog, filter
-import modulation_utils
-import digital_swig as digital
+from . import modulation_utils
+from . import digital_swig as digital
 
 # default values (used in __init__ and add_options)
 _def_samples_per_symbol = 2
@@ -58,10 +63,10 @@ class gmsk_mod(gr.hier_block2):
     """
     Hierarchical block for Gaussian Minimum Shift Key (GMSK)
     modulation.
-    
+
     The input is a byte stream (unsigned char with packed bits)
     and the output is the complex modulated signal at baseband.
-    
+
     Args:
         samples_per_symbol: samples per baud >= 2 (integer)
         bt: Gaussian filter bandwidth * symbol time (float)
@@ -75,9 +80,9 @@ class gmsk_mod(gr.hier_block2):
                  verbose=_def_verbose,
                  log=_def_log):
 
-	gr.hier_block2.__init__(self, "gmsk_mod",
-				gr.io_signature(1, 1, gr.sizeof_char),       # Input signature
-				gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature
+        gr.hier_block2.__init__(self, "gmsk_mod",
+                                gr.io_signature(1, 1, gr.sizeof_char),       # Input signature
+                                gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature
 
         samples_per_symbol = int(samples_per_symbol)
         self._samples_per_symbol = samples_per_symbol
@@ -85,40 +90,40 @@ class gmsk_mod(gr.hier_block2):
         self._differential = False
 
         if not isinstance(samples_per_symbol, int) or samples_per_symbol < 2:
-            raise TypeError, ("samples_per_symbol must be an integer >= 2, is %r" % (samples_per_symbol,))
+            raise TypeError("samples_per_symbol must be an integer >= 2, is %r" % (samples_per_symbol,))
 
-	ntaps = 4 * samples_per_symbol			# up to 3 bits in filter at once
-	sensitivity = (pi / 2) / samples_per_symbol	# phase change per bit = pi / 2
+        ntaps = 4 * samples_per_symbol                        # up to 3 bits in filter at once
+        sensitivity = (old_div(pi / 2), samples_per_symbol)        # phase change per bit = pi / 2
 
-	# Turn it into NRZ data.
-	#self.nrz = digital.bytes_to_syms()
+        # Turn it into NRZ data.
+        #self.nrz = digital.bytes_to_syms()
         self.unpack = blocks.packed_to_unpacked_bb(1, gr.GR_MSB_FIRST)
         self.nrz = digital.chunks_to_symbols_bf([-1, 1], 1)
 
-	# Form Gaussian filter
+        # Form Gaussian filter
         # Generate Gaussian response (Needs to be convolved with window below).
-	self.gaussian_taps = filter.firdes.gaussian(
-		1,		       # gain
-		samples_per_symbol,    # symbol_rate
-		bt,		       # bandwidth * symbol time
-		ntaps	               # number of taps
-		)
-
-	self.sqwave = (1,) * samples_per_symbol       # rectangular window
-	self.taps = numpy.convolve(numpy.array(self.gaussian_taps),numpy.array(self.sqwave))
-	self.gaussian_filter = filter.interp_fir_filter_fff(samples_per_symbol, self.taps)
-
-	# FM modulation
-	self.fmmod = analog.frequency_modulator_fc(sensitivity)
-		
+        self.gaussian_taps = filter.firdes.gaussian(
+                1,                       # gain
+                samples_per_symbol,    # symbol_rate
+                bt,                       # bandwidth * symbol time
+                ntaps                       # number of taps
+                )
+
+        self.sqwave = (1,) * samples_per_symbol       # rectangular window
+        self.taps = numpy.convolve(numpy.array(self.gaussian_taps),numpy.array(self.sqwave))
+        self.gaussian_filter = filter.interp_fir_filter_fff(samples_per_symbol, self.taps)
+
+        # FM modulation
+        self.fmmod = analog.frequency_modulator_fc(sensitivity)
+
         if verbose:
             self._print_verbage()
-         
+
         if log:
             self._setup_logging()
 
-	# Connect & Initialize base class
-	self.connect(self, self.unpack, self.nrz, self.gaussian_filter, self.fmmod, self)
+        # Connect & Initialize base class
+        self.connect(self, self.unpack, self.nrz, self.gaussian_filter, self.fmmod, self)
 
     def samples_per_symbol(self):
         return self._samples_per_symbol
@@ -128,12 +133,12 @@ class gmsk_mod(gr.hier_block2):
         return 1
 
     def _print_verbage(self):
-        print "bits per symbol = %d" % self.bits_per_symbol()
-        print "Gaussian filter bt = %.2f" % self._bt
+        print("bits per symbol = %d" % self.bits_per_symbol())
+        print("Gaussian filter bt = %.2f" % self._bt)
 
 
     def _setup_logging(self):
-        print "Modulation logging turned on."
+        print("Modulation logging turned on.")
         self.connect(self.nrz,
                      blocks.file_sink(gr.sizeof_float, "nrz.dat"))
         self.connect(self.gaussian_filter,
@@ -166,10 +171,10 @@ class gmsk_demod(gr.hier_block2):
     """
     Hierarchical block for Gaussian Minimum Shift Key (GMSK)
     demodulation.
-    
+
     The input is the complex modulated signal at baseband.
     The output is a stream of bits packed 1 bit per byte (the LSB)
-    
+
     Args:
         samples_per_symbol: samples per baud (integer)
         gain_mu: controls rate of mu adjustment (float)
@@ -179,7 +184,7 @@ class gmsk_demod(gr.hier_block2):
         verbose: Print information about modulator? (boolean)
         log: Print modualtion data to files? (boolean)
     """
-    
+
     def __init__(self,
                  samples_per_symbol=_def_samples_per_symbol,
                  gain_mu=_def_gain_mu,
@@ -189,9 +194,9 @@ class gmsk_demod(gr.hier_block2):
                  verbose=_def_verbose,
                  log=_def_log):
 
-	gr.hier_block2.__init__(self, "gmsk_demod",
-				gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
-				gr.io_signature(1, 1, gr.sizeof_char))       # Output signature
+        gr.hier_block2.__init__(self, "gmsk_demod",
+                                gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
+                                gr.io_signature(1, 1, gr.sizeof_char))       # Output signature
 
         self._samples_per_symbol = samples_per_symbol
         self._gain_mu = gain_mu
@@ -199,24 +204,24 @@ class gmsk_demod(gr.hier_block2):
         self._omega_relative_limit = omega_relative_limit
         self._freq_error = freq_error
         self._differential = False
-        
+
         if samples_per_symbol < 2:
-            raise TypeError, "samples_per_symbol >= 2, is %f" % samples_per_symbol
+            raise TypeError("samples_per_symbol >= 2, is %f" % samples_per_symbol)
 
         self._omega = samples_per_symbol*(1+self._freq_error)
 
         if not self._gain_mu:
             self._gain_mu = 0.175
-            
-	self._gain_omega = .25 * self._gain_mu * self._gain_mu        # critically damped
 
-	# Demodulate FM
-	sensitivity = (pi / 2) / samples_per_symbol
-	self.fmdemod = analog.quadrature_demod_cf(1.0 / sensitivity)
+        self._gain_omega = .25 * self._gain_mu * self._gain_mu        # critically damped
 
-	# the clock recovery block tracks the symbol clock and resamples as needed.
-	# the output of the block is a stream of soft symbols (float)
-	self.clock_recovery = digital.clock_recovery_mm_ff(self._omega, self._gain_omega,
+        # Demodulate FM
+        sensitivity = (old_div(pi / 2), samples_per_symbol)
+        self.fmdemod = analog.quadrature_demod_cf(1.0 / sensitivity)
+
+        # the clock recovery block tracks the symbol clock and resamples as needed.
+        # the output of the block is a stream of soft symbols (float)
+        self.clock_recovery = digital.clock_recovery_mm_ff(self._omega, self._gain_omega,
                                                            self._mu, self._gain_mu,
                                                            self._omega_relative_limit)
 
@@ -225,12 +230,12 @@ class gmsk_demod(gr.hier_block2):
 
         if verbose:
             self._print_verbage()
-         
+
         if log:
             self._setup_logging()
 
-	# Connect & Initialize base class
-	self.connect(self, self.fmdemod, self.clock_recovery, self.slicer, self)
+        # Connect & Initialize base class
+        self.connect(self, self.fmdemod, self.clock_recovery, self.slicer, self)
 
     def samples_per_symbol(self):
         return self._samples_per_symbol
@@ -240,16 +245,16 @@ class gmsk_demod(gr.hier_block2):
         return 1
 
     def _print_verbage(self):
-        print "bits per symbol = %d" % self.bits_per_symbol()
-        print "M&M clock recovery omega = %f" % self._omega
-        print "M&M clock recovery gain mu = %f" % self._gain_mu
-        print "M&M clock recovery mu = %f" % self._mu
-        print "M&M clock recovery omega rel. limit = %f" % self._omega_relative_limit
-        print "frequency error = %f" % self._freq_error
+        print("bits per symbol = %d" % self.bits_per_symbol())
+        print("M&M clock recovery omega = %f" % self._omega)
+        print("M&M clock recovery gain mu = %f" % self._gain_mu)
+        print("M&M clock recovery mu = %f" % self._mu)
+        print("M&M clock recovery omega rel. limit = %f" % self._omega_relative_limit)
+        print("frequency error = %f" % self._freq_error)
 
 
     def _setup_logging(self):
-        print "Demodulation logging turned on."
+        print("Demodulation logging turned on.")
         self.connect(self.fmdemod,
                     blocks.file_sink(gr.sizeof_float, "fmdemod.dat"))
         self.connect(self.clock_recovery,
diff --git a/gr-digital/python/digital/modulation_utils.py b/gr-digital/python/digital/modulation_utils.py
index d499094d05..57d7ccdae8 100644
--- a/gr-digital/python/digital/modulation_utils.py
+++ b/gr-digital/python/digital/modulation_utils.py
@@ -22,6 +22,7 @@
 Miscellaneous utilities for managing mods and demods, as well as other items
 useful in dealing with generalized handling of different modulations and demods.
 """
+from __future__ import unicode_literals
 
 import inspect
 
diff --git a/gr-digital/python/digital/ofdm.py b/gr-digital/python/digital/ofdm.py
index 563b70ad00..db15a4d3f1 100644
--- a/gr-digital/python/digital/ofdm.py
+++ b/gr-digital/python/digital/ofdm.py
@@ -1,33 +1,38 @@
 #!/usr/bin/env python
 #
 # Copyright 2006-2008,2013 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
+
+from __future__ import print_function
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import unicode_literals
 
 import math
 from gnuradio import gr, fft
 from gnuradio import blocks
-import digital_swig as digital
-import ofdm_packet_utils
-from ofdm_receiver import ofdm_receiver
+from . import digital_swig as digital
+from . import ofdm_packet_utils
+from .ofdm_receiver import ofdm_receiver
 import gnuradio.gr.gr_threading as _threading
-import psk, qam
+from . import psk, qam
 
 # /////////////////////////////////////////////////////////////////////////////
 #                   mod/demod with packets as i/o
@@ -37,12 +42,12 @@ class ofdm_mod(gr.hier_block2):
     """
     Modulates an OFDM stream. Based on the options fft_length, occupied_tones, and
     cp_length, this block creates OFDM symbols using a specified modulation option.
-    
+
     Send packets by calling send_pkt
     """
     def __init__(self, options, msgq_limit=2, pad_for_usrp=True):
         """
-	Hierarchical block for sending packets
+        Hierarchical block for sending packets
 
         Packets to be sent are enqueued by calling send_pkt.
         The output is the complex modulated signal at baseband.
@@ -53,9 +58,9 @@ class ofdm_mod(gr.hier_block2):
             pad_for_usrp: If true, packets are padded such that they end up a multiple of 128 samples
         """
 
-	gr.hier_block2.__init__(self, "ofdm_mod",
-				gr.io_signature(0, 0, 0),       # Input signature
-				gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature
+        gr.hier_block2.__init__(self, "ofdm_mod",
+                                gr.io_signature(0, 0, 0),       # Input signature
+                                gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature
 
         self._pad_for_usrp = pad_for_usrp
         self._modulation = options.modulation
@@ -66,7 +71,7 @@ class ofdm_mod(gr.hier_block2):
         win = [] #[1 for i in range(self._fft_length)]
 
         # Use freq domain to get doubled-up known symbol for correlation in time domain
-        zeros_on_left = int(math.ceil((self._fft_length - self._occupied_tones)/2.0))
+        zeros_on_left = int(math.ceil((self._fft_length - self._occupied_tones) / 2.0))
         ksfreq = known_symbols_4512_3[0:self._occupied_tones]
         for i in range(len(ksfreq)):
             if((zeros_on_left + i) & 1):
@@ -74,46 +79,46 @@ class ofdm_mod(gr.hier_block2):
 
         # hard-coded known symbols
         preambles = (ksfreq,)
-                
+
         padded_preambles = list()
         for pre in preambles:
             padded = self._fft_length*[0,]
             padded[zeros_on_left : zeros_on_left + self._occupied_tones] = pre
             padded_preambles.append(padded)
-            
+
         symbol_length = options.fft_length + options.cp_length
-        
+
         mods = {"bpsk": 2, "qpsk": 4, "8psk": 8, "qam8": 8, "qam16": 16, "qam64": 64, "qam256": 256}
         arity = mods[self._modulation]
-        
+
         rot = 1
         if self._modulation == "qpsk":
             rot = (0.707+0.707j)
-            
+
         # FIXME: pass the constellation objects instead of just the points
         if(self._modulation.find("psk") >= 0):
             constel = psk.psk_constellation(arity)
-            rotated_const = map(lambda pt: pt * rot, constel.points())
+            rotated_const = [pt * rot for pt in constel.points()]
         elif(self._modulation.find("qam") >= 0):
             constel = qam.qam_constellation(arity)
-            rotated_const = map(lambda pt: pt * rot, constel.points())
-        #print rotated_const
+            rotated_const = [pt * rot for pt in constel.points()]
+        #print(rotated_const)
         self._pkt_input = digital.ofdm_mapper_bcv(rotated_const,
                                                   msgq_limit,
                                                   options.occupied_tones,
                                                   options.fft_length)
-        
+
         self.preambles = digital.ofdm_insert_preamble(self._fft_length,
                                                       padded_preambles)
         self.ifft = fft.fft_vcc(self._fft_length, False, win, True)
         self.cp_adder = digital.ofdm_cyclic_prefixer(self._fft_length,
                                                      symbol_length)
         self.scale = blocks.multiply_const_cc(1.0 / math.sqrt(self._fft_length))
-        
+
         self.connect((self._pkt_input, 0), (self.preambles, 0))
         self.connect((self._pkt_input, 1), (self.preambles, 1))
         self.connect(self.preambles, self.ifft, self.cp_adder, self.scale, self)
-        
+
         if options.verbose:
             self._print_verbage()
 
@@ -137,12 +142,12 @@ class ofdm_mod(gr.hier_block2):
         if eof:
             msg = gr.message(1) # tell self._pkt_input we're not sending any more packets
         else:
-            # print "original_payload =", string_to_hex_list(payload)
+            # print("original_payload =", string_to_hex_list(payload))
             pkt = ofdm_packet_utils.make_packet(payload, 1, 1,
                                                 self._pad_for_usrp,
                                                 whitening=True)
-            
-            #print "pkt =", string_to_hex_list(pkt)
+
+            #print("pkt =", string_to_hex_list(pkt))
             msg = gr.message_from_string(pkt)
         self._pkt_input.msgq().insert_tail(msg)
 
@@ -164,11 +169,11 @@ class ofdm_mod(gr.hier_block2):
         """
         Prints information about the OFDM modulator
         """
-        print "\nOFDM Modulator:"
-        print "Modulation Type: %s"    % (self._modulation)
-        print "FFT length:      %3d"   % (self._fft_length)
-        print "Occupied Tones:  %3d"   % (self._occupied_tones)
-        print "CP length:       %3d"   % (self._cp_length)
+        print("\nOFDM Modulator:")
+        print("Modulation Type: %s"    % (self._modulation))
+        print("FFT length:      %3d"   % (self._fft_length))
+        print("Occupied Tones:  %3d"   % (self._occupied_tones))
+        print("CP length:       %3d"   % (self._cp_length))
 
 
 class ofdm_demod(gr.hier_block2):
@@ -183,18 +188,18 @@ class ofdm_demod(gr.hier_block2):
 
     def __init__(self, options, callback=None):
         """
-	Hierarchical block for demodulating and deframing packets.
+        Hierarchical block for demodulating and deframing packets.
 
-	The input is the complex modulated signal at baseband.
+        The input is the complex modulated signal at baseband.
         Demodulated packets are sent to the handler.
 
         Args:
             options: pass modulation options from higher layers (fft length, occupied tones, etc.)
             callback: function of two args: ok, payload (ok: bool; payload: string)
-	"""
-	gr.hier_block2.__init__(self, "ofdm_demod",
-				gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
-				gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature
+        """
+        gr.hier_block2.__init__(self, "ofdm_demod",
+                                gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
+                                gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature
 
 
         self._rcvd_pktq = gr.msg_queue()          # holds packets from the PHY
@@ -206,7 +211,7 @@ class ofdm_demod(gr.hier_block2):
         self._snr = options.snr
 
         # Use freq domain to get doubled-up known symbol for correlation in time domain
-        zeros_on_left = int(math.ceil((self._fft_length - self._occupied_tones)/2.0))
+        zeros_on_left = int(math.ceil((self._fft_length - self._occupied_tones) / 2.0))
         ksfreq = known_symbols_4512_3[0:self._occupied_tones]
         for i in range(len(ksfreq)):
             if((zeros_on_left + i) & 1):
@@ -224,7 +229,7 @@ class ofdm_demod(gr.hier_block2):
 
         mods = {"bpsk": 2, "qpsk": 4, "8psk": 8, "qam8": 8, "qam16": 16, "qam64": 64, "qam256": 256}
         arity = mods[self._modulation]
-        
+
         rot = 1
         if self._modulation == "qpsk":
             rot = (0.707+0.707j)
@@ -232,15 +237,15 @@ class ofdm_demod(gr.hier_block2):
         # FIXME: pass the constellation objects instead of just the points
         if(self._modulation.find("psk") >= 0):
             constel = psk.psk_constellation(arity)
-            rotated_const = map(lambda pt: pt * rot, constel.points())
+            rotated_const = [pt * rot for pt in constel.points()]
         elif(self._modulation.find("qam") >= 0):
             constel = qam.qam_constellation(arity)
-            rotated_const = map(lambda pt: pt * rot, constel.points())
-        #print rotated_const
+            rotated_const = [pt * rot for pt in constel.points()]
+        #print(rotated_const)
 
         phgain = 0.25
         frgain = phgain*phgain / 4.0
-        self.ofdm_demod = digital.ofdm_frame_sink(rotated_const, range(arity),
+        self.ofdm_demod = digital.ofdm_frame_sink(rotated_const, list(range(arity)),
                                                   self._rcvd_pktq,
                                                   self._occupied_tones,
                                                   phgain, frgain)
@@ -263,7 +268,7 @@ class ofdm_demod(gr.hier_block2):
 
         if options.verbose:
             self._print_verbage()
-            
+
         self._watcher = _queue_watcher_thread(self._rcvd_pktq, callback)
 
     @staticmethod
@@ -286,11 +291,11 @@ class ofdm_demod(gr.hier_block2):
         """
         Prints information about the OFDM demodulator
         """
-        print "\nOFDM Demodulator:"
-        print "Modulation Type: %s"    % (self._modulation)
-        print "FFT length:      %3d"   % (self._fft_length)
-        print "Occupied Tones:  %3d"   % (self._occupied_tones)
-        print "CP length:       %3d"   % (self._cp_length)
+        print("\nOFDM Demodulator:")
+        print("Modulation Type: %s"    % (self._modulation))
+        print("FFT length:      %3d"   % (self._fft_length))
+        print("Occupied Tones:  %3d"   % (self._occupied_tones))
+        print("CP length:       %3d"   % (self._cp_length))
 
 
 
diff --git a/gr-digital/python/digital/ofdm_packet_utils.py b/gr-digital/python/digital/ofdm_packet_utils.py
index e9ca641c7a..e26308a262 100644
--- a/gr-digital/python/digital/ofdm_packet_utils.py
+++ b/gr-digital/python/digital/ofdm_packet_utils.py
@@ -19,10 +19,15 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import unicode_literals
+
 import struct
 import numpy
 from gnuradio import gru
-import crc
+from . import crc
 
 def conv_packed_binary_string_to_1_0_string(s):
     """
@@ -35,7 +40,7 @@ def conv_packed_binary_string_to_1_0_string(s):
             t = (x >> i) & 0x1
             r.append(t)
 
-    return ''.join(map(lambda x: chr(x + ord('0')), r))
+    return ''.join([chr(x + ord('0')) for x in r])
 
 def conv_1_0_string_to_packed_binary_string(s):
     """
@@ -46,7 +51,7 @@ def conv_1_0_string_to_packed_binary_string(s):
     to get to a multiple of 8.
     """
     if not is_1_0_string(s):
-        raise ValueError, "Input must be a string containing only 0's and 1's"
+        raise ValueError("Input must be a string containing only 0's and 1's")
 
     # pad to multiple of 8
     padded = False
@@ -78,7 +83,7 @@ def is_1_0_string(s):
     return True
 
 def string_to_hex_list(s):
-    return map(lambda x: hex(ord(x)), s)
+    return [hex(ord(x)) for x in s]
 
 
 def whiten(s, o):
@@ -93,7 +98,7 @@ def dewhiten(s, o):
 def make_header(payload_len, whitener_offset=0):
     # Upper nibble is offset, lower 12 bits is len
     val = ((whitener_offset & 0xf) << 12) | (payload_len & 0x0fff)
-    #print "offset =", whitener_offset, " len =", payload_len, " val=", val
+    #print("offset =", whitener_offset, " len =", payload_len, " val=", val)
     return struct.pack('!HH', val, val)
 
 def make_packet(payload, samples_per_symbol, bits_per_symbol,
@@ -113,15 +118,15 @@ def make_packet(payload, samples_per_symbol, bits_per_symbol,
     """
 
     if not whitener_offset >=0 and whitener_offset < 16:
-        raise ValueError, "whitener_offset must be between 0 and 15, inclusive (%i)" % (whitener_offset,)
+        raise ValueError("whitener_offset must be between 0 and 15, inclusive (%i)" % (whitener_offset,))
 
     payload_with_crc = crc.gen_and_append_crc32(payload)
-    #print "outbound crc =", string_to_hex_list(payload_with_crc[-4:])
+    #print("outbound crc =", string_to_hex_list(payload_with_crc[-4:]))
 
     L = len(payload_with_crc)
     MAXLEN = len(random_mask_tuple)
     if L > MAXLEN:
-        raise ValueError, "len(payload) must be in [0, %d]" % (MAXLEN,)
+        raise ValueError("len(payload) must be in [0, %d]" % (MAXLEN,))
 
     pkt_hd = make_header(L, whitener_offset)
     pkt_dt = ''.join((payload_with_crc, '\x55'))
@@ -136,7 +141,7 @@ def make_packet(payload, samples_per_symbol, bits_per_symbol,
     else:
         pkt = pkt_hd + pkt_dt
 
-    #print "make_packet: len(pkt) =", len(pkt)
+    #print("make_packet: len(pkt) =", len(pkt))
 
     return pkt
 
@@ -157,7 +162,7 @@ def _npadding_bytes(pkt_byte_len, samples_per_symbol, bits_per_symbol):
         number of bytes of padding to append.
     """
     modulus = 128
-    byte_modulus = gru.lcm(modulus/8, samples_per_symbol) * bits_per_symbol / samples_per_symbol
+    byte_modulus = gru.lcm(modulus / 8, samples_per_symbol) * bits_per_symbol / samples_per_symbol
     r = pkt_byte_len % byte_modulus
     if r == 0:
         return 0
@@ -182,9 +187,9 @@ def unmake_packet(whitened_payload_with_crc, whitener_offset=0, dewhitening=1):
     ok, payload = crc.check_crc32(payload_with_crc)
 
     if 0:
-        print "payload_with_crc =", string_to_hex_list(payload_with_crc)
-        print "ok = %r, len(payload) = %d" % (ok, len(payload))
-        print "payload =", string_to_hex_list(payload)
+        print("payload_with_crc =", string_to_hex_list(payload_with_crc))
+        print("ok = %r, len(payload) = %d" % (ok, len(payload)))
+        print("payload =", string_to_hex_list(payload))
 
     return ok, payload
 
diff --git a/gr-digital/python/digital/ofdm_receiver.py b/gr-digital/python/digital/ofdm_receiver.py
index 4b7836b43c..d23b338b78 100644
--- a/gr-digital/python/digital/ofdm_receiver.py
+++ b/gr-digital/python/digital/ofdm_receiver.py
@@ -1,24 +1,28 @@
 #!/usr/bin/env python
 #
 # Copyright 2006-2008 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
+
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import unicode_literals
 
 import math
 from numpy import fft
@@ -28,16 +32,12 @@ from gnuradio import analog
 from gnuradio import blocks
 from gnuradio import filter
 
-import digital_swig as digital
-from ofdm_sync_pn import ofdm_sync_pn
-from ofdm_sync_fixed import ofdm_sync_fixed
-from ofdm_sync_pnac import ofdm_sync_pnac
-from ofdm_sync_ml import ofdm_sync_ml
+from . import digital_swig as digital
+from .ofdm_sync_pn import ofdm_sync_pn
+from .ofdm_sync_fixed import ofdm_sync_fixed
+from .ofdm_sync_pnac import ofdm_sync_pnac
+from .ofdm_sync_ml import ofdm_sync_ml
 
-try:
-    from gnuradio import filter
-except ImportError:
-    import filter_swig as filter
 
 class ofdm_receiver(gr.hier_block2):
     """
@@ -51,9 +51,9 @@ class ofdm_receiver(gr.hier_block2):
 
     def __init__(self, fft_length, cp_length, occupied_tones, snr, ks, logging=False):
         """
-	Hierarchical block for receiving OFDM symbols.
+        Hierarchical block for receiving OFDM symbols.
 
-	The input is the complex modulated signal at baseband.
+        The input is the complex modulated signal at baseband.
         Synchronized packets are sent back to the demodulator.
 
         Args:
@@ -63,13 +63,13 @@ class ofdm_receiver(gr.hier_block2):
             snr: estimated signal to noise ratio used to guide cyclic prefix synchronizer (float)
             ks: known symbols used as preambles to each packet (list of lists)
             logging: turn file logging on or off (bool)
-	"""
+        """
 
-	gr.hier_block2.__init__(self, "ofdm_receiver",
-				gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
+        gr.hier_block2.__init__(self, "ofdm_receiver",
+                                gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
                                 gr.io_signature2(2, 2, gr.sizeof_gr_complex*occupied_tones, gr.sizeof_char)) # Output signature
-        
-        bw = (float(occupied_tones) / float(fft_length)) / 2.0
+
+        bw = (old_div(float(occupied_tones) / float(fft_length)), 2.0)
         tb = bw*0.08
         chan_coeffs = filter.firdes.low_pass (1.0,                     # gain
                                               1.0,                     # sampling rate
@@ -77,13 +77,13 @@ class ofdm_receiver(gr.hier_block2):
                                               tb,                      # width of trans. band
                                               filter.firdes.WIN_HAMMING)   # filter type
         self.chan_filt = filter.fft_filter_ccc(1, chan_coeffs)
-        
+
         win = [1 for i in range(fft_length)]
 
-        zeros_on_left = int(math.ceil((fft_length - occupied_tones)/2.0))
+        zeros_on_left = int(math.ceil((fft_length - occupied_tones) / 2.0))
         ks0 = fft_length*[0,]
         ks0[zeros_on_left : zeros_on_left + occupied_tones] = ks[0]
-        
+
         ks0 = fft.ifftshift(ks0)
         ks0time = fft.ifft(ks0)
         # ADD SCALING FACTOR
@@ -91,19 +91,19 @@ class ofdm_receiver(gr.hier_block2):
 
         SYNC = "pn"
         if SYNC == "ml":
-            nco_sensitivity = -1.0/fft_length   # correct for fine frequency
+            nco_sensitivity = -1.0 / fft_length   # correct for fine frequency
             self.ofdm_sync = ofdm_sync_ml(fft_length,
                                           cp_length,
                                           snr,
                                           ks0time,
                                           logging)
         elif SYNC == "pn":
-            nco_sensitivity = -2.0/fft_length   # correct for fine frequency
+            nco_sensitivity = -2.0 / fft_length   # correct for fine frequency
             self.ofdm_sync = ofdm_sync_pn(fft_length,
                                           cp_length,
                                           logging)
         elif SYNC == "pnac":
-            nco_sensitivity = -2.0/fft_length   # correct for fine frequency
+            nco_sensitivity = -2.0 / fft_length   # correct for fine frequency
             self.ofdm_sync = ofdm_sync_pnac(fft_length,
                                             cp_length,
                                             ks0time,
@@ -111,10 +111,10 @@ class ofdm_receiver(gr.hier_block2):
         # for testing only; do not user over the air
         # remove filter and filter delay for this
         elif SYNC == "fixed":
-            self.chan_filt = blocks.multiply_const_cc(1.0) 
+            self.chan_filt = blocks.multiply_const_cc(1.0)
             nsymbols = 18      # enter the number of symbols per packet
             freq_offset = 0.0  # if you use a frequency offset, enter it here
-            nco_sensitivity = -2.0/fft_length   # correct for fine frequency
+            nco_sensitivity = -2.0 / fft_length   # correct for fine frequency
             self.ofdm_sync = ofdm_sync_fixed(fft_length,
                                              cp_length,
                                              nsymbols,
diff --git a/gr-digital/python/digital/ofdm_sync_fixed.py b/gr-digital/python/digital/ofdm_sync_fixed.py
index 9cbd59b943..891ba17d07 100644
--- a/gr-digital/python/digital/ofdm_sync_fixed.py
+++ b/gr-digital/python/digital/ofdm_sync_fixed.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 # 
 
+from __future__ import unicode_literals
 import math
 from gnuradio import gr
 from gnuradio import blocks
diff --git a/gr-digital/python/digital/ofdm_sync_ml.py b/gr-digital/python/digital/ofdm_sync_ml.py
index 3afd647098..6a03c21639 100644
--- a/gr-digital/python/digital/ofdm_sync_ml.py
+++ b/gr-digital/python/digital/ofdm_sync_ml.py
@@ -1,37 +1,31 @@
 #!/usr/bin/env python
 #
 # Copyright 2007,2008 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
+
+from __future__ import division
+from __future__ import unicode_literals
 
-import math
-from gnuradio import gr
 
-try:
-    from gnuradio import filter
-except ImportError:
-    import filter_swig as filter
+from gnuradio import gr, blocks, filter
 
-try:
-    from gnuradio import blocks
-except ImportError:
-    import blocks_swig as blocks
 
 class ofdm_sync_ml(gr.hier_block2):
     def __init__(self, fft_length, cp_length, snr, kstime, logging):
@@ -41,13 +35,13 @@ class ofdm_sync_ml(gr.hier_block2):
         Signal Processing, vol. 45, no. 7, pp. 1800-1805, 1997.
         '''
 
-	gr.hier_block2.__init__(self, "ofdm_sync_ml",
-				gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
+        gr.hier_block2.__init__(self, "ofdm_sync_ml",
+                                gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
                                 gr.io_signature2(2, 2, gr.sizeof_float, gr.sizeof_char)) # Output signature
 
         self.input = blocks.add_const_cc(0)
 
-        SNR = 10.0**(snr/10.0)
+        SNR = 10.0**(snr / 10.0)
         rho = SNR / (SNR + 1.0)
         symbol_length = fft_length + cp_length
 
@@ -66,15 +60,15 @@ class ofdm_sync_ml(gr.hier_block2):
         self.magsqrd2 = blocks.complex_to_mag_squared()
         self.adder = blocks.add_ff()
 
-        moving_sum_taps = [rho/2 for i in range(cp_length)]
+        moving_sum_taps = [rho / 2 for i in range(cp_length)]
         self.moving_sum_filter = filter.fir_filter_fff(1,moving_sum_taps)
-        
+
         self.connect(self.input,self.magsqrd1)
         self.connect(self.delay,self.magsqrd2)
         self.connect(self.magsqrd1,(self.adder,0))
         self.connect(self.magsqrd2,(self.adder,1))
         self.connect(self.adder,self.moving_sum_filter)
-        
+
 
         # Correlation from ML Sync
         self.conjg = blocks.conjugate_cc();
@@ -82,7 +76,7 @@ class ofdm_sync_ml(gr.hier_block2):
 
         movingsum2_taps = [1.0 for i in range(cp_length)]
         self.movingsum2 = filter.fir_filter_ccf(1,movingsum2_taps)
-        
+
         # Correlator data handler
         self.c2mag = blocks.complex_to_mag()
         self.angle = blocks.complex_to_arg()
@@ -104,7 +98,7 @@ class ofdm_sync_ml(gr.hier_block2):
         # use the sync loop values to set the sampler and the NCO
         #     self.diff = theta
         #     self.angle = epsilon
-                          
+
         self.connect(self.diff, self.pk_detect)
 
         # The DPLL corrects for timing differences between CP correlations
@@ -115,7 +109,7 @@ class ofdm_sync_ml(gr.hier_block2):
             self.connect(self.dpll, (self.sample_and_hold,1))
         else:
             self.connect(self.pk_detect, (self.sample_and_hold,1))
-            
+
         self.connect(self.angle, (self.sample_and_hold,0))
 
         ################################
@@ -130,7 +124,7 @@ class ofdm_sync_ml(gr.hier_block2):
         self.div = blocks.divide_ff()
 
         # The output signature of the correlation has a few spikes because the rest of the
-        # system uses the repeated preamble symbol. It needs to work that generically if 
+        # system uses the repeated preamble symbol. It needs to work that generically if
         # anyone wants to use this against a WiMAX-like signal since it, too, repeats.
         # The output theta of the correlator above is multiplied with this correlation to
         # identify the proper peak and remove other products in this cross-correlation
@@ -139,17 +133,17 @@ class ofdm_sync_ml(gr.hier_block2):
         self.f2b = blocks.float_to_char()
         self.b2f = blocks.char_to_float()
         self.mul = blocks.multiply_ff()
-        
+
         # Normalize the power of the corr output by the energy. This is not really needed
         # and could be removed for performance, but it makes for a cleaner signal.
         # if this is removed, the threshold value needs adjustment.
         self.connect(self.input, self.kscorr, self.corrmag, (self.div,0))
         self.connect(self.moving_sum_filter, (self.div,1))
-        
+
         self.connect(self.div, (self.mul,0))
         self.connect(self.pk_detect, self.b2f, (self.mul,1))
         self.connect(self.mul, self.slice)
-        
+
         # Set output signals
         #    Output 0: fine frequency correction value
         #    Output 1: timing signal
diff --git a/gr-digital/python/digital/ofdm_sync_pn.py b/gr-digital/python/digital/ofdm_sync_pn.py
index 8bf7ed782a..bdc7fd6438 100644
--- a/gr-digital/python/digital/ofdm_sync_pn.py
+++ b/gr-digital/python/digital/ofdm_sync_pn.py
@@ -1,38 +1,31 @@
 #!/usr/bin/env python
 #
 # Copyright 2007,2008 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
+
+from __future__ import division
+from __future__ import unicode_literals
 
-import math
-from numpy import fft
-from gnuradio import gr
 
-try:
-    from gnuradio import filter
-except ImportError:
-    import filter_swig as filter
+from gnuradio import gr, blocks, filter
 
-try:
-    from gnuradio import blocks
-except ImportError:
-    import blocks_swig as blocks
 
 class ofdm_sync_pn(gr.hier_block2):
     def __init__(self, fft_length, cp_length, logging=False):
@@ -52,7 +45,7 @@ class ofdm_sync_pn(gr.hier_block2):
         # PN Sync
 
         # Create a delay line
-        self.delay = blocks.delay(gr.sizeof_gr_complex, fft_length/2)
+        self.delay = blocks.delay(gr.sizeof_gr_complex, fft_length / 2)
 
         # Correlation from ML Sync
         self.conjg = blocks.conjugate_cc();
@@ -98,10 +91,10 @@ class ofdm_sync_pn(gr.hier_block2):
         self.connect(self.c2mag, (self.normalize,0))
 
         # Create a moving sum filter for the corr output
-        matched_filter_taps = [1.0/cp_length for i in range(cp_length)]
+        matched_filter_taps = [1.0 / cp_length for i in range(cp_length)]
         self.matched_filter = filter.fir_filter_fff(1,matched_filter_taps)
         self.connect(self.normalize, self.matched_filter)
-        
+
         self.connect(self.matched_filter, self.sub1, self.pk_detect)
         #self.connect(self.matched_filter, self.pk_detect)
         self.connect(self.pk_detect, (self.sample_and_hold,1))
diff --git a/gr-digital/python/digital/ofdm_sync_pnac.py b/gr-digital/python/digital/ofdm_sync_pnac.py
index 55a6c21f4c..4d756f7ff7 100644
--- a/gr-digital/python/digital/ofdm_sync_pnac.py
+++ b/gr-digital/python/digital/ofdm_sync_pnac.py
@@ -1,38 +1,31 @@
 #!/usr/bin/env python
 #
 # Copyright 2007 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
+
+from __future__ import division
+from __future__ import unicode_literals
 
-import math
-from numpy import fft
-from gnuradio import gr
 
-try:
-    from gnuradio import filter
-except ImportError:
-    import filter_swig as filter
+from gnuradio import gr, blocks, filter
 
-try:
-    from gnuradio import blocks
-except ImportError:
-    import blocks_swig as blocks
 
 class ofdm_sync_pnac(gr.hier_block2):
     def __init__(self, fft_length, cp_length, kstime, logging=False):
@@ -69,9 +62,9 @@ class ofdm_sync_pnac(gr.hier_block2):
         kstime = [k.conjugate() for k in kstime[0:fft_length//2]]
         kstime.reverse()
         self.crosscorr_filter = filter.fir_filter_ccc(1, kstime)
-        
+
         # Create a delay line
-        self.delay = blocks.delay(gr.sizeof_gr_complex, fft_length/2)
+        self.delay = blocks.delay(gr.sizeof_gr_complex, fft_length / 2)
 
         # Correlation from ML Sync
         self.conjg = blocks.conjugate_cc();
@@ -105,7 +98,7 @@ class ofdm_sync_pnac(gr.hier_block2):
         self.connect(self.corr, self.c2mag)
         self.connect(self.corr, self.angle)
         self.connect(self.angle, (self.sample_and_hold,0))
-        
+
         # Get the power of the input signal to compare against the correlation
         self.connect(self.crosscorr_filter, self.mag, self.power)
 
diff --git a/gr-digital/python/digital/ofdm_txrx.py b/gr-digital/python/digital/ofdm_txrx.py
index 6f96fc6287..f90a579385 100644
--- a/gr-digital/python/digital/ofdm_txrx.py
+++ b/gr-digital/python/digital/ofdm_txrx.py
@@ -25,24 +25,21 @@ For simple configurations, no need to connect all the relevant OFDM blocks
 to form an OFDM Tx/Rx--simply use these.
 """
 
+from __future__ import print_function
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import unicode_literals
+
 # Reminder: All frequency-domain stuff is in shifted form, i.e. DC carrier
 # in the middle!
 
+
 import numpy
-from gnuradio import gr
-import digital_swig as digital
-from utils import tagged_streams
 
-try:
-    # This will work when feature #505 is added.
-    from gnuradio import fft
-    from gnuradio import blocks
-    from gnuradio import analog
-except ImportError:
-    # Until then this will work.
-    import fft_swig as fft
-    import blocks_swig as blocks
-    import analog_swig as analog
+from gnuradio import gr, blocks, fft, analog
+
+from . import digital_swig as digital
+
 
 _def_fft_len = 64
 _def_cp_len = 16
@@ -50,7 +47,7 @@ _def_frame_length_tag_key = "frame_length"
 _def_packet_length_tag_key = "packet_length"
 _def_packet_num_tag_key = "packet_num"
 # Data and pilot carriers are same as in 802.11a
-_def_occupied_carriers = (range(-26, -21) + range(-20, -7) + range(-6, 0) + range(1, 7) + range(8, 21) + range(22, 27),)
+_def_occupied_carriers = (list(range(-26, -21)) + list(range(-20, -7)) + list(range(-6, 0)) + list(range(1, 7)) + list(range(8, 21)) + list(range(22, 27)),)
 _def_pilot_carriers=((-21, -7, 7, 21,),)
 _pilot_sym_scramble_seq = (
         1,1,1,1, -1,-1,-1,1, -1,-1,-1,-1, 1,1,-1,1, -1,-1,1,1, -1,1,1,-1, 1,1,1,1, 1,1,-1,1,
@@ -112,7 +109,7 @@ def _get_constellation(bps):
     try:
         return constellation[bps]
     except KeyError:
-        print 'Modulation not supported.'
+        print('Modulation not supported.')
         exit(1)
 
 class ofdm_tx(gr.hier_block2):
diff --git a/gr-digital/python/digital/packet_utils.py b/gr-digital/python/digital/packet_utils.py
index de7e2988da..04d27125fa 100644
--- a/gr-digital/python/digital/packet_utils.py
+++ b/gr-digital/python/digital/packet_utils.py
@@ -19,10 +19,18 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import absolute_import
+from __future__ import division
+
 import struct
+
 import numpy
+import six
+
 from gnuradio import gru
-import crc
+from . import crc
+
 
 def conv_packed_binary_string_to_1_0_string(s):
     """
@@ -35,7 +43,7 @@ def conv_packed_binary_string_to_1_0_string(s):
             t = (x >> i) & 0x1
             r.append(t)
 
-    return ''.join(map(lambda x: chr(x + ord('0')), r))
+    return ''.join([chr(x + ord('0')) for x in r])
 
 def conv_1_0_string_to_packed_binary_string(s):
     """
@@ -46,7 +54,7 @@ def conv_1_0_string_to_packed_binary_string(s):
     to get to a multiple of 8.
     """
     if not is_1_0_string(s):
-        raise ValueError, "Input must be a string containing only 0's and 1's"
+        raise ValueError("Input must be a string containing only 0's and 1's")
 
     # pad to multiple of 8
     padded = False
@@ -83,7 +91,7 @@ def is_1_0_string(s):
     return True
 
 def string_to_hex_list(s):
-    return map(lambda x: hex(ord(x)), s)
+    return [hex(ord(x)) for x in s]
 
 
 def whiten(s, o):
@@ -98,8 +106,8 @@ def dewhiten(s, o):
 def make_header(payload_len, whitener_offset=0):
     # Upper nibble is offset, lower 12 bits is len
     val = ((whitener_offset & 0xf) << 12) | (payload_len & 0x0fff)
-    #print "offset =", whitener_offset, " len =", payload_len, " val=", val
-    return struct.pack('!HH', val, val)
+    #print("offset =", whitener_offset, " len =", payload_len, " val=", val)
+    return struct.pack(b'!HH', val, val)
 
 def make_packet(payload, samples_per_symbol, bits_per_symbol,
                 preamble=default_preamble, access_code=default_access_code,
@@ -123,13 +131,13 @@ def make_packet(payload, samples_per_symbol, bits_per_symbol,
     and finally CRC-32.
     """
     if not is_1_0_string(preamble):
-        raise ValueError, "preamble must be a string containing only 0's and 1's (%r)" % (preamble,)
+        raise ValueError("preamble must be a string containing only 0's and 1's (%r)" % (preamble,))
 
     if not is_1_0_string(access_code):
-        raise ValueError, "access_code must be a string containing only 0's and 1's (%r)" % (access_code,)
+        raise ValueError("access_code must be a string containing only 0's and 1's (%r)" % (access_code,))
 
     if not whitener_offset >=0 and whitener_offset < 16:
-        raise ValueError, "whitener_offset must be between 0 and 15, inclusive (%i)" % (whitener_offset,)
+        raise ValueError("whitener_offset must be between 0 and 15, inclusive (%i)" % (whitener_offset,))
 
     (packed_access_code, padded) = conv_1_0_string_to_packed_binary_string(access_code)
     (packed_preamble, ignore) = conv_1_0_string_to_packed_binary_string(preamble)
@@ -138,24 +146,24 @@ def make_packet(payload, samples_per_symbol, bits_per_symbol,
         payload_with_crc = crc.gen_and_append_crc32(payload)
     else:
         payload_with_crc = payload
-    #print "outbound crc =", string_to_hex_list(payload_with_crc[-4:])
+    #print("outbound crc =", string_to_hex_list(payload_with_crc[-4:]))
 
     L = len(payload_with_crc)
     MAXLEN = len(random_mask_tuple)
     if L > MAXLEN:
-        raise ValueError, "len(payload) must be in [0, %d]" % (MAXLEN,)
+        raise ValueError("len(payload) must be in [0, %d]" % (MAXLEN,))
 
     if whitening:
-        pkt = ''.join((packed_preamble, packed_access_code, make_header(L, whitener_offset),
-                       whiten(payload_with_crc, whitener_offset), '\x55'))
+        pkt = b''.join((packed_preamble, packed_access_code, make_header(L, whitener_offset),
+                       whiten(payload_with_crc, whitener_offset), b'\x55'))
     else:
-        pkt = ''.join((packed_preamble, packed_access_code, make_header(L, whitener_offset),
-                       (payload_with_crc), '\x55'))
+        pkt = b''.join((packed_preamble, packed_access_code, make_header(L, whitener_offset),
+                       (payload_with_crc), b'\x55'))
 
     if pad_for_usrp:
-        pkt = pkt + (_npadding_bytes(len(pkt), int(samples_per_symbol), bits_per_symbol) * '\x55')
+        pkt = pkt + (_npadding_bytes(len(pkt), int(samples_per_symbol), bits_per_symbol) * b'\x55')
 
-    #print "make_packet: len(pkt) =", len(pkt)
+    #print("make_packet: len(pkt) =", len(pkt))
     return pkt
 
 def _npadding_bytes(pkt_byte_len, samples_per_symbol, bits_per_symbol):
@@ -175,7 +183,7 @@ def _npadding_bytes(pkt_byte_len, samples_per_symbol, bits_per_symbol):
         number of bytes of padding to append.
     """
     modulus = 128
-    byte_modulus = gru.lcm(modulus/8, samples_per_symbol) * bits_per_symbol / samples_per_symbol
+    byte_modulus = gru.lcm(modulus // 8, samples_per_symbol) * bits_per_symbol // samples_per_symbol
     r = pkt_byte_len % byte_modulus
     if r == 0:
         return 0
@@ -206,10 +214,10 @@ def unmake_packet(whitened_payload_with_crc, whitener_offset=0,
         ok = True
 
     if 0:
-        print "payload_with_crc =", string_to_hex_list(payload_with_crc)
-        print "ok = %r, len(payload) = %d" % (ok, len(payload))
-        print "payload =", string_to_hex_list(payload)
-        print ""
+        print("payload_with_crc =", string_to_hex_list(payload_with_crc))
+        print("ok = %r, len(payload) = %d" % (ok, len(payload)))
+        print("payload =", string_to_hex_list(payload))
+        print("")
 
     return ok, payload
 
diff --git a/gr-digital/python/digital/pkt.py b/gr-digital/python/digital/pkt.py
index fbdcaa3a66..585a2915c0 100644
--- a/gr-digital/python/digital/pkt.py
+++ b/gr-digital/python/digital/pkt.py
@@ -1,34 +1,34 @@
 #
 # Copyright 2005, 2006, 2007 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
+
+from __future__ import print_function
+from __future__ import absolute_import
+from __future__ import unicode_literals
 
 from math import pi
-from gnuradio import gr
+from gnuradio import gr, blocks
 import gnuradio.gr.gr_threading as _threading
-import packet_utils
-import digital_swig as digital
+from . import packet_utils
+from . import digital_swig as digital
 
-try:
-    from gnuradio import blocks
-except ImportError:
-    import blocks_swig as blocks
 
 # /////////////////////////////////////////////////////////////////////////////
 #                   mod/demod with packets as i/o
@@ -43,7 +43,7 @@ class mod_pkts(gr.hier_block2):
     def __init__(self, modulator, preamble=None, access_code=None, msgq_limit=2,
                  pad_for_usrp=True, use_whitener_offset=False, modulate=True):
         """
-	Hierarchical block for sending packets
+        Hierarchical block for sending packets
 
         Packets to be sent are enqueued by calling send_pkt.
         The output is the complex modulated signal at baseband.
@@ -54,29 +54,29 @@ class mod_pkts(gr.hier_block2):
             msgq_limit: maximum number of messages in message queue (int)
             pad_for_usrp: If true, packets are padded such that they end up a multiple of 128 samples
             use_whitener_offset: If true, start of whitener XOR string is incremented each packet
-        
+
         See gmsk_mod for remaining parameters
         """
 
-	gr.hier_block2.__init__(self, "mod_pkts",
-				gr.io_signature(0, 0, 0),                    # Input signature
-				gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature
+        gr.hier_block2.__init__(self, "mod_pkts",
+                                gr.io_signature(0, 0, 0),                    # Input signature
+                                gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature
 
         self._modulator = modulator
         self._pad_for_usrp = pad_for_usrp
         self._use_whitener_offset = use_whitener_offset
         self._whitener_offset = 0
-        
+
         if access_code is None:
             access_code = packet_utils.default_access_code
         if not packet_utils.is_1_0_string(access_code):
-            raise ValueError, "Invalid access_code %r. Must be string of 1's and 0's" % (access_code,)
+            raise ValueError("Invalid access_code %r. Must be string of 1's and 0's" % (access_code,))
         self._access_code = access_code
-        
+
         if preamble is None:
             preamble = packet_utils.default_preamble
         if not packet_utils.is_1_0_string(preamble):
-            raise ValueError, "Invalid preamble %r. Must be string of 1's and 0's" % (preamble,)
+            raise ValueError("Invalid preamble %r. Must be string of 1's and 0's" % (preamble,))
         self._preamble = preamble
 
         # accepts messages from the outside world
@@ -93,7 +93,7 @@ class mod_pkts(gr.hier_block2):
         if eof:
             msg = gr.message(1) # tell self._pkt_input we're not sending any more packets
         else:
-            # print "original_payload =", string_to_hex_list(payload)
+            # print("original_payload =", string_to_hex_list(payload))
             pkt = packet_utils.make_packet(payload,
                                            self._modulator.samples_per_symbol(),
                                            self._modulator.bits_per_symbol(),
@@ -101,11 +101,11 @@ class mod_pkts(gr.hier_block2):
                                            self._access_code,
                                            self._pad_for_usrp,
                                            self._whitener_offset)
-            #print "pkt =", string_to_hex_list(pkt)
+            #print("pkt =", string_to_hex_list(pkt))
             msg = gr.message_from_string(pkt)
             if self._use_whitener_offset is True:
                 self._whitener_offset = (self._whitener_offset + 1) % 16
-                
+
         self._pkt_input.msgq().insert_tail(msg)
 
 
@@ -120,9 +120,9 @@ class demod_pkts(gr.hier_block2):
 
     def __init__(self, demodulator, access_code=None, callback=None, threshold=-1):
         """
-	Hierarchical block for demodulating and deframing packets.
+        Hierarchical block for demodulating and deframing packets.
 
-	The input is the complex modulated signal at baseband.
+        The input is the complex modulated signal at baseband.
         Demodulated packets are sent to the handler.
 
         Args:
@@ -130,17 +130,17 @@ class demod_pkts(gr.hier_block2):
             access_code: AKA sync vector (string of 1's and 0's)
             callback: function of two args: ok, payload (ok: bool; payload: string)
             threshold: detect access_code with up to threshold bits wrong (-1 -> use default) (int)
-	"""
+        """
 
-	gr.hier_block2.__init__(self, "demod_pkts",
-				gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
-				gr.io_signature(0, 0, 0))                    # Output signature
+        gr.hier_block2.__init__(self, "demod_pkts",
+                                gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
+                                gr.io_signature(0, 0, 0))                    # Output signature
 
         self._demodulator = demodulator
         if access_code is None:
             access_code = packet_utils.default_access_code
         if not packet_utils.is_1_0_string(access_code):
-            raise ValueError, "Invalid access_code %r. Must be string of 1's and 0's" % (access_code,)
+            raise ValueError("Invalid access_code %r. Must be string of 1's and 0's" % (access_code,))
         self._access_code = access_code
 
         if threshold == -1:
@@ -151,7 +151,7 @@ class demod_pkts(gr.hier_block2):
 
         self.framer_sink = digital.framer_sink_1(self._rcvd_pktq)
         self.connect(self, self._demodulator, self.correlator, self.framer_sink)
-        
+
         self._watcher = _queue_watcher_thread(self._rcvd_pktq, callback)
 
 
diff --git a/gr-digital/python/digital/psk.py b/gr-digital/python/digital/psk.py
index 0e0c65ea2b..5518ba55f3 100644
--- a/gr-digital/python/digital/psk.py
+++ b/gr-digital/python/digital/psk.py
@@ -1,36 +1,40 @@
 #
 # Copyright 2005,2006,2011 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
 
 """
 PSK modulation and demodulation.
 """
 
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import unicode_literals
+
 from math import pi, log
 from cmath import exp
 
-import digital_swig
-import modulation_utils
-from utils import mod_codes, gray_code
-from generic_mod_demod import generic_mod, generic_demod
-from generic_mod_demod import shared_mod_args, shared_demod_args
+from . import digital_swig
+from . import modulation_utils
+from .utils import mod_codes, gray_code
+from .generic_mod_demod import generic_mod, generic_demod
+from .generic_mod_demod import shared_mod_args, shared_demod_args
 
 # Default number of points in constellation.
 _def_constellation_points = 4
@@ -56,7 +60,7 @@ def create_encodings(mod_code, arity, differential):
     else:
         raise ValueError('That modulation code is not implemented for this constellation.')
     return (pre_diff_code, post_diff_code)
-    
+
 # /////////////////////////////////////////////////////////////////////////////
 #                           PSK constellation
 # /////////////////////////////////////////////////////////////////////////////
@@ -68,7 +72,7 @@ def psk_constellation(m=_def_constellation_points, mod_code=_def_mod_code,
     """
     k = log(m) / log(2.0)
     if (k != int(k)):
-        raise StandardError('Number of constellation points must be a power of two.')
+        raise Exception('Number of constellation points must be a power of two.')
     points = [exp(2*pi*(0+1j)*i/m) for i in range(0,m)]
     pre_diff_code, post_diff_code = create_encodings(mod_code, m, differential)
     if post_diff_code is not None:
@@ -84,7 +88,7 @@ def psk_constellation(m=_def_constellation_points, mod_code=_def_mod_code,
 class psk_mod(generic_mod):
     """
     Hierarchical block for RRC-filtered PSK modulation.
-    
+
     The input is a byte stream (unsigned char), treated as a series of packed
     symbols. Symbols are grouped from MSB to LSB.
 
@@ -118,7 +122,7 @@ class psk_demod(generic_demod):
 
     """
     Hierarchical block for RRC-filtered PSK modulation.
-    
+
     The input is a complex modulated signal at baseband.
 
     The output is a stream of bytes, each representing a recovered bit.
diff --git a/gr-digital/python/digital/psk_constellations.py b/gr-digital/python/digital/psk_constellations.py
old mode 100755
new mode 100644
index d2db4e848b..ce8f45d47b
--- a/gr-digital/python/digital/psk_constellations.py
+++ b/gr-digital/python/digital/psk_constellations.py
@@ -20,8 +20,10 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import absolute_import
+from __future__ import unicode_literals
 import numpy
-from constellation_map_generator import *
+from .constellation_map_generator import *
 
 '''
 Note on the naming scheme. Each constellation is named using a prefix
diff --git a/gr-digital/python/digital/qa_binary_slicer_fb.py b/gr-digital/python/digital/qa_binary_slicer_fb.py
old mode 100755
new mode 100644
index 93e12dbb8d..0b2879380b
--- a/gr-digital/python/digital/qa_binary_slicer_fb.py
+++ b/gr-digital/python/digital/qa_binary_slicer_fb.py
@@ -1,24 +1,25 @@
 #!/usr/bin/env python
 #
 # Copyright 2011-2013 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
+
 
 import random
 
@@ -33,8 +34,8 @@ class test_binary_slicer_fb(gr_unittest.TestCase):
         self.tb = None
 
     def test_binary_slicer_fb(self):
-	expected_result = ( 0, 1,  0,  0, 1, 1,  0,  0,  0, 1, 1, 1,  0, 1, 1, 1, 1)
-  	src_data =        (-1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1)
+        expected_result = ( 0, 1,  0,  0, 1, 1,  0,  0,  0, 1, 1, 1,  0, 1, 1, 1, 1)
+        src_data =        (-1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1)
         src_data = [s + (1 - random.random()) for s in src_data] # add some noise
         src = blocks.vector_source_f(src_data)
         op = digital.binary_slicer_fb()
@@ -45,11 +46,10 @@ class test_binary_slicer_fb(gr_unittest.TestCase):
         self.tb.run()               # run the graph and wait for it to finish
 
         actual_result = dst.data()  # fetch the contents of the sink
-	#print "actual result", actual_result
-	#print "expected result", expected_result
+        #print "actual result", actual_result
+        #print "expected result", expected_result
         self.assertFloatTuplesAlmostEqual(expected_result, actual_result)
 
 
 if __name__ == '__main__':
     gr_unittest.run(test_binary_slicer_fb, "test_binary_slicer_fb.xml")
-
diff --git a/gr-digital/python/digital/qa_burst_shaper.py b/gr-digital/python/digital/qa_burst_shaper.py
old mode 100755
new mode 100644
index 36c6d06479..949a5f573d
--- a/gr-digital/python/digital/qa_burst_shaper.py
+++ b/gr-digital/python/digital/qa_burst_shaper.py
@@ -21,6 +21,7 @@
 # Boston, MA 02110-1301, USA.
 # 
 
+
 from gnuradio import gr, gr_unittest
 from gnuradio import blocks, digital
 import pmt
@@ -121,7 +122,7 @@ class qa_burst_shaper (gr_unittest.TestCase):
         window = np.concatenate((-2.0*np.ones(5), -4.0*np.ones(5)))
         tags = (make_length_tag(0, length),)
         phasing = np.zeros(5)
-        for i in xrange(5):
+        for i in range(5):
             phasing[i] = ((-1.0)**i)
         expected = np.concatenate((np.zeros(prepad), phasing*window[0:5],
                                    np.ones(length), phasing*window[5:10],
@@ -154,7 +155,7 @@ class qa_burst_shaper (gr_unittest.TestCase):
                                  -4.0*np.ones(5, dtype=complex)))
         tags = (make_length_tag(0, length),)
         phasing = np.zeros(5, dtype=complex)
-        for i in xrange(5):
+        for i in range(5):
             phasing[i] = complex((-1.0)**i)
         expected = np.concatenate((np.zeros(prepad, dtype=complex),
                                    phasing*window[0:5],
@@ -264,7 +265,7 @@ class qa_burst_shaper (gr_unittest.TestCase):
 
         # checks
         self.assertFloatTuplesAlmostEqual(sink.data(), expected, 6)
-        for i in xrange(len(etags)):
+        for i in range(len(etags)):
             self.assertTrue(compare_tags(sink.tags()[i], etags[i]))
 
     def test_tag_gap (self):
@@ -303,7 +304,7 @@ class qa_burst_shaper (gr_unittest.TestCase):
 
         # checks
         self.assertFloatTuplesAlmostEqual(sink.data(), expected, 6)
-        for i in xrange(len(etags)):
+        for i in range(len(etags)):
             self.assertTrue(compare_tags(sink.tags()[i], etags[i]))
 
     def test_tag_propagation (self):
diff --git a/gr-digital/python/digital/qa_chunks_to_symbols.py b/gr-digital/python/digital/qa_chunks_to_symbols.py
old mode 100755
new mode 100644
index 0d80f71d6c..8a4266617f
--- a/gr-digital/python/digital/qa_chunks_to_symbols.py
+++ b/gr-digital/python/digital/qa_chunks_to_symbols.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 import pmt
 from gnuradio import gr, gr_unittest, digital, blocks
 
@@ -138,12 +139,12 @@ class test_chunks_to_symbols(gr_unittest.TestCase):
 
 
     def test_sf_callback(self):
-	constA = [-3, -1, 1, 3]
+        constA = [-3, -1, 1, 3]
         constB = [12, -12, 6, -6]
         src_data = (0, 1, 2, 3, 3, 2, 1, 0)
         expected_result=(12, -12, 6, -6, -6, 6, -12, 12)
 
-	src = blocks.vector_source_s(src_data, False, 1, "")
+        src = blocks.vector_source_s(src_data, False, 1, "")
         op = digital.chunks_to_symbols_sf(constA)
         op.set_symbol_table(constB)
         dst = blocks.vector_sink_f()
@@ -159,7 +160,7 @@ class test_chunks_to_symbols(gr_unittest.TestCase):
         src_data = (0, 1, 2, 3, 3, 2, 1, 0)
         expected_result=(12.0+1j, -12.0-1j, 6.0+1j, -6-1j, -6-1j, 6+1j, -12-1j, 12+1j)
 
-	src = blocks.vector_source_s(src_data, False, 1, "")
+        src = blocks.vector_source_s(src_data, False, 1, "")
         op = digital.chunks_to_symbols_sc(constA)
         op.set_symbol_table(constB)
         dst = blocks.vector_sink_c()
diff --git a/gr-digital/python/digital/qa_clock_recovery_mm.py b/gr-digital/python/digital/qa_clock_recovery_mm.py
old mode 100755
new mode 100644
index 878ea25c6c..0618ec321c
--- a/gr-digital/python/digital/qa_clock_recovery_mm.py
+++ b/gr-digital/python/digital/qa_clock_recovery_mm.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 import random
 import cmath
 
diff --git a/gr-digital/python/digital/qa_cma_equalizer.py b/gr-digital/python/digital/qa_cma_equalizer.py
old mode 100755
new mode 100644
index 6da391f70c..228d951640
--- a/gr-digital/python/digital/qa_cma_equalizer.py
+++ b/gr-digital/python/digital/qa_cma_equalizer.py
@@ -1,48 +1,49 @@
 #!/usr/bin/env python
 #
 # Copyright 2006,2007,2010,2011,2013 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
+
 
 from gnuradio import gr, gr_unittest, digital, blocks
 
 class test_cma_equalizer_fir(gr_unittest.TestCase):
 
     def setUp(self):
-    	self.tb = gr.top_block()
+        self.tb = gr.top_block()
 
     def tearDown(self):
-    	self.tb = None
-    	
+        self.tb = None
+
     def transform(self, src_data):
-	SRC = blocks.vector_source_c(src_data, False)
-	EQU = digital.cma_equalizer_cc(4, 1.0, .001, 1)
-	DST = blocks.vector_sink_c()
-	self.tb.connect(SRC, EQU, DST)
-	self.tb.run()
-	return DST.data()
+        SRC = blocks.vector_source_c(src_data, False)
+        EQU = digital.cma_equalizer_cc(4, 1.0, .001, 1)
+        DST = blocks.vector_sink_c()
+        self.tb.connect(SRC, EQU, DST)
+        self.tb.run()
+        return DST.data()
 
     def test_001_identity(self):
-    	# Constant modulus signal so no adjustments
-	src_data      = (1+0j, 0+1j, -1+0j, 0-1j)*1000
-	expected_data = src_data
-	result = self.transform(src_data)
+        # Constant modulus signal so no adjustments
+        src_data      = (1+0j, 0+1j, -1+0j, 0-1j)*1000
+        expected_data = src_data
+        result = self.transform(src_data)
 
         N = -500
         self.assertComplexTuplesAlmostEqual(expected_data[N:], result[N:])
diff --git a/gr-digital/python/digital/qa_constellation.py b/gr-digital/python/digital/qa_constellation.py
index 42e49bb059..3436ce6f45 100644
--- a/gr-digital/python/digital/qa_constellation.py
+++ b/gr-digital/python/digital/qa_constellation.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+
 import random, math
 from cmath import exp, pi, log, sqrt
 
@@ -51,7 +53,7 @@ def twod_constell():
 def threed_constell():
     oned_points = ((1+0j), (0+1j), (-1+0j), (0-1j))
     points = []
-    r4 = range(0, 4)
+    r4 = list(range(0, 4))
     for ia in r4:
         for ib in r4:
             for ic in r4:
@@ -143,7 +145,7 @@ def tested_constellations(easy=True, medium=True, difficult=True):
             diff_poss = (True, False)
         else:
             diff_poss = (False,)
-        poss_args = [[argname, argvalues, 0] for argname, argvalues in poss_args.items()]
+        poss_args = [[argname, argvalues, 0] for argname, argvalues in list(poss_args.items())]
         for current_diff in diff_poss:
             # Add an index into args to keep track of current position in argvalues
             while True:
@@ -211,7 +213,7 @@ class test_constellation(gr_unittest.TestCase):
         table = digital.soft_dec_table_generator(digital.sd_psk_4_0, prec, Es)
         c.set_soft_dec_lut(table, prec)
 
-        x = sqrt(2.0)/2.0
+        x = sqrt(2.0) / 2.0
         step = (x.real+x.real) / (2**prec - 1)
         samples = [ -x-x*1j, -x+x*1j,
                      x+x*1j,  x-x*1j,
@@ -253,7 +255,7 @@ class test_constellation(gr_unittest.TestCase):
         table = digital.soft_dec_table(constel, code, prec)
         c.gen_soft_dec_lut(prec)
 
-        x = sqrt(2.0)/2.0
+        x = sqrt(2.0) / 2.0
         step = (x.real+x.real) / (2**prec - 1)
         samples = [ -x-x*1j, -x+x*1j,
                      x+x*1j,  x-x*1j,
@@ -293,7 +295,7 @@ class test_constellation(gr_unittest.TestCase):
         table = digital.soft_dec_table(constel, code, prec)
         c.gen_soft_dec_lut(prec)
 
-        x = sqrt(2.0)/2.0
+        x = sqrt(2.0) / 2.0
         step = (x.real+x.real) / (2**prec - 1)
         samples = [ -x-x*1j, -x+x*1j,
                      x+x*1j,  x-x*1j,
@@ -322,9 +324,9 @@ class mod_demod(gr.hier_block2):
             # that they can work with shorts and ints as well as chars.
             raise ValueError("Constellation cannot contain more than 256 points.")
 
-	gr.hier_block2.__init__(self, "mod_demod",
-				gr.io_signature(1, 1, gr.sizeof_char),       # Input signature
-				gr.io_signature(1, 1, gr.sizeof_char))       # Output signature
+        gr.hier_block2.__init__(self, "mod_demod",
+                                gr.io_signature(1, 1, gr.sizeof_char),       # Input signature
+                                gr.io_signature(1, 1, gr.sizeof_char))       # Output signature
 
         arity = constellation.arity()
 
diff --git a/gr-digital/python/digital/qa_constellation_decoder_cb.py b/gr-digital/python/digital/qa_constellation_decoder_cb.py
old mode 100755
new mode 100644
index d3fbce91ba..e7350be553
--- a/gr-digital/python/digital/qa_constellation_decoder_cb.py
+++ b/gr-digital/python/digital/qa_constellation_decoder_cb.py
@@ -1,24 +1,25 @@
 #!/usr/bin/env python
 #
 # Copyright 2004,2007,2010-2013 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
+
 
 from gnuradio import gr, gr_unittest, digital, blocks
 
@@ -32,9 +33,9 @@ class test_constellation_decoder(gr_unittest.TestCase):
 
     def test_constellation_decoder_cb_bpsk(self):
         cnst = digital.constellation_bpsk()
-  	src_data =        (0.5 + 0.5j,  0.1 - 1.2j, -0.8 - 0.1j, -0.45 + 0.8j,
+        src_data =        (0.5 + 0.5j,  0.1 - 1.2j, -0.8 - 0.1j, -0.45 + 0.8j,
                            0.8 + 1.0j, -0.5 + 0.1j,  0.1 - 1.2j)
-	expected_result = (        1,           1,           0,            0,
+        expected_result = (        1,           1,           0,            0,
                                    1,           0,           1)
         src = blocks.vector_source_c(src_data)
         op = digital.constellation_decoder_cb(cnst.base())
@@ -45,18 +46,18 @@ class test_constellation_decoder(gr_unittest.TestCase):
         self.tb.run()               # run the graph and wait for it to finish
 
         actual_result = dst.data()  # fetch the contents of the sink
-	#print "actual result", actual_result
-	#print "expected result", expected_result
+        #print "actual result", actual_result
+        #print "expected result", expected_result
         self.assertFloatTuplesAlmostEqual(expected_result, actual_result)
 
     def _test_constellation_decoder_cb_qpsk(self):
         cnst = digital.constellation_qpsk()
-  	src_data =        (0.5 + 0.5j,  0.1 - 1.2j, -0.8 - 0.1j, -0.45 + 0.8j,
+        src_data =        (0.5 + 0.5j,  0.1 - 1.2j, -0.8 - 0.1j, -0.45 + 0.8j,
                            0.8 + 1.0j, -0.5 + 0.1j,  0.1 - 1.2j)
-	expected_result = (        3,           1,           0,            2,
+        expected_result = (        3,           1,           0,            2,
                                    3,           2,           1)
         src = blocks.vector_source_c(src_data)
-        op = digital_swig.constellation_decoder_cb(cnst.base())
+        op = digital.constellation_decoder_cb(cnst.base())
         dst = blocks.vector_sink_b()
 
         self.tb.connect(src, op)
@@ -64,11 +65,10 @@ class test_constellation_decoder(gr_unittest.TestCase):
         self.tb.run()               # run the graph and wait for it to finish
 
         actual_result = dst.data()  # fetch the contents of the sink
-	#print "actual result", actual_result
-	#print "expected result", expected_result
+        #print "actual result", actual_result
+        #print "expected result", expected_result
         self.assertFloatTuplesAlmostEqual(expected_result, actual_result)
 
 
 if __name__ == '__main__':
     gr_unittest.run(test_constellation_decoder, "test_constellation_decoder.xml")
-
diff --git a/gr-digital/python/digital/qa_constellation_receiver.py b/gr-digital/python/digital/qa_constellation_receiver.py
old mode 100755
new mode 100644
index 9565c7089e..bcf4b18118
--- a/gr-digital/python/digital/qa_constellation_receiver.py
+++ b/gr-digital/python/digital/qa_constellation_receiver.py
@@ -1,24 +1,28 @@
 #!/usr/bin/env python
 #
 # Copyright 2011,2013 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
+
+from __future__ import print_function
+from __future__ import absolute_import
+
 
 import random
 import math
@@ -53,12 +57,13 @@ TIMING_OFFSET = 1.0
 FREQ_BW = 2*math.pi/100.0
 PHASE_BW = 2*math.pi/100.0
 
+
 class channel_model(gr.hier_block2):
     def __init__(self, noise_voltage, freq, timing):
-	gr.hier_block2.__init__(self, "channel_model",
-				gr.io_signature(1, 1, gr.sizeof_gr_complex),
+        gr.hier_block2.__init__(self, "channel_model",
+                                gr.io_signature(1, 1, gr.sizeof_gr_complex),
                                 gr.io_signature(1, 1, gr.sizeof_gr_complex))
-        
+
 
         timing_offset = filter.fractional_resampler_cc(0, timing)
         noise_adder = blocks.add_cc()
@@ -74,16 +79,16 @@ class channel_model(gr.hier_block2):
         self.connect(mixer_offset, (noise_adder,1))
         self.connect(noise, (noise_adder,0))
         self.connect(noise_adder, self)
-        
+
 
 class test_constellation_receiver(gr_unittest.TestCase):
-    
+
     # We ignore the first half of the output data since often it takes
     # a while for the receiver to lock on.
     ignore_fraction = 0.8
     max_data_length = DATA_LENGTH * 6
     max_num_samples = 1000
-    
+
     def test_basic(self):
         """
         Tests a bunch of different constellations by using generic
@@ -172,7 +177,7 @@ class rec_test_tb(gr.top_block):
         super(rec_test_tb, self).__init__()
         # Transmission Blocks
         if src_data is None:
-            self.src_data = tuple([rndm.randint(0,1) for i in range(0, data_length)])
+            self.src_data = tuple([random.randint(0,1) for i in range(0, data_length)])
         else:
             self.src_data = src_data
         packer = blocks.unpacked_to_packed_bb(1, gr.GR_MSB_FIRST)
@@ -182,7 +187,7 @@ class rec_test_tb(gr.top_block):
         if freq_offset:
             channel = channel_model(NOISE_VOLTAGE, FREQUENCY_OFFSET, TIMING_OFFSET)
         else:
-            channel = channel_model(NOISE_VOLTAGE, 0, TIMING_OFFSET)            
+            channel = channel_model(NOISE_VOLTAGE, 0, TIMING_OFFSET)
         # Receiver Blocks
         if freq_offset:
             demod = generic_demod(constellation, differential=differential,
diff --git a/gr-digital/python/digital/qa_constellation_soft_decoder_cf.py b/gr-digital/python/digital/qa_constellation_soft_decoder_cf.py
index 872aed0157..629d52c0a4 100644
--- a/gr-digital/python/digital/qa_constellation_soft_decoder_cf.py
+++ b/gr-digital/python/digital/qa_constellation_soft_decoder_cf.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, digital, blocks
 from math import sqrt
 from numpy import random, vectorize
@@ -36,7 +37,7 @@ class test_constellation_soft_decoder(gr_unittest.TestCase):
         cnst_pts, code = const_gen()
         Es = max([abs(c) for c in cnst_pts])
         lut = digital.soft_dec_table_generator(const_sd_gen, prec, Es)
-	expected_result = list()
+        expected_result = list()
         for s in src_data:
             res = digital.calc_soft_dec_from_table(s, lut, prec, sqrt(2.0))
             expected_result += res
@@ -52,14 +53,14 @@ class test_constellation_soft_decoder(gr_unittest.TestCase):
         self.tb.run()
 
         actual_result = dst.data()  # fetch the contents of the sink
-	#print "actual result", actual_result
-	#print "expected result", expected_result
+        #print "actual result", actual_result
+        #print "expected result", expected_result
         self.assertFloatTuplesAlmostEqual(expected_result, actual_result, 5)
 
     def helper_no_lut(self, prec, src_data, const_gen, const_sd_gen):
         cnst_pts, code = const_gen()
         cnst = digital.constellation_calcdist(cnst_pts, code, 2, 1)
-	expected_result = list()
+        expected_result = list()
         for s in src_data:
             res = digital.calc_soft_dec(s, cnst.points(), code)
             expected_result += res
@@ -73,8 +74,8 @@ class test_constellation_soft_decoder(gr_unittest.TestCase):
         self.tb.run()
 
         actual_result = dst.data()  # fetch the contents of the sink
-	#print "actual result", actual_result
-	#print "expected result", expected_result
+        #print "actual result", actual_result
+        #print "expected result", expected_result
 
         # Double vs. float precision issues between Python and C++, so
         # use only 4 decimals in comparisons.
diff --git a/gr-digital/python/digital/qa_correlate_access_code.py b/gr-digital/python/digital/qa_correlate_access_code.py
old mode 100755
new mode 100644
index d89b457117..1955dcf318
--- a/gr-digital/python/digital/qa_correlate_access_code.py
+++ b/gr-digital/python/digital/qa_correlate_access_code.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, digital, blocks
 
 default_access_code = '\xAC\xDD\xA4\xE2\xF2\x8C\x20\xFC'
@@ -35,7 +36,7 @@ def string_to_1_0_list(s):
     return r
 
 def to_1_0_string(L):
-    return ''.join(map(lambda x: chr(x + ord('0')), L))
+    return ''.join([chr(x + ord('0')) for x in L])
 
 class test_correlate_access_code(gr_unittest.TestCase):
 
diff --git a/gr-digital/python/digital/qa_correlate_access_code_XX_ts.py b/gr-digital/python/digital/qa_correlate_access_code_XX_ts.py
old mode 100755
new mode 100644
index 5429ce1e07..7666c3bda8
--- a/gr-digital/python/digital/qa_correlate_access_code_XX_ts.py
+++ b/gr-digital/python/digital/qa_correlate_access_code_XX_ts.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, digital, blocks
 import pmt
 
@@ -35,7 +36,7 @@ def string_to_1_0_list(s):
     return r
 
 def to_1_0_string(L):
-    return ''.join(map(lambda x: chr(x + ord('0')), L))
+    return ''.join([chr(x + ord('0')) for x in L])
 
 class test_correlate_access_code_XX_ts(gr_unittest.TestCase):
 
@@ -51,7 +52,7 @@ class test_correlate_access_code_XX_ts(gr_unittest.TestCase):
         packet = header + payload
         pad = (0,) * 64
         src_data = (0, 0, 1, 1, 1, 1, 0, 1, 1) + tuple(string_to_1_0_list(packet)) + pad
-        expected = tuple(map(long, src_data[9+32:-len(pad)]))
+        expected = tuple(map(int, src_data[9+32:-len(pad)]))
         src = blocks.vector_source_b(src_data)
         op = digital.correlate_access_code_bb_ts("1011", 0, "sync")
         dst = blocks.vector_sink_b()
diff --git a/gr-digital/python/digital/qa_correlate_access_code_tag.py b/gr-digital/python/digital/qa_correlate_access_code_tag.py
old mode 100755
new mode 100644
index f2663e4ecc..4c70c61697
--- a/gr-digital/python/digital/qa_correlate_access_code_tag.py
+++ b/gr-digital/python/digital/qa_correlate_access_code_tag.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, digital, blocks
 
 default_access_code = '\xAC\xDD\xA4\xE2\xF2\x8C\x20\xFC'
@@ -35,7 +36,7 @@ def string_to_1_0_list(s):
     return r
 
 def to_1_0_string(L):
-    return ''.join(map(lambda x: chr(x + ord('0')), L))
+    return ''.join([chr(x + ord('0')) for x in L])
 
 class test_correlate_access_code(gr_unittest.TestCase):
 
diff --git a/gr-digital/python/digital/qa_costas_loop_cc.py b/gr-digital/python/digital/qa_costas_loop_cc.py
old mode 100755
new mode 100644
index e48f45cc22..283a9199df
--- a/gr-digital/python/digital/qa_costas_loop_cc.py
+++ b/gr-digital/python/digital/qa_costas_loop_cc.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+
 import random
 import cmath
 
@@ -57,7 +59,7 @@ class test_costas_loop_cc(gr_unittest.TestCase):
         order = 2
         self.test = digital.costas_loop_cc(natfreq, order)
 
-        data = [complex(2*random.randint(0,1)-1, 0) for i in xrange(100)]
+        data = [complex(2*random.randint(0,1)-1, 0) for i in range(100)]
         self.src = blocks.vector_source_c(data, False)
         self.snk = blocks.vector_sink_c()
 
@@ -76,7 +78,7 @@ class test_costas_loop_cc(gr_unittest.TestCase):
         self.test = digital.costas_loop_cc(natfreq, order)
 
         rot = cmath.exp(0.2j) # some small rotation
-        data = [complex(2*random.randint(0,1)-1, 0) for i in xrange(100)]
+        data = [complex(2*random.randint(0,1)-1, 0) for i in range(100)]
 
         N = 40 # settling time
         expected_result = data[N:]
@@ -102,7 +104,7 @@ class test_costas_loop_cc(gr_unittest.TestCase):
 
         rot = cmath.exp(0.2j) # some small rotation
         data = [complex(2*random.randint(0,1)-1, 2*random.randint(0,1)-1)
-                for i in xrange(100)]
+                for i in range(100)]
 
         N = 40 # settling time
         expected_result = data[N:]
@@ -126,9 +128,9 @@ class test_costas_loop_cc(gr_unittest.TestCase):
         order = 8
         self.test = digital.costas_loop_cc(natfreq, order)
 
-        rot = cmath.exp(-cmath.pi/8.0j) # rotate to match Costas rotation
+        rot = cmath.exp(-cmath.pi / 8.0j) # rotate to match Costas rotation
         const = psk.psk_constellation(order)
-        data = [random.randint(0,7) for i in xrange(100)]
+        data = [random.randint(0,7) for i in range(100)]
         data = [2*rot*const.points()[d] for d in data]
 
         N = 40 # settling time
diff --git a/gr-digital/python/digital/qa_cpm.py b/gr-digital/python/digital/qa_cpm.py
old mode 100755
new mode 100644
index 6468ed507b..47a6fa23b4
--- a/gr-digital/python/digital/qa_cpm.py
+++ b/gr-digital/python/digital/qa_cpm.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 # 
 
+
 import numpy
 
 from gnuradio import gr, gr_unittest, digital, analog, blocks
diff --git a/gr-digital/python/digital/qa_crc32.py b/gr-digital/python/digital/qa_crc32.py
old mode 100755
new mode 100644
index 9252825ad6..6d3d2fa3ce
--- a/gr-digital/python/digital/qa_crc32.py
+++ b/gr-digital/python/digital/qa_crc32.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 # 
 
+
 import random
 import cmath
 
diff --git a/gr-digital/python/digital/qa_crc32_bb.py b/gr-digital/python/digital/qa_crc32_bb.py
old mode 100755
new mode 100644
index 5e45bfb1b0..53ea6f3deb
--- a/gr-digital/python/digital/qa_crc32_bb.py
+++ b/gr-digital/python/digital/qa_crc32_bb.py
@@ -19,6 +19,7 @@
 # Boston, MA 02110-1301, USA.
 # 
 
+
 from gnuradio import gr, gr_unittest, blocks, digital
 import pmt
 
@@ -33,7 +34,7 @@ class qa_crc32_bb (gr_unittest.TestCase):
 
     def test_001_crc_len (self):
         """ Make sure the output of a CRC set is 4 bytes longer than the input. """
-        data = range(16)
+        data = list(range(16))
         src = blocks.vector_source_b(data)
         crc = digital.crc32_bb(False, self.tsb_key)
         sink = blocks.tsb_vector_sink_b(tsb_key=self.tsb_key)
@@ -69,7 +70,7 @@ class qa_crc32_bb (gr_unittest.TestCase):
     def test_003_crc_correct_lentag (self):
         tag_name = "length"
         pack_len = 8
-        packets = range(pack_len*2)
+        packets = list(range(pack_len*2))
         tag1 = gr.tag_t()
         tag1.offset = 0
         tag1.key = pmt.string_to_symbol(tag_name)
@@ -107,7 +108,7 @@ class qa_crc32_bb (gr_unittest.TestCase):
         tags_found = {'tag1': False, 'tag2': False, 'tag3': False}
         for tag in sink.tags():
             key = pmt.symbol_to_string(tag.key)
-            if key in correct_offsets.keys():
+            if key in list(correct_offsets.keys()):
                 tags_found[key] = True
                 self.assertEqual(correct_offsets[key], tag.offset)
         self.assertTrue(all(tags_found.values()))
@@ -160,7 +161,7 @@ class qa_crc32_bb (gr_unittest.TestCase):
 
     def test_006_crc_len (self):
         """ Make sure the output of a CRC set is 32 (unpacked) bytes longer than the input. """
-        data = range(16)
+        data = list(range(16))
         src = blocks.vector_source_b(data)
         crc = digital.crc32_bb(False, self.tsb_key, False)
         sink = blocks.tsb_vector_sink_b(tsb_key=self.tsb_key)
@@ -196,7 +197,7 @@ class qa_crc32_bb (gr_unittest.TestCase):
     def test_008_crc_correct_lentag (self):
         tag_name = "length"
         pack_len = 8
-        packets = range(pack_len*2)
+        packets = list(range(pack_len*2))
         tag1 = gr.tag_t()
         tag1.offset = 0
         tag1.key = pmt.string_to_symbol(tag_name)
@@ -234,7 +235,7 @@ class qa_crc32_bb (gr_unittest.TestCase):
         tags_found = {'tag1': False, 'tag2': False, 'tag3': False}
         for tag in sink.tags():
             key = pmt.symbol_to_string(tag.key)
-            if key in correct_offsets.keys():
+            if key in list(correct_offsets.keys()):
                 tags_found[key] = True
                 self.assertEqual(correct_offsets[key], tag.offset)
         self.assertTrue(all(tags_found.values()))
diff --git a/gr-digital/python/digital/qa_diff_encoder.py b/gr-digital/python/digital/qa_diff_encoder.py
old mode 100755
new mode 100644
index 410b937fbc..58d757d0c2
--- a/gr-digital/python/digital/qa_diff_encoder.py
+++ b/gr-digital/python/digital/qa_diff_encoder.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 import random
 
 from gnuradio import gr, gr_unittest, digital, blocks
diff --git a/gr-digital/python/digital/qa_diff_phasor_cc.py b/gr-digital/python/digital/qa_diff_phasor_cc.py
old mode 100755
new mode 100644
index 7cae4870cc..72063cf92c
--- a/gr-digital/python/digital/qa_diff_phasor_cc.py
+++ b/gr-digital/python/digital/qa_diff_phasor_cc.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, digital, blocks
 
 class test_diff_phasor(gr_unittest.TestCase):
diff --git a/gr-digital/python/digital/qa_digital.py b/gr-digital/python/digital/qa_digital.py
old mode 100755
new mode 100644
index 63a167dece..d443b08fde
--- a/gr-digital/python/digital/qa_digital.py
+++ b/gr-digital/python/digital/qa_digital.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 # 
 
+
 from gnuradio import gr, gr_unittest, digital
 
 class test_digital(gr_unittest.TestCase):
diff --git a/gr-digital/python/digital/qa_fll_band_edge.py b/gr-digital/python/digital/qa_fll_band_edge.py
old mode 100755
new mode 100644
index 17c5fa85f8..a4859565ec
--- a/gr-digital/python/digital/qa_fll_band_edge.py
+++ b/gr-digital/python/digital/qa_fll_band_edge.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 # 
 
+from __future__ import division
+
 import random
 import math
 
@@ -48,7 +50,7 @@ class test_fll_band_edge_cc(gr_unittest.TestCase):
 
         # Create a set of 1's and -1's, pulse shape and interpolate to sps
         random.seed(0)
-        data = [2.0*random.randint(0, 2) - 1.0 for i in xrange(200)]
+        data = [2.0*random.randint(0, 2) - 1.0 for i in range(200)]
         self.src = blocks.vector_source_c(data, False)
         self.rrc = filter.interp_fir_filter_ccf(sps, rrc_taps)
 
diff --git a/gr-digital/python/digital/qa_framer_sink.py b/gr-digital/python/digital/qa_framer_sink.py
old mode 100755
new mode 100644
index 4b260c14ec..555bc121f8
--- a/gr-digital/python/digital/qa_framer_sink.py
+++ b/gr-digital/python/digital/qa_framer_sink.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 # 
 
+
 from gnuradio import gr, gr_unittest, digital, blocks
 
 default_access_code = '\xAC\xDD\xA4\xE2\xF2\x8C\x20\xFC'
@@ -34,7 +35,7 @@ def string_to_1_0_list(s):
     return r
 
 def to_1_0_string(L):
-    return ''.join(map(lambda x: chr(x + ord('0')), L))
+    return ''.join([chr(x + ord('0')) for x in L])
 
 class test_framker_sink(gr_unittest.TestCase):
 
diff --git a/gr-digital/python/digital/qa_glfsr_source.py b/gr-digital/python/digital/qa_glfsr_source.py
old mode 100755
new mode 100644
index f39c408198..2c1921e117
--- a/gr-digital/python/digital/qa_glfsr_source.py
+++ b/gr-digital/python/digital/qa_glfsr_source.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, digital, blocks
 
 class test_glfsr_source(gr_unittest.TestCase):
@@ -32,8 +33,8 @@ class test_glfsr_source(gr_unittest.TestCase):
 
     def test_000_make_b(self):
         src = digital.glfsr_source_b(16)
-        self.assertEquals(src.mask(), 0x8016)
-        self.assertEquals(src.period(), 2**16-1)
+        self.assertEqual(src.mask(), 0x8016)
+        self.assertEqual(src.period(), 2**16-1)
 
     def test_001_degree_b(self):
         self.assertRaises(RuntimeError,
@@ -46,11 +47,11 @@ class test_glfsr_source(gr_unittest.TestCase):
             src = digital.glfsr_source_b(degree, False)
             b2f = digital.chunks_to_symbols_bf((-1.0,1.0), 1)
             dst = blocks.vector_sink_f()
-	    del self.tb # Discard existing top block
-	    self.tb = gr.top_block()
+            del self.tb # Discard existing top block
+            self.tb = gr.top_block()
             self.tb.connect(src, b2f, dst)
             self.tb.run()
-	    self.tb.disconnect_all()
+            self.tb.disconnect_all()
             actual_result = dst.data()
             R = auto_correlate(actual_result)
             self.assertEqual(R[0], float(len(R))) # Auto-correlation peak at origin
@@ -59,8 +60,8 @@ class test_glfsr_source(gr_unittest.TestCase):
 
     def test_003_make_f(self):
         src = digital.glfsr_source_f(16)
-        self.assertEquals(src.mask(), 0x8016)
-        self.assertEquals(src.period(), 2**16-1)
+        self.assertEqual(src.mask(), 0x8016)
+        self.assertEqual(src.period(), 2**16-1)
 
     def test_004_degree_f(self):
         self.assertRaises(RuntimeError,
@@ -71,8 +72,8 @@ class test_glfsr_source(gr_unittest.TestCase):
         for degree in range(1,11):                # Higher degrees take too long to correlate
             src = digital.glfsr_source_f(degree, False)
             dst = blocks.vector_sink_f()
-	    del self.tb # Discard existing top block
-	    self.tb = gr.top_block()
+            del self.tb # Discard existing top block
+            self.tb = gr.top_block()
             self.tb.connect(src, dst)
             self.tb.run()
 
diff --git a/gr-digital/python/digital/qa_hdlc_framer.py b/gr-digital/python/digital/qa_hdlc_framer.py
old mode 100755
new mode 100644
index 6fed264546..4aa8280e83
--- a/gr-digital/python/digital/qa_hdlc_framer.py
+++ b/gr-digital/python/digital/qa_hdlc_framer.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 # 
 
+
 from gnuradio import gr, gr_unittest, digital, blocks
 import pmt
 import numpy
@@ -45,7 +46,7 @@ class test_hdlc_framer(gr_unittest.TestCase):
         self.tb.msg_connect(deframe, "out", debug, "store")
         self.tb.start()
         msg = pmt.cons(pmt.PMT_NIL, pmt.init_u8vector(len(src_data),src_data))
-        for i in xrange(npkts):
+        for i in range(npkts):
             frame.to_basic_block()._post(pmt.intern("in"), msg)
         sleep(0.2)
         self.tb.stop()
@@ -53,7 +54,7 @@ class test_hdlc_framer(gr_unittest.TestCase):
         rxmsg = debug.get_message(0)
         result_len = pmt.blob_length(pmt.cdr(rxmsg))
         msg_data = []
-        for j in xrange(result_len):
+        for j in range(result_len):
             msg_data.append(pmt.u8vector_ref(pmt.cdr(rxmsg), j))
         self.assertEqual(src_data, msg_data)
 
diff --git a/gr-digital/python/digital/qa_header_payload_demux.py b/gr-digital/python/digital/qa_header_payload_demux.py
old mode 100755
new mode 100644
index f36d71067c..d77f7c689d
--- a/gr-digital/python/digital/qa_header_payload_demux.py
+++ b/gr-digital/python/digital/qa_header_payload_demux.py
@@ -20,15 +20,19 @@
 #
 
 from __future__ import print_function
+from __future__ import division
+
 import time
 import random
 import numpy
+
 from gnuradio import gr
 from gnuradio import gr_unittest
 from gnuradio import digital
 from gnuradio import blocks
 import pmt
 
+
 def make_tag(key, value, offset):
     tag = gr.tag_t()
     tag.offset = offset
@@ -55,7 +59,7 @@ class HeaderToMessageBlock(gr.sync_block):
         self.msg_count = 0
 
     def work(self, input_items, output_items):
-        for i in xrange(len(input_items[0])/self.header_len):
+        for i in range(len(input_items[0]) // self.header_len):
             msg = self.messages[self.msg_count] or False
             #print("Sending message: {0}".format(msg))
             self.message_port_pub(pmt.intern('header_data'), pmt.to_pmt(msg))
@@ -227,7 +231,7 @@ class qa_header_payload_demux (gr_unittest.TestCase):
         header_padding = 1
         payload = tuple(range(5, 20))
         data_signal = (0,) * n_zeros + header + payload
-        trigger_signal = [0,] * len(data_signal)
+        trigger_signal = [0] * len(data_signal)
         trigger_signal[n_zeros] = 1
         # This is dropped:
         testtag1 = make_tag('tag1', 0, 0)
@@ -296,7 +300,7 @@ class qa_header_payload_demux (gr_unittest.TestCase):
         payload_offset = -1
         payload = tuple(range(5, 20))
         data_signal = (0,) * n_zeros + header + payload + (0,) * 100
-        trigger_signal = [0,] * len(data_signal)
+        trigger_signal = [0] * len(data_signal)
         trigger_signal[n_zeros] = 1
         # This goes on output 1, item 3 + 1 (for payload offset)
         testtag4 = make_tag('tag4', 314, n_zeros + len(header) + 3)
@@ -379,13 +383,13 @@ class qa_header_payload_demux (gr_unittest.TestCase):
         data_src = blocks.vector_source_f(data_signal, False, tags=(testtag1, testtag2, testtag3, testtag4))
         trigger_src = blocks.vector_source_b(trigger_signal, False)
         hpd = digital.header_payload_demux(
-            len(header) / items_per_symbol, # Header length (in symbols)
-            items_per_symbol,               # Items per symbols
-            gi,                             # Items per guard time
-            "frame_len",                    # Frame length tag key
-            "detect",                       # Trigger tag key
-            True,                           # Output symbols (not items)
-            gr.sizeof_float                 # Bytes per item
+            len(header) // items_per_symbol, # Header length (in symbols)
+            items_per_symbol,                # Items per symbols
+            gi,                              # Items per guard time
+            "frame_len",                     # Frame length tag key
+            "detect",                        # Trigger tag key
+            True,                            # Output symbols (not items)
+            gr.sizeof_float                  # Bytes per item
         )
         self.assertEqual(pmt.length(hpd.message_ports_in()), 2) #extra system port defined for you
         header_sink = blocks.vector_sink_f(items_per_symbol)
@@ -548,7 +552,7 @@ class qa_header_payload_demux (gr_unittest.TestCase):
             indexes = []
             burst_sizes = []
             total_payload_len = 0
-            for burst_count in xrange(n_bursts):
+            for burst_count in range(n_bursts):
                 gap_size = random.randint(0, max_gap)
                 signal += [0] * gap_size
                 is_failure = random.random() < fail_rate
@@ -577,7 +581,7 @@ class qa_header_payload_demux (gr_unittest.TestCase):
         ### Go, go, go
         # The divide-by-20 means we'll usually get the same random seed
         # between the first run and the XML run.
-        random_seed = int(time.time()/20)
+        random_seed = int(time.time() / 20)
         random.seed(random_seed)
         print("Random seed: {0}".format(random_seed))
         n_bursts = 400
@@ -621,4 +625,3 @@ class qa_header_payload_demux (gr_unittest.TestCase):
 
 if __name__ == '__main__':
     gr_unittest.run(qa_header_payload_demux, "qa_header_payload_demux.xml")
-
diff --git a/gr-digital/python/digital/qa_lfsr.py b/gr-digital/python/digital/qa_lfsr.py
old mode 100755
new mode 100644
index 8b8872ab3b..8cc97a0185
--- a/gr-digital/python/digital/qa_lfsr.py
+++ b/gr-digital/python/digital/qa_lfsr.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 import math
 
 from gnuradio import gr, gr_unittest, digital
@@ -37,7 +38,7 @@ class test_lfsr(gr_unittest.TestCase):
         l = digital.lfsr(1, 1, reglen)
 
         result_data = []
-        for i in xrange(4*(reglen+1)):
+        for i in range(4*(reglen+1)):
             result_data.append(l.next_bit())
 
         expected_result = 4*([1,] + reglen*[0,])
diff --git a/gr-digital/python/digital/qa_lms_equalizer.py b/gr-digital/python/digital/qa_lms_equalizer.py
old mode 100755
new mode 100644
index 7768c1f078..fa79993f84
--- a/gr-digital/python/digital/qa_lms_equalizer.py
+++ b/gr-digital/python/digital/qa_lms_equalizer.py
@@ -1,51 +1,52 @@
 #!/usr/bin/env python
 #
 # Copyright 2006,2007,2010,2011,2013 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
+
 
 from gnuradio import gr, gr_unittest, digital, blocks
 
 class test_lms_dd_equalizer(gr_unittest.TestCase):
 
     def setUp(self):
-    	self.tb = gr.top_block()
+        self.tb = gr.top_block()
 
     def tearDown(self):
-    	self.tb = None
-    	
+        self.tb = None
+
     def transform(self, src_data, gain, const):
-	SRC = blocks.vector_source_c(src_data, False)
-	EQU = digital.lms_dd_equalizer_cc(4, gain, 1, const.base())
-	DST = blocks.vector_sink_c()
-	self.tb.connect(SRC, EQU, DST)
-	self.tb.run()
-	return DST.data()
+        SRC = blocks.vector_source_c(src_data, False)
+        EQU = digital.lms_dd_equalizer_cc(4, gain, 1, const.base())
+        DST = blocks.vector_sink_c()
+        self.tb.connect(SRC, EQU, DST)
+        self.tb.run()
+        return DST.data()
 
     def test_001_identity(self):
-    	# Constant modulus signal so no adjustments
+        # Constant modulus signal so no adjustments
         const = digital.constellation_qpsk()
-	src_data = const.points()*1000
+        src_data = const.points()*1000
 
         N = 100 # settling time
-	expected_data = src_data[N:]
-	result = self.transform(src_data, 0.1, const)[N:]
+        expected_data = src_data[N:]
+        result = self.transform(src_data, 0.1, const)[N:]
 
         N = -500
         self.assertComplexTuplesAlmostEqual(expected_data[N:], result[N:], 5)
diff --git a/gr-digital/python/digital/qa_map.py b/gr-digital/python/digital/qa_map.py
old mode 100755
new mode 100644
index 604fa084d9..0b71b2814a
--- a/gr-digital/python/digital/qa_map.py
+++ b/gr-digital/python/digital/qa_map.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 # 
 
+
 from gnuradio import gr, gr_unittest, digital, blocks
 
 class test_map(gr_unittest.TestCase):
@@ -32,7 +33,7 @@ class test_map(gr_unittest.TestCase):
 
     def helper(self, symbols):
         src_data = [0, 1, 2, 3, 0, 1, 2, 3]
-        expected_data = map(lambda x: symbols[x], src_data)
+        expected_data = [symbols[x] for x in src_data]
         src = blocks.vector_source_b(src_data)
         op = digital.map_bb(symbols)
         dst = blocks.vector_sink_b()
diff --git a/gr-digital/python/digital/qa_mpsk_snr_est.py b/gr-digital/python/digital/qa_mpsk_snr_est.py
old mode 100755
new mode 100644
index 97d31c7686..dcc7dcc694
--- a/gr-digital/python/digital/qa_mpsk_snr_est.py
+++ b/gr-digital/python/digital/qa_mpsk_snr_est.py
@@ -19,6 +19,7 @@
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
 #
+
 import random
 
 from gnuradio import gr, gr_unittest, digital, blocks
@@ -34,15 +35,15 @@ class test_mpsk_snr_est(gr_unittest.TestCase):
 
         random.seed(0) # make repeatable
         N = 10000
-        self._noise = [get_n_cplx() for i in xrange(N)]
-        self._bits = [get_cplx() for i in xrange(N)]
+        self._noise = [get_n_cplx() for i in range(N)]
+        self._bits = [get_cplx() for i in range(N)]
 
     def tearDown(self):
         self.tb = None
 
     def mpsk_snr_est_setup(self, op):
         result = []
-        for i in xrange(1,6):
+        for i in range(1,6):
             src_data = [b+(i*n) for b,n in zip(self._bits, self._noise)]
 
             src = blocks.vector_source_c(src_data)
@@ -57,7 +58,7 @@ class test_mpsk_snr_est(gr_unittest.TestCase):
         return result
 
     def test_mpsk_snr_est_simple(self):
-	expected_result = [8.20, 4.99, 3.23, 2.01, 1.03]
+        expected_result = [8.20, 4.99, 3.23, 2.01, 1.03]
 
         N = 10000
         alpha = 0.001
@@ -67,7 +68,7 @@ class test_mpsk_snr_est(gr_unittest.TestCase):
         self.assertFloatTuplesAlmostEqual(expected_result, actual_result, 2)
 
     def test_mpsk_snr_est_skew(self):
-	expected_result = [8.31, 1.83, -1.68, -3.56, -4.68]
+        expected_result = [8.31, 1.83, -1.68, -3.56, -4.68]
 
         N = 10000
         alpha = 0.001
@@ -77,7 +78,7 @@ class test_mpsk_snr_est(gr_unittest.TestCase):
         self.assertFloatTuplesAlmostEqual(expected_result, actual_result, 2)
 
     def test_mpsk_snr_est_m2m4(self):
-	expected_result = [8.01, 3.19, 1.97, 2.15, 2.65]
+        expected_result = [8.01, 3.19, 1.97, 2.15, 2.65]
 
         N = 10000
         alpha = 0.001
@@ -87,7 +88,7 @@ class test_mpsk_snr_est(gr_unittest.TestCase):
         self.assertFloatTuplesAlmostEqual(expected_result, actual_result, 2)
 
     def test_mpsk_snr_est_svn(self):
-	expected_result = [7.91, 3.01, 1.77, 1.97, 2.49]
+        expected_result = [7.91, 3.01, 1.77, 1.97, 2.49]
 
         N = 10000
         alpha = 0.001
@@ -97,10 +98,10 @@ class test_mpsk_snr_est(gr_unittest.TestCase):
         self.assertFloatTuplesAlmostEqual(expected_result, actual_result, 2)
 
     def test_probe_mpsk_snr_est_m2m4(self):
-	expected_result = [8.01, 3.19, 1.97, 2.15, 2.65]
+        expected_result = [8.01, 3.19, 1.97, 2.15, 2.65]
 
         actual_result = []
-        for i in xrange(1,6):
+        for i in range(1,6):
             src_data = [b+(i*n) for b,n in zip(self._bits, self._noise)]
 
             src = blocks.vector_source_c(src_data)
diff --git a/gr-digital/python/digital/qa_ofdm_carrier_allocator_cvc.py b/gr-digital/python/digital/qa_ofdm_carrier_allocator_cvc.py
old mode 100755
new mode 100644
index befb15ac4a..4ffe61b8ea
--- a/gr-digital/python/digital/qa_ofdm_carrier_allocator_cvc.py
+++ b/gr-digital/python/digital/qa_ofdm_carrier_allocator_cvc.py
@@ -1,23 +1,24 @@
 #!/usr/bin/env python
 # Copyright 2012-2014 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
+
 
 from gnuradio import gr, gr_unittest, digital, blocks
 import pmt
@@ -41,7 +42,7 @@ class qa_digital_carrier_allocator_cvc (gr_unittest.TestCase):
         pilot_symbols = ((1j,),)
         occupied_carriers = ((0, 1, 2),)
         pilot_carriers = ((3,),)
-        sync_word = (range(fft_len),)
+        sync_word = (list(range(fft_len)),)
         expected_result = tuple(sync_word[0] + [1j, 0, 0, 1, 2, 3])
         #                                                 ^ DC carrier
         src = blocks.vector_source_c(tx_symbols, False, 1)
@@ -164,7 +165,7 @@ class qa_digital_carrier_allocator_cvc (gr_unittest.TestCase):
         - add some random tags
         - don't shift
         """
-        tx_symbols = range(1, 16); # 15 symbols
+        tx_symbols = list(range(1, 16)); # 15 symbols
         pilot_symbols = ((1j, 2j), (3j, 4j))
         occupied_carriers = ((1, 3, 4, 11, 12, 14), (1, 2, 4, 11, 13, 14),)
         pilot_carriers = ((2, 13), (3, 12))
@@ -203,7 +204,7 @@ class qa_digital_carrier_allocator_cvc (gr_unittest.TestCase):
         correct_offsets = {'tag1': 0, 'tag2': 1, 'tag3': 3, 'tag4': 5}
         for tag in sink.tags():
             key = pmt.symbol_to_string(tag.key)
-            if key in tags_found.keys():
+            if key in list(tags_found.keys()):
                 tags_found[key] = True
                 self.assertEqual(correct_offsets[key], tag.offset)
         self.assertTrue(all(tags_found.values()))
diff --git a/gr-digital/python/digital/qa_ofdm_chanest_vcvc.py b/gr-digital/python/digital/qa_ofdm_chanest_vcvc.py
old mode 100755
new mode 100644
index d63b65d018..e39247da0a
--- a/gr-digital/python/digital/qa_ofdm_chanest_vcvc.py
+++ b/gr-digital/python/digital/qa_ofdm_chanest_vcvc.py
@@ -19,6 +19,8 @@
 # Boston, MA 02110-1301, USA.
 # 
 
+from __future__ import division
+
 import sys
 import numpy
 import random
@@ -203,7 +205,7 @@ class qa_ofdm_chanest_vcvc (gr_unittest.TestCase):
         tx_data = shift_tuple(sync_symbol1, carr_offset) + \
                   shift_tuple(sync_symbol2, carr_offset) + \
                   shift_tuple(data_symbol, carr_offset)
-        channel = range(fft_len)
+        channel = list(range(fft_len))
         src = blocks.vector_source_c(tx_data, False, fft_len)
         chan = blocks.multiply_const_vcc(channel)
         chanest = digital.ofdm_chanest_vcvc(sync_symbol1, sync_symbol2, 1)
@@ -234,7 +236,7 @@ class qa_ofdm_chanest_vcvc (gr_unittest.TestCase):
         n_iter = 20 # The more the accurater
         def run_flow_graph(sync_sym1, sync_sym2, data_sym):
             top_block = gr.top_block()
-            carr_offset = random.randint(-max_offset/2, max_offset/2) * 2
+            carr_offset = random.randint(-max_offset / 2, max_offset / 2) * 2
             tx_data = shift_tuple(sync_sym1, carr_offset) + \
                       shift_tuple(sync_sym2, carr_offset) + \
                       shift_tuple(data_sym,  carr_offset)
@@ -265,14 +267,14 @@ class qa_ofdm_chanest_vcvc (gr_unittest.TestCase):
                     rx_sym_est[i] = (sink.data()[i] / channel_est[i]).real
             return (carr_offset, list(shift_tuple(rx_sym_est, -carr_offset_hat)))
         bit_errors = 0
-        for k in xrange(n_iter):
+        for k in range(n_iter):
             sync_sym = [(random.randint(0, 1) * 2 - 1) * syncsym_mask[i] for i in range(fft_len)]
             ref_sym  = [(random.randint(0, 1) * 2 - 1) * carrier_mask[i] for i in range(fft_len)]
             data_sym = [(random.randint(0, 1) * 2 - 1) * carrier_mask[i] for i in range(fft_len)]
             data_sym[26] = 1
             (carr_offset, rx_sym) = run_flow_graph(sync_sym, ref_sym, data_sym)
             rx_sym_est = [0,] * fft_len
-            for i in xrange(fft_len):
+            for i in range(fft_len):
                 if carrier_mask[i] == 0:
                     continue
                 rx_sym_est[i] = {True: 1, False: -1}[rx_sym[i] > 0]
diff --git a/gr-digital/python/digital/qa_ofdm_cyclic_prefixer.py b/gr-digital/python/digital/qa_ofdm_cyclic_prefixer.py
old mode 100755
new mode 100644
index ecc1c426d6..fc486fa6a2
--- a/gr-digital/python/digital/qa_ofdm_cyclic_prefixer.py
+++ b/gr-digital/python/digital/qa_ofdm_cyclic_prefixer.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 # 
 
+from __future__ import division
+
 from gnuradio import gr, gr_unittest, digital, blocks
 import pmt
 
@@ -37,7 +39,7 @@ class test_ofdm_cyclic_prefixer (gr_unittest.TestCase):
         cp_len = 2
         expected_result = (6, 7, 0, 1, 2, 3, 4, 5, 6, 7,
                            6, 7, 0, 1, 2, 3, 4, 5, 6, 7)
-        src = blocks.vector_source_c(range(fft_len) * 2, False, fft_len)
+        src = blocks.vector_source_c(list(range(fft_len)) * 2, False, fft_len)
         cp = digital.ofdm_cyclic_prefixer(fft_len, fft_len + cp_len)
         sink = blocks.vector_sink_c()
         self.tb.connect(src, cp, sink)
@@ -49,9 +51,9 @@ class test_ofdm_cyclic_prefixer (gr_unittest.TestCase):
         fft_len = 8
         cp_len = 2
         rolloff = 2
-        expected_result = (7.0/2,       8, 1, 2, 3, 4, 5, 6, 7, 8, # 1.0/2
-                           7.0/2+1.0/2, 8, 1, 2, 3, 4, 5, 6, 7, 8)
-        src = blocks.vector_source_c(range(1, fft_len+1) * 2, False, fft_len)
+        expected_result = (7.0 / 2,       8, 1, 2, 3, 4, 5, 6, 7, 8, # 1.0/2
+                           7.0 / 2+1.0 / 2, 8, 1, 2, 3, 4, 5, 6, 7, 8)
+        src = blocks.vector_source_c(list(range(1, fft_len+1)) * 2, False, fft_len)
         cp = digital.ofdm_cyclic_prefixer(fft_len, fft_len + cp_len, rolloff)
         sink = blocks.vector_sink_c()
         self.tb.connect(src, cp, sink)
@@ -63,13 +65,13 @@ class test_ofdm_cyclic_prefixer (gr_unittest.TestCase):
         fft_len = 8
         cp_len = 2
         tag_name = "ts_last"
-        expected_result = (7.0/2,       8, 1, 2, 3, 4, 5, 6, 7, 8, # 1.0/2
-                           7.0/2+1.0/2, 8, 1, 2, 3, 4, 5, 6, 7, 8, 1.0/2)
+        expected_result = (7.0 / 2,       8, 1, 2, 3, 4, 5, 6, 7, 8, # 1.0/2
+                           7.0 / 2+1.0 / 2, 8, 1, 2, 3, 4, 5, 6, 7, 8, 1.0 / 2)
         tag2 = gr.tag_t()
         tag2.offset = 1
         tag2.key = pmt.string_to_symbol("random_tag")
         tag2.value = pmt.from_long(42)
-        src = blocks.vector_source_c(range(1, fft_len+1) * 2, False, fft_len, (tag2,))
+        src = blocks.vector_source_c(list(range(1, fft_len+1)) * 2, False, fft_len, (tag2,))
         cp = digital.ofdm_cyclic_prefixer(fft_len, fft_len + cp_len, 2, tag_name)
         sink = blocks.tsb_vector_sink_c(tsb_key=tag_name)
         self.tb.connect(src, blocks.stream_to_tagged_stream(gr.sizeof_gr_complex, fft_len, 2, tag_name), cp, sink)
diff --git a/gr-digital/python/digital/qa_ofdm_frame_equalizer_vcvc.py b/gr-digital/python/digital/qa_ofdm_frame_equalizer_vcvc.py
old mode 100755
new mode 100644
index 1b3ffb7738..482147e33a
--- a/gr-digital/python/digital/qa_ofdm_frame_equalizer_vcvc.py
+++ b/gr-digital/python/digital/qa_ofdm_frame_equalizer_vcvc.py
@@ -1,23 +1,25 @@
 #!/usr/bin/env python
 # Copyright 2012,2013 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
+
+from __future__ import division
 
 import numpy
 
@@ -220,7 +222,7 @@ class qa_ofdm_frame_equalizer_vcvc (gr_unittest.TestCase):
         eq = digital.ofdm_frame_equalizer_vcvc(equalizer.base(), 0, self.tsb_key, True)
         self.tb.connect(
                 src,
-                blocks.stream_to_tagged_stream(gr.sizeof_gr_complex, fft_len, len(tx_data)/fft_len, self.tsb_key),
+                blocks.stream_to_tagged_stream(gr.sizeof_gr_complex, fft_len, len(tx_data) // fft_len, self.tsb_key),
                 eq,
                 sink
         )
@@ -278,7 +280,7 @@ class qa_ofdm_frame_equalizer_vcvc (gr_unittest.TestCase):
         sink = blocks.tsb_vector_sink_c(vlen=fft_len, tsb_key=self.tsb_key)
         self.tb.connect(
                 src,
-                blocks.stream_to_tagged_stream(gr.sizeof_gr_complex, fft_len, len(tx_data)/fft_len, self.tsb_key),
+                blocks.stream_to_tagged_stream(gr.sizeof_gr_complex, fft_len, len(tx_data) // fft_len, self.tsb_key),
                 eq,
                 sink
         )
@@ -360,7 +362,7 @@ class qa_ofdm_frame_equalizer_vcvc (gr_unittest.TestCase):
         sink = blocks.tsb_vector_sink_c(fft_len, tsb_key=self.tsb_key)
         self.tb.connect(
                 src,
-                blocks.stream_to_tagged_stream(gr.sizeof_gr_complex, fft_len, len(tx_data)/fft_len, self.tsb_key),
+                blocks.stream_to_tagged_stream(gr.sizeof_gr_complex, fft_len, len(tx_data) // fft_len, self.tsb_key),
                 eq,
                 sink
         )
diff --git a/gr-digital/python/digital/qa_ofdm_serializer_vcc.py b/gr-digital/python/digital/qa_ofdm_serializer_vcc.py
old mode 100755
new mode 100644
index 8a60b97882..a53aafccb6
--- a/gr-digital/python/digital/qa_ofdm_serializer_vcc.py
+++ b/gr-digital/python/digital/qa_ofdm_serializer_vcc.py
@@ -1,24 +1,26 @@
 #!/usr/bin/env python
 #
 # Copyright 2012-2014 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
+
+from __future__ import division
 
 import numpy
 
@@ -42,7 +44,7 @@ class qa_ofdm_serializer_vcc (gr_unittest.TestCase):
                       0, 13, 1j, 14, 15, 0, 0, 0, 0, 0, 0, 0,  0,  2j, 0,  0)
         expected_result = tuple(range(1, 16)) + (0, 0, 0)
         occupied_carriers = ((1, 3, 4, 11, 12, 14), (1, 2, 4, 11, 13, 14),)
-        n_syms = len(tx_symbols)/fft_len
+        n_syms = len(tx_symbols) // fft_len
         src = blocks.vector_source_c(tx_symbols, False, fft_len)
         serializer = digital.ofdm_serializer_vcc(fft_len, occupied_carriers, self.tsb_key, "", 0, "", False)
         sink = blocks.tsb_vector_sink_c(tsb_key=self.tsb_key)
@@ -60,7 +62,7 @@ class qa_ofdm_serializer_vcc (gr_unittest.TestCase):
         )
         expected_result = tuple(range(18))
         occupied_carriers = ((13, 14, 15, 1, 2, 3), (-4, -2, -1, 1, 2, 4),)
-        n_syms = len(tx_symbols)/fft_len
+        n_syms = len(tx_symbols) // fft_len
         src = blocks.vector_source_c(tx_symbols, False, fft_len)
         serializer = digital.ofdm_serializer_vcc(fft_len, occupied_carriers, self.tsb_key)
         sink = blocks.tsb_vector_sink_c(tsb_key=self.tsb_key)
@@ -71,14 +73,14 @@ class qa_ofdm_serializer_vcc (gr_unittest.TestCase):
     def test_002_with_offset (self):
         """ Standard test, carrier offset """
         fft_len = 16
-        tx_symbols = range(1, 16);
+        tx_symbols = list(range(1, 16));
         tx_symbols = (0, 0, 1,  1j,  2,  3, 0, 0, 0, 0, 0, 0, 4,  5,  2j, 6,
                       0, 0, 7,  8,  3j,  9, 0, 0, 0, 0, 0, 0, 10, 4j, 11, 12,
                       0, 0, 13, 1j, 14, 15, 0, 0, 0, 0, 0, 0, 0,  0,  2j, 0)
         carr_offset = 1 # Compare this with tx_symbols from the previous test
         expected_result = tuple(range(1, 16)) + (0, 0, 0)
         occupied_carriers = ((1, 3, 4, 11, 12, 14), (1, 2, 4, 11, 13, 14),)
-        n_syms = len(tx_symbols)/fft_len
+        n_syms = len(tx_symbols) // fft_len
         offsettag = gr.tag_t()
         offsettag.offset = 0
         offsettag.key = pmt.string_to_symbol("ofdm_sync_carr_offset")
@@ -156,7 +158,7 @@ class qa_ofdm_serializer_vcc (gr_unittest.TestCase):
                        pilot_carriers,
                        pilot_symbols, (),
                        self.tsb_key)
-        tx_ifft = fft.fft_vcc(fft_len, False, (1.0/fft_len,)*fft_len, True)
+        tx_ifft = fft.fft_vcc(fft_len, False, (1.0 / fft_len,)*fft_len, True)
         oscillator = analog.sig_source_c(1.0, analog.GR_COS_WAVE, freq_offset, 1.0)
         mixer = blocks.multiply_cc()
         rx_fft  = fft.fft_vcc(fft_len, True, (), True)
@@ -182,13 +184,13 @@ class qa_ofdm_serializer_vcc (gr_unittest.TestCase):
     def test_005_packet_len_tag (self):
         """ Standard test """
         fft_len = 16
-        tx_symbols = range(1, 16);
+        tx_symbols = list(range(1, 16));
         tx_symbols = (0, 1,  1j,  2,  3, 0, 0, 0, 0, 0, 0, 4,  5,  2j, 6,  0,
                       0, 7,  8,  3j,  9, 0, 0, 0, 0, 0, 0, 10, 4j, 11, 12, 0,
                       0, 13, 1j, 14, 15, 0, 0, 0, 0, 0, 0, 0,  0,  2j, 0,  0)
         expected_result = tuple(range(1, 16))
         occupied_carriers = ((1, 3, 4, 11, 12, 14), (1, 2, 4, 11, 13, 14),)
-        n_syms = len(tx_symbols)/fft_len
+        n_syms = len(tx_symbols) // fft_len
         packet_len_tsb_key = "packet_len"
         tag2 = gr.tag_t()
         tag2.offset = 0
diff --git a/gr-digital/python/digital/qa_ofdm_sync_sc_cfb.py b/gr-digital/python/digital/qa_ofdm_sync_sc_cfb.py
old mode 100755
new mode 100644
index ccb6dff439..c09bd2861c
--- a/gr-digital/python/digital/qa_ofdm_sync_sc_cfb.py
+++ b/gr-digital/python/digital/qa_ofdm_sync_sc_cfb.py
@@ -1,24 +1,26 @@
 #!/usr/bin/env python
 #
 # Copyright 2012,2013 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
+
+from __future__ import division
 
 import numpy
 import random
@@ -44,7 +46,7 @@ class qa_ofdm_sync_sc_cfb (gr_unittest.TestCase):
         fft_len = 32
         cp_len = 4
         sig_len = (fft_len + cp_len) * 10
-        sync_symbol = [(random.randint(0, 1)*2)-1 for x in range(fft_len/2)] * 2
+        sync_symbol = [(random.randint(0, 1)*2)-1 for x in range(fft_len // 2)] * 2
         tx_signal = [0,] * n_zeros + \
                     sync_symbol[-cp_len:] + \
                     sync_symbol + \
@@ -60,8 +62,8 @@ class qa_ofdm_sync_sc_cfb (gr_unittest.TestCase):
         self.tb.connect((sync, 0), sink_freq)
         self.tb.connect((sync, 1), sink_detect)
         self.tb.run()
-        sig1_detect = sink_detect.data()[0:len(tx_signal)/2]
-        sig2_detect = sink_detect.data()[len(tx_signal)/2:]
+        sig1_detect = sink_detect.data()[0:len(tx_signal) // 2]
+        sig2_detect = sink_detect.data()[len(tx_signal) // 2:]
         self.assertTrue(abs(sig1_detect.index(1) - (n_zeros + fft_len + cp_len)) < cp_len)
         self.assertTrue(abs(sig2_detect.index(1) - (n_zeros + fft_len + cp_len)) < cp_len)
         self.assertEqual(numpy.sum(sig1_detect), 1)
@@ -75,7 +77,7 @@ class qa_ofdm_sync_sc_cfb (gr_unittest.TestCase):
         max_freq_offset = 2*numpy.pi/fft_len # Otherwise, it's coarse
         freq_offset = ((2 * random.random()) - 1) * max_freq_offset
         sig_len = (fft_len + cp_len) * 10
-        sync_symbol = [(random.randint(0, 1)*2)-1 for x in range(fft_len/2)] * 2
+        sync_symbol = [(random.randint(0, 1)*2)-1 for x in range(fft_len // 2)] * 2
         tx_signal = sync_symbol[-cp_len:] + \
                     sync_symbol + \
                     [(random.randint(0, 1)*2)-1 for x in range(sig_len)]
@@ -99,8 +101,8 @@ class qa_ofdm_sync_sc_cfb (gr_unittest.TestCase):
         fft_len = 32
         cp_len = 4
         tx_signal = []
-        for i in xrange(n_bursts):
-            sync_symbol = [(random.randint(0, 1)*2)-1 for x in range(fft_len/2)] * 2
+        for i in range(n_bursts):
+            sync_symbol = [(random.randint(0, 1)*2)-1 for x in range(fft_len // 2)] * 2
             tx_signal += [0,] * random.randint(0, 2*fft_len) + \
                          sync_symbol[-cp_len:] + \
                          sync_symbol + \
@@ -139,8 +141,8 @@ Detection error was: %d """ % (numpy.sum(sink_detect.data()) - n_bursts)
         tagname = "packet_length"
         min_packet_length = 10
         max_packet_length = 50
-        sync_sequence = [random.randint(0, 1)*2-1 for x in range(fft_len/2)]
-        for i in xrange(n_bursts):
+        sync_sequence = [random.randint(0, 1)*2-1 for x in range(fft_len // 2)]
+        for i in range(n_bursts):
             packet_length = random.randint(min_packet_length,
                                            max_packet_length+1)
             packet = [random.randint(0, 255) for i in range(packet_length)]
diff --git a/gr-digital/python/digital/qa_ofdm_txrx.py b/gr-digital/python/digital/qa_ofdm_txrx.py
old mode 100755
new mode 100644
index ac267d2389..2e8d101317
--- a/gr-digital/python/digital/qa_ofdm_txrx.py
+++ b/gr-digital/python/digital/qa_ofdm_txrx.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 # 
 
+
 import random
 import numpy
 
diff --git a/gr-digital/python/digital/qa_packet_format.py b/gr-digital/python/digital/qa_packet_format.py
index 6440b80a5e..5a713698be 100644
--- a/gr-digital/python/digital/qa_packet_format.py
+++ b/gr-digital/python/digital/qa_packet_format.py
@@ -20,7 +20,12 @@
 # Boston, MA 02110-1301, USA.
 #
 
-import random, time, struct
+
+import time
+import struct
+
+import six
+
 import pmt
 from gnuradio import gr, gr_unittest, digital, blocks
 from gnuradio.digital import packet_utils
@@ -57,6 +62,7 @@ class test_packet_format_fb(gr_unittest.TestCase):
         self.tb.start()
         while (snk_hdr.num_messages() < 1) and (snk_pld.num_messages() < 1):
             time.sleep(0.1)
+
         self.tb.stop()
         self.tb.wait()
 
@@ -65,14 +71,14 @@ class test_packet_format_fb(gr_unittest.TestCase):
 
         result_hdr = pmt.u8vector_elements(result_hdr_pmt)
         result_pld = pmt.u8vector_elements(result_pld_pmt)
-        header = "".join([chr(r) for r in result_hdr])
-        payload = "".join([chr(r) for r in result_pld])
+        header = "".join(chr(r) for r in result_hdr)
+        payload = "".join(chr(r) for r in result_pld)
 
         access_code = packet_utils.conv_1_0_string_to_packed_binary_string(packet_utils.default_access_code)[0]
         rx_access_code = header[0:len(access_code)]
 
         length = len(send_str)
-        rx_length = struct.unpack_from("!H", header, len(access_code))[0]
+        rx_length = struct.unpack_from(b"!H", six.b(header), len(access_code))[0]
 
         self.assertEqual(access_code, rx_access_code)
         self.assertEqual(length, rx_length)
@@ -113,16 +119,16 @@ class test_packet_format_fb(gr_unittest.TestCase):
 
         result_hdr = pmt.u8vector_elements(result_hdr_pmt)
         result_pld = pmt.u8vector_elements(result_pld_pmt)
-        header = "".join([chr(r) for r in result_hdr])
-        payload = "".join([chr(r) for r in result_pld])
+        header = "".join(chr(r) for r in result_hdr)
+        payload = "".join(chr(r) for r in result_pld)
 
         access_code = packet_utils.conv_1_0_string_to_packed_binary_string(packet_utils.default_access_code)[0]
         rx_access_code = header[0:len(access_code)]
 
         length = len(send_str)
-        rx_length = struct.unpack_from("!H", header, len(access_code))[0]
-        rx_bps = struct.unpack_from("!H", header, len(access_code)+4)[0]
-        rx_counter = struct.unpack_from("!H", header, len(access_code)+6)[0]
+        rx_length = struct.unpack_from(b"!H", six.b(header), len(access_code))[0]
+        rx_bps = struct.unpack_from(b"!H", six.b(header), len(access_code)+4)[0]
+        rx_counter = struct.unpack_from(b"!H", six.b(header), len(access_code)+6)[0]
 
         self.assertEqual(access_code, rx_access_code)
         self.assertEqual(length, rx_length)
diff --git a/gr-digital/python/digital/qa_packet_headergenerator_bb.py b/gr-digital/python/digital/qa_packet_headergenerator_bb.py
old mode 100755
new mode 100644
index d2677ce220..1ca0e85d8d
--- a/gr-digital/python/digital/qa_packet_headergenerator_bb.py
+++ b/gr-digital/python/digital/qa_packet_headergenerator_bb.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 # 
 
+
 from gnuradio import gr, gr_unittest, digital, blocks
 from gnuradio.gr import packet_utils
 import pmt
diff --git a/gr-digital/python/digital/qa_packet_headerparser_b.py b/gr-digital/python/digital/qa_packet_headerparser_b.py
old mode 100755
new mode 100644
index fb4226d6fd..3e22fa9100
--- a/gr-digital/python/digital/qa_packet_headerparser_b.py
+++ b/gr-digital/python/digital/qa_packet_headerparser_b.py
@@ -19,6 +19,7 @@
 # Boston, MA 02110-1301, USA.
 # 
 
+
 import time
 import random
 
@@ -77,7 +78,7 @@ class qa_packet_headerparser_b (gr_unittest.TestCase):
         header_len = 32
         packet_len_tagname = "packet_len"
         packet_lengths = [random.randint(1, 100) for x in range(N)]
-        data, tags = tagged_streams.packets_to_vectors([range(packet_lengths[i]) for i in range(N)], packet_len_tagname)
+        data, tags = tagged_streams.packets_to_vectors([list(range(packet_lengths[i])) for i in range(N)], packet_len_tagname)
         src = blocks.vector_source_b(data, False, 1, tags)
         header_gen = digital.packet_headergenerator_bb(header_len, packet_len_tagname)
         header_parser = digital.packet_headerparser_b(header_len, packet_len_tagname)
@@ -89,7 +90,7 @@ class qa_packet_headerparser_b (gr_unittest.TestCase):
         self.tb.stop()
         self.tb.wait()
         self.assertEqual(sink.num_messages(), N)
-        for i in xrange(N):
+        for i in range(N):
             msg = pmt.to_python(sink.get_message(i))
             self.assertEqual(msg, {'packet_len': packet_lengths[i], 'packet_num': i})
 
@@ -110,7 +111,7 @@ class qa_packet_headerparser_b (gr_unittest.TestCase):
         frame_len_tagname = "frame_len"
         src = blocks.vector_source_b(encoded_headers)
         header_formatter = digital.packet_header_ofdm(
-                (range(32),range(4),range(8)), # 32/4/8 carriers are occupied (which doesn't matter here)
+                (list(range(32)),list(range(4)),list(range(8))), # 32/4/8 carriers are occupied (which doesn't matter here)
                 1,         # 1 OFDM symbol per header (= 32 bits)
                 packet_len_tagname,
                 frame_len_tagname,
@@ -141,10 +142,10 @@ class qa_packet_headerparser_b (gr_unittest.TestCase):
         packet_length = 23
         packet_len_tagname = "packet_len"
         frame_len_tagname = "frame_len"
-        data, tags = tagged_streams.packets_to_vectors([range(packet_length),range(packet_length),], packet_len_tagname)
+        data, tags = tagged_streams.packets_to_vectors([list(range(packet_length)),list(range(packet_length)),], packet_len_tagname)
         src = blocks.vector_source_b(data, False, 1, tags)
         header_formatter = digital.packet_header_ofdm(
-                (range(32),), # 32 carriers are occupied (which doesn't matter here)
+                (list(range(32)),), # 32 carriers are occupied (which doesn't matter here)
                 1,         # 1 OFDM symbol per header (= 32 bits)
                 packet_len_tagname,
                 frame_len_tagname,
diff --git a/gr-digital/python/digital/qa_pfb_clock_sync.py b/gr-digital/python/digital/qa_pfb_clock_sync.py
old mode 100755
new mode 100644
index e16a99338e..77980d19e5
--- a/gr-digital/python/digital/qa_pfb_clock_sync.py
+++ b/gr-digital/python/digital/qa_pfb_clock_sync.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+
 import random
 import cmath
 import time
@@ -39,9 +41,9 @@ class test_pfb_clock_sync(gr_unittest.TestCase):
         excess_bw = 0.35
 
         sps = 4
-        loop_bw = cmath.pi/100.0
+        loop_bw = cmath.pi / 100.0
         nfilts = 32
-        init_phase = nfilts/2
+        init_phase = nfilts / 2
         max_rate_deviation = 0.5
         osps = 1
 
@@ -92,9 +94,9 @@ class test_pfb_clock_sync(gr_unittest.TestCase):
         excess_bw = 0.35
 
         sps = 4
-        loop_bw = cmath.pi/100.0
+        loop_bw = cmath.pi / 100.0
         nfilts = 32
-        init_phase = nfilts/2
+        init_phase = nfilts / 2
         max_rate_deviation = 0.5
         osps = 1
 
@@ -146,9 +148,9 @@ class test_pfb_clock_sync(gr_unittest.TestCase):
         excess_bw1 = 0.22
 
         sps = 4
-        loop_bw = cmath.pi/100.0
+        loop_bw = cmath.pi / 100.0
         nfilts = 32
-        init_phase = nfilts/2
+        init_phase = nfilts / 2
         max_rate_deviation = 0.5
         osps = 1
 
@@ -184,9 +186,9 @@ class test_pfb_clock_sync(gr_unittest.TestCase):
         excess_bw1 = 0.22
 
         sps = 4
-        loop_bw = cmath.pi/100.0
+        loop_bw = cmath.pi / 100.0
         nfilts = 32
-        init_phase = nfilts/2
+        init_phase = nfilts / 2
         max_rate_deviation = 0.5
         osps = 1
 
diff --git a/gr-digital/python/digital/qa_pn_correlator_cc.py b/gr-digital/python/digital/qa_pn_correlator_cc.py
old mode 100755
new mode 100644
index 92041d9eda..111801b5c9
--- a/gr-digital/python/digital/qa_pn_correlator_cc.py
+++ b/gr-digital/python/digital/qa_pn_correlator_cc.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, digital, blocks
 
 class test_pn_correlator_cc(gr_unittest.TestCase):
diff --git a/gr-digital/python/digital/qa_probe_density.py b/gr-digital/python/digital/qa_probe_density.py
old mode 100755
new mode 100644
index 752d95da3e..e4450cd092
--- a/gr-digital/python/digital/qa_probe_density.py
+++ b/gr-digital/python/digital/qa_probe_density.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 # 
 
+from __future__ import print_function
+
 from gnuradio import gr, gr_unittest, digital, blocks
 
 class test_probe_density(gr_unittest.TestCase):
@@ -62,7 +64,7 @@ class test_probe_density(gr_unittest.TestCase):
         self.tb.run()
 
         result_data = op.density()
-        print result_data
+        print(result_data)
         self.assertAlmostEqual(expected_data, result_data, 5)
 
 if __name__ == '__main__':
diff --git a/gr-digital/python/digital/qa_scrambler.py b/gr-digital/python/digital/qa_scrambler.py
old mode 100755
new mode 100644
index 4d35879b1f..bb8e1a95ae
--- a/gr-digital/python/digital/qa_scrambler.py
+++ b/gr-digital/python/digital/qa_scrambler.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, digital, blocks
 import pmt
 
diff --git a/gr-digital/python/digital/qa_simple_correlator.py b/gr-digital/python/digital/qa_simple_correlator.py
old mode 100755
new mode 100644
index f39fb62dda..9c0352e896
--- a/gr-digital/python/digital/qa_simple_correlator.py
+++ b/gr-digital/python/digital/qa_simple_correlator.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks, filter, digital
 
 class test_simple_correlator(gr_unittest.TestCase):
diff --git a/gr-digital/python/digital/qa_simple_framer.py b/gr-digital/python/digital/qa_simple_framer.py
old mode 100755
new mode 100644
index cf9934648b..fb1ac0dfd6
--- a/gr-digital/python/digital/qa_simple_framer.py
+++ b/gr-digital/python/digital/qa_simple_framer.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, digital, blocks
 
 class test_simple_framer(gr_unittest.TestCase):
diff --git a/gr-digital/python/digital/qam.py b/gr-digital/python/digital/qam.py
index 518be78941..be4b7efa74 100644
--- a/gr-digital/python/digital/qam.py
+++ b/gr-digital/python/digital/qam.py
@@ -1,37 +1,40 @@
 #
 # Copyright 2005,2006,2011,2013 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
 
 """
 QAM modulation and demodulation.
 """
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import unicode_literals
 
 from math import pi, sqrt, log
 
 from gnuradio import gr
-from generic_mod_demod import generic_mod, generic_demod
-from generic_mod_demod import shared_mod_args, shared_demod_args
-from utils.gray_code import gray_code
-from utils import mod_codes
-import modulation_utils
-import digital_swig as digital
+from .generic_mod_demod import generic_mod, generic_demod
+from .generic_mod_demod import shared_mod_args, shared_demod_args
+from .utils.gray_code import gray_code
+from .utils import mod_codes
+from . import modulation_utils
+from . import digital_swig as digital
 
 # Default number of points in constellation.
 _def_constellation_points = 16
@@ -42,7 +45,7 @@ _def_differential = True
 _def_mod_code = mod_codes.NO_CODE
 
 def is_power_of_four(x):
-    v = log(x)/log(4)
+    v = log(x) / log(4)
     return int(v) == v
 
 def get_bit(x, n):
@@ -52,7 +55,7 @@ def get_bit(x, n):
 def get_bits(x, n, k):
     """ Get the k bits of integer x starting at bit n(from little end)."""
     # Remove the n smallest bits
-    v = x >> n 
+    v = x >> n
     # Remove all bits bigger than n+k-1
     return v % pow(2, k)
 
@@ -74,7 +77,7 @@ def make_differential_constellation(m, gray_coded):
     k = int(log(m) / log(2.0))
     # First create a constellation for one quadrant containing m/4 points.
     # The quadrant has 'side' points along each side of a quadrant.
-    side = int(sqrtm/2)
+    side = int(sqrtm / 2)
     if gray_coded:
         # Number rows and columns using gray codes.
         gcs = gray_code(side)
@@ -83,7 +86,7 @@ def make_differential_constellation(m, gray_coded):
     else:
         i_gcs = dict([(i, i) for i in range(0, side)])
     # The distance between points is found.
-    step = 1/(side-0.5)
+    step = 1 / (side-0.5)
 
     gc_to_x = [(i_gcs[gc]+0.5)*step for gc in range(0, side)]
 
@@ -100,7 +103,7 @@ def make_differential_constellation(m, gray_coded):
             return complex(-gc_to_x[gc_x], -gc_to_x[gc_y])
         if quad == 3:
             return complex(gc_to_x[gc_y], -gc_to_x[gc_x])
-        raise StandardError("Impossible!")
+        raise Exception("Impossible!")
 
     # First two bits determine quadrant.
     # Next (k-2)/2 bits determine x position.
@@ -108,8 +111,8 @@ def make_differential_constellation(m, gray_coded):
     # How x and y relate to real and imag depends on quadrant (see get_c function).
     const_map = []
     for i in range(m):
-        y = get_bits(i, 0, (k-2)/2)
-        x = get_bits(i, (k-2)/2, (k-2)/2)
+        y = get_bits(i, 0, (k-2) // 2)
+        x = get_bits(i, (k-2) // 2, (k-2) // 2)
         quad = get_bits(i, k-2, 2)
         const_map.append(get_c(x, y, quad))
 
@@ -127,17 +130,17 @@ def make_non_differential_constellation(m, gray_coded):
         # Get inverse gray codes.
         i_gcs = mod_codes.invert_code(gcs)
     else:
-        i_gcs = range(0, side)
+        i_gcs = list(range(0, side))
     # The distance between points is found.
-    step = 2.0/(side-1)
+    step = 2.0 / (side-1)
 
     gc_to_x = [-1 + i_gcs[gc]*step for gc in range(0, side)]
     # First k/2 bits determine x position.
     # Following k/2 bits determine y position.
     const_map = []
     for i in range(m):
-        y = gc_to_x[get_bits(i, 0, k/2)]
-        x = gc_to_x[get_bits(i, k/2, k/2)]
+        y = gc_to_x[get_bits(i, 0, k // 2)]
+        x = gc_to_x[get_bits(i, k // 2, k // 2)]
         const_map.append(complex(x,y))
     return const_map
 
@@ -170,7 +173,7 @@ def qam_constellation(constellation_points=_def_constellation_points,
     else:
         points = make_non_differential_constellation(constellation_points, gray_coded)
     side = int(sqrt(constellation_points))
-    width = 2.0/(side-1)
+    width = 2.0 / (side-1)
 
     # No pre-diff code
     # Should add one so that we can gray-code the quadrant bits too.
@@ -242,8 +245,8 @@ def large_ampls_to_corners_mapping(side, points, width):
             sector = real_x * side + imag_x
             # If this sector is a normal constellation sector then
             # use the center point.
-            c = ((real_x-side/2.0+0.5)*width +
-                 (imag_x-side/2.0+0.5)*width*1j)
+            c = ((real_x-side / 2.0+0.5)*width +
+                 (imag_x-side / 2.0+0.5)*width*1j)
             if (real_x >= extra_layers and real_x < side-extra_layers
                 and imag_x >= extra_layers and imag_x < side-extra_layers):
                 # This is not an edge row/column.  Find closest point.
@@ -254,7 +257,7 @@ def large_ampls_to_corners_mapping(side, points, width):
             sector_values.append(index)
     return sector_values
 
- 
+
 # /////////////////////////////////////////////////////////////////////////////
 #                           QAM modulator
 # /////////////////////////////////////////////////////////////////////////////
@@ -262,10 +265,10 @@ def large_ampls_to_corners_mapping(side, points, width):
 class qam_mod(generic_mod):
     """
     Hierarchical block for RRC-filtered QAM modulation.
-    
+
     The input is a byte stream (unsigned char) and the
     output is the complex modulated signal at baseband.
-    
+
     Args:
         constellation_points: Number of constellation points (must be a power of four) (integer).
         mod_code: Whether to use a gray_code (digital.mod_codes.GRAY_CODE) or not (digital.mod_codes.NO_CODE).
@@ -280,10 +283,10 @@ class qam_mod(generic_mod):
                  *args, **kwargs):
 
         """
-	Hierarchical block for RRC-filtered QAM modulation.
+        Hierarchical block for RRC-filtered QAM modulation.
 
-	The input is a byte stream (unsigned char) and the
-	output is the complex modulated signal at baseband.
+        The input is a byte stream (unsigned char) and the
+        output is the complex modulated signal at baseband.
 
         Args:
             constellation_points: Number of constellation points.
@@ -292,7 +295,7 @@ class qam_mod(generic_mod):
                       if we want gray coding, see digital.utils.mod_codes)
 
         See generic_mod block for list of additional parameters.
-	"""
+        """
 
         constellation = qam_constellation(constellation_points, differential,
                                           mod_code)
@@ -309,10 +312,10 @@ class qam_mod(generic_mod):
 class qam_demod(generic_demod):
     """
     Hierarchical block for RRC-filtered QAM modulation.
-    
+
     The input is a byte stream (unsigned char) and the
     output is the complex modulated signal at baseband.
-    
+
     Args:
         constellation_points: Number of constellation points (must be a power of four) (integer).
         mod_code: Whether to use a gray_code (digital.mod_codes.GRAY_CODE) or not (digital.mod_codes.NO_CODE).
@@ -327,10 +330,10 @@ class qam_demod(generic_demod):
                  large_ampls_to_corner = False,
                  *args, **kwargs):
         """
-	Hierarchical block for RRC-filtered QAM modulation.
+        Hierarchical block for RRC-filtered QAM modulation.
 
-	The input is a byte stream (unsigned char) and the
-	output is the complex modulated signal at baseband.
+        The input is a byte stream (unsigned char) and the
+        output is the complex modulated signal at baseband.
 
         Args:
             constellation_points: Number of constellation points.
diff --git a/gr-digital/python/digital/qam_constellations.py b/gr-digital/python/digital/qam_constellations.py
old mode 100755
new mode 100644
index ab58916384..dc85e90ff8
--- a/gr-digital/python/digital/qam_constellations.py
+++ b/gr-digital/python/digital/qam_constellations.py
@@ -20,8 +20,11 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import unicode_literals
 import numpy
-from constellation_map_generator import *
+from .constellation_map_generator import *
 
 '''
 Note on the naming scheme. Each constellation is named using a prefix
@@ -242,8 +245,8 @@ def sd_qam_16_0x0_0_1_2_3(x, Es=1):
     '''
 
     dist = Es*numpy.sqrt(2)
-    boundary = dist/3.0
-    dist0 = dist/6.0
+    boundary = dist / 3.0
+    dist0 = dist / 6.0
 #    print "Sample:    ", x
 #    print "Es:        ", Es
 #    print "Distance:  ", dist
@@ -270,7 +273,7 @@ def sd_qam_16_0x0_0_1_2_3(x, Es=1):
     b2 = -abs(x_re) + boundary
     b0 = -abs(x_im) + boundary
 
-    return [(Es/2.0)*b3, (Es/2.0)*b2, (Es/2.0)*b1, (Es/2.0)*b0]
+    return [(Es / 2.0)*b3, (Es / 2.0)*b2, (Es / 2.0)*b1, (Es / 2.0)*b0]
 sd_qam_16 = sd_qam_16_0x0_0_1_2_3
 sd_qam_16_0 = sd_qam_16
 
diff --git a/gr-digital/python/digital/qamlike.py b/gr-digital/python/digital/qamlike.py
index 2f8c855339..286eabd898 100644
--- a/gr-digital/python/digital/qamlike.py
+++ b/gr-digital/python/digital/qamlike.py
@@ -1,33 +1,35 @@
 # Copyright 2013 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
 
 """
 This file contains constellations that are similar to QAM, but are not perfect squares.
 """
+from __future__ import absolute_import
+from __future__ import unicode_literals
 
-import digital_swig
-from qam import large_ampls_to_corners_mapping
+from . import digital_swig
+from .qam import large_ampls_to_corners_mapping
 
 def qam32_holeinside_constellation(large_ampls_to_corners=False):
     # First make constellation for one quadrant.
-    #      0   1   2 
+    #      0   1   2
     # 2 - 010 111 110
     # 1 - 011 101 100
     # 0 - 000 001
@@ -72,4 +74,3 @@ def qam32_holeinside_constellation(large_ampls_to_corners=False):
         constellation = digital_swig.constellation_expl_rect(
             points, pre_diff_code, 4, side, side, width, width, sector_values)
     return constellation
-
diff --git a/gr-digital/python/digital/qpsk.py b/gr-digital/python/digital/qpsk.py
index c5230ef24d..8303883992 100644
--- a/gr-digital/python/digital/qpsk.py
+++ b/gr-digital/python/digital/qpsk.py
@@ -24,13 +24,15 @@ QPSK modulation.
 
 Demodulation is not included since the generic_mod_demod
 """
+from __future__ import absolute_import
+from __future__ import unicode_literals
 
 from gnuradio import gr
 from gnuradio.digital.generic_mod_demod import generic_mod, generic_demod
 from gnuradio.digital.generic_mod_demod import shared_mod_args, shared_demod_args
-from utils import mod_codes
-import digital_swig as digital
-import modulation_utils
+from .utils import mod_codes
+from . import digital_swig as digital
+from . import modulation_utils
 
 # The default encoding (e.g. gray-code, set-partition)
 _def_mod_code = mod_codes.GRAY_CODE
diff --git a/gr-digital/python/digital/soft_dec_lut_gen.py b/gr-digital/python/digital/soft_dec_lut_gen.py
index f517277702..fc69f7f678 100644
--- a/gr-digital/python/digital/soft_dec_lut_gen.py
+++ b/gr-digital/python/digital/soft_dec_lut_gen.py
@@ -20,6 +20,10 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
+
 import numpy
 
 def soft_dec_table_generator(soft_dec_gen, prec, Es=1):
@@ -123,6 +127,7 @@ def soft_dec_table(constel, symbols, prec, npwr=1):
     xrng = numpy.linspace(re_min, re_max, npts)
 
     table = []
+
     for y in yrng:
         for x in xrng:
             pt = complex(x, y)
@@ -196,8 +201,8 @@ def calc_soft_dec(sample, constel, symbols, npwr=1):
 
     M = len(constel)
     k = int(numpy.log2(M))
-    tmp = 2*k*[0,]
-    s = k*[0,]
+    tmp = 2*k*[0]
+    s = k*[0]
 
     for i in range(M):
         # Calculate the distance between the sample and the current
@@ -206,7 +211,7 @@ def calc_soft_dec(sample, constel, symbols, npwr=1):
 
         # Calculate the probability factor from the distance and the
         # scaled noise power.
-        d = numpy.exp(-dist/npwr)
+        d = numpy.exp(-dist / npwr)
 
         for j in range(k):
             # Get the bit at the jth index
@@ -235,21 +240,21 @@ def show_table(table):
     pp = ""
     subi = 1
     subj = 0
-    for i in reversed(xrange(prec+1)):
+    for i in reversed(list(range(prec+1))):
         if(i == prec//2):
             pp += "-----" + prec*((nbits*8)+3)*"-" + "\n"
             subi = 0
             continue
-        for j in xrange(prec+1):
+        for j in range(prec+1):
             if(j == prec//2):
                 pp += "| "
                 subj = 1
             else:
                 item = table[prec*(i-subi) + (j-subj)]
                 pp += "( "
-                for t in xrange(nbits-1, -1, -1):
+                for t in range(nbits-1, -1, -1):
                     pp += "{0: .4f} ".format(item[t])
                 pp += ") "
         pp += "\n"
         subj = 0
-    print pp
+    print(pp)
diff --git a/gr-digital/python/digital/test_soft_decisions.py b/gr-digital/python/digital/test_soft_decisions.py
old mode 100755
new mode 100644
index 78714100b7..f2ed547bd5
--- a/gr-digital/python/digital/test_soft_decisions.py
+++ b/gr-digital/python/digital/test_soft_decisions.py
@@ -1,30 +1,35 @@
 #!/usr/bin/env python
 #
 # Copyright 2013 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
+
+from __future__ import print_function
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import unicode_literals
 
 import numpy, pylab, sys
 from gnuradio import digital
-from soft_dec_lut_gen import *
-from psk_constellations import *
-from qam_constellations import *
+from .soft_dec_lut_gen import *
+from .psk_constellations import *
+from .qam_constellations import *
 
 def test_qpsk(i, sample, prec):
     qpsk_const_list = [psk_4_0, psk_4_1, psk_4_2, psk_4_3,
@@ -61,7 +66,7 @@ def test_qpsk(i, sample, prec):
             y_cpp_table, y_cpp_raw_calc, constel, code, c)
 
 def test_qam16(i, sample, prec):
-    sample = sample/1
+    sample = sample / 1
     qam_const_list = [qam_16_0, ]
     qam_lut_gen_list = [sd_qam_16_0, ]
 
@@ -114,12 +119,12 @@ if __name__ == "__main__":
 
     k = numpy.log2(len(constel))
 
-    print "Sample: ", x
-    print "Python Generator Calculated: ", (y_python_gen_calc)
-    print "Python Generator Table:      ", (y_python_table)
-    print "Python Raw calc:             ", (y_python_raw_calc)
-    print "C++ Table calc:              ", (y_cpp_table)
-    print "C++ Raw calc:                ", (y_cpp_raw_calc)
+    print("Sample: ", x)
+    print("Python Generator Calculated: ", (y_python_gen_calc))
+    print("Python Generator Table:      ", (y_python_table))
+    print("Python Raw calc:             ", (y_python_raw_calc))
+    print("C++ Table calc:              ", (y_cpp_table))
+    print("C++ Raw calc:                ", (y_cpp_raw_calc))
 
     fig = pylab.figure(1)
     sp1 = fig.add_subplot(1,1,1)
diff --git a/gr-digital/python/digital/utils/alignment.py b/gr-digital/python/digital/utils/alignment.py
index f3ad3781e2..e9292a4bcc 100644
--- a/gr-digital/python/digital/utils/alignment.py
+++ b/gr-digital/python/digital/utils/alignment.py
@@ -41,6 +41,8 @@ This module contains functions for aligning sequences.
 (100, -20)
 
 """
+from __future__ import division
+from __future__ import unicode_literals
 
 import random
 
@@ -63,7 +65,7 @@ def compare_sequences(d1, d2, offset, sample_indices=None):
     """
     max_index = min(len(d1), len(d2)+offset)
     if sample_indices is None:
-        sample_indices = range(0, max_index)
+        sample_indices = list(range(0, max_index))
     correct = 0
     total = 0
     for i in sample_indices:
@@ -84,8 +86,8 @@ def random_sample(size, num_samples=def_num_samples, seed=None):
     if num_samples > size:
         indices = set(range(0, size))
     else:
-        if num_samples > size/2:
-            num_samples = num_samples/2
+        if num_samples > size / 2:
+            num_samples = num_samples / 2
         indices = set([])
         while len(indices) < num_samples:
             index = rndm.randint(0, size-1)
@@ -119,8 +121,8 @@ def align_sequences(d1, d2,
     best_offset = None
     best_compared = None
     best_correct = None
-    pos_range = range(0, min(len(d1), max_offset))
-    neg_range = range(-1, -min(len(d2), max_offset), -1)
+    pos_range = list(range(0, min(len(d1), max_offset)))
+    neg_range = list(range(-1, -min(len(d2), max_offset), -1))
     # Interleave the positive and negative offsets.
     int_range = [item for items in zip(pos_range, neg_range) for item in items]
     for offset in int_range:
diff --git a/gr-digital/python/digital/utils/gray_code.py b/gr-digital/python/digital/utils/gray_code.py
index 926a1ded10..ad88274087 100644
--- a/gr-digital/python/digital/utils/gray_code.py
+++ b/gr-digital/python/digital/utils/gray_code.py
@@ -1,25 +1,27 @@
 #!/usr/bin/env python
 #
 # Copyright 2011 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
 
+from __future__ import division
+from __future__ import unicode_literals
 class GrayCodeGenerator(object):
     """
     Generates and caches gray codes.
@@ -41,7 +43,7 @@ class GrayCodeGenerator(object):
         if len(self.gcs) < length:
             self.generate_new_gray_code(length)
         return self.gcs[:length]
-    
+
     def generate_new_gray_code(self, length):
         """
         Generates new gray code and places into cache.
@@ -49,7 +51,7 @@ class GrayCodeGenerator(object):
         while len(self.gcs) < length:
             if self.i == self.lp2:
                 # if i is a power of two then gray number is of form 1100000...
-                result = self.i + self.i/2
+                result = self.i + self.i // 2
             else:
                 # if not we take advantage of the symmetry of all but the last bit
                 # around a power of two.
diff --git a/gr-digital/python/digital/utils/mod_codes.py b/gr-digital/python/digital/utils/mod_codes.py
index f55fe41b8b..586ab1999a 100644
--- a/gr-digital/python/digital/utils/mod_codes.py
+++ b/gr-digital/python/digital/utils/mod_codes.py
@@ -21,6 +21,7 @@
 # 
 
 # Constants used to represent what coding to use.
+from __future__ import unicode_literals
 GRAY_CODE = 'gray'
 SET_PARTITION_CODE = 'set-partition'
 NO_CODE = 'none'
diff --git a/gr-digital/python/digital/utils/tagged_streams.py b/gr-digital/python/digital/utils/tagged_streams.py
index 4b393bfc20..68267a293e 100644
--- a/gr-digital/python/digital/utils/tagged_streams.py
+++ b/gr-digital/python/digital/utils/tagged_streams.py
@@ -1,27 +1,30 @@
 #!/usr/bin/env python
 #
 # Copyright 2013 Free Software Foundation, Inc.
-# 
+#
 # This file is part of GNU Radio
-# 
+#
 # GNU Radio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3, or (at your option)
 # any later version.
-# 
+#
 # GNU Radio is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with GNU Radio; see the file COPYING.  If not, write to
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
 
 # DEPRECATED -- Marked for removal in 3.8
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio import gr
 import pmt
 
@@ -30,9 +33,9 @@ def make_lengthtags(lengths, offsets, tagname='length', vlen=1):
     assert(len(offsets) == len(lengths))
     for offset, length in zip(offsets, lengths):
         tag = gr.tag_t()
-        tag.offset = offset/vlen
+        tag.offset = offset / vlen
         tag.key = pmt.string_to_symbol(tagname)
-        tag.value = pmt.from_long(length/vlen)
+        tag.value = pmt.from_long(length / vlen)
         tags.append(tag)
     return tags
 
@@ -75,7 +78,7 @@ def count_bursts(data, tags, lengthtagname, vlen=1):
         if pos in lengths:
             if in_packet:
                 print("Got tag at pos {0} current packet_pos is {1}".format(pos, packet_pos))
-                raise StandardError("Received packet tag while in packet.")
+                raise Exception("Received packet tag while in packet.")
             packet_pos = -1
             packet_length = lengths[pos]
             in_packet = True
@@ -127,9 +130,9 @@ def packets_to_vectors(packets, lengthtagname, vlen=1):
     for packet in packets:
         data.extend(packet)
         tag = gr.tag_t()
-        tag.offset = offset/vlen
+        tag.offset = offset // vlen
         tag.key = pmt.string_to_symbol(lengthtagname)
-        tag.value = pmt.from_long(len(packet)/vlen)
+        tag.value = pmt.from_long(len(packet) // vlen)
         tags.append(tag)
         offset = offset + len(packet)
     return data, tags
diff --git a/gr-digital/swig/digital_swig.py.in b/gr-digital/swig/digital_swig.py.in
index d5d55a0f4e..a4326d1343 100644
--- a/gr-digital/swig/digital_swig.py.in
+++ b/gr-digital/swig/digital_swig.py.in
@@ -19,6 +19,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
-from digital_swig0 import *
-from digital_swig1 import *
-from digital_swig2 import *
+from __future__ import absolute_import
+
+from .digital_swig0 import *
+from .digital_swig1 import *
+from .digital_swig2 import *
diff --git a/gr-dtv/examples/atsc_ctrlport_monitor.py b/gr-dtv/examples/atsc_ctrlport_monitor.py
old mode 100755
new mode 100644
index 7c43aebb77..9e1a7778c2
--- a/gr-dtv/examples/atsc_ctrlport_monitor.py
+++ b/gr-dtv/examples/atsc_ctrlport_monitor.py
@@ -18,6 +18,10 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
+
 import sys
 import matplotlib
 matplotlib.use("QT4Agg")
@@ -37,12 +41,12 @@ the link quality. This also gets the equalizer taps of the receiver
 and displays the frequency response.
 """
 
-class atsc_ctrlport_monitor:
+class atsc_ctrlport_monitor(object):
     def __init__(self, host, port):
         argv = [None, host, port]
         radiosys = GNURadioControlPortClient(argv=argv, rpcmethod='thrift')
         self.radio = radiosys.client
-        print self.radio
+        print(self.radio)
 
 
         vt_init_key = 'dtv_atsc_viterbi_decoder0::decoder_metrics'
@@ -108,17 +112,17 @@ class atsc_ctrlport_monitor:
 
         ntaps = len(eqdata.value)
         taps.set_ydata(eqdata.value)
-        taps.set_xdata(xrange(ntaps))
+        taps.set_xdata(list(range(ntaps)))
         self._sp0.set_xlim(0, ntaps)
         self._sp0.set_ylim(min(eqdata.value), max(eqdata.value))
 
         fs = 6.25e6
-        freq = scipy.linspace(-fs/2, fs/2, 10000)
+        freq = scipy.linspace(-fs / 2, fs / 2, 10000)
         H = fftpack.fftshift(fftpack.fft(eqdata.value, 10000))
         HdB = 20.0*scipy.log10(abs(H))
         psd.set_ydata(HdB)
         psd.set_xdata(freq)
-        self._sp1.set_xlim(0, fs/2)
+        self._sp1.set_xlim(0, fs / 2)
         self._sp1.set_ylim([min(HdB), max(HdB)])
         self._sp1.set_yticks([min(HdB), max(HdB)])
         self._sp1.set_yticklabels(["min", "max"])
diff --git a/gr-dtv/python/dtv/CMakeLists.txt b/gr-dtv/python/dtv/CMakeLists.txt
index e39b21cbb9..caf19d8d97 100644
--- a/gr-dtv/python/dtv/CMakeLists.txt
+++ b/gr-dtv/python/dtv/CMakeLists.txt
@@ -44,6 +44,6 @@ if(ENABLE_TESTING)
   file(GLOB py_qa_test_files "qa_*.py")
   foreach(py_qa_test_file ${py_qa_test_files})
     get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE)
-    GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${py_qa_test_file})
+    GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} -B ${py_qa_test_file})
   endforeach(py_qa_test_file)
 endif(ENABLE_TESTING)
diff --git a/gr-dtv/python/dtv/__init__.py b/gr-dtv/python/dtv/__init__.py
index 8d2b8bfbcf..82bd562117 100644
--- a/gr-dtv/python/dtv/__init__.py
+++ b/gr-dtv/python/dtv/__init__.py
@@ -24,14 +24,17 @@
 '''
 Blocks and utilities for digital TV module.
 '''
+from __future__ import absolute_import
+from __future__ import unicode_literals
+
 import os
 
 try:
-    from dtv_swig import *
+    from .dtv_swig import *
 except ImportError:
     dirname, filename = os.path.split(os.path.abspath(__file__))
     __path__.append(os.path.join(dirname, "..", "..", "swig"))
-    from dtv_swig import *
+    from .dtv_swig import *
 
 # Import pure python code here
-from atsc_rx import *
+from .atsc_rx import *
diff --git a/gr-dtv/python/dtv/atsc_rx.py b/gr-dtv/python/dtv/atsc_rx.py
index 590e5f041c..7b31e3dae2 100644
--- a/gr-dtv/python/dtv/atsc_rx.py
+++ b/gr-dtv/python/dtv/atsc_rx.py
@@ -19,8 +19,10 @@
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
+from __future__ import absolute_import
+from __future__ import unicode_literals
 from gnuradio import gr, filter, analog
-from atsc_rx_filter import *
+from .atsc_rx_filter import *
 
 class atsc_rx(gr.hier_block2):
     def __init__(self, input_rate, sps):
@@ -53,17 +55,17 @@ class atsc_rx(gr.hier_block2):
         # Remove convolutional trellis coding
         vit = dtv.atsc_viterbi_decoder()
 
-	# Remove convolutional interleaving
-	dei = dtv.atsc_deinterleaver()
+        # Remove convolutional interleaving
+        dei = dtv.atsc_deinterleaver()
 
-	# Reed-Solomon decode
-	rsd = dtv.atsc_rs_decoder()
+        # Reed-Solomon decode
+        rsd = dtv.atsc_rs_decoder()
 
-	# Derandomize MPEG2-TS packet
-	der = dtv.atsc_derandomizer()
+        # Derandomize MPEG2-TS packet
+        der = dtv.atsc_derandomizer()
 
-	# Remove padding from packet
-	dep = dtv.atsc_depad()
+        # Remove padding from packet
+        dep = dtv.atsc_depad()
 
         # Connect pipeline
         self.connect(self, rx_filt, pll, dcr, agc, btl, fsc, equ)
diff --git a/gr-dtv/python/dtv/atsc_rx_filter.py b/gr-dtv/python/dtv/atsc_rx_filter.py
index e860fa265a..b5df161a59 100644
--- a/gr-dtv/python/dtv/atsc_rx_filter.py
+++ b/gr-dtv/python/dtv/atsc_rx_filter.py
@@ -19,8 +19,10 @@
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio import gr, filter
-import dtv_swig as dtv
+from . import dtv_swig as dtv
 
 # FIXME move these into separate constants module
 ATSC_CHANNEL_BW   = 6.0e6
@@ -38,10 +40,10 @@ class atsc_rx_filter(gr.hier_block2):
         nfilts = 16
         output_rate = ATSC_SYMBOL_RATE*sps # Desired oversampled sample rate
         filter_rate = input_rate*nfilts
-        symbol_rate = ATSC_SYMBOL_RATE/2.0 # One-sided bandwidth of sideband
+        symbol_rate = ATSC_SYMBOL_RATE / 2.0 # One-sided bandwidth of sideband
         excess_bw = 0.1152 #1.0-(0.5*ATSC_SYMBOL_RATE/ATSC_CHANNEL_BW) # ~10.3%
         ntaps = int((2*ATSC_RRC_SYMS+1)*sps*nfilts)
-        interp = output_rate/input_rate
+        interp = output_rate / input_rate
         gain = nfilts*symbol_rate/filter_rate
         rrc_taps = filter.firdes.root_raised_cosine(gain,             # Filter gain
                                                     filter_rate,      # PFB filter prototype rate
diff --git a/gr-dtv/python/dtv/qa_dtv.py b/gr-dtv/python/dtv/qa_dtv.py
old mode 100755
new mode 100644
index a0f6edf801..cebdeb5959
--- a/gr-dtv/python/dtv/qa_dtv.py
+++ b/gr-dtv/python/dtv/qa_dtv.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, dtv
 
 class test_dtv(gr_unittest.TestCase):
diff --git a/gr-fec/include/gnuradio/fec/polar_common.h b/gr-fec/include/gnuradio/fec/polar_common.h
index 99c7d84e55..daa612cfc5 100644
--- a/gr-fec/include/gnuradio/fec/polar_common.h
+++ b/gr-fec/include/gnuradio/fec/polar_common.h
@@ -24,6 +24,8 @@
 #ifndef INCLUDED_FEC_POLAR_COMMON_H
 #define INCLUDED_FEC_POLAR_COMMON_H
 
+#include <vector>
+
 #include <gnuradio/fec/api.h>
 
 // Forward declaration for those objects. SWIG doesn't like them to be #include'd.
diff --git a/gr-fec/python/fec/CMakeLists.txt b/gr-fec/python/fec/CMakeLists.txt
index 9d170b0423..013b3521a9 100644
--- a/gr-fec/python/fec/CMakeLists.txt
+++ b/gr-fec/python/fec/CMakeLists.txt
@@ -67,7 +67,7 @@ endif(NOT GSL_FOUND)
 
 foreach(py_qa_test_file ${py_qa_test_files})
     get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE)
-    GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${py_qa_test_file})
+    GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} -B ${py_qa_test_file})
 endforeach(py_qa_test_file)
 
 endif(ENABLE_TESTING)
diff --git a/gr-fec/python/fec/LDPC/Generate_LDPC_matrix.py b/gr-fec/python/fec/LDPC/Generate_LDPC_matrix.py
index a3862a6fda..8c5b17bc43 100644
--- a/gr-fec/python/fec/LDPC/Generate_LDPC_matrix.py
+++ b/gr-fec/python/fec/LDPC/Generate_LDPC_matrix.py
@@ -20,7 +20,12 @@
 # Boston, MA 02110-1301, USA.
 #
 
-from Generate_LDPC_matrix_functions import *
+from __future__ import print_function
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import unicode_literals
+
+from .Generate_LDPC_matrix_functions import *
 
 # This is an example of how to generate a parity check matrix for
 # use with the LDPC Richardson Urbanke encoder. A significant amount
@@ -62,18 +67,18 @@ newH = get_full_rank_H_matrix(parity_check_matrix.H)
 # can take a while...
 [bestH,g] = get_best_matrix(newH,100)
 
-# Print out some of the resulting properties.
+# Print(out some of the resulting properties.)
 n = bestH.shape[1]
 k = n - bestH.shape[0]
-print "Parity check matrix properties:"
-print "\tSize :", bestH.shape
-print "\tRank :", linalg.matrix_rank(bestH)
-print "\tRate : %.3f" % ((k*1.0)/n)
-print "\tn    :", n, " (codeword length)"
-print "\tk    :", k, " (info word length)"
-print "\tgap  : %i" % g
+print("Parity check matrix properties:")
+print("\tSize :", bestH.shape)
+print("\tRank :", linalg.matrix_rank(bestH))
+print("\tRate : %.3f" % ((k*1.0) / n))
+print("\tn    :", n, " (codeword length)")
+print("\tk    :", k, " (info word length)")
+print("\tgap  : %i" % g)
 
 # Save the matrix to an alist file for future use:
 alist_filename = "n_%04i_k_%04i_gap_%02i.alist" % (n,k,g)
 write_alist_file(alist_filename,bestH)
-print '\nMatrix saved to alist file:', alist_filename, "\n"
+print('\nMatrix saved to alist file:', alist_filename, "\n")
diff --git a/gr-fec/python/fec/LDPC/Generate_LDPC_matrix_functions.py b/gr-fec/python/fec/LDPC/Generate_LDPC_matrix_functions.py
index c42fee631f..5774329ecd 100644
--- a/gr-fec/python/fec/LDPC/Generate_LDPC_matrix_functions.py
+++ b/gr-fec/python/fec/LDPC/Generate_LDPC_matrix_functions.py
@@ -20,6 +20,10 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
+
 import string, sys
 from numpy import *
 from numpy.random import shuffle, randint
@@ -46,9 +50,9 @@ def read_alist_file(filename):
     indices = string.split(data[lineNumber])
     for index in indices:
       H[int(index)-1,lineNumber-4] = 1
-  # The subsequent lines in the file list the indices for where
-  # the 1s are in the rows, but this is redundant
-  # information.
+      # The subsequent lines in the file list the indices for where
+      # the 1s are in the rows, but this is redundant
+      # information.
 
   return H
 
@@ -68,7 +72,7 @@ def write_alist_file(filename, H, verbose=0):
   numRows = H.shape[0]
   numCols = H.shape[1]
 
-  tempstring = `numCols` + ' ' + `numRows` + '\n'
+  tempstring = repr(numCols) + ' ' + repr(numRows) + '\n'
   myfile.write(tempstring)
 
   tempstring1 = ''
@@ -79,12 +83,12 @@ def write_alist_file(filename, H, verbose=0):
     rowWeight = nonzeros.shape[1]
     if rowWeight > maxRowWeight:
       maxRowWeight = rowWeight
-    tempstring1 = tempstring1 + `rowWeight` + ' '
+      tempstring1 = tempstring1 + repr(rowWeight) + ' '
     for tempArray in nonzeros:
       for index in tempArray:
-        tempstring2 = tempstring2 + `index+1` + ' '
-      tempstring2 = tempstring2 + '\n'
-  tempstring1 = tempstring1 + '\n'
+        tempstring2 = tempstring2 + repr(index+1) + ' '
+        tempstring2 = tempstring2 + '\n'
+        tempstring1 = tempstring1 + '\n'
 
   tempstring3 = ''
   tempstring4 = ''
@@ -94,14 +98,14 @@ def write_alist_file(filename, H, verbose=0):
     colWeight = nonzeros.shape[1]
     if colWeight > maxColWeight:
       maxColWeight = colWeight
-    tempstring3 = tempstring3 + `colWeight` + ' '
+      tempstring3 = tempstring3 + repr(colWeight) + ' '
     for tempArray in nonzeros:
       for index in tempArray:
-        tempstring4 = tempstring4 + `index+1` + ' '
-      tempstring4 = tempstring4 + '\n'
-  tempstring3 = tempstring3 + '\n'
+        tempstring4 = tempstring4 + repr(index+1) + ' '
+        tempstring4 = tempstring4 + '\n'
+        tempstring3 = tempstring3 + '\n'
 
-  tempstring = `maxColWeight` + ' ' + `maxRowWeight` + '\n'
+  tempstring = repr(maxColWeight) + ' ' + repr(maxRowWeight) + '\n'
   # write out max column and row weights
   myfile.write(tempstring)
   # write out all of the column weights
@@ -116,11 +120,11 @@ def write_alist_file(filename, H, verbose=0):
   myfile.close()
 
 
-class LDPC_matrix:
+class LDPC_matrix(object):
   """ Class for a LDPC parity check matrix """
   def __init__(self, alist_filename = None,
-             n_p_q = None,
-             H_matrix = None):
+               n_p_q = None,
+               H_matrix = None):
     if (alist_filename != None):
       self.H = self.read_alist_file(alist_filename)
     elif (n_p_q != None):
@@ -128,9 +132,9 @@ class LDPC_matrix:
     elif (H_matrix != None):
       self.H = H_matrix
     else:
-      print 'Error: provide either an alist filename,',
-      print 'parameters for constructing regular LDPC parity',
-      print 'check matrix, or a numpy array.'
+      print('Error: provide either an alist filename, ', end='')
+      print('parameters for constructing regular LDPC parity, ', end='')
+      print('check matrix, or a numpy array.')
 
     self.rank = linalg.matrix_rank(self.H)
     self.numRows = self.H.shape[0]
@@ -159,31 +163,31 @@ class LDPC_matrix:
 
     # For this algorithm, n/p must be an integer, because the
     # number of rows in each submatrix must be a whole number.
-    ratioTest = (n*1.0)/q
+    ratioTest = (n*1.0) / q
     if ratioTest%1 != 0:
-      print '\nError in regular_LDPC_code_contructor: The'
-      print 'ratio of inputs n/q must be a whole number.\n'
+      print('\nError in regular_LDPC_code_contructor: The ', end='')
+      print('ratio of inputs n/q must be a whole number.\n')
       return
 
     # First submatrix first:
-    m = (n*p)/q  # number of rows in H matrix
-    submatrix1 = zeros((m/p,n))
-    for row in arange(m/p):
+    m = (n*p) / q  # number of rows in H matrix
+    submatrix1 = zeros((m / p,n))
+    for row in arange(m / p):
       range1 = row*q
       range2 = (row+1)*q
       submatrix1[row,range1:range2] = 1
-    H = submatrix1
+      H = submatrix1
 
     # Create the other submatrices and vertically stack them on.
     submatrixNum = 2
     newColumnOrder = arange(n)
     while submatrixNum <= p:
-      submatrix = zeros((m/p,n))
+      submatrix = zeros((m / p,n))
       shuffle(newColumnOrder)
 
       for columnNum in arange(n):
         submatrix[:,columnNum] = \
-                      submatrix1[:,newColumnOrder[columnNum]]
+                                 submatrix1[:,newColumnOrder[columnNum]]
 
       H = vstack((H,submatrix))
       submatrixNum = submatrixNum + 1
@@ -197,14 +201,14 @@ class LDPC_matrix:
     for rowNum in arange(rows):
       nonzeros = array(H[rowNum,:].nonzero())
       if nonzeros.shape[1] != q:
-        print 'Row', rowNum, 'has incorrect weight!'
+        print('Row', rowNum, 'has incorrect weight!')
         return
 
     # Check the column weights
     for columnNum in arange(cols):
       nonzeros = array(H[:,columnNum].nonzero())
       if nonzeros.shape[1] != p:
-        print 'Row', columnNum, 'has incorrect weight!'
+        print('Row', columnNum, 'has incorrect weight!')
         return
 
     return H
@@ -221,10 +225,10 @@ def greedy_upper_triangulation(H, verbose=0):
   # Per email from Dr. Urbanke, author of this textbook, this
   # algorithm requires H to be full rank
   if linalg.matrix_rank(H_t) != H_t.shape[0]:
-      print 'Rank of H:', linalg.matrix_rank(tempArray)
-      print 'H has', H_t.shape[0], 'rows'
-      print 'Error: H must be full rank.'
-      return
+    print('Rank of H:', linalg.matrix_rank(tempArray))
+    print('H has', H_t.shape[0], 'rows')
+    print('Error: H must be full rank.')
+    return
 
   size = H_t.shape
   n = size[1]
@@ -253,7 +257,7 @@ def greedy_upper_triangulation(H, verbose=0):
     # equal to the min positive residual degree, then pick a
     # random column c.
     indices = (minResidualDegrees == minimumResidualDegree)\
-                                     .nonzero()[1]
+              .nonzero()[1]
     indices = indices + t
     if indices.shape[0] == 1:
       columnC = indices[0]
@@ -282,7 +286,7 @@ def greedy_upper_triangulation(H, verbose=0):
     else:
       # This is the 'choose' case.
       rowsThatContainNonZeros = H_residual[:,columnC-t]\
-                                          .nonzero()[0]
+                                .nonzero()[0]
 
       # Swap column c with column t. (Book says t+1 but we
       # index from 0, not 1.)
@@ -315,8 +319,8 @@ def greedy_upper_triangulation(H, verbose=0):
         while sub_index < (m - rowInH_t):
           Htemp[m-sub_index-1,:] = H_t[m-sub_index,:]
           sub_index = sub_index+1
-        H_t = Htemp.copy()
-        Htemp = H_t.copy()
+          H_t = Htemp.copy()
+          Htemp = H_t.copy()
 
       # Save temp H as new H_t.
       H_t = Htemp.copy()
@@ -327,7 +331,7 @@ def greedy_upper_triangulation(H, verbose=0):
 
   if g == 0:
     if verbose:
-      print 'Error: gap is 0.'
+      print('Error: gap is 0.')
     return
 
   # We need to ensure phi is nonsingular.
@@ -348,22 +352,22 @@ def greedy_upper_triangulation(H, verbose=0):
     except linalg.linalg.LinAlgError:
       # Phi is singular
       if verbose > 1:
-        print 'Initial phi is singular'
+        print('Initial phi is singular')
     else:
       # Phi is nonsingular, so we need to use this version of H.
       if verbose > 1:
-        print 'Initial phi is nonsingular'
+        print('Initial phi is nonsingular')
       return [H_t, g, t]
   else:
     if verbose:
-      print 'Initial phi is all zeros:\n', phi
+      print('Initial phi is all zeros:\n', phi)
 
   # If the C and D submatrices are all zeros, there is no point in
   # shuffling them around in an attempt to find a good phi.
   if not (C.any() or D.any()):
     if verbose:
-      print 'C and D are all zeros. There is no hope in',
-      print 'finding a nonsingular phi matrix. '
+      print('C and D are all zeros. There is no hope in',)
+      print('finding a nonsingular phi matrix. ')
     return
 
   # We can't look at every row/column permutation possibility
@@ -378,8 +382,8 @@ def greedy_upper_triangulation(H, verbose=0):
 
   while iterationCount < maxIterations:
     if verbose > 1:
-      print 'iterationCount:', iterationCount
-    tempH = H_t.copy()
+      print('iterationCount:', iterationCount)
+      tempH = H_t.copy()
 
     shuffle(columnsToShuffle)
     shuffle(rowsToShuffle)
@@ -387,7 +391,7 @@ def greedy_upper_triangulation(H, verbose=0):
     for newDestinationColumnNumber in arange(t,n):
       oldColumnNumber = columnsToShuffle[index]
       tempH[:,newDestinationColumnNumber] = \
-                                         H_t[:,oldColumnNumber]
+                                            H_t[:,oldColumnNumber]
       index +=1
 
     tempH2 = tempH.copy()
@@ -414,23 +418,23 @@ def greedy_upper_triangulation(H, verbose=0):
       except linalg.linalg.LinAlgError:
         # Phi is singular
         if verbose > 1:
-          print 'Phi is still singular'
+          print('Phi is still singular')
       else:
         # Phi is nonsingular, so we're done.
         if verbose:
-          print 'Found a nonsingular phi on',
-          print 'iterationCount = ', iterationCount
+          print('Found a nonsingular phi on',)
+          print('iterationCount = ', iterationCount)
         return [H_t, g, t]
     else:
       if verbose > 1:
-        print 'phi is all zeros'
+        print('phi is all zeros')
 
     iterationCount +=1
 
   # If we've reached this point, then we haven't found a
   # version of H that has a nonsingular phi.
   if verbose:
-    print '--- Error: nonsingular phi matrix not found.'
+    print('--- Error: nonsingular phi matrix not found.')
 
 def inv_mod2(squareMatrix, verbose=0):
   """
@@ -468,16 +472,16 @@ def inv_mod2(squareMatrix, verbose=0):
         tempTest[rowNum,colNum] = 0
       else:
         if verbose > 1:
-          print 'In inv_mod2. Rounding error on this',
-          print 'value? Mod 2 has already been done.',
-          print 'value:', value
+          print('In inv_mod2. Rounding error on this',)
+          print('value? Mod 2 has already been done.',)
+          print('value:', value)
 
   test = tempTest.copy()
 
   if (test - eye(t,t) % 2).any():
     if verbose:
-      print 'Error in inv_mod2: did not find inverse.'
-    # TODO is this the most appropriate error to raise?
+      print('Error in inv_mod2: did not find inverse.')
+      # TODO is this the most appropriate error to raise?
     raise linalg.linalg.LinAlgError
   else:
     return C
@@ -520,7 +524,7 @@ def get_full_rank_H_matrix(H, verbose=False):
   tempArray = H.copy()
   if linalg.matrix_rank(tempArray) == tempArray.shape[0]:
     if verbose:
-      print 'Returning H; it is already full rank.'
+      print('Returning H; it is already full rank.')
     return tempArray
 
   numRows = tempArray.shape[0]
@@ -538,8 +542,8 @@ def get_full_rank_H_matrix(H, verbose=False):
 
   while i < limit:
     if verbose:
-      print 'In get_full_rank_H_matrix; i:', i
-    # Flag indicating that the row contains a non-zero entry
+      print('In get_full_rank_H_matrix; i:', i)
+      # Flag indicating that the row contains a non-zero entry
     found  = False
     for j in arange(i, numColumns):
       if tempArray[i, j] == 1:
@@ -588,8 +592,8 @@ def get_full_rank_H_matrix(H, verbose=False):
     newH[:,index] = tempHarray[:,columnOrder[0,index]]
 
   if verbose:
-    print 'original H.shape:', H.shape
-    print 'newH.shape:', newH.shape
+    print('original H.shape:', H.shape)
+    print('newH.shape:', newH.shape)
 
   return newH
 
@@ -604,13 +608,13 @@ def get_best_matrix(H, numIterations=100, verbose=False):
   index = 1
   while index <= numIterations:
     if verbose:
-      print '--- In get_best_matrix, iteration:', index
-    index += 1
+      print('--- In get_best_matrix, iteration:', index)
+      index += 1
     try:
       ret = greedy_upper_triangulation(H, verbose)
-    except ValueError, e:
+    except ValueError as e:
       if verbose > 1:
-        print 'greedy_upper_triangulation error: ', e
+        print('greedy_upper_triangulation error: ', e)
     else:
       if ret:
         [betterH, gap, t] = ret
@@ -632,8 +636,8 @@ def get_best_matrix(H, numIterations=100, verbose=False):
     return [bestH, bestGap]
   else:
     if verbose:
-      print 'Error: Could not find appropriate H form',
-      print 'for encoding.'
+      print('Error: Could not find appropriate H form',)
+      print('for encoding.')
     return
 
 def getSystematicGmatrix(GenMatrix):
@@ -643,7 +647,7 @@ def getSystematicGmatrix(GenMatrix):
   matrix and P is the parity submatrix. If the GenMatrix matrix
   provided is not full rank, then dependent rows will be deleted.
 
-  This function does not convert parity check (H) matrices to the 
+  This function does not convert parity check (H) matrices to the
   generator matrix format. Use the function getSystematicGmatrixFromH
   for that purpose.
   """
@@ -682,7 +686,7 @@ def getSystematicGmatrix(GenMatrix):
       tempArray = move_row_to_bottom(i,tempArray)
       # decrease limit since we just found a row of 0s
       limit -= 1
-  # the rows below i are the dependent rows, which we discard
+      # the rows below i are the dependent rows, which we discard
   G = tempArray[0:i,:]
   return G
 
@@ -696,7 +700,7 @@ def getSystematicGmatrixFromH(H, verbose=False):
   will be deleted first.
   """
   if verbose:
-    print 'received H with size: ', H.shape
+    print('received H with size: ', H.shape)
 
   # First, put the H matrix into the form H = [I|m] where:
   #   I is (n-k) x (n-k) identity matrix
@@ -716,5 +720,5 @@ def getSystematicGmatrixFromH(H, verbose=False):
   k = m.shape[1]
   G = concatenate((identity(k),m.T),axis=1)
   if verbose:
-    print 'returning G with size: ', G.shape
-  return G
\ No newline at end of file
+    print('returning G with size: ', G.shape)
+  return G
diff --git a/gr-fec/python/fec/LDPC/__init__.py b/gr-fec/python/fec/LDPC/__init__.py
index 173171a24f..7ee9196d12 100644
--- a/gr-fec/python/fec/LDPC/__init__.py
+++ b/gr-fec/python/fec/LDPC/__init__.py
@@ -1,3 +1,5 @@
+from __future__ import absolute_import
+from __future__ import unicode_literals
 #
 # Copyright 2015 Free Software Foundation, Inc.
 #
@@ -19,4 +21,4 @@
 # Boston, MA 02110-1301, USA.
 #
 
-from Generate_LDPC_matrix_functions import *
+from .Generate_LDPC_matrix_functions import *
diff --git a/gr-fec/python/fec/__init__.py b/gr-fec/python/fec/__init__.py
index 6c82232d4f..e5458686dc 100644
--- a/gr-fec/python/fec/__init__.py
+++ b/gr-fec/python/fec/__init__.py
@@ -23,25 +23,28 @@
 Blocks for forward error correction.
 '''
 
+from __future__ import absolute_import
+from __future__ import unicode_literals
+
 try:
-    from fec_swig import *
+    from .fec_swig import *
 except ImportError:
     import os
     dirname, filename = os.path.split(os.path.abspath(__file__))
     __path__.append(os.path.join(dirname, "..", "..", "swig"))
-    from fec_swig import *
+    from .fec_swig import *
 
-from bitflip import *
-from extended_encoder import extended_encoder
-from extended_decoder import extended_decoder
-from threaded_encoder import threaded_encoder
-from threaded_decoder import threaded_decoder
-from capillary_threaded_decoder import capillary_threaded_decoder
-from capillary_threaded_encoder import capillary_threaded_encoder
-from extended_async_encoder import extended_async_encoder
-from extended_tagged_encoder import extended_tagged_encoder
-from extended_tagged_decoder import extended_tagged_decoder
+from .bitflip import *
+from .extended_encoder import extended_encoder
+from .extended_decoder import extended_decoder
+from .threaded_encoder import threaded_encoder
+from .threaded_decoder import threaded_decoder
+from .capillary_threaded_decoder import capillary_threaded_decoder
+from .capillary_threaded_encoder import capillary_threaded_encoder
+from .extended_async_encoder import extended_async_encoder
+from .extended_tagged_encoder import extended_tagged_encoder
+from .extended_tagged_decoder import extended_tagged_decoder
 
 
-from fec_test import fec_test
-from bercurve_generator import bercurve_generator
+from .fec_test import fec_test
+from .bercurve_generator import bercurve_generator
diff --git a/gr-fec/python/fec/_qa_helper.py b/gr-fec/python/fec/_qa_helper.py
old mode 100755
new mode 100644
index 8722453441..85a19ed7c5
--- a/gr-fec/python/fec/_qa_helper.py
+++ b/gr-fec/python/fec/_qa_helper.py
@@ -20,12 +20,19 @@
 # Boston, MA 02110-1301, USA.
 #
 
-from gnuradio import blocks
-from gnuradio import gr
-import sys, numpy
+from __future__ import print_function
+from __future__ import absolute_import
+from __future__ import unicode_literals
+
+
+import numpy
+
+from gnuradio import gr, blocks
+# Must use absolute import here because this file is not installed as part
+# of the module
+from gnuradio.fec import extended_encoder
+from gnuradio.fec import extended_decoder
 
-from extended_encoder import extended_encoder
-from extended_decoder import extended_decoder
 
 class map_bb(gr.sync_block):
     def __init__(self, bitmap):
@@ -37,7 +44,7 @@ class map_bb(gr.sync_block):
         self.bitmap = bitmap
 
     def work(self, input_items, output_items):
-        output_items[0][:] = map(lambda x: self.bitmap[x], input_items[0])
+        output_items[0][:] = [self.bitmap[x] for x in input_items[0]]
         return len(output_items[0])
 
 
@@ -85,6 +92,6 @@ if __name__ == '__main__':
             errs += 1
 
     if errs == 0:
-        print "Decoded properly"
+        print("Decoded properly")
     else:
-        print "Problem Decoding"
+        print("Problem Decoding")
diff --git a/gr-fec/python/fec/bercurve_generator.py b/gr-fec/python/fec/bercurve_generator.py
index 3221a683ce..29a02c135a 100644
--- a/gr-fec/python/fec/bercurve_generator.py
+++ b/gr-fec/python/fec/bercurve_generator.py
@@ -20,10 +20,12 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import absolute_import
+from __future__ import unicode_literals
 from gnuradio import gr, blocks
 import numpy
 
-from fec_test import fec_test
+from .fec_test import fec_test
 
 class bercurve_generator(gr.hier_block2):
 
@@ -40,7 +42,7 @@ class bercurve_generator(gr.hier_block2):
         self.decoder_list = decoder_list
         self.puncpat = puncpat
 
-        self.random_gen_b_0 = blocks.vector_source_b(map(int, numpy.random.randint(0, 256, 100000)), True)
+        self.random_gen_b_0 = blocks.vector_source_b(list(map(int, numpy.random.randint(0, 256, 100000))), True)
         self.deinterleave = blocks.deinterleave(gr.sizeof_char*1)
         self.connect(self.random_gen_b_0, self.deinterleave)
         self.ber_generators = []
diff --git a/gr-fec/python/fec/bitflip.py b/gr-fec/python/fec/bitflip.py
index 235dc19a05..332a288e7e 100644
--- a/gr-fec/python/fec/bitflip.py
+++ b/gr-fec/python/fec/bitflip.py
@@ -20,6 +20,11 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+from __future__ import unicode_literals
+
+
+
 def bitreverse(mint):
     res = 0;
     while mint != 0:
@@ -51,7 +56,7 @@ def read_bitlist(bitlist):
 
 def read_big_bitlist(bitlist):
     ret = []
-    for j in range(0, len(bitlist)/64):
+    for j in range(0, len(bitlist) / 64):
         res = 0;
         for i in range(0, 64):
             if int(bitlist[j*64+i]) == 1:
@@ -72,9 +77,9 @@ def generate_symmetries(symlist):
         for i in range(len(symlist[0])):
             retlist.append(symlist[0][i:] + symlist[0][0:i]);
         invlist = symlist[0];
-        for i in range(1, len(symlist[0])/2):
-            invlist[i] = symlist[0][i + len(symlist[0])/2];
-            invlist[i + len(symlist[0])/2] = symlist[0][i];
+        for i in range(1, len(symlist[0]) / 2):
+            invlist[i] = symlist[0][i + len(symlist[0]) / 2];
+            invlist[i + len(symlist[0]) / 2] = symlist[0][i];
         for i in range(len(symlist[0])):
             retlist.append(symlist[0][i:] + symlist[0][0:i]);
         return retlist;
diff --git a/gr-fec/python/fec/capillary_threaded_decoder.py b/gr-fec/python/fec/capillary_threaded_decoder.py
index 9a00cde192..821e3cf92a 100644
--- a/gr-fec/python/fec/capillary_threaded_decoder.py
+++ b/gr-fec/python/fec/capillary_threaded_decoder.py
@@ -20,10 +20,15 @@
 # Boston, MA 02110-1301, USA.
 #
 
-from gnuradio import gr, blocks
-import fec_swig as fec
+from __future__ import division
+from __future__ import unicode_literals
+
 import math
 
+from gnuradio import gr, blocks
+from . import fec_swig as fec
+
+
 class capillary_threaded_decoder(gr.hier_block2):
     def __init__(self, decoder_list_0, input_size, output_size):
         gr.hier_block2.__init__(
@@ -64,7 +69,7 @@ class capillary_threaded_decoder(gr.hier_block2):
                 branchcount += 2
 
         codercount = 0
-        for i in range(len(decoder_list_0)/2):
+        for i in range(len(decoder_list_0) // 2):
             self.connect((self.deinterleaves_0[rootcount], 0), (self.generic_decoders_0[codercount], 0))
             self.connect((self.deinterleaves_0[rootcount], 1), (self.generic_decoders_0[codercount + 1], 0))
             rootcount += 1
@@ -80,7 +85,7 @@ class capillary_threaded_decoder(gr.hier_block2):
                 branchcount += 2
 
         codercount = 0
-        for i in range(len(decoder_list_0)/2):
+        for i in range(len(decoder_list_0) // 2):
             self.connect((self.generic_decoders_0[codercount], 0), (self.interleaves_0[rootcount], 0))
             self.connect((self.generic_decoders_0[codercount + 1], 0), (self.interleaves_0[rootcount], 1))
             rootcount += 1
diff --git a/gr-fec/python/fec/capillary_threaded_encoder.py b/gr-fec/python/fec/capillary_threaded_encoder.py
index 21d4af62ca..899d10c3b7 100644
--- a/gr-fec/python/fec/capillary_threaded_encoder.py
+++ b/gr-fec/python/fec/capillary_threaded_encoder.py
@@ -20,10 +20,15 @@
 # Boston, MA 02110-1301, USA.
 #
 
-from gnuradio import gr, blocks
-import fec_swig as fec
+from __future__ import division
+from __future__ import unicode_literals
+
 import math
 
+from gnuradio import gr, blocks
+from . import fec_swig as fec
+
+
 class capillary_threaded_encoder(gr.hier_block2):
     def __init__(self, encoder_list_0, input_size=gr.sizeof_char, output_size=gr.sizeof_char):
         gr.hier_block2.__init__(self, "Capillary Threaded Encoder",
@@ -43,7 +48,7 @@ class capillary_threaded_encoder(gr.hier_block2):
                 self.deinterleaves_0.append(blocks.deinterleave(input_size,
                                                                 fec.get_encoder_input_size(encoder_list_0[0])))
 
-       	self.generic_encoders_0 = [];
+        self.generic_encoders_0 = [];
         for i in range(len(encoder_list_0)):
             self.generic_encoders_0.append(fec.encoder(encoder_list_0[i],
                                                        input_size, output_size))
@@ -64,7 +69,7 @@ class capillary_threaded_encoder(gr.hier_block2):
                 branchcount += 2;
 
         codercount = 0;
-        for i in range(len(encoder_list_0)/2):
+        for i in range(len(encoder_list_0) // 2):
             self.connect((self.deinterleaves_0[rootcount], 0), (self.generic_encoders_0[codercount], 0))
             self.connect((self.deinterleaves_0[rootcount], 1), (self.generic_encoders_0[codercount + 1], 0))
             rootcount += 1;
@@ -82,13 +87,13 @@ class capillary_threaded_encoder(gr.hier_block2):
 
 
         codercount = 0;
-        for i in range(len(encoder_list_0)/2):
+        for i in range(len(encoder_list_0) // 2):
             self.connect((self.generic_encoders_0[codercount], 0), (self.interleaves_0[rootcount], 0))
             self.connect((self.generic_encoders_0[codercount + 1], 0), (self.interleaves_0[rootcount], 1))
             rootcount += 1;
             codercount += 2;
 
-       	if((len(self.encoder_list_0)) > 1):
+        if((len(self.encoder_list_0)) > 1):
             self.connect((self, 0), (self.deinterleaves_0[0], 0))
             self.connect((self.interleaves_0[0], 0), (self, 0))
         else:
diff --git a/gr-fec/python/fec/extended_async_encoder.py b/gr-fec/python/fec/extended_async_encoder.py
index fffe64aeb8..cebd5c652b 100644
--- a/gr-fec/python/fec/extended_async_encoder.py
+++ b/gr-fec/python/fec/extended_async_encoder.py
@@ -20,11 +20,18 @@
 # Boston, MA 02110-1301, USA.
 #
 
-from gnuradio import gr
-import fec_swig as fec
-from bitflip import read_bitlist
+from __future__ import print_function
+from __future__ import absolute_import
+from __future__ import unicode_literals
+
 import weakref
 
+from gnuradio import gr
+
+from . import fec_swig as fec
+from .bitflip import read_bitlist
+
+
 class extended_async_encoder(gr.hier_block2):
     def __init__(self, encoder_obj_list, puncpat=None):
         gr.hier_block2.__init__(self, "extended_async_encoder",
diff --git a/gr-fec/python/fec/extended_decoder.py b/gr-fec/python/fec/extended_decoder.py
index 7e6cf452f9..3c7ebefb49 100644
--- a/gr-fec/python/fec/extended_decoder.py
+++ b/gr-fec/python/fec/extended_decoder.py
@@ -20,24 +20,25 @@
 # Boston, MA 02110-1301, USA.
 #
 
-from gnuradio import gr, blocks
-import fec_swig as fec
-from bitflip import *
-import sys
+from __future__ import print_function
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import unicode_literals
 
-if sys.modules.has_key("gnuradio.digital"):
-    digital = sys.modules["gnuradio.digital"]
-else:
-    from gnuradio import digital
+from gnuradio import gr, blocks, digital
+
+from . import fec_swig as fec
+
+from .bitflip import *
+from .threaded_decoder import threaded_decoder
+from .capillary_threaded_decoder import capillary_threaded_decoder
 
-from threaded_decoder import threaded_decoder
-from capillary_threaded_decoder import capillary_threaded_decoder
 
 class extended_decoder(gr.hier_block2):
 
 #solution to log_(1-2*t)(1-2*.0335) = 1/taps where t is thresh (syndrome density)
 #for i in numpy.arange(.1, .499, .01):
-    #print str(log((1-(2 * .035)), (1-(2 * i)))) + ':' + str(i);
+    #print(str(log((1-(2 * .035)), (1-(2 * i)))) + ':' + str(i);)
     garbletable = {
         0.310786835319:0.1,
         0.279118162802:0.11,
@@ -127,13 +128,13 @@ class extended_decoder(gr.hier_block2):
                 cat.append(i);
 
             synd_garble = .49
-            idx_list = self.garbletable.keys()
+            idx_list = list(self.garbletable.keys())
             idx_list.sort()
             for i in idx_list:
-                if 1.0/self.ann.count('1') >= i:
+                if 1.0 / self.ann.count('1') >= i:
                     synd_garble = self.garbletable[i]
-            print 'using syndrom garble threshold ' + str(synd_garble) + 'for conv_bit_corr_bb'
-            print 'ceiling: .0335 data garble rate'
+            print('using syndrom garble threshold ' + str(synd_garble) + 'for conv_bit_corr_bb')
+            print('ceiling: .0335 data garble rate')
             self.blocks.append(fec.conv_bit_corr_bb(cat, len(puncpat) - puncpat.count('0'),
                                                     len(ann), integration_period, flush, synd_garble))
 
diff --git a/gr-fec/python/fec/extended_encoder.py b/gr-fec/python/fec/extended_encoder.py
index 1c6da0ecb1..992c2bdad4 100644
--- a/gr-fec/python/fec/extended_encoder.py
+++ b/gr-fec/python/fec/extended_encoder.py
@@ -20,12 +20,16 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import absolute_import
+from __future__ import unicode_literals
+
 from gnuradio import gr, blocks
 
-import fec_swig as fec
-from threaded_encoder import threaded_encoder
-from capillary_threaded_encoder import capillary_threaded_encoder
-from bitflip import read_bitlist
+from . import fec_swig as fec
+from .threaded_encoder import threaded_encoder
+from .capillary_threaded_encoder import capillary_threaded_encoder
+from .bitflip import read_bitlist
+
 
 class extended_encoder(gr.hier_block2):
     def __init__(self, encoder_obj_list, threading, puncpat=None):
diff --git a/gr-fec/python/fec/extended_tagged_decoder.py b/gr-fec/python/fec/extended_tagged_decoder.py
index 9713907712..c119bf9938 100644
--- a/gr-fec/python/fec/extended_tagged_decoder.py
+++ b/gr-fec/python/fec/extended_tagged_decoder.py
@@ -20,21 +20,23 @@
 # Boston, MA 02110-1301, USA.
 #
 
-from gnuradio import gr, blocks
-import fec_swig as fec
-from bitflip import *
-import sys
+from __future__ import print_function
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import unicode_literals
+
+from gnuradio import gr, blocks, digital
+
+from . import fec_swig as fec
+
+from .bitflip import *
 
-if sys.modules.has_key("gnuradio.digital"):
-    digital = sys.modules["gnuradio.digital"]
-else:
-    from gnuradio import digital
 
 class extended_tagged_decoder(gr.hier_block2):
 
 #solution to log_(1-2*t)(1-2*.0335) = 1/taps where t is thresh (syndrome density)
 #for i in numpy.arange(.1, .499, .01):
-    #print str(log((1-(2 * .035)), (1-(2 * i)))) + ':' + str(i);
+    #print(str(log((1-(2 * .035)), (1-(2 * i)))) + ':' + str(i);)
     garbletable = {
         0.310786835319:0.1,
         0.279118162802:0.11,
@@ -136,13 +138,13 @@ class extended_tagged_decoder(gr.hier_block2):
                 cat.append(i);
 
             synd_garble = .49
-            idx_list = self.garbletable.keys()
+            idx_list = list(self.garbletable.keys())
             idx_list.sort()
             for i in idx_list:
-                if 1.0/self.ann.count('1') >= i:
+                if 1.0 / self.ann.count('1') >= i:
                     synd_garble = self.garbletable[i]
-            print 'using syndrom garble threshold ' + str(synd_garble) + 'for conv_bit_corr_bb'
-            print 'ceiling: .0335 data garble rate'
+            print('using syndrom garble threshold ' + str(synd_garble) + 'for conv_bit_corr_bb')
+            print('ceiling: .0335 data garble rate')
             self.blocks.append(fec.conv_bit_corr_bb(cat, len(puncpat) - puncpat.count('0'),
                                            len(ann), integration_period, flush, synd_garble))
 
diff --git a/gr-fec/python/fec/extended_tagged_encoder.py b/gr-fec/python/fec/extended_tagged_encoder.py
index d3cf1d80d2..9f4a684c4a 100644
--- a/gr-fec/python/fec/extended_tagged_encoder.py
+++ b/gr-fec/python/fec/extended_tagged_encoder.py
@@ -20,10 +20,16 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import absolute_import
+from __future__ import unicode_literals
+
+
 from gnuradio import gr, blocks
 
-import fec_swig as fec
-from bitflip import read_bitlist
+from . import fec_swig as fec
+
+from .bitflip import read_bitlist
+
 
 class extended_tagged_encoder(gr.hier_block2):
     def __init__(self, encoder_obj_list, puncpat=None, lentagname=None, mtu=1500):
diff --git a/gr-fec/python/fec/fec_test.py b/gr-fec/python/fec/fec_test.py
index 6466a0bcb4..dfb5b1b28e 100644
--- a/gr-fec/python/fec/fec_test.py
+++ b/gr-fec/python/fec/fec_test.py
@@ -20,18 +20,21 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio.fec.bitflip import read_bitlist
 from gnuradio import gr, blocks, analog
 import math
 import sys
 
-if sys.modules.has_key("gnuradio.digital"):
+if "gnuradio.digital" in sys.modules:
     digital = sys.modules["gnuradio.digital"]
 else:
     from gnuradio import digital
 
-from extended_encoder import extended_encoder
-from extended_decoder import extended_decoder
+from .extended_encoder import extended_encoder
+from .extended_decoder import extended_decoder
 
 class fec_test(gr.hier_block2):
 
@@ -64,7 +67,7 @@ class fec_test(gr.hier_block2):
                                         ann=None, puncpat=puncpat,
                                         integration_period=10000, rotator=None)
 
-        noise = math.sqrt((10.0**(-esno/10.0))/2.0)
+        noise = math.sqrt((10.0**(old_div(-esno / 10.0)),2.0))
         #self.fastnoise = analog.fastnoise_source_f(analog.GR_GAUSSIAN, noise, seed, 8192)
         self.fastnoise = analog.noise_source_f(analog.GR_GAUSSIAN, noise, seed)
         self.addnoise = blocks.add_ff(1)
diff --git a/gr-fec/python/fec/polar/CMakeLists.txt b/gr-fec/python/fec/polar/CMakeLists.txt
index 1efed062ff..2c126746e7 100644
--- a/gr-fec/python/fec/polar/CMakeLists.txt
+++ b/gr-fec/python/fec/polar/CMakeLists.txt
@@ -27,6 +27,9 @@ GR_PYTHON_INSTALL(
     channel_construction_awgn.py
     channel_construction_bec.py
     helper_functions.py
+    encoder.py
+    decoder.py
+    common.py
     DESTINATION ${GR_PYTHON_DIR}/gnuradio/fec/polar
 )
 
diff --git a/gr-fec/python/fec/polar/__init__.py b/gr-fec/python/fec/polar/__init__.py
index ce1b1459fb..e06020b886 100644
--- a/gr-fec/python/fec/polar/__init__.py
+++ b/gr-fec/python/fec/polar/__init__.py
@@ -21,9 +21,12 @@
 
 # turn this folder into a Python module
 
-import channel_construction as cc
-from channel_construction_bec import bhattacharyya_bounds
-from helper_functions import is_power_of_two
+from __future__ import print_function
+from __future__ import absolute_import
+from __future__ import unicode_literals
+from . import channel_construction as cc
+from .channel_construction_bec import bhattacharyya_bounds
+from .helper_functions import is_power_of_two
 
 
 CHANNEL_TYPE_AWGN = 'AWGN'
diff --git a/gr-fec/python/fec/polar/channel_construction.py b/gr-fec/python/fec/polar/channel_construction.py
index a981007b45..a22c643cf8 100644
--- a/gr-fec/python/fec/polar/channel_construction.py
+++ b/gr-fec/python/fec/polar/channel_construction.py
@@ -23,12 +23,14 @@
 foundational paper for polar codes.
 '''
 
+from __future__ import print_function
+from __future__ import absolute_import
 
-from channel_construction_bec import calculate_bec_channel_capacities
-from channel_construction_bec import design_snr_to_bec_eta
-from channel_construction_bec import bhattacharyya_bounds
-from channel_construction_awgn import tal_vardy_tpm_algorithm
-from helper_functions import *
+from .channel_construction_bec import calculate_bec_channel_capacities
+from .channel_construction_bec import design_snr_to_bec_eta
+from .channel_construction_bec import bhattacharyya_bounds
+from .channel_construction_awgn import tal_vardy_tpm_algorithm
+from .helper_functions import *
 
 
 Z_PARAM_FIRST_HEADER_LINE = "Bhattacharyya parameters (Z-parameters) for a polar code"
@@ -117,7 +119,7 @@ def load_z_parameters(block_size, design_snr, mu):
 
 def main():
     np.set_printoptions(precision=3, linewidth=150)
-    print 'channel construction Bhattacharyya bounds by Arikan'
+    print('channel construction Bhattacharyya bounds by Arikan')
     n = 10
     m = 2 ** n
     k = m // 2
diff --git a/gr-fec/python/fec/polar/channel_construction_awgn.py b/gr-fec/python/fec/polar/channel_construction_awgn.py
old mode 100755
new mode 100644
index 7d820b2883..c75f3d1c44
--- a/gr-fec/python/fec/polar/channel_construction_awgn.py
+++ b/gr-fec/python/fec/polar/channel_construction_awgn.py
@@ -18,6 +18,11 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import unicode_literals
+
 '''
 Based on 2 papers:
 [1] Ido Tal, Alexander Vardy: 'How To Construct Polar Codes', 2013
@@ -27,11 +32,10 @@ for an in-depth description of a widely used algorithm for channel construction.
 for an overview of different approaches
 '''
 
-
 from scipy.optimize import fsolve
 from scipy.special import erfc
-from helper_functions import *
-from channel_construction_bec import bhattacharyya_bounds
+from .helper_functions import *
+from .channel_construction_bec import bhattacharyya_bounds
 
 
 def solver_equation(val, s):
@@ -190,7 +194,7 @@ def upper_convolve(tpm, mu):
     idx = -1
     for i in range(mu):
         idx += 1
-        q[0, idx] = (tpm[0, i] ** 2 + tpm[1, i] ** 2) / 2
+        q[0, idx] = (tpm[0 / i] ** 2 + tpm[1, i] ** 2, 2)
         q[1, idx] = tpm[0, i] * tpm[1, i]
         for j in range(i + 1, mu):
             idx += 1
@@ -211,8 +215,8 @@ def lower_convolve(tpm, mu):
     idx = -1
     for i in range(0, mu):
         idx += 1
-        q[0, idx] = (tpm[0, i] ** 2) / 2
-        q[1, idx] = (tpm[1, i] ** 2) / 2
+        q[0, idx] = (tpm[0 / i] ** 2, 2)
+        q[1, idx] = (tpm[1 / i] ** 2, 2)
         if q[0, idx] < q[1, idx]:
             q[0, idx], q[1, idx] = swap_values(q[0, idx], q[1, idx])
         idx += 1
@@ -249,7 +253,7 @@ def normalize_q(q, tpm):
 
 
 def main():
-    print 'channel construction AWGN main'
+    print('channel construction AWGN main')
     n = 8
     m = 2 ** n
     design_snr = 0.0
diff --git a/gr-fec/python/fec/polar/channel_construction_bec.py b/gr-fec/python/fec/polar/channel_construction_bec.py
index 4b35602d96..f920024ee0 100644
--- a/gr-fec/python/fec/polar/channel_construction_bec.py
+++ b/gr-fec/python/fec/polar/channel_construction_bec.py
@@ -18,8 +18,13 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import unicode_literals
+
 import numpy as np
-import helper_functions as hf
+from . import helper_functions as hf
 
 
 def bec_channel(eta):
@@ -220,7 +225,7 @@ def plot_capacity_histogram(design_snr, save_file=None):
 
 
 def main():
-    print 'channel construction main'
+    print('channel construction main')
     n = 11
     block_size = int(2 ** n)
     design_snr = -1.59
diff --git a/gr-fec/python/fec/polar/common.py b/gr-fec/python/fec/polar/common.py
index fa5987b6d2..8604f05ba1 100644
--- a/gr-fec/python/fec/polar/common.py
+++ b/gr-fec/python/fec/polar/common.py
@@ -18,16 +18,20 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import absolute_import
+from __future__ import unicode_literals
+
 
 import numpy as np
-from helper_functions import *
+from .helper_functions import *
 
 '''
 PolarCommon holds value checks and common initializer code for both Encoder and Decoder.
 '''
 
 
-class PolarCommon:
+class PolarCommon(object):
     def __init__(self, n, k, frozen_bit_position, frozenbits=None):
         if not is_power_of_two(n):
             raise ValueError("n={0} is not a power of 2!".format(n))
@@ -81,4 +85,4 @@ class PolarCommon:
         return self._encode_efficient(vec)
 
     def info_print(self):
-        print "POLAR code ({0}, {1})".format(self.N, self.K)
+        print("POLAR code ({0}, {1})".format(self.N, self.K))
diff --git a/gr-fec/python/fec/polar/decoder.py b/gr-fec/python/fec/polar/decoder.py
index 8748d284f7..5acd04aa72 100644
--- a/gr-fec/python/fec/polar/decoder.py
+++ b/gr-fec/python/fec/polar/decoder.py
@@ -18,11 +18,16 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import unicode_literals
+
 import numpy as np
-from common import PolarCommon
+from .common import PolarCommon
 
 # for dev
-from encoder import PolarEncoder
+from .encoder import PolarEncoder
 from matplotlib import pyplot as plt
 
 
@@ -239,31 +244,31 @@ def test_reverse_enc_dec():
     encoder = PolarEncoder(n, k, frozenbitposition, frozenbits)
     decoder = PolarDecoder(n, k, frozenbitposition, frozenbits)
     encoded = encoder.encode(bits)
-    print 'encoded:', encoded
+    print('encoded:', encoded)
     rx = decoder.decode(encoded)
-    print 'bits:', bits
-    print 'rx  :', rx
-    print (bits == rx).all()
+    print('bits:', bits)
+    print('rx  :', rx)
+    print((bits == rx).all())
 
 
 def compare_decoder_impls():
-    print '\nthis is decoder test'
+    print('\nthis is decoder test')
     n = 8
     k = 4
     frozenbits = np.zeros(n - k)
     # frozenbitposition16 = np.array((0, 1, 2, 3, 4, 5, 8, 9), dtype=int)
     frozenbitposition = np.array((0, 1, 2, 4), dtype=int)
     bits = np.random.randint(2, size=k)
-    print 'bits:', bits
+    print('bits:', bits)
     encoder = PolarEncoder(n, k, frozenbitposition, frozenbits)
     decoder = PolarDecoder(n, k, frozenbitposition, frozenbits)
     encoded = encoder.encode(bits)
-    print 'encoded:', encoded
+    print('encoded:', encoded)
     rx_st = decoder._lr_sc_decoder(encoded)
     rx_eff = decoder._lr_sc_decoder_efficient(encoded)
-    print 'standard :', rx_st
-    print 'efficient:', rx_eff
-    print (rx_st == rx_eff).all()
+    print('standard :', rx_st)
+    print('efficient:', rx_eff)
+    print((rx_st == rx_eff).all())
 
 
 def main():
@@ -279,14 +284,14 @@ def main():
     # decoder = PolarDecoder(n, k, frozenbitposition, frozenbits)
     #
     # bits = np.ones(k, dtype=int)
-    # print "bits: ", bits
+    # print("bits: ", bits)
     # evec = encoder.encode(bits)
-    # print "froz: ", encoder._insert_frozen_bits(bits)
-    # print "evec: ", evec
+    # print("froz: ", encoder._insert_frozen_bits(bits))
+    # print("evec: ", evec)
     #
     # evec[1] = 0
     # deced = decoder._lr_sc_decoder(evec)
-    # print 'SC decoded:', deced
+    # print('SC decoded:', deced)
     #
     # test_reverse_enc_dec()
     # compare_decoder_impls()
diff --git a/gr-fec/python/fec/polar/encoder.py b/gr-fec/python/fec/polar/encoder.py
index cc8fda2d1b..c5c7c05d5b 100644
--- a/gr-fec/python/fec/polar/encoder.py
+++ b/gr-fec/python/fec/polar/encoder.py
@@ -18,9 +18,13 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import absolute_import
+from __future__ import unicode_literals
+
 import numpy as np
-from common import PolarCommon
-import helper_functions as hf
+from .common import PolarCommon
+from . import helper_functions as hf
 
 
 class PolarEncoder(PolarCommon):
@@ -99,8 +103,8 @@ def test_pseudo_rate_1_encoder(encoder, ntests, k):
         u_hat = encoder._encode_efficient(fenc)
         if not (u_hat == u).all():
             print('rate-1 encoder/decoder failed')
-            print u
-            print u_hat
+            print(u)
+            print(u_hat)
             return False
     return True
 
@@ -114,11 +118,11 @@ def test_encoder_impls():
     # frozenbitposition8 = np.array((0, 1, 2, 4), dtype=int)  # keep it!
     frozenbitposition = np.array((0, 1, 2, 3, 4, 5, 8, 9), dtype=int)
     encoder = PolarEncoder(n, k, frozenbitposition)  #, frozenbits)
-    print 'result:', compare_results(encoder, ntests, k)
+    print('result:', compare_results(encoder, ntests, k))
 
     print('Test rate-1 encoder/decoder chain results')
     r1_test = test_pseudo_rate_1_encoder(encoder, ntests, k)
-    print 'Test rate-1 encoder/decoder:', r1_test
+    print('Test rate-1 encoder/decoder:', r1_test)
     test_systematic_encoder(encoder, ntests, k)
 
 
diff --git a/gr-fec/python/fec/polar/helper_functions.py b/gr-fec/python/fec/polar/helper_functions.py
index 85140c856f..6ea30c799b 100644
--- a/gr-fec/python/fec/polar/helper_functions.py
+++ b/gr-fec/python/fec/polar/helper_functions.py
@@ -18,6 +18,10 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
+
 import numpy as np
 import time, sys
 import copy
@@ -33,7 +37,7 @@ def bsc_channel(p):
     p denotes an erroneous transistion
     '''
     if not (p >= 0.0 and p <= 1.0):
-        print "given p is out of range!"
+        print("given p is out of range!")
         return np.array([], dtype=float)
 
     # 0 -> 0, 0 -> 1, 1 -> 0, 1 -> 1
@@ -99,7 +103,7 @@ def get_Fn(n):
 def get_Gn(n):
     # this matrix is called generator matrix
     if not is_power_of_two(n):
-        print "invalid input"
+        print("invalid input")
         return None
     if n == 1:
         return np.array([1, ])
@@ -177,7 +181,7 @@ def bhattacharyya_parameter(w):
 
 
 def main():
-    print 'helper functions'
+    print('helper functions')
 
     for i in range(9):
         print(i, 'is power of 2: ', is_power_of_two(i))
diff --git a/gr-fec/python/fec/polar/testbed.py b/gr-fec/python/fec/polar/testbed.py
old mode 100755
new mode 100644
index 3f8e814e4f..08ef0de558
--- a/gr-fec/python/fec/polar/testbed.py
+++ b/gr-fec/python/fec/polar/testbed.py
@@ -18,11 +18,16 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import unicode_literals
 
-from encoder import PolarEncoder
-from decoder import PolarDecoder
-import channel_construction as cc
-from helper_functions import *
+
+from .encoder import PolarEncoder
+from .decoder import PolarDecoder
+from . import channel_construction as cc
+from .helper_functions import *
 
 import matplotlib.pyplot as plt
 
@@ -58,13 +63,13 @@ def is_equal(first, second):
     if not (first == second).all():
         result = first == second
         for i in range(len(result)):
-            print '{0:4}: {1:2} == {2:1} = {3}'.format(i, first[i], second[i], result[i])
+            print('{0:4}: {1:2} == {2:1} = {3}'.format(i, first[i], second[i], result[i]))
         return False
     return True
 
 
 def exact_value(la, lb):
-    return np.log((np.exp(la + lb) + 1) / (np.exp(la) + np.exp(lb)))
+    return np.log((np.exp(la + lb) + 1) / (np.exp(la + np.exp(lb))))
 
 
 def approx_value(la, lb):
@@ -112,7 +117,7 @@ def test_1024_rate_1_code():
         recv = decoder.decode(rx)
         channel_counter += (bits == recv)
 
-    print channel_counter
+    print(channel_counter)
     print(np.min(channel_counter), np.max(channel_counter))
 
     np.save('channel_counter_' + str(ntests) + '.npy', channel_counter)
@@ -330,7 +335,7 @@ def main():
     # frozenbits = np.zeros(n - k)
     # frozenbitposition8 = np.array((0, 1, 2, 4), dtype=int)
     # frozenbitposition = np.array((0, 1, 2, 3, 4, 5, 8, 9), dtype=int)
-    # print frozenbitposition
+    # print(frozenbitposition)
 
     # test_enc_dec_chain()
     # test_1024_rate_1_code()
diff --git a/gr-fec/python/fec/qa_ber_bf.py b/gr-fec/python/fec/qa_ber_bf.py
index 5d1734de0c..0d720988cb 100644
--- a/gr-fec/python/fec/qa_ber_bf.py
+++ b/gr-fec/python/fec/qa_ber_bf.py
@@ -20,11 +20,15 @@
 # Boston, MA 02110-1301, USA.
 #
 
-from gnuradio import gr, gr_unittest, blocks
-import fec_swig as fec
+from __future__ import print_function
+
+
 import numpy
 import copy
 
+from gnuradio import gr, gr_unittest, blocks
+from gnuradio import fec
+
 
 class test_ber_bf(gr_unittest.TestCase):
     def setUp(self):
@@ -132,8 +136,8 @@ class test_ber_bf(gr_unittest.TestCase):
         data = dst.data()
         expected_result = [-2.0, ]
 
-        print data
-        print expected_result
+        print(data)
+        print(expected_result)
 
         self.assertFloatTuplesAlmostEqual(expected_result, data, 5)
 
diff --git a/gr-fec/python/fec/qa_depuncture.py b/gr-fec/python/fec/qa_depuncture.py
index 5566e83a25..9ec57bfc41 100644
--- a/gr-fec/python/fec/qa_depuncture.py
+++ b/gr-fec/python/fec/qa_depuncture.py
@@ -20,11 +20,14 @@
 # Boston, MA 02110-1301, USA.
 #
 
-from gnuradio import gr, gr_unittest
-import fec_swig as fec
-import blocks_swig as blocks
+from __future__ import division
+
 from collections import deque
 
+from gnuradio import gr, gr_unittest, blocks
+from gnuradio import fec
+
+
 class test_depuncture (gr_unittest.TestCase):
 
     def depuncture_setup(self):
@@ -37,7 +40,7 @@ class test_depuncture (gr_unittest.TestCase):
 
         k = 0
         self.expected = []
-        for n in range(len(self.src_data)/(self.puncsize - self.puncholes)):
+        for n in range(len(self.src_data) // (self.puncsize - self.puncholes)):
             for i in range(self.puncsize):
                 if _puncpat[i] == 1:
                     self.expected.append(self.src_data[k]);
@@ -46,7 +49,7 @@ class test_depuncture (gr_unittest.TestCase):
                     self.expected.append(self.sym)
 
     def setUp(self):
-        self.src_data = 2000*range(64)
+        self.src_data = 2000*list(range(64))
         self.tb = gr.top_block ()
 
     def tearDown(self):
@@ -64,15 +67,15 @@ class test_depuncture (gr_unittest.TestCase):
         self.depuncture_setup()
 
         src = blocks.vector_source_b(self.src_data)
-	op  = fec.depuncture_bb(self.puncsize, self.puncpat,
+        op  = fec.depuncture_bb(self.puncsize, self.puncpat,
                                 self.delay, self.sym)
-	dst = blocks.vector_sink_b()
+        dst = blocks.vector_sink_b()
 
-	self.tb.connect(src, op, dst)
-	self.tb.run()
+        self.tb.connect(src, op, dst)
+        self.tb.run()
 
-	dst_data = list(dst.data())
-        for i in xrange(len(dst_data)):
+        dst_data = list(dst.data())
+        for i in range(len(dst_data)):
             dst_data[i] = int(dst_data[i])
 
         self.assertEqual(self.expected, dst_data)
@@ -89,15 +92,15 @@ class test_depuncture (gr_unittest.TestCase):
         self.depuncture_setup()
 
         src = blocks.vector_source_b(self.src_data)
-	op  = fec.depuncture_bb(self.puncsize, self.puncpat,
+        op  = fec.depuncture_bb(self.puncsize, self.puncpat,
                                 self.delay, self.sym)
-	dst = blocks.vector_sink_b()
+        dst = blocks.vector_sink_b()
 
-	self.tb.connect(src, op, dst)
-	self.tb.run()
+        self.tb.connect(src, op, dst)
+        self.tb.run()
 
-	dst_data = list(dst.data())
-        for i in xrange(len(dst_data)):
+        dst_data = list(dst.data())
+        for i in range(len(dst_data)):
             dst_data[i] = int(dst_data[i])
 
         self.assertEqual(self.expected, dst_data)
@@ -115,15 +118,15 @@ class test_depuncture (gr_unittest.TestCase):
         self.depuncture_setup()
 
         src = blocks.vector_source_b(self.src_data)
-	op  = fec.depuncture_bb(self.puncsize, self.puncpat,
+        op  = fec.depuncture_bb(self.puncsize, self.puncpat,
                                 self.delay, self.sym)
-	dst = blocks.vector_sink_b()
+        dst = blocks.vector_sink_b()
 
-	self.tb.connect(src, op, dst)
-	self.tb.run()
+        self.tb.connect(src, op, dst)
+        self.tb.run()
 
-	dst_data = list(dst.data())
-        for i in xrange(len(dst_data)):
+        dst_data = list(dst.data())
+        for i in range(len(dst_data)):
             dst_data[i] = int(dst_data[i])
 
         self.assertEqual(self.expected, dst_data)
@@ -141,23 +144,23 @@ class test_depuncture (gr_unittest.TestCase):
         self.sym = 0
 
         src = blocks.vector_source_b(self.src_data)
-	op0  = fec.depuncture_bb(self.puncsize, self.puncpat0,
+        op0  = fec.depuncture_bb(self.puncsize, self.puncpat0,
                                  self.delay, self.sym)
-	op1  = fec.depuncture_bb(self.puncsize, self.puncpat1,
+        op1  = fec.depuncture_bb(self.puncsize, self.puncpat1,
                                  self.delay, self.sym)
-	dst0 = blocks.vector_sink_b()
-	dst1 = blocks.vector_sink_b()
+        dst0 = blocks.vector_sink_b()
+        dst1 = blocks.vector_sink_b()
 
-	self.tb.connect(src, op0, dst0)
-	self.tb.connect(src, op1, dst1)
-	self.tb.run()
+        self.tb.connect(src, op0, dst0)
+        self.tb.connect(src, op1, dst1)
+        self.tb.run()
 
-	dst_data0 = list(dst0.data())
-        for i in xrange(len(dst_data0)):
+        dst_data0 = list(dst0.data())
+        for i in range(len(dst_data0)):
             dst_data0[i] = int(dst_data0[i])
 
-	dst_data1 = list(dst1.data())
-        for i in xrange(len(dst_data1)):
+        dst_data1 = list(dst1.data())
+        for i in range(len(dst_data1)):
             dst_data1[i] = int(dst_data1[i])
 
         self.assertEqual(dst_data1, dst_data0)
@@ -175,15 +178,15 @@ class test_depuncture (gr_unittest.TestCase):
         self.depuncture_setup()
 
         src = blocks.vector_source_b(self.src_data)
-	op  = fec.depuncture_bb(self.puncsize, self.puncpat,
+        op  = fec.depuncture_bb(self.puncsize, self.puncpat,
                                 self.delay)
-	dst = blocks.vector_sink_b()
+        dst = blocks.vector_sink_b()
 
-	self.tb.connect(src, op, dst)
-	self.tb.run()
+        self.tb.connect(src, op, dst)
+        self.tb.run()
 
-	dst_data = list(dst.data())
-        for i in xrange(len(dst_data)):
+        dst_data = list(dst.data())
+        for i in range(len(dst_data)):
             dst_data[i] = int(dst_data[i])
 
         self.assertEqual(self.expected, dst_data)
diff --git a/gr-fec/python/fec/qa_ecc_ccsds_27.py b/gr-fec/python/fec/qa_ecc_ccsds_27.py
old mode 100755
new mode 100644
index 895e683345..6656c9d3ac
--- a/gr-fec/python/fec/qa_ecc_ccsds_27.py
+++ b/gr-fec/python/fec/qa_ecc_ccsds_27.py
@@ -20,9 +20,10 @@
 # Boston, MA 02110-1301, USA.
 #
 
-from gnuradio import gr, gr_unittest
-import fec_swig as fec
-import blocks_swig as blocks
+
+from gnuradio import gr, gr_unittest, blocks
+from gnuradio import fec
+
 
 class test_ccsds_27 (gr_unittest.TestCase):
 
@@ -34,17 +35,17 @@ class test_ccsds_27 (gr_unittest.TestCase):
 
     def xtest_ccsds_27 (self):
         src_data = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
-	expected = (0, 0, 0, 0, 1, 2, 3, 4, 5, 6)
+        expected = (0, 0, 0, 0, 1, 2, 3, 4, 5, 6)
         src = blocks.vector_source_b(src_data)
-	enc = fec.encode_ccsds_27_bb()
-	b2f = blocks.char_to_float()
-	add = blocks.add_const_ff(-0.5)
-	mul = blocks.multiply_const_ff(2.0)
-	dec = fec.decode_ccsds_27_fb()
-	dst = blocks.vector_sink_b()
-	self.tb.connect(src, enc, b2f, add, mul, dec, dst)
-	self.tb.run()
-	dst_data = dst.data()
+        enc = fec.encode_ccsds_27_bb()
+        b2f = blocks.char_to_float()
+        add = blocks.add_const_ff(-0.5)
+        mul = blocks.multiply_const_ff(2.0)
+        dec = fec.decode_ccsds_27_fb()
+        dst = blocks.vector_sink_b()
+        self.tb.connect(src, enc, b2f, add, mul, dec, dst)
+        self.tb.run()
+        dst_data = dst.data()
         self.assertEqual(expected, dst_data)
 
 
diff --git a/gr-fec/python/fec/qa_fecapi_cc.py b/gr-fec/python/fec/qa_fecapi_cc.py
index bbd500161e..053f671a0e 100644
--- a/gr-fec/python/fec/qa_fecapi_cc.py
+++ b/gr-fec/python/fec/qa_fecapi_cc.py
@@ -20,12 +20,14 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import absolute_import
+
+
 from gnuradio import gr, gr_unittest
-import fec_swig as fec
+from gnuradio import fec
+
 from _qa_helper import _qa_helper
 
-from extended_encoder import extended_encoder
-from extended_decoder import extended_decoder
 
 class test_fecapi_cc(gr_unittest.TestCase):
 
@@ -91,8 +93,8 @@ class test_fecapi_cc(gr_unittest.TestCase):
         k = 7
         rate = 2
         polys = [109,79]
-        enc = map((lambda a: fec.cc_encoder_make(frame_size*8, k, rate, polys)), range(0,1))
-        dec = map((lambda a: fec.cc_decoder.make(frame_size*8, k, rate, polys)), range(0,1))
+        enc = list(map((lambda a: fec.cc_encoder_make(frame_size*8, k, rate, polys)), list(range(0,1))))
+        dec = list(map((lambda a: fec.cc_decoder.make(frame_size*8, k, rate, polys)), list(range(0,1))))
         threading = None
         self.test = _qa_helper(5*frame_size, enc, dec, threading)
         self.tb.connect(self.test)
@@ -108,8 +110,8 @@ class test_fecapi_cc(gr_unittest.TestCase):
         k = 7
         rate = 2
         polys = [109,79]
-        enc = map((lambda a: fec.cc_encoder_make(frame_size*8, k, rate, polys)), range(0,1))
-        dec = map((lambda a: fec.cc_decoder.make(frame_size*8, k, rate, polys)), range(0,1))
+        enc = list(map((lambda a: fec.cc_encoder_make(frame_size*8, k, rate, polys)), list(range(0,1))))
+        dec = list(map((lambda a: fec.cc_decoder.make(frame_size*8, k, rate, polys)), list(range(0,1))))
         threading = 'ordinary'
         self.test = _qa_helper(5*frame_size, enc, dec, threading)
         self.tb.connect(self.test)
@@ -125,8 +127,8 @@ class test_fecapi_cc(gr_unittest.TestCase):
         k = 7
         rate = 2
         polys = [109,79]
-        enc = map((lambda a: fec.cc_encoder_make(frame_size*8, k, rate, polys)), range(0,1))
-        dec = map((lambda a: fec.cc_decoder.make(frame_size*8, k, rate, polys)), range(0,1))
+        enc = list(map((lambda a: fec.cc_encoder_make(frame_size*8, k, rate, polys)), list(range(0,1))))
+        dec = list(map((lambda a: fec.cc_decoder.make(frame_size*8, k, rate, polys)), list(range(0,1))))
         threading = 'capillary'
         self.test = _qa_helper(5*frame_size, enc, dec, threading)
         self.tb.connect(self.test)
@@ -143,8 +145,8 @@ class test_fecapi_cc(gr_unittest.TestCase):
         rate = 2
         polys = [109,79]
         mode = fec.CC_TERMINATED
-        enc = map((lambda a: fec.cc_encoder_make(frame_size*8, k, rate, polys, mode=mode)), range(0,4))
-        dec = map((lambda a: fec.cc_decoder.make(frame_size*8, k, rate, polys, mode=mode)), range(0,4))
+        enc = list(map((lambda a: fec.cc_encoder_make(frame_size*8, k, rate, polys, mode=mode)), list(range(0,4))))
+        dec = list(map((lambda a: fec.cc_decoder.make(frame_size*8, k, rate, polys, mode=mode)), list(range(0,4))))
         threading = 'capillary'
         self.test = _qa_helper(4*frame_size, enc, dec, threading)
         self.tb.connect(self.test)
@@ -161,8 +163,8 @@ class test_fecapi_cc(gr_unittest.TestCase):
         rate = 2
         polys = [109,79]
         mode = fec.CC_TRUNCATED
-        enc = map((lambda a: fec.cc_encoder_make(frame_size*8, k, rate, polys, mode=mode)), range(0,4))
-        dec = map((lambda a: fec.cc_decoder.make(frame_size*8, k, rate, polys, mode=mode)), range(0,4))
+        enc = list(map((lambda a: fec.cc_encoder_make(frame_size*8, k, rate, polys, mode=mode)), list(range(0,4))))
+        dec = list(map((lambda a: fec.cc_decoder.make(frame_size*8, k, rate, polys, mode=mode)), list(range(0,4))))
         threading = 'capillary'
         self.test = _qa_helper(4*frame_size, enc, dec, threading)
         self.tb.connect(self.test)
@@ -179,8 +181,8 @@ class test_fecapi_cc(gr_unittest.TestCase):
         rate = 2
         polys = [109,79]
         mode = fec.CC_TAILBITING
-        enc = map((lambda a: fec.cc_encoder_make(frame_size*8, k, rate, polys, mode=mode)), range(0,4))
-        dec = map((lambda a: fec.cc_decoder.make(frame_size*8, k, rate, polys, mode=mode)), range(0,4))
+        enc = list(map((lambda a: fec.cc_encoder_make(frame_size*8, k, rate, polys, mode=mode)), list(range(0,4))))
+        dec = list(map((lambda a: fec.cc_decoder.make(frame_size*8, k, rate, polys, mode=mode)), list(range(0,4))))
         threading = 'capillary'
         self.test = _qa_helper(4*frame_size, enc, dec, threading)
         self.tb.connect(self.test)
diff --git a/gr-fec/python/fec/qa_fecapi_dummy.py b/gr-fec/python/fec/qa_fecapi_dummy.py
index 9471c71d74..368014d890 100644
--- a/gr-fec/python/fec/qa_fecapi_dummy.py
+++ b/gr-fec/python/fec/qa_fecapi_dummy.py
@@ -20,13 +20,17 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import absolute_import
+
+import numpy as np
+
 from gnuradio import gr, gr_unittest, blocks
-import fec_swig as fec
+from gnuradio import fec
+from fec import extended_encoder
+from fec import extended_decoder
+
 from _qa_helper import _qa_helper
-import numpy as np
 
-from extended_encoder import extended_encoder
-from extended_decoder import extended_decoder
 
 class test_fecapi_dummy(gr_unittest.TestCase):
 
@@ -80,8 +84,8 @@ class test_fecapi_dummy(gr_unittest.TestCase):
 
     def test_parallelism1_00(self):
         frame_size = 30
-        enc = map((lambda a: fec.dummy_encoder_make(frame_size*8)), range(0,1))
-        dec = map((lambda a: fec.dummy_decoder.make(frame_size*8)), range(0,1))
+        enc = list(map((lambda a: fec.dummy_encoder_make(frame_size*8)), list(range(0,1))))
+        dec = list(map((lambda a: fec.dummy_decoder.make(frame_size*8)), list(range(0,1))))
         threading = None
         self.test = _qa_helper(10*frame_size, enc, dec, threading)
         self.tb.connect(self.test)
@@ -94,8 +98,8 @@ class test_fecapi_dummy(gr_unittest.TestCase):
 
     def test_parallelism1_01(self):
         frame_size = 30
-        enc = map((lambda a: fec.dummy_encoder_make(frame_size*8)), range(0,1))
-        dec = map((lambda a: fec.dummy_decoder.make(frame_size*8)), range(0,1))
+        enc = list(map((lambda a: fec.dummy_encoder_make(frame_size*8)), list(range(0,1))))
+        dec = list(map((lambda a: fec.dummy_decoder.make(frame_size*8)), list(range(0,1))))
         threading = 'ordinary'
         self.test = _qa_helper(10*frame_size, enc, dec, threading)
         self.tb.connect(self.test)
@@ -108,8 +112,8 @@ class test_fecapi_dummy(gr_unittest.TestCase):
 
     def test_parallelism1_02(self):
         frame_size = 300
-        enc = map((lambda a: fec.dummy_encoder_make(frame_size*8)), range(0,1))
-        dec = map((lambda a: fec.dummy_decoder.make(frame_size*8)), range(0,1))
+        enc = list(map((lambda a: fec.dummy_encoder_make(frame_size*8)), list(range(0,1))))
+        dec = list(map((lambda a: fec.dummy_decoder.make(frame_size*8)), list(range(0,1))))
         threading = 'capillary'
         self.test = _qa_helper(10*frame_size, enc, dec, threading)
         self.tb.connect(self.test)
@@ -123,8 +127,8 @@ class test_fecapi_dummy(gr_unittest.TestCase):
     def test_parallelism1_03(self):
         frame_size = 30
         dims = 10
-        enc = map((lambda a: fec.dummy_encoder_make(frame_size*8)), range(0,dims))
-        dec = map((lambda a: fec.dummy_decoder.make(frame_size*8)), range(0,dims))
+        enc = list(map((lambda a: fec.dummy_encoder_make(frame_size*8)), list(range(0,dims))))
+        dec = list(map((lambda a: fec.dummy_decoder.make(frame_size*8)), list(range(0,dims))))
         threading = 'ordinary'
         self.test = _qa_helper(dims*frame_size, enc, dec, threading)
         self.tb.connect(self.test)
@@ -138,8 +142,8 @@ class test_fecapi_dummy(gr_unittest.TestCase):
     def test_parallelism1_04(self):
         frame_size = 30
         dims = 16
-        enc = map((lambda a: fec.dummy_encoder_make(frame_size*8)), range(0,dims))
-        dec = map((lambda a: fec.dummy_decoder.make(frame_size*8)), range(0,dims))
+        enc = list(map((lambda a: fec.dummy_encoder_make(frame_size*8)), list(range(0,dims))))
+        dec = list(map((lambda a: fec.dummy_decoder.make(frame_size*8)), list(range(0,dims))))
         threading = 'capillary'
         self.test = _qa_helper(dims*frame_size, enc, dec, threading)
         self.tb.connect(self.test)
@@ -153,7 +157,7 @@ class test_fecapi_dummy(gr_unittest.TestCase):
     def test_parallelism1_05(self):
         frame_size = 30
         dims = 5
-        enc = map((lambda a: fec.dummy_encoder_make(frame_size*8)), range(0,dims))
+        enc = list(map((lambda a: fec.dummy_encoder_make(frame_size*8)), list(range(0,dims))))
         #dec = map((lambda a: fec.dummy_decoder.make(frame_size*8)), range(0,dims))
         threading = 'capillary'
 
@@ -163,7 +167,7 @@ class test_fecapi_dummy(gr_unittest.TestCase):
         frame_size = 30
         dims = 5
         #enc = map((lambda a: fec.dummy_encoder_make(frame_size*8)), range(0,dims))
-        dec = map((lambda a: fec.dummy_decoder.make(frame_size*8)), range(0,dims))
+        dec = list(map((lambda a: fec.dummy_decoder.make(frame_size*8)), list(range(0,dims))))
         threading = 'capillary'
 
         self.assertRaises(AttributeError, lambda: extended_decoder(dec, threading=threading, puncpat="11"))
@@ -172,7 +176,7 @@ class test_fecapi_dummy(gr_unittest.TestCase):
         frame_size = 30
         dims1 = 16
         dims2 = 16
-        enc = map((lambda b: map((lambda a: fec.dummy_encoder_make(frame_size*8)), range(0,dims1))), range(0,dims2))
+        enc = list(map((lambda b: list(map((lambda a: fec.dummy_encoder_make(frame_size*8)), list(range(0,dims1))))), list(range(0,dims2))))
         #dec = map((lambda b: map((lambda a: fec.dummy_decoder_make(frame_size*8)), range(0,dims1))), range(0,dims2))
         threading = 'capillary'
 
@@ -182,7 +186,7 @@ class test_fecapi_dummy(gr_unittest.TestCase):
         frame_size = 30
         dims1 = 16
         dims2 = 16
-        dec = map((lambda b: map((lambda a: fec.dummy_decoder_make(frame_size*8)), range(0,dims1))), range(0,dims2))
+        dec = list(map((lambda b: list(map((lambda a: fec.dummy_decoder_make(frame_size*8)), list(range(0,dims1))))), list(range(0,dims2))))
         threading = 'capillary'
 
         self.assertRaises(AttributeError, lambda: extended_decoder(dec, threading=threading, puncpat="11"))
@@ -193,6 +197,7 @@ class test_fecapi_dummy(gr_unittest.TestCase):
         frame_size = 32
 
         data = np.random.randint(0, 2, n_frames * frame_size)
+        data.dtype = np.uint8
         packed_data = np.packbits(data)
 
         tb = gr.top_block()
diff --git a/gr-fec/python/fec/qa_fecapi_ldpc.py b/gr-fec/python/fec/qa_fecapi_ldpc.py
index b45ce0ee19..758a26469e 100644
--- a/gr-fec/python/fec/qa_fecapi_ldpc.py
+++ b/gr-fec/python/fec/qa_fecapi_ldpc.py
@@ -20,15 +20,19 @@
 # Boston, MA 02110-1301, USA.
 #
 
-from gnuradio import gr, gr_unittest
-import fec_swig as fec
-from _qa_helper import _qa_helper
+from __future__ import absolute_import
 
-from extended_encoder import extended_encoder
-from extended_decoder import extended_decoder
 
 import os
 
+from gnuradio import gr, gr_unittest
+from gnuradio import fec
+from fec import extended_encoder
+from fec import extended_decoder
+
+from _qa_helper import _qa_helper
+
+
 # Get location of the alist files. If run in 'ctest' or 'make test',
 # the shell script sets srcdir. Otherwise, we assume we're running
 # from the current directory and know where to go.
@@ -131,8 +135,8 @@ class test_fecapi_ldpc(gr_unittest.TestCase):
         gap = 4
         LDPC_matrix_object = fec.ldpc_H_matrix(filename, gap)
         k = LDPC_matrix_object.k()
-        enc = map((lambda a: fec.ldpc_par_mtrx_encoder.make_H(LDPC_matrix_object)), range(0,1))
-        dec = map((lambda a: fec.ldpc_bit_flip_decoder.make(LDPC_matrix_object.get_base_sptr())), range(0,1))
+        enc = list(map((lambda a: fec.ldpc_par_mtrx_encoder.make_H(LDPC_matrix_object)), list(range(0,1))))
+        dec = list(map((lambda a: fec.ldpc_bit_flip_decoder.make(LDPC_matrix_object.get_base_sptr())), list(range(0,1))))
         threading = None
         self.test = _qa_helper(10*k, enc, dec, threading)
         self.tb.connect(self.test)
@@ -148,8 +152,8 @@ class test_fecapi_ldpc(gr_unittest.TestCase):
         gap = 4
         LDPC_matrix_object = fec.ldpc_H_matrix(filename, gap)
         k = LDPC_matrix_object.k()
-        enc = map((lambda a: fec.ldpc_par_mtrx_encoder.make_H(LDPC_matrix_object)), range(0,1))
-        dec = map((lambda a: fec.ldpc_bit_flip_decoder.make(LDPC_matrix_object.get_base_sptr())), range(0,1))
+        enc = list(map((lambda a: fec.ldpc_par_mtrx_encoder.make_H(LDPC_matrix_object)), list(range(0,1))))
+        dec = list(map((lambda a: fec.ldpc_bit_flip_decoder.make(LDPC_matrix_object.get_base_sptr())), list(range(0,1))))
         threading = 'ordinary'
         self.test = _qa_helper(10*k, enc, dec, threading)
         self.tb.connect(self.test)
@@ -165,8 +169,8 @@ class test_fecapi_ldpc(gr_unittest.TestCase):
         gap = 4
         LDPC_matrix_object = fec.ldpc_H_matrix(filename, gap)
         k = LDPC_matrix_object.k()
-        enc = map((lambda a: fec.ldpc_par_mtrx_encoder.make_H(LDPC_matrix_object)), range(0,1))
-        dec = map((lambda a: fec.ldpc_bit_flip_decoder.make(LDPC_matrix_object.get_base_sptr())), range(0,1))
+        enc = list(map((lambda a: fec.ldpc_par_mtrx_encoder.make_H(LDPC_matrix_object)), list(range(0,1))))
+        dec = list(map((lambda a: fec.ldpc_bit_flip_decoder.make(LDPC_matrix_object.get_base_sptr())), list(range(0,1))))
         threading = 'capillary'
         self.test = _qa_helper(10*k, enc, dec, threading)
         self.tb.connect(self.test)
@@ -255,7 +259,7 @@ class test_fecapi_ldpc(gr_unittest.TestCase):
         dims = 5
         LDPC_matrix_object = fec.ldpc_H_matrix(filename, gap)
         k = LDPC_matrix_object.k()
-        dec = map((lambda a: fec.ldpc_bit_flip_decoder.make(LDPC_matrix_object.get_base_sptr())), range(0,dims))
+        dec = list(map((lambda a: fec.ldpc_bit_flip_decoder.make(LDPC_matrix_object.get_base_sptr())), list(range(0,dims))))
         threading = 'capillary'
         self.assertRaises(AttributeError, lambda: extended_decoder(dec, threading=threading, puncpat="11"))
 
@@ -267,8 +271,8 @@ class test_fecapi_ldpc(gr_unittest.TestCase):
         k = LDPC_matrix_object.k()
         dims1 = 16
         dims2 = 16
-        enc = map((lambda b: map((lambda a: fec.ldpc_par_mtrx_encoder.make_H(LDPC_matrix_object)),
-                                 range(0,dims1))), range(0,dims2))
+        enc = list(map((lambda b: list(map((lambda a: fec.ldpc_par_mtrx_encoder.make_H(LDPC_matrix_object)),
+                                 list(range(0,dims1))))), list(range(0,dims2))))
         threading = 'capillary'
 
         self.assertRaises(AttributeError, lambda: extended_encoder(enc, threading=threading, puncpat="11"))
@@ -281,8 +285,8 @@ class test_fecapi_ldpc(gr_unittest.TestCase):
         k = LDPC_matrix_object.k()
         dims1 = 16
         dims2 = 16
-        enc = map((lambda b: map((lambda a: fec.ldpc_par_mtrx_encoder.make_H(LDPC_matrix_object)),
-                                 range(0,dims1))), range(0,dims2))
+        enc = list(map((lambda b: list(map((lambda a: fec.ldpc_par_mtrx_encoder.make_H(LDPC_matrix_object)),
+                                 list(range(0,dims1))))), list(range(0,dims2))))
         threading = 'capillary'
 
         self.assertRaises(AttributeError, lambda: extended_encoder(enc, threading=threading, puncpat="11"))
@@ -295,8 +299,8 @@ class test_fecapi_ldpc(gr_unittest.TestCase):
         k = LDPC_matrix_object.k()
         dims1 = 16
         dims2 = 16
-        dec = map((lambda b: map((lambda a: fec.ldpc_bit_flip_decoder.make(LDPC_matrix_object.get_base_sptr())),
-                                 range(0,dims1))), range(0,dims2))
+        dec = list(map((lambda b: list(map((lambda a: fec.ldpc_bit_flip_decoder.make(LDPC_matrix_object.get_base_sptr())),
+                                 list(range(0,dims1))))), list(range(0,dims2))))
         threading = 'capillary'
 
         self.assertRaises(AttributeError, lambda: extended_decoder(dec, threading=threading, puncpat="11"))
diff --git a/gr-fec/python/fec/qa_fecapi_repetition.py b/gr-fec/python/fec/qa_fecapi_repetition.py
index 7998d61bd1..650aab7010 100644
--- a/gr-fec/python/fec/qa_fecapi_repetition.py
+++ b/gr-fec/python/fec/qa_fecapi_repetition.py
@@ -20,12 +20,15 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import absolute_import
+
+
+
 from gnuradio import gr, gr_unittest
-import fec_swig as fec
+from gnuradio import fec
+
 from _qa_helper import _qa_helper
 
-from extended_encoder import extended_encoder
-from extended_decoder import extended_decoder
 
 class test_fecapi_repetition(gr_unittest.TestCase):
 
@@ -83,8 +86,8 @@ class test_fecapi_repetition(gr_unittest.TestCase):
     def test_parallelism1_00(self):
         frame_size = 30
         rep = 3
-        enc = map((lambda a: fec.repetition_encoder_make(frame_size*8, rep)), range(0,1))
-        dec = map((lambda a: fec.repetition_decoder.make(frame_size*8, rep)), range(0,1))
+        enc = list(map((lambda a: fec.repetition_encoder_make(frame_size*8, rep)), list(range(0,1))))
+        dec = list(map((lambda a: fec.repetition_decoder.make(frame_size*8, rep)), list(range(0,1))))
         threading = None
         self.test = _qa_helper(10*frame_size, enc, dec, threading)
         self.tb.connect(self.test)
@@ -98,8 +101,8 @@ class test_fecapi_repetition(gr_unittest.TestCase):
     def test_parallelism1_01(self):
         frame_size = 30
         rep = 3
-        enc = map((lambda a: fec.repetition_encoder_make(frame_size*8, rep)), range(0,1))
-        dec = map((lambda a: fec.repetition_decoder.make(frame_size*8, rep)), range(0,1))
+        enc = list(map((lambda a: fec.repetition_encoder_make(frame_size*8, rep)), list(range(0,1))))
+        dec = list(map((lambda a: fec.repetition_decoder.make(frame_size*8, rep)), list(range(0,1))))
         threading = 'ordinary'
         self.test = _qa_helper(10*frame_size, enc, dec, threading)
         self.tb.connect(self.test)
@@ -113,8 +116,8 @@ class test_fecapi_repetition(gr_unittest.TestCase):
     def test_parallelism1_02(self):
         frame_size = 300
         rep = 3
-        enc = map((lambda a: fec.repetition_encoder_make(frame_size*8, rep)), range(0,1))
-        dec = map((lambda a: fec.repetition_decoder.make(frame_size*8, rep)), range(0,1))
+        enc = list(map((lambda a: fec.repetition_encoder_make(frame_size*8, rep)), list(range(0,1))))
+        dec = list(map((lambda a: fec.repetition_decoder.make(frame_size*8, rep)), list(range(0,1))))
         threading = 'capillary'
         self.test = _qa_helper(10*frame_size, enc, dec, threading)
         self.tb.connect(self.test)
@@ -129,8 +132,8 @@ class test_fecapi_repetition(gr_unittest.TestCase):
         frame_size = 30
         rep = 3
         dims = 10
-        enc = map((lambda a: fec.repetition_encoder_make(frame_size*8, rep)), range(0,dims))
-        dec = map((lambda a: fec.repetition_decoder.make(frame_size*8, rep)), range(0,dims))
+        enc = list(map((lambda a: fec.repetition_encoder_make(frame_size*8, rep)), list(range(0,dims))))
+        dec = list(map((lambda a: fec.repetition_decoder.make(frame_size*8, rep)), list(range(0,dims))))
         threading = 'ordinary'
         self.test = _qa_helper(dims*frame_size, enc, dec, threading)
         self.tb.connect(self.test)
@@ -145,8 +148,8 @@ class test_fecapi_repetition(gr_unittest.TestCase):
         frame_size = 30
         rep = 3
         dims = 16
-        enc = map((lambda a: fec.repetition_encoder_make(frame_size*8, rep)), range(0,dims))
-        dec = map((lambda a: fec.repetition_decoder.make(frame_size*8, rep)), range(0,dims))
+        enc = list(map((lambda a: fec.repetition_encoder_make(frame_size*8, rep)), list(range(0,dims))))
+        dec = list(map((lambda a: fec.repetition_decoder.make(frame_size*8, rep)), list(range(0,dims))))
         threading = 'capillary'
         self.test = _qa_helper(dims*frame_size, enc, dec, threading)
         self.tb.connect(self.test)
diff --git a/gr-fec/python/fec/qa_polar_decoder_sc.py b/gr-fec/python/fec/qa_polar_decoder_sc.py
index 6dd1e8e481..c8d956328e 100644
--- a/gr-fec/python/fec/qa_polar_decoder_sc.py
+++ b/gr-fec/python/fec/qa_polar_decoder_sc.py
@@ -20,13 +20,18 @@
 # Boston, MA 02110-1301, USA.
 #
 
-from gnuradio import gr, gr_unittest, blocks
-import fec_swig as fec
+from __future__ import print_function
+from __future__ import absolute_import
+from __future__ import division
+
 
 import numpy as np
-from extended_decoder import extended_decoder
-from polar.encoder import PolarEncoder
-import polar.channel_construction as cc
+
+from gnuradio import gr, gr_unittest, blocks
+from gnuradio import fec
+from fec import extended_decoder
+from fec.polar.encoder import PolarEncoder
+from fec.polar import channel_construction as cc
 
 # import os
 # print('PID:', os.getpid())
diff --git a/gr-fec/python/fec/qa_polar_decoder_sc_list.py b/gr-fec/python/fec/qa_polar_decoder_sc_list.py
index 36819b396f..13a8e9bc32 100644
--- a/gr-fec/python/fec/qa_polar_decoder_sc_list.py
+++ b/gr-fec/python/fec/qa_polar_decoder_sc_list.py
@@ -20,13 +20,17 @@
 # Boston, MA 02110-1301, USA.
 #
 
-from gnuradio import gr, gr_unittest, blocks
-import fec_swig as fec
+from __future__ import print_function
+from __future__ import absolute_import
+from __future__ import division
+
+
 import numpy as np
 
-from extended_decoder import extended_decoder
-from polar.encoder import PolarEncoder
-import polar.channel_construction as cc
+from gnuradio import gr, gr_unittest, blocks, fec
+from gnuradio.fec import extended_decoder
+from gnuradio.fec.polar.encoder import PolarEncoder
+from gnuradio.fec.polar import channel_construction as cc
 
 # import os
 # print('PID:', os.getpid())
@@ -56,7 +60,7 @@ class test_polar_decoder_sc_list(gr_unittest.TestCase):
         self.assertFalse(polar_decoder.set_frame_size(10))
 
     def test_002_one_vector(self):
-        print "test_002_one_vector"
+        print("test_002_one_vector")
         expo = 6
         block_size = 2 ** expo
         num_info_bits = 2 ** (expo - 1)
@@ -89,7 +93,7 @@ class test_polar_decoder_sc_list(gr_unittest.TestCase):
         self.assertTupleEqual(tuple(res), tuple(bits))
 
     def test_003_stream(self):
-        print "test_003_stream"
+        print("test_003_stream")
         nframes = 5
         expo = 8
         block_size = 2 ** expo
diff --git a/gr-fec/python/fec/qa_polar_decoder_sc_systematic.py b/gr-fec/python/fec/qa_polar_decoder_sc_systematic.py
index fb2381e069..525ebbc76c 100644
--- a/gr-fec/python/fec/qa_polar_decoder_sc_systematic.py
+++ b/gr-fec/python/fec/qa_polar_decoder_sc_systematic.py
@@ -20,13 +20,16 @@
 # Boston, MA 02110-1301, USA.
 #
 
-from gnuradio import gr, gr_unittest, blocks
-import fec_swig as fec
+from __future__ import absolute_import
+from __future__ import division
 
 import numpy as np
-from extended_decoder import extended_decoder
-from polar.encoder import PolarEncoder
-import polar.channel_construction as cc
+
+from gnuradio import gr, gr_unittest, blocks, fec
+
+from gnuradio.fec.extended_decoder import extended_decoder
+from gnuradio.fec.polar.encoder import PolarEncoder
+from gnuradio.fec.polar import channel_construction as cc
 
 # import os
 # print('PID:', os.getpid())
@@ -113,5 +116,3 @@ class test_polar_decoder_sc_systematic(gr_unittest.TestCase):
 
 if __name__ == '__main__':
     gr_unittest.run(test_polar_decoder_sc_systematic)
-
-
diff --git a/gr-fec/python/fec/qa_polar_encoder.py b/gr-fec/python/fec/qa_polar_encoder.py
index d7362b6dc4..ba003d9070 100644
--- a/gr-fec/python/fec/qa_polar_encoder.py
+++ b/gr-fec/python/fec/qa_polar_encoder.py
@@ -20,13 +20,16 @@
 # Boston, MA 02110-1301, USA.
 #
 
-from gnuradio import gr, gr_unittest, blocks
-import fec_swig as fec
+from __future__ import absolute_import
+from __future__ import division
+
+
 import numpy as np
 
-from extended_encoder import extended_encoder
-from polar.encoder import PolarEncoder
-import polar.channel_construction as cc
+from gnuradio import gr, gr_unittest, blocks, fec
+from gnuradio.fec.extended_encoder import extended_encoder
+from gnuradio.fec.polar.encoder import PolarEncoder
+from gnuradio.fec.polar import channel_construction as cc
 
 # import os
 # print('PID:', os.getpid())
diff --git a/gr-fec/python/fec/qa_polar_encoder_systematic.py b/gr-fec/python/fec/qa_polar_encoder_systematic.py
index 015a31b3cb..18b918ddab 100644
--- a/gr-fec/python/fec/qa_polar_encoder_systematic.py
+++ b/gr-fec/python/fec/qa_polar_encoder_systematic.py
@@ -20,13 +20,15 @@
 # Boston, MA 02110-1301, USA.
 #
 
-from gnuradio import gr, gr_unittest, blocks
-import fec_swig as fec
+from __future__ import absolute_import
+from __future__ import division
+
 import numpy as np
 
-from extended_encoder import extended_encoder
-from polar.encoder import PolarEncoder
-import polar.channel_construction as cc
+from gnuradio import gr, gr_unittest, blocks, fec
+from gnuradio.fec.extended_encoder import extended_encoder
+from gnuradio.fec.polar.encoder import PolarEncoder
+from gnuradio.fec.polar import channel_construction as cc
 
 # import os
 # print('PID:', os.getpid())
@@ -103,5 +105,3 @@ class test_polar_encoder_systematic(gr_unittest.TestCase):
 
 if __name__ == '__main__':
     gr_unittest.run(test_polar_encoder_systematic)
-
-
diff --git a/gr-fec/python/fec/qa_puncture.py b/gr-fec/python/fec/qa_puncture.py
index fdd15c9a08..f4e0ba8556 100644
--- a/gr-fec/python/fec/qa_puncture.py
+++ b/gr-fec/python/fec/qa_puncture.py
@@ -20,11 +20,13 @@
 # Boston, MA 02110-1301, USA.
 #
 
-from gnuradio import gr, gr_unittest
-import fec_swig as fec
-import blocks_swig as blocks
+from __future__ import division
+
 from collections import deque
 
+from gnuradio import gr, gr_unittest, blocks, fec
+
+
 class test_puncture (gr_unittest.TestCase):
 
     def puncture_setup(self):
@@ -36,13 +38,13 @@ class test_puncture (gr_unittest.TestCase):
         _puncpat = list(d)
 
         self.expected = []
-        for n in range(len(self.src_data)/self.puncsize):
+        for n in range(len(self.src_data) // self.puncsize):
             for i in range(self.puncsize):
                 if _puncpat[i] == 1:
                     self.expected.append(self.src_data[n*self.puncsize+i]);
 
     def setUp(self):
-        self.src_data = 10000*range(64)
+        self.src_data = 10000*list(range(64))
         self.tb = gr.top_block()
 
     def tearDown(self):
@@ -58,14 +60,14 @@ class test_puncture (gr_unittest.TestCase):
         self.puncture_setup()
 
         src = blocks.vector_source_b(self.src_data)
-	op  = fec.puncture_bb(self.puncsize, self.puncpat, self.delay)
-	dst = blocks.vector_sink_b()
+        op  = fec.puncture_bb(self.puncsize, self.puncpat, self.delay)
+        dst = blocks.vector_sink_b()
 
-	self.tb.connect(src, op, dst)
-	self.tb.run()
+        self.tb.connect(src, op, dst)
+        self.tb.run()
 
-	dst_data = list(dst.data())
-        for i in xrange(len(dst_data)):
+        dst_data = list(dst.data())
+        for i in range(len(dst_data)):
             dst_data[i] = int(dst_data[i])
 
         self.assertEqual(self.expected, dst_data)
@@ -78,19 +80,19 @@ class test_puncture (gr_unittest.TestCase):
         self.puncpat = 0xEE
         self.delay = 1
 
-        self.src_data = range(16)
+        self.src_data = list(range(16))
 
         self.puncture_setup()
 
         src = blocks.vector_source_b(self.src_data)
-	op  = fec.puncture_bb(self.puncsize, self.puncpat, self.delay)
-	dst = blocks.vector_sink_b()
+        op  = fec.puncture_bb(self.puncsize, self.puncpat, self.delay)
+        dst = blocks.vector_sink_b()
 
-	self.tb.connect(src, op, dst)
-	self.tb.run()
+        self.tb.connect(src, op, dst)
+        self.tb.run()
 
-	dst_data = list(dst.data())
-        for i in xrange(len(dst_data)):
+        dst_data = list(dst.data())
+        for i in range(len(dst_data)):
             dst_data[i] = int(dst_data[i])
 
         self.assertEqual(self.expected, dst_data)
@@ -107,14 +109,14 @@ class test_puncture (gr_unittest.TestCase):
         self.puncture_setup()
 
         src = blocks.vector_source_b(self.src_data)
-	op  = fec.puncture_bb(self.puncsize, self.puncpat, self.delay)
-	dst = blocks.vector_sink_b()
+        op  = fec.puncture_bb(self.puncsize, self.puncpat, self.delay)
+        dst = blocks.vector_sink_b()
 
-	self.tb.connect(src, op, dst)
-	self.tb.run()
+        self.tb.connect(src, op, dst)
+        self.tb.run()
 
-	dst_data = list(dst.data())
-        for i in xrange(len(dst_data)):
+        dst_data = list(dst.data())
+        for i in range(len(dst_data)):
             dst_data[i] = int(dst_data[i])
 
         self.assertEqual(self.expected, dst_data)
@@ -131,21 +133,21 @@ class test_puncture (gr_unittest.TestCase):
         self.delay = 1
 
         src = blocks.vector_source_b(self.src_data)
-	op0  = fec.puncture_bb(self.puncsize, self.puncpat0, self.delay)
-	op1  = fec.puncture_bb(self.puncsize, self.puncpat1, self.delay)
-	dst0 = blocks.vector_sink_b()
-	dst1 = blocks.vector_sink_b()
+        op0  = fec.puncture_bb(self.puncsize, self.puncpat0, self.delay)
+        op1  = fec.puncture_bb(self.puncsize, self.puncpat1, self.delay)
+        dst0 = blocks.vector_sink_b()
+        dst1 = blocks.vector_sink_b()
 
-	self.tb.connect(src, op0, dst0)
-	self.tb.connect(src, op1, dst1)
-	self.tb.run()
+        self.tb.connect(src, op0, dst0)
+        self.tb.connect(src, op1, dst1)
+        self.tb.run()
 
-	dst_data0 = list(dst0.data())
-        for i in xrange(len(dst_data0)):
+        dst_data0 = list(dst0.data())
+        for i in range(len(dst_data0)):
             dst_data0[i] = int(dst_data0[i])
 
-	dst_data1 = list(dst1.data())
-        for i in xrange(len(dst_data1)):
+        dst_data1 = list(dst1.data())
+        for i in range(len(dst_data1)):
             dst_data1[i] = int(dst_data1[i])
 
         self.assertEqual(dst_data1, dst_data0)
@@ -162,13 +164,13 @@ class test_puncture (gr_unittest.TestCase):
         self.puncture_setup()
 
         src = blocks.vector_source_f(self.src_data)
-	op  = fec.puncture_ff(self.puncsize, self.puncpat, self.delay)
-	dst = blocks.vector_sink_f()
+        op  = fec.puncture_ff(self.puncsize, self.puncpat, self.delay)
+        dst = blocks.vector_sink_f()
 
-	self.tb.connect(src, op, dst)
-	self.tb.run()
+        self.tb.connect(src, op, dst)
+        self.tb.run()
 
-	dst_data = list(dst.data())
+        dst_data = list(dst.data())
         self.assertEqual(self.expected, dst_data)
 
 
@@ -179,18 +181,18 @@ class test_puncture (gr_unittest.TestCase):
         self.puncpat = 0xEE
         self.delay = 1
 
-        self.src_data = range(16)
+        self.src_data = list(range(16))
 
         self.puncture_setup()
 
         src = blocks.vector_source_f(self.src_data)
-	op  = fec.puncture_ff(self.puncsize, self.puncpat, self.delay)
-	dst = blocks.vector_sink_f()
+        op  = fec.puncture_ff(self.puncsize, self.puncpat, self.delay)
+        dst = blocks.vector_sink_f()
 
-	self.tb.connect(src, op, dst)
-	self.tb.run()
+        self.tb.connect(src, op, dst)
+        self.tb.run()
 
-	dst_data = list(dst.data())
+        dst_data = list(dst.data())
         self.assertEqual(self.expected, dst_data)
 
 
@@ -205,13 +207,13 @@ class test_puncture (gr_unittest.TestCase):
         self.puncture_setup()
 
         src = blocks.vector_source_f(self.src_data)
-	op  = fec.puncture_ff(self.puncsize, self.puncpat, self.delay)
-	dst = blocks.vector_sink_f()
+        op  = fec.puncture_ff(self.puncsize, self.puncpat, self.delay)
+        dst = blocks.vector_sink_f()
 
-	self.tb.connect(src, op, dst)
-	self.tb.run()
+        self.tb.connect(src, op, dst)
+        self.tb.run()
 
-	dst_data = list(dst.data())
+        dst_data = list(dst.data())
         self.assertEqual(self.expected, dst_data)
 
     def test_f_003(self):
@@ -226,17 +228,17 @@ class test_puncture (gr_unittest.TestCase):
         self.delay = 1
 
         src = blocks.vector_source_f(self.src_data)
-	op0  = fec.puncture_ff(self.puncsize, self.puncpat0, self.delay)
-	op1  = fec.puncture_ff(self.puncsize, self.puncpat1, self.delay)
-	dst0 = blocks.vector_sink_f()
-	dst1 = blocks.vector_sink_f()
+        op0  = fec.puncture_ff(self.puncsize, self.puncpat0, self.delay)
+        op1  = fec.puncture_ff(self.puncsize, self.puncpat1, self.delay)
+        dst0 = blocks.vector_sink_f()
+        dst1 = blocks.vector_sink_f()
 
-	self.tb.connect(src, op0, dst0)
-	self.tb.connect(src, op1, dst1)
-	self.tb.run()
+        self.tb.connect(src, op0, dst0)
+        self.tb.connect(src, op1, dst1)
+        self.tb.run()
 
-	dst_data0 = list(dst0.data())
-	dst_data1 = list(dst1.data())
+        dst_data0 = list(dst0.data())
+        dst_data1 = list(dst1.data())
 
         self.assertEqual(dst_data1, dst_data0)
 
diff --git a/gr-fec/python/fec/threaded_decoder.py b/gr-fec/python/fec/threaded_decoder.py
index 115ad7b5d3..adf4abfe22 100644
--- a/gr-fec/python/fec/threaded_decoder.py
+++ b/gr-fec/python/fec/threaded_decoder.py
@@ -20,8 +20,10 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import unicode_literals
 from gnuradio import gr, blocks
-import fec_swig as fec
+from . import fec_swig as fec
+
 
 class threaded_decoder(gr.hier_block2):
     def __init__(self, decoder_list_0, input_size, output_size):
diff --git a/gr-fec/python/fec/threaded_encoder.py b/gr-fec/python/fec/threaded_encoder.py
index 391baa5442..254b4d39d8 100644
--- a/gr-fec/python/fec/threaded_encoder.py
+++ b/gr-fec/python/fec/threaded_encoder.py
@@ -20,8 +20,11 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import unicode_literals
 from gnuradio import gr, blocks
-import fec_swig as fec
+
+from . import fec_swig as fec
+
 
 class threaded_encoder(gr.hier_block2):
     def __init__(self, encoder_list_0, input_size, output_size):
diff --git a/gr-fft/python/fft/CMakeLists.txt b/gr-fft/python/fft/CMakeLists.txt
index 016c76d27d..f08aebc11d 100644
--- a/gr-fft/python/fft/CMakeLists.txt
+++ b/gr-fft/python/fft/CMakeLists.txt
@@ -40,6 +40,6 @@ if(ENABLE_TESTING)
   file(GLOB py_qa_test_files "qa_*.py")
   foreach(py_qa_test_file ${py_qa_test_files})
     get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE)
-    GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${py_qa_test_file})
+    GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} -B ${py_qa_test_file})
   endforeach(py_qa_test_file)
 endif(ENABLE_TESTING)
diff --git a/gr-fft/python/fft/__init__.py b/gr-fft/python/fft/__init__.py
index 1864353ed1..2e110f5371 100644
--- a/gr-fft/python/fft/__init__.py
+++ b/gr-fft/python/fft/__init__.py
@@ -22,11 +22,15 @@
 '''
 Fourier-transform blocks and related functions.
 '''
+
+from __future__ import absolute_import
+from __future__ import unicode_literals
+
 import os
 
 try:
-    from fft_swig import *
+    from .fft_swig import *
 except ImportError:
     dirname, filename = os.path.split(os.path.abspath(__file__))
     __path__.append(os.path.join(dirname, "..", "..", "swig"))
-    from fft_swig import *
+    from .fft_swig import *
diff --git a/gr-fft/python/fft/logpwrfft.py b/gr-fft/python/fft/logpwrfft.py
index 356ec1217b..ee424f2f84 100644
--- a/gr-fft/python/fft/logpwrfft.py
+++ b/gr-fft/python/fft/logpwrfft.py
@@ -1,3 +1,5 @@
+from __future__ import division
+from __future__ import unicode_literals
 #
 # Copyright 2008 Free Software Foundation, Inc.
 #
@@ -23,8 +25,8 @@ from gnuradio import gr
 from gnuradio import blocks
 import sys, math
 
-import fft_swig as fft
-from fft_swig import window
+from . import fft_swig as fft
+from .fft_swig import window
 
 try:
     from gnuradio import filter
@@ -63,14 +65,14 @@ class _logpwrfft_base(gr.hier_block2):
         if win is None: win = window.blackmanharris
         fft_window = win(fft_size)
         fft = self._fft_block[0](fft_size, True, fft_window)
-        window_power = sum(map(lambda x: x*x, fft_window))
+        window_power = sum([x*x for x in fft_window])
 
         c2magsq = blocks.complex_to_mag_squared(fft_size)
         self._avg = filter.single_pole_iir_filter_ff(1.0, fft_size)
         self._log = blocks.nlog10_ff(10, fft_size,
                                      -20*math.log10(fft_size)              # Adjust for number of bins
-                                     -10*math.log10(window_power/fft_size) # Adjust for windowing loss
-                                     -20*math.log10(ref_scale/2))      # Adjust for reference scale
+                                     -10*math.log10(window_power / fft_size) # Adjust for windowing loss
+                                     -20*math.log10(ref_scale / 2))      # Adjust for reference scale
         self.connect(self, self._sd, fft, c2magsq, self._avg, self._log, self)
 
         self._average = average
@@ -173,4 +175,3 @@ class logpwrfft_c(_logpwrfft_base):
         _name = "logpwrfft_c"
         _item_size = gr.sizeof_gr_complex
         _fft_block = (fft.fft_vcc, )
-
diff --git a/gr-fft/python/fft/qa_fft.py b/gr-fft/python/fft/qa_fft.py
old mode 100755
new mode 100644
index db3ca7778d..b1c44f2809
--- a/gr-fft/python/fft/qa_fft.py
+++ b/gr-fft/python/fft/qa_fft.py
@@ -19,6 +19,8 @@
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 #
 
+from __future__ import division
+
 from gnuradio import gr, gr_unittest, fft, blocks
 
 # Note: Octave code to verify these results:
diff --git a/gr-fft/python/fft/qa_goertzel.py b/gr-fft/python/fft/qa_goertzel.py
old mode 100755
new mode 100644
index c2c5c565e7..ebd272cb22
--- a/gr-fft/python/fft/qa_goertzel.py
+++ b/gr-fft/python/fft/qa_goertzel.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+
 from math import pi, cos
 
 from gnuradio import gr, gr_unittest, fft, blocks
@@ -36,30 +38,30 @@ class test_goertzel(gr_unittest.TestCase):
         return [cos(2*pi*x*freq/rate) for x in range(rate)]
 
     def transform(self, src_data, rate, freq):
-	src = blocks.vector_source_f(src_data, False)
+        src = blocks.vector_source_f(src_data, False)
         dft = fft.goertzel_fc(rate, rate, freq)
-	dst = blocks.vector_sink_c()
-	self.tb.connect(src, dft, dst)
-	self.tb.run()
-	return dst.data()
+        dst = blocks.vector_sink_c()
+        self.tb.connect(src, dft, dst)
+        self.tb.run()
+        return dst.data()
 
     def test_001(self): # Measure single tone magnitude
-	rate = 8000
-	freq = 100
-	bin = freq
-	src_data = self.make_tone_data(rate, freq)
-	expected_result = 0.5
-	actual_result = abs(self.transform(src_data, rate, bin)[0])
-	self.assertAlmostEqual(expected_result, actual_result, places=4)
+        rate = 8000
+        freq = 100
+        bin = freq
+        src_data = self.make_tone_data(rate, freq)
+        expected_result = 0.5
+        actual_result = abs(self.transform(src_data, rate, bin)[0])
+        self.assertAlmostEqual(expected_result, actual_result, places=4)
 
     def test_002(self): # Measure off frequency magnitude
-	rate = 8000
-	freq = 100
-	bin = freq/2
-	src_data = self.make_tone_data(rate, freq)
-	expected_result = 0.0
-	actual_result = abs(self.transform(src_data, rate, bin)[0])
-	self.assertAlmostEqual(expected_result, actual_result, places=4)
+        rate = 8000
+        freq = 100
+        bin = freq / 2
+        src_data = self.make_tone_data(rate, freq)
+        expected_result = 0.0
+        actual_result = abs(self.transform(src_data, rate, bin)[0])
+        self.assertAlmostEqual(expected_result, actual_result, places=4)
 
 if __name__ == '__main__':
     gr_unittest.run(test_goertzel, "test_goertzel.xml")
diff --git a/gr-filter/examples/benchmark_filters.py b/gr-filter/examples/benchmark_filters.py
old mode 100755
new mode 100644
index 4da6b9f5ad..0c7aebcf64
--- a/gr-filter/examples/benchmark_filters.py
+++ b/gr-filter/examples/benchmark_filters.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import unicode_literals
 import time
 import random
 from argparse import ArgumentParser
@@ -48,8 +50,8 @@ def benchmark(name, creator, dec, ntaps, total_test_size, block_size):
     tb.run()
     stop = time.time()
     delta = stop - start
-    print "%16s: taps: %4d  input: %4g, time: %6.3f  taps/sec: %10.4g" % (
-        name, ntaps, total_test_size, delta, ntaps*total_test_size/delta)
+    print("%16s: taps: %4d  input: %4g, time: %6.3f  taps/sec: %10.4g" % (
+        name, ntaps, total_test_size, delta, ntaps*total_test_size/delta))
 
 def main():
     parser = ArgumentParser()
diff --git a/gr-filter/examples/channelize.py b/gr-filter/examples/channelize.py
old mode 100755
new mode 100644
index e70817e873..51f0bad20b
--- a/gr-filter/examples/channelize.py
+++ b/gr-filter/examples/channelize.py
@@ -20,6 +20,9 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import blocks
 from gnuradio import filter
@@ -60,10 +63,10 @@ class pfb_top_block(gr.top_block):
                                               window=filter.firdes.WIN_BLACKMAN_hARRIS)
 
         # Calculate the number of taps per channel for our own information
-        tpc = scipy.ceil(float(len(self._taps)) /  float(self._M))
-        print "Number of taps:     ", len(self._taps)
-        print "Number of channels: ", self._M
-        print "Taps per channel:   ", tpc
+        tpc = scipy.ceil(float(len(self._taps)) / float(self._M))
+        print("Number of taps:     ", len(self._taps))
+        print("Number of channels: ", self._M)
+        print("Taps per channel:   ", tpc)
 
         # Create a set of signals at different frequencies
         #   freqs lists the frequencies of the signals that get stored
@@ -71,8 +74,8 @@ class pfb_top_block(gr.top_block):
         self.signals = list()
         self.add = blocks.add_cc()
         freqs = [-70, -50, -30, -10, 10, 20, 40, 60, 80]
-        for i in xrange(len(freqs)):
-            f = freqs[i] + (M/2-M+i+1)*self._fs
+        for i in range(len(freqs)):
+            f = freqs[i] + (M / 2-M+i+1)*self._fs
             self.signals.append(analog.sig_source_c(self._ifs, analog.GR_SIN_WAVE, f, 1))
             self.connect(self.signals[i], (self.add,i))
 
@@ -93,7 +96,7 @@ class pfb_top_block(gr.top_block):
 
         # Create a vector sink for each of M output channels of the filter and connect it
         self.snks = list()
-        for i in xrange(self._M):
+        for i in range(self._M):
             self.snks.append(blocks.vector_sink_c())
             self.connect((self.pfb, i), self.snks[i])
 
@@ -105,7 +108,7 @@ def main():
     tb.run()
 
     tend = time.time()
-    print "Run time: %f" % (tend - tstart)
+    print("Run time: %f" % (tend - tstart))
 
     if 1:
         fig_in = pylab.figure(1, figsize=(16,9), facecolor="w")
@@ -123,11 +126,11 @@ def main():
         d = tb.snk_i.data()[Ns:Ne]
         spin_f = fig_in.add_subplot(2, 1, 1)
 
-        X,freq = mlab.psd(d, NFFT=fftlen, noverlap=fftlen/4, Fs=fs,
+        X,freq = mlab.psd(d, NFFT=fftlen, noverlap=fftlen / 4, Fs=fs,
                           window = lambda d: d*winfunc(fftlen),
                           scale_by_freq=True)
         X_in = 10.0*scipy.log10(abs(X))
-        f_in = scipy.arange(-fs/2.0, fs/2.0, fs/float(X_in.size))
+        f_in = scipy.arange(-fs / 2.0, fs / 2.0, fs / float(X_in.size))
         pin_f = spin_f.plot(f_in, X_in, "b")
         spin_f.set_xlim([min(f_in), max(f_in)+1])
         spin_f.set_ylim([-200.0, 50.0])
@@ -137,7 +140,7 @@ def main():
         spin_f.set_ylabel("Power (dBW)")
 
 
-        Ts = 1.0/fs
+        Ts = 1.0 / fs
         Tmax = len(d)*Ts
 
         t_in = scipy.arange(0, Tmax, Ts)
@@ -157,20 +160,20 @@ def main():
         # Plot each of the channels outputs. Frequencies on Figure 2 and
         # time signals on Figure 3
         fs_o = tb._fs
-        Ts_o = 1.0/fs_o
+        Ts_o = 1.0 / fs_o
         Tmax_o = len(d)*Ts_o
-        for i in xrange(len(tb.snks)):
+        for i in range(len(tb.snks)):
             # remove issues with the transients at the beginning
             # also remove some corruption at the end of the stream
             #    this is a bug, probably due to the corner cases
             d = tb.snks[i].data()[Ns:Ne]
 
             sp1_f = fig1.add_subplot(Nrows, Ncols, 1+i)
-            X,freq = mlab.psd(d, NFFT=fftlen, noverlap=fftlen/4, Fs=fs_o,
+            X,freq = mlab.psd(d, NFFT=fftlen, noverlap=fftlen / 4, Fs=fs_o,
                               window = lambda d: d*winfunc(fftlen),
                               scale_by_freq=True)
             X_o = 10.0*scipy.log10(abs(X))
-            f_o = scipy.arange(-fs_o/2.0, fs_o/2.0, fs_o/float(X_o.size))
+            f_o = scipy.arange(-fs_o / 2.0, fs_o / 2.0, fs_o / float(X_o.size))
             p2_f = sp1_f.plot(f_o, X_o, "b")
             sp1_f.set_xlim([min(f_o), max(f_o)+1])
             sp1_f.set_ylim([-200.0, 50.0])
diff --git a/gr-filter/examples/chirp_channelize.py b/gr-filter/examples/chirp_channelize.py
old mode 100755
new mode 100644
index aedd5c4892..471416b6a5
--- a/gr-filter/examples/chirp_channelize.py
+++ b/gr-filter/examples/chirp_channelize.py
@@ -20,6 +20,9 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import blocks
 from gnuradio import filter
@@ -59,17 +62,17 @@ class pfb_top_block(gr.top_block):
                                               window=filter.firdes.WIN_BLACKMAN_hARRIS)
 
         # Calculate the number of taps per channel for our own information
-        tpc = scipy.ceil(float(len(self._taps)) /  float(self._M))
-        print "Number of taps:     ", len(self._taps)
-        print "Number of channels: ", self._M
-        print "Taps per channel:   ", tpc
+        tpc = scipy.ceil(float(len(self._taps)) / float(self._M))
+        print("Number of taps:     ", len(self._taps))
+        print("Number of channels: ", self._M)
+        print("Taps per channel:   ", tpc)
 
         repeated = True
         if(repeated):
             self.vco_input = analog.sig_source_f(self._fs, analog.GR_SIN_WAVE, 0.25, 110)
         else:
             amp = 100
-            data = scipy.arange(0, amp, amp/float(self._N))
+            data = scipy.arange(0, amp, amp / float(self._N))
             self.vco_input = blocks.vector_source_f(data, False)
 
         # Build a VCO controlled by either the sinusoid or single chirp tone
@@ -92,7 +95,7 @@ class pfb_top_block(gr.top_block):
 
         # Create a vector sink for each of M output channels of the filter and connect it
         self.snks = list()
-        for i in xrange(self._M):
+        for i in range(self._M):
             self.snks.append(blocks.vector_sink_c())
             self.connect((self.pfb, i), self.snks[i])
 
@@ -104,7 +107,7 @@ def main():
     tb.run()
 
     tend = time.time()
-    print "Run time: %f" % (tend - tstart)
+    print("Run time: %f" % (tend - tstart))
 
     if 1:
         fig_in = pylab.figure(1, figsize=(16,9), facecolor="w")
@@ -123,11 +126,11 @@ def main():
         d = tb.snk_i.data()[Ns:Ne]
         spin_f = fig_in.add_subplot(2, 1, 1)
 
-        X,freq = mlab.psd(d, NFFT=fftlen, noverlap=fftlen/4, Fs=fs,
+        X,freq = mlab.psd(d, NFFT=fftlen, noverlap=fftlen / 4, Fs=fs,
                           window = lambda d: d*winfunc(fftlen),
                           scale_by_freq=True)
         X_in = 10.0*scipy.log10(abs(fftpack.fftshift(X)))
-        f_in = scipy.arange(-fs/2.0, fs/2.0, fs/float(X_in.size))
+        f_in = scipy.arange(-fs / 2.0, fs / 2.0, fs / float(X_in.size))
         pin_f = spin_f.plot(f_in, X_in, "b")
         spin_f.set_xlim([min(f_in), max(f_in)+1])
         spin_f.set_ylim([-200.0, 50.0])
@@ -137,7 +140,7 @@ def main():
         spin_f.set_ylabel("Power (dBW)")
 
 
-        Ts = 1.0/fs
+        Ts = 1.0 / fs
         Tmax = len(d)*Ts
 
         t_in = scipy.arange(0, Tmax, Ts)
@@ -157,16 +160,16 @@ def main():
         # Plot each of the channels outputs. Frequencies on Figure 2 and
         # time signals on Figure 3
         fs_o = tb._fs / tb._M
-        Ts_o = 1.0/fs_o
+        Ts_o = 1.0 / fs_o
         Tmax_o = len(d)*Ts_o
-        for i in xrange(len(tb.snks)):
+        for i in range(len(tb.snks)):
             # remove issues with the transients at the beginning
             # also remove some corruption at the end of the stream
             #    this is a bug, probably due to the corner cases
             d = tb.snks[i].data()[Ns:Ne]
 
             sp1_f = fig1.add_subplot(Nrows, Ncols, 1+i)
-            X,freq = mlab.psd(d, NFFT=fftlen, noverlap=fftlen/4, Fs=fs_o,
+            X,freq = mlab.psd(d, NFFT=fftlen, noverlap=fftlen / 4, Fs=fs_o,
                               window = lambda d: d*winfunc(fftlen),
                               scale_by_freq=True)
             X_o = 10.0*scipy.log10(abs(X))
diff --git a/gr-filter/examples/decimate.py b/gr-filter/examples/decimate.py
old mode 100755
new mode 100644
index 675073a431..fb37d8047e
--- a/gr-filter/examples/decimate.py
+++ b/gr-filter/examples/decimate.py
@@ -20,6 +20,9 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import blocks
 from gnuradio import filter
@@ -60,10 +63,10 @@ class pfb_top_block(gr.top_block):
                                               window=filter.firdes.WIN_BLACKMAN_hARRIS)
 
         # Calculate the number of taps per channel for our own information
-        tpc = scipy.ceil(float(len(self._taps)) /  float(self._decim))
-        print "Number of taps:     ", len(self._taps)
-        print "Number of filters:  ", self._decim
-        print "Taps per channel:   ", tpc
+        tpc = scipy.ceil(float(len(self._taps)) / float(self._decim))
+        print("Number of taps:     ", len(self._taps))
+        print("Number of filters:  ", self._decim)
+        print("Taps per channel:   ", tpc)
 
         # Build the input signal source
         # We create a list of freqs, and a sine wave is generated and added to the source
@@ -71,7 +74,7 @@ class pfb_top_block(gr.top_block):
         self.signals = list()
         self.add = blocks.add_cc()
         freqs = [10, 20, 2040]
-        for i in xrange(len(freqs)):
+        for i in range(len(freqs)):
             self.signals.append(analog.sig_source_c(self._fs, analog.GR_SIN_WAVE, freqs[i], 1))
             self.connect(self.signals[i], (self.add,i))
 
@@ -100,7 +103,7 @@ def main():
     tstart = time.time()
     tb.run()
     tend = time.time()
-    print "Run time: %f" % (tend - tstart)
+    print("Run time: %f" % (tend - tstart))
 
     if 1:
         fig1 = pylab.figure(1, figsize=(16,9))
@@ -118,11 +121,11 @@ def main():
         d = tb.snk_i.data()[Ns:Ns+Ne]
         sp1_f = fig1.add_subplot(2, 1, 1)
 
-        X,freq = mlab.psd(d, NFFT=fftlen, noverlap=fftlen/4, Fs=fs,
+        X,freq = mlab.psd(d, NFFT=fftlen, noverlap=fftlen / 4, Fs=fs,
                           window = lambda d: d*winfunc(fftlen),
                           scale_by_freq=True)
         X_in = 10.0*scipy.log10(abs(fftpack.fftshift(X)))
-        f_in = scipy.arange(-fs/2.0, fs/2.0, fs/float(X_in.size))
+        f_in = scipy.arange(-fs / 2.0, fs / 2.0, fs / float(X_in.size))
         p1_f = sp1_f.plot(f_in, X_in, "b")
         sp1_f.set_xlim([min(f_in), max(f_in)+1])
         sp1_f.set_ylim([-200.0, 50.0])
@@ -131,7 +134,7 @@ def main():
         sp1_f.set_xlabel("Frequency (Hz)")
         sp1_f.set_ylabel("Power (dBW)")
 
-        Ts = 1.0/fs
+        Ts = 1.0 / fs
         Tmax = len(d)*Ts
 
         t_in = scipy.arange(0, Tmax, Ts)
@@ -150,11 +153,11 @@ def main():
 
         sp2_f = fig2.add_subplot(2, 1, 1)
         d = tb.snk.data()[Ns:Ns+Ne]
-        X,freq = mlab.psd(d, NFFT=fftlen, noverlap=fftlen/4, Fs=fs_o,
+        X,freq = mlab.psd(d, NFFT=fftlen, noverlap=fftlen / 4, Fs=fs_o,
                           window = lambda d: d*winfunc(fftlen),
                           scale_by_freq=True)
         X_o = 10.0*scipy.log10(abs(fftpack.fftshift(X)))
-        f_o = scipy.arange(-fs_o/2.0, fs_o/2.0, fs_o/float(X_o.size))
+        f_o = scipy.arange(-fs_o / 2.0, fs_o / 2.0, fs_o / float(X_o.size))
         p2_f = sp2_f.plot(f_o, X_o, "b")
         sp2_f.set_xlim([min(f_o), max(f_o)+1])
         sp2_f.set_ylim([-200.0, 50.0])
@@ -164,7 +167,7 @@ def main():
         sp2_f.set_ylabel("Power (dBW)")
 
 
-        Ts_o = 1.0/fs_o
+        Ts_o = 1.0 / fs_o
         Tmax_o = len(d)*Ts_o
 
         x_o = scipy.array(d)
diff --git a/gr-filter/examples/fft_filter_ccc.py b/gr-filter/examples/fft_filter_ccc.py
old mode 100755
new mode 100644
index 92bcc7e316..6cadddee1f
--- a/gr-filter/examples/fft_filter_ccc.py
+++ b/gr-filter/examples/fft_filter_ccc.py
@@ -20,6 +20,9 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio import gr, filter
 from gnuradio import analog
 from gnuradio import blocks
@@ -31,13 +34,13 @@ import sys
 try:
     import scipy
 except ImportError:
-    print "Error: could not import scipy (http://www.scipy.org/)"
+    print("Error: could not import scipy (http://www.scipy.org/)")
     sys.exit(1)
 
 try:
     import pylab
 except ImportError:
-    print "Error: could not import pylab (http://matplotlib.sourceforge.net/)"
+    print("Error: could not import pylab (http://matplotlib.sourceforge.net/)")
     sys.exit(1)
 
 class example_fft_filter_ccc(gr.top_block):
@@ -54,7 +57,7 @@ class example_fft_filter_ccc(gr.top_block):
         taps = filter.firdes.complex_band_pass_2(1, self._fs,
                                                  self._bw0, self._bw1,
                                                  self._tw, self._at)
-        print "Num. Taps: ", len(taps)
+        print("Num. Taps: ", len(taps))
 
         self.src  = analog.noise_source_c(analog.GR_GAUSSIAN, 1)
         self.head = blocks.head(gr.sizeof_gr_complex, self._nsamps)
@@ -101,9 +104,9 @@ def main():
     nfft = 1024
     f1 = pylab.figure(1, figsize=(12,10))
     s1 = f1.add_subplot(1,1,1)
-    s1.psd(data_src, NFFT=nfft, noverlap=nfft/4,
+    s1.psd(data_src, NFFT=nfft, noverlap=nfft / 4,
            Fs=args.samplerate)
-    s1.psd(data_snk, NFFT=nfft, noverlap=nfft/4,
+    s1.psd(data_snk, NFFT=nfft, noverlap=nfft / 4,
            Fs=args.samplerate)
 
     f2 = pylab.figure(2, figsize=(12,10))
diff --git a/gr-filter/examples/fir_filter_ccc.py b/gr-filter/examples/fir_filter_ccc.py
old mode 100755
new mode 100644
index 357e3d7111..fe5e7e0254
--- a/gr-filter/examples/fir_filter_ccc.py
+++ b/gr-filter/examples/fir_filter_ccc.py
@@ -20,6 +20,9 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio import gr, filter
 from gnuradio import analog
 from gnuradio import blocks
@@ -31,13 +34,13 @@ import sys
 try:
     import scipy
 except ImportError:
-    print "Error: could not import scipy (http://www.scipy.org/)"
+    print("Error: could not import scipy (http://www.scipy.org/)")
     sys.exit(1)
 
 try:
     import pylab
 except ImportError:
-    print "Error: could not import pylab (http://matplotlib.sourceforge.net/)"
+    print("Error: could not import pylab (http://matplotlib.sourceforge.net/)")
     sys.exit(1)
 
 class example_fir_filter_ccc(gr.top_block):
@@ -51,7 +54,7 @@ class example_fir_filter_ccc(gr.top_block):
         self._at = atten
         self._decim = D
         taps = filter.firdes.low_pass_2(1, self._fs, self._bw, self._tw, self._at)
-        print "Num. Taps: ", len(taps)
+        print("Num. Taps: ", len(taps))
 
         self.src  = analog.noise_source_c(analog.GR_GAUSSIAN, 1)
         self.head = blocks.head(gr.sizeof_gr_complex, self._nsamps)
@@ -95,9 +98,9 @@ def main():
     nfft = 1024
     f1 = pylab.figure(1, figsize=(12,10))
     s1 = f1.add_subplot(1,1,1)
-    s1.psd(data_src, NFFT=nfft, noverlap=nfft/4,
+    s1.psd(data_src, NFFT=nfft, noverlap=nfft / 4,
            Fs=args.samplerate)
-    s1.psd(data_snk, NFFT=nfft, noverlap=nfft/4,
+    s1.psd(data_snk, NFFT=nfft, noverlap=nfft / 4,
            Fs=args.samplerate)
 
     f2 = pylab.figure(2, figsize=(12,10))
diff --git a/gr-filter/examples/fir_filter_fff.py b/gr-filter/examples/fir_filter_fff.py
old mode 100755
new mode 100644
index 2019215f12..c4c9ea2c83
--- a/gr-filter/examples/fir_filter_fff.py
+++ b/gr-filter/examples/fir_filter_fff.py
@@ -20,6 +20,9 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio import gr, filter
 from gnuradio import analog
 from gnuradio import blocks
@@ -31,13 +34,13 @@ import sys
 try:
     import scipy
 except ImportError:
-    print "Error: could not import scipy (http://www.scipy.org/)"
+    print("Error: could not import scipy (http://www.scipy.org/)")
     sys.exit(1)
 
 try:
     import pylab
 except ImportError:
-    print "Error: could not import pylab (http://matplotlib.sourceforge.net/)"
+    print("Error: could not import pylab (http://matplotlib.sourceforge.net/)")
     sys.exit(1)
 
 class example_fir_filter_fff(gr.top_block):
@@ -51,7 +54,7 @@ class example_fir_filter_fff(gr.top_block):
         self._at = atten
         self._decim = D
         taps = filter.firdes.low_pass_2(1, self._fs, self._bw, self._tw, self._at)
-        print "Num. Taps: ", len(taps)
+        print("Num. Taps: ", len(taps))
 
         self.src  = analog.noise_source_f(analog.GR_GAUSSIAN, 1)
         self.head = blocks.head(gr.sizeof_float, self._nsamps)
@@ -95,9 +98,9 @@ def main():
     nfft = 1024
     f1 = pylab.figure(1, figsize=(12,10))
     s1 = f1.add_subplot(1,1,1)
-    s1.psd(data_src, NFFT=nfft, noverlap=nfft/4,
+    s1.psd(data_src, NFFT=nfft, noverlap=nfft / 4,
            Fs=args.samplerate)
-    s1.psd(data_snk, NFFT=nfft, noverlap=nfft/4,
+    s1.psd(data_snk, NFFT=nfft, noverlap=nfft / 4,
            Fs=args.samplerate)
 
     f2 = pylab.figure(2, figsize=(12,10))
diff --git a/gr-filter/examples/gr_filtdes_api.py b/gr-filter/examples/gr_filtdes_api.py
old mode 100755
new mode 100644
index 6d7716ce49..6ef6b52f25
--- a/gr-filter/examples/gr_filtdes_api.py
+++ b/gr-filter/examples/gr_filtdes_api.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import unicode_literals
 from gnuradio.filter import filter_design
 import sys
 
@@ -31,7 +33,7 @@ returns b,a for IIR filter design
 filtobj = filter_design.launch(sys.argv)
 
 # Displaying all filter paramters
-print "Filter Count:", filtobj.get_filtercount()
-print "Filter type:", filtobj.get_restype()
-print "Filter params", filtobj.get_params()
-print "Filter Coefficients", filtobj.get_taps()
+print("Filter Count:", filtobj.get_filtercount())
+print("Filter type:", filtobj.get_restype())
+print("Filter params", filtobj.get_params())
+print("Filter Coefficients", filtobj.get_taps())
diff --git a/gr-filter/examples/gr_filtdes_callback.py b/gr-filter/examples/gr_filtdes_callback.py
old mode 100755
new mode 100644
index 9496253d7a..d99edffc46
--- a/gr-filter/examples/gr_filtdes_callback.py
+++ b/gr-filter/examples/gr_filtdes_callback.py
@@ -20,13 +20,15 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import unicode_literals
 from gnuradio.filter import filter_design
 import sys
 try:
     from PyQt4 import Qt, QtCore, QtGui
 except ImportError:
-    print "Please install PyQt4 to run this script (http://www.riverbankcomputing.co.uk/software/pyqt/download)"
-    raise SystemExit, 1
+    print("Please install PyQt4 to run this script (http://www.riverbankcomputing.co.uk/software/pyqt/download)")
+    raise SystemExit(1)
 
 '''
 Callback example
@@ -36,10 +38,10 @@ launch function returns gr_filter_design mainwindow
 object when callback is not None
 '''
 def print_params(filtobj):
-    print "Filter Count:", filtobj.get_filtercount()
-    print "Filter type:", filtobj.get_restype()
-    print "Filter params", filtobj.get_params()
-    print "Filter Coefficients", filtobj.get_taps()
+    print("Filter Count:", filtobj.get_filtercount())
+    print("Filter type:", filtobj.get_restype())
+    print("Filter params", filtobj.get_params())
+    print("Filter Coefficients", filtobj.get_taps())
 
 app = Qt.QApplication(sys.argv)
 #launch function returns gr_filter_design mainwindow object
diff --git a/gr-filter/examples/gr_filtdes_live_upd.py b/gr-filter/examples/gr_filtdes_live_upd.py
old mode 100755
new mode 100644
index 9f974dd81c..ca925eb9b4
--- a/gr-filter/examples/gr_filtdes_live_upd.py
+++ b/gr-filter/examples/gr_filtdes_live_upd.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import unicode_literals
 from gnuradio.filter import filter_design
 from gnuradio import gr, filter
 from gnuradio import blocks
@@ -89,8 +91,8 @@ class my_top_block(gr.top_block):
         pyWin.show()
 
     def update_filter(self, filtobj):
-        print "Filter type:", filtobj.get_restype()
-        print "Filter params", filtobj.get_params()
+        print("Filter type:", filtobj.get_restype())
+        print("Filter params", filtobj.get_params())
         self.filt.set_taps(filtobj.get_taps())
 
 if __name__ == "__main__":
diff --git a/gr-filter/examples/gr_filtdes_restrict.py b/gr-filter/examples/gr_filtdes_restrict.py
old mode 100755
new mode 100644
index 1613cc6489..c18d4c1f04
--- a/gr-filter/examples/gr_filtdes_restrict.py
+++ b/gr-filter/examples/gr_filtdes_restrict.py
@@ -20,13 +20,15 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import unicode_literals
 from gnuradio.filter import filter_design
 import sys
 try:
     from PyQt4 import Qt, QtCore, QtGui
 except ImportError:
-    print "Please install PyQt4 to run this script (http://www.riverbankcomputing.co.uk/software/pyqt/download)"
-    raise SystemExit, 1
+    print("Please install PyQt4 to run this script (http://www.riverbankcomputing.co.uk/software/pyqt/download)")
+    raise SystemExit(1)
 
 
 '''
@@ -35,10 +37,10 @@ Function called when "design" button is pressed
 or pole-zero plot is changed
 '''
 def print_params(filtobj):
-    print "Filter Count:", filtobj.get_filtercount()
-    print "Filter type:", filtobj.get_restype()
-    print "Filter params", filtobj.get_params()
-    print "Filter Coefficients", filtobj.get_taps()
+    print("Filter Count:", filtobj.get_filtercount())
+    print("Filter type:", filtobj.get_restype())
+    print("Filter params", filtobj.get_params())
+    print("Filter Coefficients", filtobj.get_taps())
 
 app = Qt.QApplication(sys.argv)
 main_win = filter_design.launch(sys.argv, callback = print_params, restype = "iir")
diff --git a/gr-filter/examples/interpolate.py b/gr-filter/examples/interpolate.py
old mode 100755
new mode 100644
index 40bab7b1f1..1f1357211b
--- a/gr-filter/examples/interpolate.py
+++ b/gr-filter/examples/interpolate.py
@@ -20,6 +20,9 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import blocks
 from gnuradio import filter
@@ -79,10 +82,10 @@ class pfb_top_block(gr.top_block):
                                                window=filter.firdes.WIN_BLACKMAN_hARRIS)
 
         # Calculate the number of taps per channel for our own information
-        tpc = scipy.ceil(float(len(self._taps)) /  float(self._interp))
-        print "Number of taps:     ", len(self._taps)
-        print "Number of filters:  ", self._interp
-        print "Taps per channel:   ", tpc
+        tpc = scipy.ceil(float(len(self._taps)) / float(self._interp))
+        print("Number of taps:     ", len(self._taps))
+        print("Number of filters:  ", self._interp)
+        print("Taps per channel:   ", tpc)
 
         # Create a couple of signals at different frequencies
         self.signal1 = analog.sig_source_c(self._fs, analog.GR_SIN_WAVE, freq1, 0.5)
@@ -121,7 +124,7 @@ def main():
     tstart = time.time()
     tb.run()
     tend = time.time()
-    print "Run time: %f" % (tend - tstart)
+    print("Run time: %f" % (tend - tstart))
 
 
     if 1:
@@ -141,11 +144,11 @@ def main():
         d = tb.snk_i.data()[Ns:Ns+Ne]
         sp1_f = fig1.add_subplot(2, 1, 1)
 
-        X,freq = mlab.psd(d, NFFT=fftlen, noverlap=fftlen/4, Fs=fs,
+        X,freq = mlab.psd(d, NFFT=fftlen, noverlap=fftlen / 4, Fs=fs,
                           window = lambda d: d*winfunc(fftlen),
                           scale_by_freq=True)
         X_in = 10.0*scipy.log10(abs(fftpack.fftshift(X)))
-        f_in = scipy.arange(-fs/2.0, fs/2.0, fs/float(X_in.size))
+        f_in = scipy.arange(-fs / 2.0, fs / 2.0, fs / float(X_in.size))
         p1_f = sp1_f.plot(f_in, X_in, "b")
         sp1_f.set_xlim([min(f_in), max(f_in)+1])
         sp1_f.set_ylim([-200.0, 50.0])
@@ -155,7 +158,7 @@ def main():
         sp1_f.set_xlabel("Frequency (Hz)")
         sp1_f.set_ylabel("Power (dBW)")
 
-        Ts = 1.0/fs
+        Ts = 1.0 / fs
         Tmax = len(d)*Ts
 
         t_in = scipy.arange(0, Tmax, Ts)
@@ -175,11 +178,11 @@ def main():
 
         sp2_f = fig2.add_subplot(2, 1, 1)
         d = tb.snk1.data()[Ns:Ns+(tb._interp*Ne)]
-        X,freq = mlab.psd(d, NFFT=fftlen, noverlap=fftlen/4, Fs=fs,
+        X,freq = mlab.psd(d, NFFT=fftlen, noverlap=fftlen / 4, Fs=fs,
                           window = lambda d: d*winfunc(fftlen),
                           scale_by_freq=True)
         X_o = 10.0*scipy.log10(abs(fftpack.fftshift(X)))
-        f_o = scipy.arange(-fs_int/2.0, fs_int/2.0, fs_int/float(X_o.size))
+        f_o = scipy.arange(-fs_int / 2.0, fs_int / 2.0, fs_int / float(X_o.size))
         p2_f = sp2_f.plot(f_o, X_o, "b")
         sp2_f.set_xlim([min(f_o), max(f_o)+1])
         sp2_f.set_ylim([-200.0, 50.0])
@@ -188,7 +191,7 @@ def main():
         sp2_f.set_xlabel("Frequency (Hz)")
         sp2_f.set_ylabel("Power (dBW)")
 
-        Ts_int = 1.0/fs_int
+        Ts_int = 1.0 / fs_int
         Tmax = len(d)*Ts_int
 
         t_o = scipy.arange(0, Tmax, Ts_int)
@@ -208,11 +211,11 @@ def main():
 
         sp3_f = fig3.add_subplot(2, 1, 1)
         d = tb.snk2.data()[Ns:Ns+(tb._interp*Ne)]
-        X,freq = mlab.psd(d, NFFT=fftlen, noverlap=fftlen/4, Fs=fs,
+        X,freq = mlab.psd(d, NFFT=fftlen, noverlap=fftlen / 4, Fs=fs,
                           window = lambda d: d*winfunc(fftlen),
                           scale_by_freq=True)
         X_o = 10.0*scipy.log10(abs(fftpack.fftshift(X)))
-        f_o = scipy.arange(-fs_aint/2.0, fs_aint/2.0, fs_aint/float(X_o.size))
+        f_o = scipy.arange(-fs_aint / 2.0, fs_aint / 2.0, fs_aint / float(X_o.size))
         p3_f = sp3_f.plot(f_o, X_o, "b")
         sp3_f.set_xlim([min(f_o), max(f_o)+1])
         sp3_f.set_ylim([-200.0, 50.0])
@@ -221,7 +224,7 @@ def main():
         sp3_f.set_xlabel("Frequency (Hz)")
         sp3_f.set_ylabel("Power (dBW)")
 
-        Ts_aint = 1.0/fs_aint
+        Ts_aint = 1.0 / fs_aint
         Tmax = len(d)*Ts_aint
 
         t_o = scipy.arange(0, Tmax, Ts_aint)
diff --git a/gr-filter/examples/reconstruction.py b/gr-filter/examples/reconstruction.py
old mode 100755
new mode 100644
index 0a83b5a4e0..c9c1cd3922
--- a/gr-filter/examples/reconstruction.py
+++ b/gr-filter/examples/reconstruction.py
@@ -20,6 +20,9 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio import gr, digital
 from gnuradio import filter
 from gnuradio import blocks
@@ -28,20 +31,20 @@ import sys
 try:
     from gnuradio import channels
 except ImportError:
-    print "Error: Program requires gr-channels."
+    print("Error: Program requires gr-channels.")
     sys.exit(1)
 
 try:
     import scipy
     from scipy import fftpack
 except ImportError:
-    print "Error: Program requires scipy (see: www.scipy.org)."
+    print("Error: Program requires scipy (see: www.scipy.org).")
     sys.exit(1)
 
 try:
     import pylab
 except ImportError:
-    print "Error: Program requires matplotlib (see: matplotlib.sourceforge.net)."
+    print("Error: Program requires matplotlib (see: matplotlib.sourceforge.net).")
     sys.exit(1)
 
 fftlen = 8192
@@ -49,7 +52,7 @@ fftlen = 8192
 def main():
     N = 10000
     fs = 2000.0
-    Ts = 1.0/fs
+    Ts = 1.0 / fs
     t = scipy.arange(0, N*Ts, Ts)
 
     # When playing with the number of channels, be careful about the filter
@@ -62,7 +65,7 @@ def main():
     proto_taps = filter.firdes.low_pass_2(1, nchans*fs,
                                           bw, tb, 80,
                                           filter.firdes.WIN_BLACKMAN_hARRIS)
-    print "Filter length: ", len(proto_taps)
+    print("Filter length: ", len(proto_taps))
 
 
     # Create a modulated signal
@@ -95,7 +98,7 @@ def main():
     tb.connect(rrc, src_snk)
 
     vsnk = []
-    for i in xrange(nchans):
+    for i in range(nchans):
         tb.connect((channelizer,i), (synthesizer, i))
 
         vsnk.append(blocks.vector_sink_c())
@@ -131,10 +134,10 @@ def main():
 
     # Plot channels
     nrows = int(scipy.sqrt(nchans))
-    ncols = int(scipy.ceil(float(nchans)/float(nrows)))
+    ncols = int(scipy.ceil(float(nchans) / float(nrows)))
 
     f2 = pylab.figure(2, figsize=(16,12), facecolor='w')
-    for n in xrange(nchans):
+    for n in range(nchans):
         s = f2.add_subplot(nrows, ncols, n+1)
         s.psd(vsnk[n].data(), NFFT=fftlen, Fs=fs_in)
         s.set_title("Channel {0}".format(n))
diff --git a/gr-filter/examples/resampler.py b/gr-filter/examples/resampler.py
old mode 100755
new mode 100644
index e329f062d0..29b25629cc
--- a/gr-filter/examples/resampler.py
+++ b/gr-filter/examples/resampler.py
@@ -20,6 +20,9 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import filter
 from gnuradio import blocks
@@ -48,7 +51,7 @@ class mytb(gr.top_block):
         gr.top_block.__init__(self)
 
         rerate = float(fs_out) / float(fs_in)
-        print "Resampling from %f to %f by %f " %(fs_in, fs_out, rerate)
+        print("Resampling from %f to %f by %f " %(fs_in, fs_out, rerate))
 
         # Creating our own taps
         taps = filter.firdes.low_pass_2(32, 32, 0.25, 0.1, 80)
@@ -91,31 +94,31 @@ def main():
     fig1 = pylab.figure(1, figsize=(10,10), facecolor="w")
     sp1 = fig1.add_subplot(2,1,1)
     sp1.psd(tb.snk_in.data(), NFFT=nfftsize,
-            noverlap=nfftsize/4, Fs = fs_in)
-    sp1.set_title(("Input Signal at f_s=%.2f kHz" % (fs_in/1000.0)))
-    sp1.set_xlim([-fs_in/2, fs_in/2])
+            noverlap=nfftsize / 4, Fs = fs_in)
+    sp1.set_title(("Input Signal at f_s=%.2f kHz" % (fs_in / 1000.0)))
+    sp1.set_xlim([-fs_in / 2, fs_in / 2])
 
     sp2 = fig1.add_subplot(2,1,2)
     sp2.psd(tb.snk_0.data(), NFFT=nfftsize,
-            noverlap=nfftsize/4, Fs = fs_out,
+            noverlap=nfftsize / 4, Fs = fs_out,
             label="With our filter")
     sp2.psd(tb.snk_1.data(), NFFT=nfftsize,
-            noverlap=nfftsize/4, Fs = fs_out,
+            noverlap=nfftsize / 4, Fs = fs_out,
             label="With auto-generated filter")
-    sp2.set_title(("Output Signals at f_s=%.2f kHz" % (fs_out/1000.0)))
-    sp2.set_xlim([-fs_out/2, fs_out/2])
+    sp2.set_title(("Output Signals at f_s=%.2f kHz" % (fs_out / 1000.0)))
+    sp2.set_xlim([-fs_out / 2, fs_out / 2])
     sp2.legend()
 
     # Plot signals in time
-    Ts_in = 1.0/fs_in
-    Ts_out = 1.0/fs_out
+    Ts_in = 1.0 / fs_in
+    Ts_out = 1.0 / fs_out
     t_in = scipy.arange(0, len(tb.snk_in.data())*Ts_in, Ts_in)
     t_out = scipy.arange(0, len(tb.snk_0.data())*Ts_out, Ts_out)
 
     fig2 = pylab.figure(2, figsize=(10,10), facecolor="w")
     sp21 = fig2.add_subplot(2,1,1)
     sp21.plot(t_in, tb.snk_in.data())
-    sp21.set_title(("Input Signal at f_s=%.2f kHz" % (fs_in/1000.0)))
+    sp21.set_title(("Input Signal at f_s=%.2f kHz" % (fs_in / 1000.0)))
     sp21.set_xlim([t_in[100], t_in[200]])
 
     sp22 = fig2.add_subplot(2,1,2)
@@ -123,8 +126,8 @@ def main():
               label="With our filter")
     sp22.plot(t_out, tb.snk_1.data(),
               label="With auto-generated filter")
-    sp22.set_title(("Output Signals at f_s=%.2f kHz" % (fs_out/1000.0)))
-    r = float(fs_out)/float(fs_in)
+    sp22.set_title(("Output Signals at f_s=%.2f kHz" % (fs_out / 1000.0)))
+    r = float(fs_out) / float(fs_in)
     sp22.set_xlim([t_out[r * 100], t_out[r * 200]])
     sp22.legend()
 
diff --git a/gr-filter/examples/synth_filter.py b/gr-filter/examples/synth_filter.py
old mode 100755
new mode 100644
index 5382127b35..b971c4a641
--- a/gr-filter/examples/synth_filter.py
+++ b/gr-filter/examples/synth_filter.py
@@ -20,6 +20,9 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import filter
 from gnuradio import blocks
@@ -57,8 +60,8 @@ def main():
 
     taps = filter.firdes.low_pass_2(len(freqs), fs,
                                     fs/float(nchans)/2, 100, 100)
-    print "Num. Taps = %d (taps per filter = %d)" % (len(taps),
-                                                     len(taps)/nchans)
+    print("Num. Taps = %d (taps per filter = %d)" % (len(taps),
+                                                     len(taps) / nchans))
     filtbank = filter.pfb_synthesizer_ccf(nchans, taps)
 
     head = blocks.head(gr.sizeof_gr_complex, N)
@@ -83,7 +86,7 @@ def main():
         winfunc = scipy.blackman
         s2.psd(snk.data()[10000:], NFFT=fftlen,
                Fs = nchans*fs,
-               noverlap=fftlen/4,
+               noverlap=fftlen / 4,
                window = lambda d: d*winfunc(fftlen))
 
         pylab.show()
diff --git a/gr-filter/examples/synth_to_chan.py b/gr-filter/examples/synth_to_chan.py
old mode 100755
new mode 100644
index 88fb080a65..f1f1da4ec1
--- a/gr-filter/examples/synth_to_chan.py
+++ b/gr-filter/examples/synth_to_chan.py
@@ -20,6 +20,9 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import blocks
 from gnuradio import filter
@@ -59,11 +62,11 @@ def main():
         fmtx.append(fm)
 
     syntaps = filter.firdes.low_pass_2(len(freqs), fs, fs/float(nchans)/2, 100, 100)
-    print "Synthesis Num. Taps = %d (taps per filter = %d)" % (len(syntaps),
-                                                               len(syntaps)/nchans)
+    print("Synthesis Num. Taps = %d (taps per filter = %d)" % (len(syntaps),
+                                                               len(syntaps) / nchans))
     chtaps = filter.firdes.low_pass_2(len(freqs), fs, fs/float(nchans)/2, 100, 100)
-    print "Channelizer Num. Taps = %d (taps per filter = %d)" % (len(chtaps),
-                                                                 len(chtaps)/nchans)
+    print("Channelizer Num. Taps = %d (taps per filter = %d)" % (len(chtaps),
+                                                                 len(chtaps) / nchans))
     filtbank = filter.pfb_synthesizer_ccf(nchans, syntaps)
     channelizer = filter.pfb.channelizer_ccf(nchans, chtaps)
 
@@ -84,7 +87,7 @@ def main():
     for i,si in enumerate(sigs):
         tb.connect(si, fmtx[i], (filtbank, i))
 
-    for i in xrange(nchans):
+    for i in range(nchans):
         snk.append(blocks.vector_sink_c())
         tb.connect((channelizer, i), snk[i])
 
@@ -107,7 +110,7 @@ def main():
         s2 = f2.add_subplot(1,1,1)
         s2.psd(data, NFFT=fftlen,
                Fs = nchans*fs,
-               noverlap=fftlen/4,
+               noverlap=fftlen / 4,
                window = lambda d: d*winfunc(fftlen))
         s2.set_title(("Output PSD from Channel %d" % channel))
 
@@ -115,7 +118,7 @@ def main():
         s3 = f3.add_subplot(1,1,1)
         s3.psd(snk_synth.data()[1000:], NFFT=fftlen,
                Fs = nchans*fs,
-               noverlap=fftlen/4,
+               noverlap=fftlen / 4,
                window = lambda d: d*winfunc(fftlen))
         s3.set_title("Output of Synthesis Filter")
 
diff --git a/gr-filter/lib/iir_filter_ffd_impl.cc b/gr-filter/lib/iir_filter_ffd_impl.cc
index f70e3a25af..c389b7c84c 100644
--- a/gr-filter/lib/iir_filter_ffd_impl.cc
+++ b/gr-filter/lib/iir_filter_ffd_impl.cc
@@ -32,21 +32,21 @@ namespace gr {
 
     iir_filter_ffd::sptr
     iir_filter_ffd::make(const std::vector<double> &fftaps,
-			 const std::vector<double> &fbtaps,
-			 bool oldstyle)
+                         const std::vector<double> &fbtaps,
+                         bool oldstyle)
     {
       return gnuradio::get_initial_sptr
-	(new iir_filter_ffd_impl(fftaps, fbtaps, oldstyle));
+        (new iir_filter_ffd_impl(fftaps, fbtaps, oldstyle));
     }
 
     iir_filter_ffd_impl::iir_filter_ffd_impl(const std::vector<double> &fftaps,
-					     const std::vector<double> &fbtaps,
-					     bool oldstyle)
+                                             const std::vector<double> &fbtaps,
+                                             bool oldstyle)
 
       : sync_block("iir_filter_ffd",
-		      io_signature::make(1, 1, sizeof (float)),
-		      io_signature::make(1, 1, sizeof (float))),
-	d_updated(false)
+                   io_signature::make(1, 1, sizeof (float)),
+                   io_signature::make(1, 1, sizeof (float))),
+        d_updated(false)
     {
       d_iir = new kernel::iir_filter<float,float,double,double>(fftaps, fbtaps, oldstyle);
     }
@@ -58,7 +58,7 @@ namespace gr {
 
     void
     iir_filter_ffd_impl::set_taps(const std::vector<double> &fftaps,
-				  const std::vector<double> &fbtaps)
+                                  const std::vector<double> &fbtaps)
     {
       d_new_fftaps = fftaps;
       d_new_fbtaps = fbtaps;
@@ -67,20 +67,20 @@ namespace gr {
 
     int
     iir_filter_ffd_impl::work(int noutput_items,
-			      gr_vector_const_void_star &input_items,
-			      gr_vector_void_star &output_items)
+                              gr_vector_const_void_star &input_items,
+                              gr_vector_void_star &output_items)
     {
       const float *in = (const float*)input_items[0];
       float *out = (float*)output_items[0];
 
       if(d_updated) {
-	d_iir->set_taps(d_new_fftaps, d_new_fbtaps);
-	d_updated = false;
+        d_iir->set_taps(d_new_fftaps, d_new_fbtaps);
+        d_updated = false;
       }
 
       d_iir->filter_n(out, in, noutput_items);
       return noutput_items;
-    };
+    }
 
   } /* namespace filter */
 } /* namespace gr */
diff --git a/gr-filter/lib/single_pole_iir_filter_ff_impl.cc b/gr-filter/lib/single_pole_iir_filter_ff_impl.cc
index d948afbc14..cbbcad4d7b 100644
--- a/gr-filter/lib/single_pole_iir_filter_ff_impl.cc
+++ b/gr-filter/lib/single_pole_iir_filter_ff_impl.cc
@@ -34,15 +34,15 @@ namespace gr {
     single_pole_iir_filter_ff::make(double alpha, unsigned int vlen)
     {
       return gnuradio::get_initial_sptr
-	(new single_pole_iir_filter_ff_impl(alpha, vlen));
+        (new single_pole_iir_filter_ff_impl(alpha, vlen));
     }
 
     single_pole_iir_filter_ff_impl::single_pole_iir_filter_ff_impl
-        (double alpha, unsigned int vlen)
-	  : sync_block("single_pole_iir_filter_ff",
-		   io_signature::make(1, 1, sizeof(float)*vlen),
-		   io_signature::make(1, 1, sizeof(float)*vlen)),
-	    d_vlen(vlen), d_iir(vlen)
+    (double alpha, unsigned int vlen)
+      : sync_block("single_pole_iir_filter_ff",
+                   io_signature::make(1, 1, sizeof(float)*vlen),
+                   io_signature::make(1, 1, sizeof(float)*vlen)),
+        d_vlen(vlen), d_iir(vlen)
     {
       set_taps(alpha);
     }
@@ -55,33 +55,33 @@ namespace gr {
     single_pole_iir_filter_ff_impl::set_taps(double alpha)
     {
       for(unsigned int i = 0; i < d_vlen; i++) {
-	d_iir[i].set_taps(alpha);
+        d_iir[i].set_taps(alpha);
       }
     }
 
     int
     single_pole_iir_filter_ff_impl::work(int noutput_items,
-					 gr_vector_const_void_star &input_items,
-					 gr_vector_void_star &output_items)
+                                         gr_vector_const_void_star &input_items,
+                                         gr_vector_void_star &output_items)
     {
       const float *in = (const float*)input_items[0];
       float *out = (float*)output_items[0];
       unsigned int vlen = d_vlen;
 
       if(d_vlen == 1) {
-	for(int i = 0; i < noutput_items; i++) {
-	  out[i] = d_iir[0].filter (in[i]);
-	}
+        for(int i = 0; i < noutput_items; i++) {
+          out[i] = d_iir[0].filter (in[i]);
+        }
       }
       else {
-	for(int i = 0; i < noutput_items; i++) {
-	  for(unsigned int j = 0; j < vlen; j++) {
-	    *out++ = d_iir[j].filter(*in++);
-	  }
-	}
+        for(int i = 0; i < noutput_items; i++) {
+          for(unsigned int j = 0; j < vlen; j++) {
+            *out++ = d_iir[j].filter(*in++);
+          }
+        }
       }
       return noutput_items;
-    };
+    }
 
   } /* namespace filter */
 } /* namespace gr */
diff --git a/gr-filter/python/filter/CMakeLists.txt b/gr-filter/python/filter/CMakeLists.txt
index bc4892412e..f692456d0d 100644
--- a/gr-filter/python/filter/CMakeLists.txt
+++ b/gr-filter/python/filter/CMakeLists.txt
@@ -46,6 +46,6 @@ if(ENABLE_TESTING)
   file(GLOB py_qa_test_files "qa_*.py")
   foreach(py_qa_test_file ${py_qa_test_files})
     get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE)
-    GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${py_qa_test_file})
+    GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} -B ${py_qa_test_file})
   endforeach(py_qa_test_file)
 endif(ENABLE_TESTING)
diff --git a/gr-filter/python/filter/__init__.py b/gr-filter/python/filter/__init__.py
index cbbc80f95b..4051a9677f 100644
--- a/gr-filter/python/filter/__init__.py
+++ b/gr-filter/python/filter/__init__.py
@@ -22,19 +22,23 @@
 '''
 Filter blocks and related functions.
 '''
+from __future__ import absolute_import
+from __future__ import unicode_literals
+
 import os
 
 try:
-    from filter_swig import *
+    from .filter_swig import *
 except ImportError:
     dirname, filename = os.path.split(os.path.abspath(__file__))
     __path__.append(os.path.join(dirname, "..", "..", "swig"))
-    from filter_swig import *
-from filterbank import *
-from freq_xlating_fft_filter import *
-from rational_resampler import *
-import pfb
-import optfir
+    from .filter_swig import *
+
+from .filterbank import *
+from .freq_xlating_fft_filter import *
+from .rational_resampler import *
+from . import pfb
+from . import optfir
 
 # Pull this into the filter module
 from gnuradio.fft import window
diff --git a/gr-filter/python/filter/design/api_object.py b/gr-filter/python/filter/design/api_object.py
index 7661265c75..5b3b475355 100644
--- a/gr-filter/python/filter/design/api_object.py
+++ b/gr-filter/python/filter/design/api_object.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
 # Copyright 2012 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
@@ -18,7 +19,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
-class ApiObject():
+class ApiObject(object):
     '''
         Filter count variable if the filter design tool has to
         return multiple filter paramters in future
diff --git a/gr-filter/python/filter/design/filter_design.py b/gr-filter/python/filter/design/filter_design.py
index f94b6b8340..9c2c163702 100644
--- a/gr-filter/python/filter/design/filter_design.py
+++ b/gr-filter/python/filter/design/filter_design.py
@@ -18,65 +18,72 @@
 # Boston, MA 02110-1301, USA.
 #
 
-import sys, os, re, csv, copy
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
+
+import sys
+import re
+import csv
 import warnings
 from optparse import OptionParser
+
 from gnuradio import filter
 
 try:
     import scipy
     from scipy import fftpack, poly1d, signal
 except ImportError:
-    print "Please install SciPy to run this script (http://www.scipy.org/)"
-    raise SystemExit, 1
+    print("Please install SciPy to run this script (http://www.scipy.org/)")
+    raise SystemExit(1)
 
 try:
     from PyQt4 import Qt, QtCore, QtGui
 except ImportError:
-    print "Please install PyQt4 to run this script (http://www.riverbankcomputing.co.uk/software/pyqt/download)"
-    raise SystemExit, 1
+    print("Please install PyQt4 to run this script (http://www.riverbankcomputing.co.uk/software/pyqt/download)")
+    raise SystemExit(1)
 
 try:
     import PyQt4.Qwt5 as Qwt
 except ImportError:
-    print "Please install PyQwt5 to run this script (http://pyqwt.sourceforge.net/)"
-    raise SystemExit, 1
+    print("Please install PyQwt5 to run this script (http://pyqwt.sourceforge.net/)")
+    raise SystemExit(1)
 
 try:
     from gnuradio.filter.pyqt_filter_stacked import Ui_MainWindow
 except ImportError:
-    print "Could not import from pyqt_filter_stacked. Please build with \"pyuic4 pyqt_filter_stacked.ui -o pyqt_filter_stacked.py\""
-    raise SystemExit, 1
+    print("Could not import from pyqt_filter_stacked. Please build with \"pyuic4 pyqt_filter_stacked.ui -o pyqt_filter_stacked.py\"")
+    raise SystemExit(1)
 
 try:
     from gnuradio.filter.banditems import *
 except ImportError:
-    print "Could not import from banditems. Please check whether banditems.py is in the library path"
-    raise SystemExit, 1
+    print("Could not import from banditems. Please check whether banditems.py is in the library path")
+    raise SystemExit(1)
 
 try:
     from gnuradio.filter.polezero_plot import *
 except ImportError:
-    print "Could not import from polezero_plot. Please check whether polezero_plot.py is in the library path"
-    raise SystemExit, 1
+    print("Could not import from polezero_plot. Please check whether polezero_plot.py is in the library path")
+    raise SystemExit(1)
 
 try:
     from gnuradio.filter.idealbanditems import *
 except ImportError:
-    print "Could not import from idealbanditems. Please check whether idealbanditems.py is in the library path"
-    raise SystemExit, 1
+    print("Could not import from idealbanditems. Please check whether idealbanditems.py is in the library path")
+    raise SystemExit(1)
 
 try:
     from gnuradio.filter.api_object import *
 except ImportError:
-    print "Could not import from api_object. Please check whether api_object.py is in the library path"
-    raise SystemExit, 1
+    print("Could not import from api_object. Please check whether api_object.py is in the library path")
+    raise SystemExit(1)
 
 try:
     from gnuradio.filter.fir_design import *
 except ImportError:
-    print "Could not import from fir_design. Please check whether fir_design.py is in the library path"
-    raise SystemExit, 1
+    print("Could not import from fir_design. Please check whether fir_design.py is in the library path")
+    raise SystemExit(1)
 
 try:
     _fromUtf8 = QtCore.QString.fromUtf8
@@ -140,72 +147,72 @@ class gr_plot_filter(QtGui.QMainWindow):
                      self.nfft_edit_changed)
 
         self.connect(self.gui.actionQuick_Access,
-					 Qt.SIGNAL("activated()"),
-					 self.action_quick_access)
+                     Qt.SIGNAL("activated()"),
+                     self.action_quick_access)
 
         self.connect(self.gui.actionSpec_Widget,
-					 Qt.SIGNAL("activated()"),
-					 self.action_spec_widget)
+                     Qt.SIGNAL("activated()"),
+                     self.action_spec_widget)
 
         self.connect(self.gui.actionResponse_Widget,
-					 Qt.SIGNAL("activated()"),
-					 self.action_response_widget)
+                     Qt.SIGNAL("activated()"),
+                     self.action_response_widget)
 
         self.connect(self.gui.actionDesign_Widget,
-					 Qt.SIGNAL("activated()"),
-					 self.action_design_widget)
+                     Qt.SIGNAL("activated()"),
+                     self.action_design_widget)
 
         self.connect(self.gui.actionMagnitude_Response,
-					 Qt.SIGNAL("activated()"),
-					 self.set_actmagresponse)
+                     Qt.SIGNAL("activated()"),
+                     self.set_actmagresponse)
 
         self.connect(self.gui.actionGrid_2,
-					 Qt.SIGNAL("activated()"),
-					 self.set_actgrid)
+                     Qt.SIGNAL("activated()"),
+                     self.set_actgrid)
 
         self.connect(self.gui.actionPhase_Respone,
-					 Qt.SIGNAL("activated()"),
-					 self.set_actphase)
+                     Qt.SIGNAL("activated()"),
+                     self.set_actphase)
 
         self.connect(self.gui.actionGroup_Delay,
-					 Qt.SIGNAL("activated()"),
-					 self.set_actgdelay)
+                     Qt.SIGNAL("activated()"),
+                     self.set_actgdelay)
 
         self.connect(self.gui.actionFilter_Coefficients,
-					 Qt.SIGNAL("activated()"),
-					 self.set_actfcoeff)
+                     Qt.SIGNAL("activated()"),
+                     self.set_actfcoeff)
 
         self.connect(self.gui.actionBand_Diagram,
-					 Qt.SIGNAL("activated()"),
-					 self.set_actband)
+                     Qt.SIGNAL("activated()"),
+                     self.set_actband)
 
         self.connect(self.gui.actionIdeal_Band,
-					 Qt.SIGNAL("activated()"),
-					 self.set_drawideal)
+                     Qt.SIGNAL("activated()"),
+                     self.set_drawideal)
 
         self.connect(self.gui.actionPole_Zero_Plot_2,
-					 Qt.SIGNAL("activated()"),
-					 self.set_actpzplot)
+                     Qt.SIGNAL("activated()"),
+                     self.set_actpzplot)
 
         self.connect(self.gui.actionGridview,
-					 Qt.SIGNAL("activated()"),
-					 self.set_switchview)
+                     Qt.SIGNAL("activated()"),
+                     self.set_switchview)
 
         self.connect(self.gui.actionPlot_select,
-					 Qt.SIGNAL("activated()"),
-					 self.set_plotselect)
+                     Qt.SIGNAL("activated()"),
+                     self.set_plotselect)
 
         self.connect(self.gui.actionPhase_Delay,
-					 Qt.SIGNAL("activated()"),
-					 self.set_actpdelay)
+                     Qt.SIGNAL("activated()"),
+                     self.set_actpdelay)
 
         self.connect(self.gui.actionImpulse_Response,
-					 Qt.SIGNAL("activated()"),
-					 self.set_actimpres)
+                     Qt.SIGNAL("activated()"),
+                     self.set_actimpres)
 
         self.connect(self.gui.actionStep_Response,
-					 Qt.SIGNAL("activated()"),
-					 self.set_actstepres)
+                     Qt.SIGNAL("activated()"),
+                     self.set_actstepres)
 
         self.connect(self.gui.mfmagPush,
                      Qt.SIGNAL("released()"),
@@ -272,48 +279,48 @@ class gr_plot_filter(QtGui.QMainWindow):
                      self.set_mtimpulse)
 
         self.connect(self.gui.checkKeepcur,
-					 Qt.SIGNAL("stateChanged(int)"),
-					 self.set_bufferplots)
+                     Qt.SIGNAL("stateChanged(int)"),
+                     self.set_bufferplots)
 
         self.connect(self.gui.checkGrid,
-					 Qt.SIGNAL("stateChanged(int)"),
-					 self.set_grid)
+                     Qt.SIGNAL("stateChanged(int)"),
+                     self.set_grid)
 
         self.connect(self.gui.checkMagres,
-					 Qt.SIGNAL("stateChanged(int)"),
-					 self.set_magresponse)
+                     Qt.SIGNAL("stateChanged(int)"),
+                     self.set_magresponse)
 
         self.connect(self.gui.checkGdelay,
-					 Qt.SIGNAL("stateChanged(int)"),
-					 self.set_gdelay)
+                     Qt.SIGNAL("stateChanged(int)"),
+                     self.set_gdelay)
 
         self.connect(self.gui.checkPhase,
-					 Qt.SIGNAL("stateChanged(int)"),
-					 self.set_phase)
+                     Qt.SIGNAL("stateChanged(int)"),
+                     self.set_phase)
 
         self.connect(self.gui.checkFcoeff,
-					 Qt.SIGNAL("stateChanged(int)"),
-					 self.set_fcoeff)
+                     Qt.SIGNAL("stateChanged(int)"),
+                     self.set_fcoeff)
 
         self.connect(self.gui.checkBand,
-					 Qt.SIGNAL("stateChanged(int)"),
-					 self.set_band)
+                     Qt.SIGNAL("stateChanged(int)"),
+                     self.set_band)
 
         self.connect(self.gui.checkPzplot,
-					 Qt.SIGNAL("stateChanged(int)"),
-					 self.set_pzplot)
+                     Qt.SIGNAL("stateChanged(int)"),
+                     self.set_pzplot)
 
         self.connect(self.gui.checkPdelay,
-					 Qt.SIGNAL("stateChanged(int)"),
-					 self.set_pdelay)
+                     Qt.SIGNAL("stateChanged(int)"),
+                     self.set_pdelay)
 
         self.connect(self.gui.checkImpulse,
-					 Qt.SIGNAL("stateChanged(int)"),
-					 self.set_impres)
+                     Qt.SIGNAL("stateChanged(int)"),
+                     self.set_impres)
 
         self.connect(self.gui.checkStep,
-					 Qt.SIGNAL("stateChanged(int)"),
-					 self.set_stepres)
+                     Qt.SIGNAL("stateChanged(int)"),
+                     self.set_stepres)
 
         self.gridenable = False
         self.mfoverlay  = False
@@ -387,28 +394,28 @@ class gr_plot_filter(QtGui.QMainWindow):
         impxtitle = Qwt.QwtText("n (Samples)")
         impxtitle.setFont(Qt.QFont("Helvetica", 11, Qt.QFont.Bold))
         self.gui.impresPlot.setAxisTitle(self.gui.freqPlot.xBottom,
-                                       impxtitle)
+                                         impxtitle)
         self.gui.impresPlot.setAxisTitle(self.gui.freqPlot.yLeft,
-                                       impytitle)
+                                         impytitle)
         self.gui.stepresPlot.setAxisTitle(self.gui.freqPlot.xBottom,
-                                       impxtitle)
+                                          impxtitle)
         self.gui.stepresPlot.setAxisTitle(self.gui.freqPlot.yLeft,
-                                       impytitle)
+                                          impytitle)
         mtytitle = Qwt.QwtText("Amplitude")
         mtytitle.setFont(Qt.QFont("Helvetica", 9, Qt.QFont.Bold))
         mtxtitle = Qwt.QwtText("n (Samples/taps)")
         mtxtitle.setFont(Qt.QFont("Helvetica", 9, Qt.QFont.Bold))
         self.gui.mtimePlot.setAxisTitle(self.gui.freqPlot.xBottom,
-                                       mtxtitle)
+                                        mtxtitle)
         self.gui.mtimePlot.setAxisTitle(self.gui.freqPlot.yLeft,
-                                       mtytitle)
+                                        mtytitle)
 
         phytitle = Qwt.QwtText("Phase Delay")
         phytitle.setFont(Qt.QFont("Helvetica", 11, Qt.QFont.Bold))
         self.gui.pdelayPlot.setAxisTitle(self.gui.groupPlot.xBottom,
-                                        fxtitle)
+                                         fxtitle)
         self.gui.pdelayPlot.setAxisTitle(self.gui.groupPlot.yLeft,
-                                        phytitle)
+                                         phytitle)
 
         # Set up plot curves
         self.rcurve = Qwt.QwtPlotCurve("Real")
@@ -480,16 +487,16 @@ class gr_plot_filter(QtGui.QMainWindow):
                                             self.gui.timePlot.canvas())
 
         self.mtimeZoomer = Qwt.QwtPlotZoomer(self.gui.mtimePlot.xBottom,
-                                            self.gui.mtimePlot.yLeft,
-                                            Qwt.QwtPicker.PointSelection,
-                                            Qwt.QwtPicker.AlwaysOn,
-                                            self.gui.mtimePlot.canvas())
+                                             self.gui.mtimePlot.yLeft,
+                                             Qwt.QwtPicker.PointSelection,
+                                             Qwt.QwtPicker.AlwaysOn,
+                                             self.gui.mtimePlot.canvas())
 
         self.mtimeZoomer2 = Qwt.QwtPlotZoomer(self.gui.mtimePlot.xBottom,
-                                            self.gui.mtimePlot.yRight,
-                                            Qwt.QwtPicker.PointSelection,
-                                            Qwt.QwtPicker.AlwaysOff,
-                                            self.gui.mtimePlot.canvas())
+                                              self.gui.mtimePlot.yRight,
+                                              Qwt.QwtPicker.PointSelection,
+                                              Qwt.QwtPicker.AlwaysOff,
+                                              self.gui.mtimePlot.canvas())
 
         self.freqZoomer = Qwt.QwtPlotZoomer(self.gui.freqPlot.xBottom,
                                             self.gui.freqPlot.yLeft,
@@ -523,25 +530,25 @@ class gr_plot_filter(QtGui.QMainWindow):
                                              self.gui.groupPlot.canvas())
 
         self.impresZoomer = Qwt.QwtPlotZoomer(self.gui.groupPlot.xBottom,
-                                             self.gui.groupPlot.yLeft,
-                                             Qwt.QwtPicker.PointSelection,
-                                             Qwt.QwtPicker.AlwaysOn,
-                                             self.gui.impresPlot.canvas())
+                                              self.gui.groupPlot.yLeft,
+                                              Qwt.QwtPicker.PointSelection,
+                                              Qwt.QwtPicker.AlwaysOn,
+                                              self.gui.impresPlot.canvas())
 
         self.stepresZoomer = Qwt.QwtPlotZoomer(self.gui.groupPlot.xBottom,
-                                             self.gui.groupPlot.yLeft,
-                                             Qwt.QwtPicker.PointSelection,
-                                             Qwt.QwtPicker.AlwaysOn,
-                                             self.gui.stepresPlot.canvas())
+                                               self.gui.groupPlot.yLeft,
+                                               Qwt.QwtPicker.PointSelection,
+                                               Qwt.QwtPicker.AlwaysOn,
+                                               self.gui.stepresPlot.canvas())
 
         self.pdelayZoomer = Qwt.QwtPlotZoomer(self.gui.groupPlot.xBottom,
-                                             self.gui.groupPlot.yLeft,
-                                             Qwt.QwtPicker.PointSelection,
-                                             Qwt.QwtPicker.AlwaysOn,
-                                             self.gui.pdelayPlot.canvas())
+                                              self.gui.groupPlot.yLeft,
+                                              Qwt.QwtPicker.PointSelection,
+                                              Qwt.QwtPicker.AlwaysOn,
+                                              self.gui.pdelayPlot.canvas())
 
 
-		#Assigning items
+        #Assigning items
         self.lpfitems = lpfItems
         self.hpfitems = hpfItems
         self.bpfitems = bpfItems
@@ -580,7 +587,7 @@ class gr_plot_filter(QtGui.QMainWindow):
         self.lpfstartproxy.setWidget(self.lpfpassEdit)
         self.lpfstartproxy.setPos(400,30)
 
-		self.lpfstopEdit=QtGui.QLineEdit()
+        self.lpfstopEdit=QtGui.QLineEdit()
         self.lpfstopEdit.setMaximumSize(QtCore.QSize(75,20))
         self.lpfstopEdit.setText(Qt.QString("Not set"))
         self.lpfstopproxy=QtGui.QGraphicsProxyWidget()
@@ -642,39 +649,39 @@ class gr_plot_filter(QtGui.QMainWindow):
         self.freqcurve.setPen(Qt.QPen(blueBrush, 1))
         self.rcurve.setPen(Qt.QPen(Qt.Qt.white, 0, Qt.Qt.NoPen))
         self.rcurve.setSymbol(Qwt.QwtSymbol(Qwt.QwtSymbol.Ellipse,
-                                      Qt.QBrush(Qt.Qt.gray),
-                                      Qt.QPen(Qt.Qt.blue),
-                                      Qt.QSize(8, 8)))
+                                            Qt.QBrush(Qt.Qt.gray),
+                                            Qt.QPen(Qt.Qt.blue),
+                                            Qt.QSize(8, 8)))
 
         self.icurve.setPen(Qt.QPen(Qt.Qt.white, 0, Qt.Qt.NoPen))
         self.icurve.setSymbol(Qwt.QwtSymbol(Qwt.QwtSymbol.Ellipse,
-                                      Qt.QBrush(Qt.Qt.gray),
-                                      Qt.QPen(Qt.Qt.red),
-                                      Qt.QSize(8, 8)))
+                                            Qt.QBrush(Qt.Qt.gray),
+                                            Qt.QPen(Qt.Qt.red),
+                                            Qt.QSize(8, 8)))
 
         self.imprescurve.setPen(Qt.QPen(Qt.Qt.white, 0, Qt.Qt.NoPen))
         self.imprescurve.setSymbol(Qwt.QwtSymbol(Qwt.QwtSymbol.Ellipse,
-                                      Qt.QBrush(Qt.Qt.gray),
-                                      Qt.QPen(Qt.Qt.blue),
-                                      Qt.QSize(8, 8)))
+                                                 Qt.QBrush(Qt.Qt.gray),
+                                                 Qt.QPen(Qt.Qt.blue),
+                                                 Qt.QSize(8, 8)))
 
         self.imprescurve_i.setPen(Qt.QPen(Qt.Qt.white, 0, Qt.Qt.NoPen))
         self.imprescurve_i.setSymbol(Qwt.QwtSymbol(Qwt.QwtSymbol.Ellipse,
-                                      Qt.QBrush(Qt.Qt.gray),
-                                      Qt.QPen(Qt.Qt.red),
-                                      Qt.QSize(8, 8)))
+                                                   Qt.QBrush(Qt.Qt.gray),
+                                                   Qt.QPen(Qt.Qt.red),
+                                                   Qt.QSize(8, 8)))
 
         self.steprescurve.setPen(Qt.QPen(Qt.Qt.white, 0, Qt.Qt.NoPen))
         self.steprescurve.setSymbol(Qwt.QwtSymbol(Qwt.QwtSymbol.Ellipse,
-                                      Qt.QBrush(Qt.Qt.gray),
-                                      Qt.QPen(Qt.Qt.blue),
-                                      Qt.QSize(8, 8)))
+                                                  Qt.QBrush(Qt.Qt.gray),
+                                                  Qt.QPen(Qt.Qt.blue),
+                                                  Qt.QSize(8, 8)))
 
         self.steprescurve_i.setPen(Qt.QPen(Qt.Qt.white, 0, Qt.Qt.NoPen))
         self.steprescurve_i.setSymbol(Qwt.QwtSymbol(Qwt.QwtSymbol.Ellipse,
-                                      Qt.QBrush(Qt.Qt.gray),
-                                      Qt.QPen(Qt.Qt.red),
-                                      Qt.QSize(8, 8)))
+                                                    Qt.QBrush(Qt.Qt.gray),
+                                                    Qt.QPen(Qt.Qt.red),
+                                                    Qt.QSize(8, 8)))
 
         self.phasecurve.setPen(Qt.QPen(blueBrush, 1))
         self.groupcurve.setPen(Qt.QPen(blueBrush, 1))
@@ -802,7 +809,7 @@ class gr_plot_filter(QtGui.QMainWindow):
         # filters this window type can handle
         currenttype = self.gui.filterTypeComboBox.currentText()
         items = self.gui.filterTypeComboBox.count()
-        for i in xrange(items):
+        for i in range(items):
             self.gui.filterTypeComboBox.removeItem(0)
         self.gui.filterTypeComboBox.addItems(self.optFilters)
 
@@ -835,9 +842,9 @@ class gr_plot_filter(QtGui.QMainWindow):
         # filters this window type can handle
         currenttype = self.gui.filterTypeComboBox.currentText()
         items = self.gui.filterTypeComboBox.count()
-        for i in xrange(items):
+        for i in range(items):
             self.gui.filterTypeComboBox.removeItem(0)
-        self.gui.filterTypeComboBox.addItems(self.firFilters)
+            self.gui.filterTypeComboBox.addItems(self.firFilters)
 
         # If the last filter type was valid for this window type,
         # go back to it; otherwise, reset
@@ -872,7 +879,7 @@ class gr_plot_filter(QtGui.QMainWindow):
                 self.design_iir()
                 if len(w):
                     reply = QtGui.QMessageBox.information(self, "BadCoefficients",
-                                                         str(w[-1].message),"&Ok")
+                                                          str(w[-1].message),"&Ok")
 
     # Do FIR design
     def design_fir(self, ftype, fs, gain, winstr):
@@ -908,15 +915,15 @@ class gr_plot_filter(QtGui.QMainWindow):
                 self.gui.nTapsEdit.setText(Qt.QString("%1").arg(self.taps.size))
             else:
                 self.draw_plots(taps,params)
-        zeros=self.get_zeros()
-        poles=self.get_poles()
-        self.gui.pzPlot.insertZeros(zeros)
-        self.gui.pzPlot.insertPoles(poles)
-        self.gui.mpzPlot.insertZeros(zeros)
-        self.gui.mpzPlot.insertPoles(poles)
-        self.update_fcoeff()
-        self.set_drawideal()
-        #return taps if callback is enabled
+                zeros=self.get_zeros()
+                poles=self.get_poles()
+                self.gui.pzPlot.insertZeros(zeros)
+                self.gui.pzPlot.insertPoles(poles)
+                self.gui.mpzPlot.insertZeros(zeros)
+                self.gui.mpzPlot.insertPoles(poles)
+                self.update_fcoeff()
+                self.set_drawideal()
+                #return taps if callback is enabled
         if self.callback:
             retobj = ApiObject()
             retobj.update_all("fir", self.params, self.taps, 1)
@@ -935,22 +942,22 @@ class gr_plot_filter(QtGui.QMainWindow):
         self.cpicker.set_iir(True)
         self.cpicker2.set_iir(True)
 
-        iirft = 	{"Elliptic" : 'ellip',
+        iirft =     {"Elliptic" : 'ellip',
                      "Butterworth" : 'butter',
                      "Chebyshev-1" : 'cheby1',
                      "Chebyshev-2" : 'cheby2',
                      "Bessel" : 'bessel'  }
 
-        sanalog = 	{"Analog (rad/second)" : 1,
-                     "Digital (normalized 0-1)" : 0  }
+        sanalog =     {"Analog (rad/second)" : 1,
+                       "Digital (normalized 0-1)" : 0  }
 
         paramtype = { 1 : "analog",
                       0 : "digital" }
         iirabbr = {
-                    "Low Pass" : "lpf",
-                    "High Pass" : "hpf",
-                    "Band Pass" : "bpf",
-                    "Band Stop" : "bnf"  }
+            "Low Pass" : "lpf",
+            "High Pass" : "hpf",
+            "Band Pass" : "bpf",
+            "Band Stop" : "bnf"  }
 
         iirboxes = {"Low Pass" : [self.gui.iirendofLpfPassBandEdit.text().toDouble(),
                                   self.gui.iirstartofLpfStopBandEdit.text().toDouble(),
@@ -1004,33 +1011,33 @@ class gr_plot_filter(QtGui.QMainWindow):
                 try:
                     (self.b,self.a) = signal.iirfilter(order, besselparams, btype=iirbtype.replace(' ','').lower(),
                                                        analog=sanalog[atype], ftype=iirft[iirftype], output='ba')
-                except StandardError, e:
-                                reply = QtGui.QMessageBox.information(self, "IIR design error",
-                                                                      e.args[0], "&Ok")
-                (self.z,self.p,self.k) = signal.tf2zpk(self.b,self.a)
-                iirparams = { "filttype": iirft[iirftype],"bandtype": iirabbr[iirbtype], "filtord": order, "paramtype":paramtype[sanalog[atype]],
-                              "critfreq": besselparams}
+                except Exception as e:
+                    reply = QtGui.QMessageBox.information(self, "IIR design error",
+                                                          e.args[0], "&Ok")
+                    (self.z,self.p,self.k) = signal.tf2zpk(self.b,self.a)
+                    iirparams = { "filttype": iirft[iirftype],"bandtype": iirabbr[iirbtype], "filtord": order, "paramtype":paramtype[sanalog[atype]],
+                                  "critfreq": besselparams}
             else:
                 try:
                     (self.b,self.a) = signal.iirdesign(params[0], params[1], params[2],
-                                             params[3], analog=sanalog[atype], ftype=iirft[iirftype], output='ba')
-                except StandardError, e:
-                                reply = QtGui.QMessageBox.information(self, "IIR design error",
-                                                                      e.args[0], "&Ok")
-                (self.z,self.p,self.k) = signal.tf2zpk(self.b,self.a)
-                #Create params
+                                                       params[3], analog=sanalog[atype], ftype=iirft[iirftype], output='ba')
+                except Exception as e:
+                    reply = QtGui.QMessageBox.information(self, "IIR design error",
+                                                          e.args[0], "&Ok")
+                    (self.z,self.p,self.k) = signal.tf2zpk(self.b,self.a)
+                    #Create params
                 iirparams = { "filttype": iirft[iirftype], "bandtype": iirabbr[iirbtype],"paramtype":paramtype[sanalog[atype]],
                               "pbedge": params[0], "sbedge": params[1],"gpass": params[2],
                               "gstop": params[3]}
-            self.gui.pzPlot.insertZeros(self.z)
-            self.gui.pzPlot.insertPoles(self.p)
-            self.gui.mpzPlot.insertZeros(self.z)
-            self.gui.mpzPlot.insertPoles(self.p)
-            self.iir_plot_all(self.z,self.p,self.k)
-            self.update_fcoeff()
-            self.gui.nTapsEdit.setText("-")
-            self.params = iirparams
-            #return api_object if callback is enabled
+                self.gui.pzPlot.insertZeros(self.z)
+                self.gui.pzPlot.insertPoles(self.p)
+                self.gui.mpzPlot.insertZeros(self.z)
+                self.gui.mpzPlot.insertPoles(self.p)
+                self.iir_plot_all(self.z,self.p,self.k)
+                self.update_fcoeff()
+                self.gui.nTapsEdit.setText("-")
+                self.params = iirparams
+                #return api_object if callback is enabled
             if self.callback:
                 retobj = ApiObject()
                 retobj.update_all("iir", self.params, (self.b, self.a), 1)
@@ -1041,20 +1048,20 @@ class gr_plot_filter(QtGui.QMainWindow):
         self.b,self.a = signal.zpk2tf(z,p,k)
         w,h = signal.freqz(self.b,self.a)
         self.fftdB = 20 * scipy.log10 (abs(h))
-        self.freq = w/max(w)
+        self.freq = w / max(w)
         self.fftDeg = scipy.unwrap(scipy.arctan2(scipy.imag(h),scipy.real(h)))
         self.groupDelay = -scipy.diff(self.fftDeg)
-        self.phaseDelay = -self.fftDeg[1:]/self.freq[1:]
+        self.phaseDelay = -self.fftDeg[1:] / self.freq[1:]
         if self.gridview:
-           self.set_mfmagresponse()
-           self.set_mtimpulse()
+            self.set_mfmagresponse()
+            self.set_mtimpulse()
         else:
-           self.update_freq_curves()
-           self.update_phase_curves()
-           self.update_group_curves()
-           self.update_pdelay_curves()
-           self.update_step_curves()
-           self.update_imp_curves()
+            self.update_freq_curves()
+            self.update_phase_curves()
+            self.update_group_curves()
+            self.update_pdelay_curves()
+            self.update_step_curves()
+            self.update_imp_curves()
 
 
     def nfft_edit_changed(self, nfft):
@@ -1074,9 +1081,9 @@ class gr_plot_filter(QtGui.QMainWindow):
 #            self.update_group_curves()
 
     def get_fft(self, fs, taps, Npts):
-        Ts = 1.0/fs
+        Ts = 1.0 / fs
         fftpts = fftpack.fft(taps, Npts)
-        self.freq = scipy.arange(0, fs, 1.0/(Npts*Ts))
+        self.freq = scipy.arange(0, fs, 1.0 / (Npts*Ts))
         with warnings.catch_warnings(record=True) as w:
             warnings.simplefilter("always")
             self.fftdB = 20.0*scipy.log10(abs(fftpts))
@@ -1086,7 +1093,7 @@ class gr_plot_filter(QtGui.QMainWindow):
 
         self.fftDeg = scipy.unwrap(scipy.angle(fftpts))
         self.groupDelay = -scipy.diff(self.fftDeg)
-        self.phaseDelay = -self.fftDeg[1:]/self.freq[1:]
+        self.phaseDelay = -self.fftDeg[1:] / self.freq[1:]
 
     def update_time_curves(self):
         ntaps = len(self.taps)
@@ -1119,7 +1126,7 @@ class gr_plot_filter(QtGui.QMainWindow):
                 self.gui.mtimePlot.enableAxis(Qwt.QwtPlot.yRight,False)
                 self.gui.mtimePlot.setAxisScale(self.gui.mtimePlot.yLeft,
                                                 ymin, ymax)
-            # Set the zoomer base to unzoom to the new axis
+                # Set the zoomer base to unzoom to the new axis
             self.timeZoomer.setZoomBase()
             self.mtimeZoomer.setZoomBase()
 
@@ -1148,9 +1155,9 @@ class gr_plot_filter(QtGui.QMainWindow):
             # Reset the x-axis to the new time scale
 
             self.gui.stepresPlot.setAxisScale(self.gui.stepresPlot.xBottom,
-                                           0, ntaps)
+                                              0, ntaps)
             self.gui.stepresPlot.setAxisScale(self.gui.stepresPlot.yLeft,
-                                           symin, symax)
+                                              symin, symax)
             if self.mtoverlay:
                 self.gui.mtimePlot.setAxisScale(self.steprescurve.yAxis(),
                                                 symin, symax)
@@ -1191,9 +1198,9 @@ class gr_plot_filter(QtGui.QMainWindow):
             # Reset the x-axis to the new time scale
 
             self.gui.impresPlot.setAxisScale(self.gui.impresPlot.xBottom,
-                                           0, ntaps)
+                                             0, ntaps)
             self.gui.impresPlot.setAxisScale(self.gui.impresPlot.yLeft,
-                                           iymin, iymax)
+                                             iymin, iymax)
 
             if self.mtoverlay:
                 self.gui.mtimePlot.setAxisScale(self.imprescurve.yAxis(),
@@ -1228,16 +1235,16 @@ class gr_plot_filter(QtGui.QMainWindow):
                 ymax = self.fftdB.max()
                 if(ymax < 0):
                     ymax = 0.8 * self.fftdB.max()
-                ymin = 1.1 * self.fftdB.min()
+                    ymin = 1.1 * self.fftdB.min()
             else:
-                xmax = self.freq[npts/2]
-                ymax = 1.5 * max(self.fftdB[0:npts/2])
-                ymin = 1.1 * min(self.fftdB[0:npts/2])
-            xmin = self.freq[0]
-            self.gui.freqPlot.setAxisScale(self.gui.freqPlot.xBottom,
-                                           xmin, xmax)
-            self.gui.freqPlot.setAxisScale(self.gui.freqPlot.yLeft,
-                                           ymin, ymax)
+                xmax = self.freq[npts / 2]
+                ymax = 1.5 * max(self.fftdB[0:npts / 2])
+                ymin = 1.1 * min(self.fftdB[0:npts / 2])
+                xmin = self.freq[0]
+                self.gui.freqPlot.setAxisScale(self.gui.freqPlot.xBottom,
+                                               xmin, xmax)
+                self.gui.freqPlot.setAxisScale(self.gui.freqPlot.yLeft,
+                                               ymin, ymax)
 
             if self.mfoverlay:
                 self.gui.mfreqPlot.setAxisScale(self.gui.mfreqPlot.xBottom,
@@ -1253,11 +1260,11 @@ class gr_plot_filter(QtGui.QMainWindow):
                                                 xmin, xmax)
                 self.gui.mfreqPlot.setAxisScale(self.gui.mfreqPlot.yLeft,
                                                 ymin, ymax)
-            #Set Axis title
+                #Set Axis title
             self.gui.mfreqPlot.setAxisTitle(self.freqcurve.yAxis(),
-						                        fytitle)
+                                            fytitle)
             self.gui.mfreqPlot.setAxisTitle(self.freqcurve.xAxis(),
-						                        fxtitle)
+                                            fxtitle)
             # Set the zoomer base to unzoom to the new axis
             self.freqZoomer.setZoomBase()
             self.mfreqZoomer.setZoomBase()
@@ -1279,16 +1286,16 @@ class gr_plot_filter(QtGui.QMainWindow):
                 ymax = self.fftDeg.max()
                 if(ymax < 0):
                     ymax = 0.8 * self.fftDeg.max()
-                ymin = 1.1 * self.fftDeg.min()
+                    ymin = 1.1 * self.fftDeg.min()
             else:
-                ymax = 1.5 * max(self.fftDeg[0:npts/2])
-                ymin = 1.1 * min(self.fftDeg[0:npts/2])
-                xmax = self.freq[npts/2]
-            xmin = self.freq[0]
-            self.gui.phasePlot.setAxisScale(self.gui.phasePlot.xBottom,
-                                            xmin, xmax)
-            self.gui.phasePlot.setAxisScale(self.gui.phasePlot.yLeft,
-                                            ymin, ymax)
+                ymax = 1.5 * max(self.fftDeg[0:npts / 2])
+                ymin = 1.1 * min(self.fftDeg[0:npts / 2])
+                xmax = self.freq[npts / 2]
+                xmin = self.freq[0]
+                self.gui.phasePlot.setAxisScale(self.gui.phasePlot.xBottom,
+                                                xmin, xmax)
+                self.gui.phasePlot.setAxisScale(self.gui.phasePlot.yLeft,
+                                                ymin, ymax)
 
             if self.mfoverlay:
                 self.gui.mfreqPlot.setAxisScale(self.gui.mfreqPlot.xBottom,
@@ -1307,7 +1314,7 @@ class gr_plot_filter(QtGui.QMainWindow):
 
             #Set Axis title
             self.gui.mfreqPlot.setAxisTitle(self.phasecurve.yAxis(),
-						                        pytitle)
+                                            pytitle)
 
             # Set the zoomer base to unzoom to the new axis
             self.phaseZoomer.setZoomBase()
@@ -1330,16 +1337,16 @@ class gr_plot_filter(QtGui.QMainWindow):
                 ymax = self.groupDelay.max()
                 if(ymax < 0):
                     ymax = 0.8 * self.groupDelay.max()
-                ymin = 1.1 * self.groupDelay.min()
+                    ymin = 1.1 * self.groupDelay.min()
             else:
-                ymax = 1.5 * max(self.groupDelay[0:npts/2])
-                ymin = 1.1 * min(self.groupDelay[0:npts/2])
-                xmax = self.freq[npts/2]
-            xmin = self.freq[0]
-            self.gui.groupPlot.setAxisScale(self.gui.groupPlot.xBottom,
-                                            xmin, xmax)
-            self.gui.groupPlot.setAxisScale(self.gui.groupPlot.yLeft,
-                                            ymin, ymax)
+                ymax = 1.5 * max(self.groupDelay[0:npts / 2])
+                ymin = 1.1 * min(self.groupDelay[0:npts / 2])
+                xmax = self.freq[npts / 2]
+                xmin = self.freq[0]
+                self.gui.groupPlot.setAxisScale(self.gui.groupPlot.xBottom,
+                                                xmin, xmax)
+                self.gui.groupPlot.setAxisScale(self.gui.groupPlot.yLeft,
+                                                ymin, ymax)
 
             if self.mfoverlay:
                 self.gui.mfreqPlot.setAxisScale(self.gui.mfreqPlot.xBottom,
@@ -1358,7 +1365,7 @@ class gr_plot_filter(QtGui.QMainWindow):
 
             #Set Axis title
             self.gui.mfreqPlot.setAxisTitle(self.groupcurve.yAxis(),
-						                        gytitle)
+                                            gytitle)
             # Set the zoomer base to unzoom to the new axis
             self.groupZoomer.setZoomBase()
             self.mfreqZoomer.setZoomBase()
@@ -1379,16 +1386,16 @@ class gr_plot_filter(QtGui.QMainWindow):
                 ymax = self.phaseDelay.max()
                 if(ymax < 0):
                     ymax = 0.8 * self.phaseDelay.max()
-                ymin = 1.1 * self.phaseDelay.min()
+                    ymin = 1.1 * self.phaseDelay.min()
             else:
                 ymax = 1.3 * max(self.phaseDelay[0:npts])
                 ymin = 0.8 * min(self.phaseDelay[0:npts])
-                xmax = self.freq[npts/2]
-            xmin = self.freq[0]
-            self.gui.pdelayPlot.setAxisScale(self.gui.pdelayPlot.xBottom,
-                                            xmin, xmax)
-            self.gui.pdelayPlot.setAxisScale(self.gui.pdelayPlot.yLeft,
-                                            ymin, ymax)
+                xmax = self.freq[npts / 2]
+                xmin = self.freq[0]
+                self.gui.pdelayPlot.setAxisScale(self.gui.pdelayPlot.xBottom,
+                                                 xmin, xmax)
+                self.gui.pdelayPlot.setAxisScale(self.gui.pdelayPlot.yLeft,
+                                                 ymin, ymax)
 
             if self.mfoverlay:
                 self.gui.mfreqPlot.setAxisScale(self.gui.mfreqPlot.xBottom,
@@ -1404,9 +1411,9 @@ class gr_plot_filter(QtGui.QMainWindow):
                                                 xmin, xmax)
                 self.gui.mfreqPlot.setAxisScale(self.gui.mfreqPlot.yLeft,
                                                 ymin, ymax)
-            #Set Axis title
+                #Set Axis title
             self.gui.mfreqPlot.setAxisTitle(self.pdelaycurve.yAxis(),
-						                        phytitle)
+                                            phytitle)
 
             # Set the zoomer base to unzoom to the new axis
             self.pdelayZoomer.setZoomBase()
@@ -1448,8 +1455,8 @@ class gr_plot_filter(QtGui.QMainWindow):
             #Detach and delete all plots if unchecked
             for c in self.bufferplots:
                 c.detach()
-            self.replot_all()
-            self.bufferplots = []
+                self.replot_all()
+                self.bufferplots = []
         else:
             self.bufferplots = []
             #Iterate through tabgroup children and copy curves
@@ -1472,7 +1479,7 @@ class gr_plot_filter(QtGui.QMainWindow):
                                 dup.setSymbol(dsym)
                                 dup.setRenderHint(Qwt.QwtPlotItem.RenderAntialiased)
                                 dup.setData([c.x(i) for i in range(c.dataSize())],
-										    [c.y(i) for i in range(c.dataSize())])
+                                            [c.y(i) for i in range(c.dataSize())])
                                 self.bufferplots.append(dup)
                                 self.bufferplots[-1].attach(item)
 
@@ -1565,7 +1572,7 @@ class gr_plot_filter(QtGui.QMainWindow):
             self.icurve.attach(self.gui.mtimePlot)
             self.update_freq_curves()
             self.update_time_curves()
-        self.set_drawideal()
+            self.set_drawideal()
 
     def set_plotselect(self):
         if (self.gui.actionPlot_select.isChecked() == 0 ):
@@ -1605,8 +1612,8 @@ class gr_plot_filter(QtGui.QMainWindow):
                 self.detach_allgrid()
                 self.freqcurve.attach(self.gui.mfreqPlot)
                 self.detach_firstattached(self.gui.mfreqPlot)
-            self.update_freq_curves()
-            self.idbanditems.detach_allidealcurves(self.gui.mfreqPlot)
+                self.update_freq_curves()
+                self.idbanditems.detach_allidealcurves(self.gui.mfreqPlot)
         else:
             self.gui.mfreqPlot.detachItems(Qwt.QwtPlotItem.Rtti_PlotItem, False)
             self.set_actgrid()
@@ -1623,7 +1630,7 @@ class gr_plot_filter(QtGui.QMainWindow):
                 self.phasecurve.attach(self.gui.mfreqPlot)
                 self.detach_firstattached(self.gui.mfreqPlot)
                 self.update_phase_curves()
-            self.idbanditems.detach_allidealcurves(self.gui.mfreqPlot)
+                self.idbanditems.detach_allidealcurves(self.gui.mfreqPlot)
         else:
             self.gui.mfreqPlot.detachItems(Qwt.QwtPlotItem.Rtti_PlotItem, False)
             self.set_actgrid()
@@ -1639,7 +1646,7 @@ class gr_plot_filter(QtGui.QMainWindow):
                 self.groupcurve.attach(self.gui.mfreqPlot)
                 self.detach_firstattached(self.gui.mfreqPlot)
                 self.update_group_curves()
-            self.idbanditems.detach_allidealcurves(self.gui.mfreqPlot)
+                self.idbanditems.detach_allidealcurves(self.gui.mfreqPlot)
         else:
             self.gui.mfreqPlot.detachItems(Qwt.QwtPlotItem.Rtti_PlotItem, False)
             self.set_actgrid()
@@ -1655,7 +1662,7 @@ class gr_plot_filter(QtGui.QMainWindow):
                 self.pdelaycurve.attach(self.gui.mfreqPlot)
                 self.detach_firstattached(self.gui.mfreqPlot)
                 self.update_pdelay_curves()
-            self.idbanditems.detach_allidealcurves(self.gui.mfreqPlot)
+                self.idbanditems.detach_allidealcurves(self.gui.mfreqPlot)
         else:
             self.gui.mfreqPlot.detachItems(Qwt.QwtPlotItem.Rtti_PlotItem, False)
             self.set_actgrid()
@@ -1688,7 +1695,7 @@ class gr_plot_filter(QtGui.QMainWindow):
             items[1].setYAxis(Qwt.QwtPlot.yRight)
             if plot is self.gui.mfreqPlot:
                 items[1].setPen(QtGui.QPen(QtCore.Qt.red, 1, QtCore.Qt.SolidLine))
-        self.set_actgrid()
+                self.set_actgrid()
 
 
     def update_fft(self, taps, params):
@@ -1894,7 +1901,7 @@ class gr_plot_filter(QtGui.QMainWindow):
                 self.scene.addItem(item)
 
     def remove_bandview(self):
-        for item in self.scene.items():
+        for item in list(self.scene.items()):
             self.scene.removeItem(item)
 
     def set_fatten(self,atten):
@@ -1918,9 +1925,10 @@ class gr_plot_filter(QtGui.QMainWindow):
         if ftype == "Complex Band Pass":
             boxatten,r = self.gui.bpfStopBandAttenEdit.text().toDouble()
             self.gui.bpfStopBandAttenEdit.setText(Qt.QString(str(atten+boxatten)))
-#self.design()
+            #self.design()
 
-    def set_curvetaps(self,(zr,pl)):
+    def set_curvetaps(self, zeros_poles):
+        zr, pl = zeros_poles
         if self.iir:
             self.z=zr
             self.p=pl
@@ -1934,7 +1942,7 @@ class gr_plot_filter(QtGui.QMainWindow):
                 self.callback(retobj)
         else:
             hz = poly1d(zr,r=1)
-            #print hz.c
+            #print(hz.c)
             self.taps=hz.c*self.taps[0]
             self.draw_plots(self.taps,self.params)
             self.update_fcoeff()
@@ -1949,7 +1957,8 @@ class gr_plot_filter(QtGui.QMainWindow):
                 retobj.update_all("fir", self.params, self.taps, 1)
                 self.callback(retobj)
 
-    def set_mcurvetaps(self,(zr,pl)):
+    def set_mcurvetaps(self, zeros_poles):
+        zr, pl = zeros_poles
         if self.iir:
             self.z=zr
             self.p=pl
@@ -1963,7 +1972,7 @@ class gr_plot_filter(QtGui.QMainWindow):
                 self.callback(retobj)
         else:
             hz = poly1d(zr,r=1)
-            #print hz.c
+            #print(hz.c)
             self.taps=hz.c*self.taps[0]
             if self.gridview:
                 self.update_fft(self.taps, self.params)
@@ -1971,8 +1980,8 @@ class gr_plot_filter(QtGui.QMainWindow):
                 self.set_mttaps()
             else:
                 self.draw_plots(self.taps,self.params)
-            self.update_fcoeff()
-            #update the pzplot in other view
+                self.update_fcoeff()
+                #update the pzplot in other view
             zeros=self.get_zeros()
             poles=self.get_poles()
             self.gui.pzPlot.insertZeros(zeros)
@@ -1983,17 +1992,19 @@ class gr_plot_filter(QtGui.QMainWindow):
                 retobj.update_all("fir", self.params, self.taps, 1)
                 self.callback(retobj)
 
-    def set_statusbar(self,(x,y)):
+    def set_statusbar(self, point):
+        x, y = point
         if x == None:
-        	self.gui.pzstatusBar.showMessage("")
+            self.gui.pzstatusBar.showMessage("")
         else:
-        	self.gui.pzstatusBar.showMessage("X: "+str(x)+"  Y: "+str(y))
+            self.gui.pzstatusBar.showMessage("X: "+str(x)+"  Y: "+str(y))
 
-    def set_mstatusbar(self,(x,y)):
+    def set_mstatusbar(self, point):
+        x, y = point
         if x == None:
-        	self.gui.mpzstatusBar.showMessage("")
+            self.gui.mpzstatusBar.showMessage("")
         else:
-        	self.gui.mpzstatusBar.showMessage("X: "+str(x)+"  Y: "+str(y))
+            self.gui.mpzstatusBar.showMessage("X: "+str(x)+"  Y: "+str(y))
 
     def get_zeros(self):
         hz = poly1d(self.taps,r=0)
@@ -2053,7 +2064,7 @@ class gr_plot_filter(QtGui.QMainWindow):
         else:
             csvhandle.writerow(["restype","fir"])
 
-        for k in self.params.keys():
+        for k in list(self.params.keys()):
             csvhandle.writerow([k, self.params[k]])
         if self.iir:
             csvhandle.writerow(["b",] + self.b.tolist())
@@ -2103,7 +2114,9 @@ class gr_plot_filter(QtGui.QMainWindow):
                         params[row[0]] = float(row[1])
                     except ValueError:
                         params[row[0]] = row[1]
+
         handle.close()
+
         if restype == "fir":
             self.iir = False
             self.gui.fselectComboBox.setCurrentIndex(0)
@@ -2195,7 +2208,7 @@ class gr_plot_filter(QtGui.QMainWindow):
             self.params = params
 
             #Set GUI for IIR type
-            iirft = 	{  "ellip"  : 0,
+            iirft =     {  "ellip"  : 0,
                            "butter" : 1,
                            "cheby1" : 2,
                            "cheby2" : 3,
@@ -2204,40 +2217,40 @@ class gr_plot_filter(QtGui.QMainWindow):
             paramtype = { "analog"  : 1,
                           "digital" : 0 }
             bandpos = {
-                         "lpf" : 0,
-                         "bpf" : 1,
-                         "bnf" : 2,
-                         "hpf" : 3}
+                "lpf" : 0,
+                "bpf" : 1,
+                "bnf" : 2,
+                "hpf" : 3}
 
             iirboxes = {"lpf" : [self.gui.iirendofLpfPassBandEdit,
-                                      self.gui.iirstartofLpfStopBandEdit,
-                                      self.gui.iirLpfPassBandAttenEdit,
-                                      self.gui.iirLpfStopBandRippleEdit],
+                                 self.gui.iirstartofLpfStopBandEdit,
+                                 self.gui.iirLpfPassBandAttenEdit,
+                                 self.gui.iirLpfStopBandRippleEdit],
 
                         "hpf" : [self.gui.iirstartofHpfPassBandEdit,
-                                       self.gui.iirendofHpfStopBandEdit,
-                                       self.gui.iirHpfPassBandAttenEdit,
-                                       self.gui.iirHpfStopBandRippleEdit],
+                                 self.gui.iirendofHpfStopBandEdit,
+                                 self.gui.iirHpfPassBandAttenEdit,
+                                 self.gui.iirHpfStopBandRippleEdit],
 
                         "bpf" : [self.gui.iirstartofBpfPassBandEdit,
-                                       self.gui.iirendofBpfPassBandEdit,
-                                       self.gui.iirendofBpfStopBandEdit1,
-                                       self.gui.iirstartofBpfStopBandEdit2,
-                                       self.gui.iirBpfPassBandAttenEdit,
-                                       self.gui.iirBpfStopBandRippleEdit],
+                                 self.gui.iirendofBpfPassBandEdit,
+                                 self.gui.iirendofBpfStopBandEdit1,
+                                 self.gui.iirstartofBpfStopBandEdit2,
+                                 self.gui.iirBpfPassBandAttenEdit,
+                                 self.gui.iirBpfStopBandRippleEdit],
 
                         "bnf" : [self.gui.iirendofBsfPassBandEdit1,
-                                       self.gui.iirstartofBsfPassBandEdit2,
-                                       self.gui.iirstartofBsfStopBandEdit,
-                                       self.gui.iirendofBsfStopBandEdit,
-                                       self.gui.iirBsfPassBandAttenEdit,
-                                       self.gui.iirBsfStopBandRippleEdit] }
+                                 self.gui.iirstartofBsfPassBandEdit2,
+                                 self.gui.iirstartofBsfStopBandEdit,
+                                 self.gui.iirendofBsfStopBandEdit,
+                                 self.gui.iirBsfPassBandAttenEdit,
+                                 self.gui.iirBsfStopBandRippleEdit] }
 
             self.gui.fselectComboBox.setCurrentIndex(1)
             self.gui.iirfilterTypeComboBox.setCurrentIndex(iirft[params["filttype"]])
             self.gui.iirfilterBandComboBox.setCurrentIndex(bandpos[params["bandtype"]])
             if params["filttype"] == "bessel":
-                critfreq = map(float, params["critfreq"][1:-1].split(','))
+                critfreq = list(map(float, params["critfreq"][1:-1].split(',')))
                 self.gui.besselordEdit.setText(Qt.QString("%1").arg(params["filtord"]))
                 self.gui.iirbesselcritEdit1.setText(Qt.QString("%1").arg(critfreq[0]))
                 self.gui.iirbesselcritEdit2.setText(Qt.QString("%1").arg(critfreq[1]))
@@ -2246,8 +2259,8 @@ class gr_plot_filter(QtGui.QMainWindow):
                 if len(iirboxes[params["bandtype"]]) == 4:
                     sdata = [params["pbedge"], params["sbedge"], params["gpass"], params["gstop"]]
                 else:
-                    pbedge = map(float, params["pbedge"][1:-1].split(','))
-                    sbedge = map(float, params["sbedge"][1:-1].split(','))
+                    pbedge = list(map(float, params["pbedge"][1:-1].split(',')))
+                    sbedge = list(map(float, params["sbedge"][1:-1].split(',')))
                     sdata = [pbedge[0], pbedge[1], sbedge[0],
                              sbedge[1], params["gpass"], params["gstop"]]
 
@@ -2260,13 +2273,13 @@ class gr_plot_filter(QtGui.QMainWindow):
         self.taps = scipy.array(taps)
         if self.params:
             self.get_fft(self.params["fs"], self.taps, self.nfftpts)
-        self.update_time_curves()
-        self.update_freq_curves()
-        self.update_phase_curves()
-        self.update_group_curves()
-        self.update_pdelay_curves()
-        self.update_step_curves()
-        self.update_imp_curves()
+            self.update_time_curves()
+            self.update_freq_curves()
+            self.update_phase_curves()
+            self.update_group_curves()
+            self.update_pdelay_curves()
+            self.update_step_curves()
+            self.update_imp_curves()
 
         self.gui.nTapsEdit.setText(Qt.QString("%1").arg(self.taps.size))
 
@@ -2309,4 +2322,3 @@ def main(args):
 
 if __name__ == '__main__':
     main(sys.argv)
-
diff --git a/gr-filter/python/filter/design/fir_design.py b/gr-filter/python/filter/design/fir_design.py
index e27b065781..254595525f 100644
--- a/gr-filter/python/filter/design/fir_design.py
+++ b/gr-filter/python/filter/design/fir_design.py
@@ -1,3 +1,5 @@
+from __future__ import division
+from __future__ import unicode_literals
 # Copyright 2012 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
@@ -38,7 +40,7 @@ def design_win_lpf(fs, gain, wintype, mainwin):
         try:
             taps = filter.firdes.low_pass_2(gain, fs, pb, tb,
                                             atten, wintype)
-        except RuntimeError, e:
+        except RuntimeError as e:
             reply = QtGui.QMessageBox.information(mainwin, "Runtime Error",
                                                   e.args[0], "&Ok")
             return ([], [], ret)
@@ -65,7 +67,7 @@ def design_win_bpf(fs, gain, wintype, mainwin):
         try:
             taps = filter.firdes.band_pass_2(gain, fs, pb1, pb2, tb,
                                              atten, wintype)
-        except RuntimeError, e:
+        except RuntimeError as e:
             reply = QtGui.QMessageBox.information(mainwin, "Runtime Error",
                                                   e.args[0], "&Ok")
             return ([], [], ret)
@@ -92,7 +94,7 @@ def design_win_cbpf(fs, gain, wintype, mainwin):
         try:
             taps = filter.firdes.complex_band_pass_2(gain, fs, pb1, pb2, tb,
                                                      atten, wintype)
-        except RuntimeError, e:
+        except RuntimeError as e:
             reply = QtGui.QMessageBox.information(mainwin, "Runtime Error",
                                                   e.args[0], "&Ok")
             return ([], [], ret)
@@ -119,7 +121,7 @@ def design_win_bnf(fs, gain, wintype, mainwin):
         try:
             taps = filter.firdes.band_reject_2(gain, fs, pb1, pb2, tb,
                                                atten, wintype)
-        except RuntimeError, e:
+        except RuntimeError as e:
             reply = QtGui.QMessageBox.information(mainwin, "Runtime Error",
                                                   e.args[0], "&Ok")
             return ([], [], ret)
@@ -145,7 +147,7 @@ def design_win_hpf(fs, gain, wintype, mainwin):
         try:
             taps = filter.firdes.high_pass_2(gain, fs, pb, tb,
                                              atten, wintype)
-        except RuntimeError, e:
+        except RuntimeError as e:
             reply = QtGui.QMessageBox.information(mainwin, "Runtime Error",
                                                   e.args[0], "&Ok")
         else:
@@ -195,7 +197,7 @@ def design_win_rrc(fs, gain, wintype, mainwin):
         try:
             taps = filter.firdes.root_raised_cosine(gain, fs, sr,
                                                     alpha, ntaps)
-        except RuntimeError, e:
+        except RuntimeError as e:
             reply = QtGui.QMessageBox.information(mainwin, "Runtime Error",
                                                   e.args[0], "&Ok")
         else:
@@ -220,7 +222,7 @@ def design_win_gaus(fs, gain, wintype, mainwin):
         try:
             taps = filter.firdes.gaussian(gain, spb, bt, ntaps)
 
-        except RuntimeError, e:
+        except RuntimeError as e:
             reply = QtGui.QMessageBox.information(mainwin, "Runtime Error",
                                                   e.args[0], "&Ok")
         else:
@@ -247,7 +249,7 @@ def design_opt_lpf(fs, gain, mainwin):
         try:
             taps = filter.optfir.low_pass(gain, fs, pb, sb,
                                           ripple, atten)
-        except RuntimeError, e:
+        except RuntimeError as e:
             reply = QtGui.QMessageBox.information(mainwin, "Filter did not converge",
                                                   e.args[0], "&Ok")
             return ([],[],False)
@@ -278,7 +280,7 @@ def design_opt_bpf(fs, gain, mainwin):
         try:
             taps = filter.optfir.band_pass(gain, fs, sb1, pb1, pb2, sb2,
                                            ripple, atten)
-        except RuntimeError, e:
+        except RuntimeError as e:
             reply = QtGui.QMessageBox.information(mainwin, "Filter did not converge",
                                                   e.args[0], "&Ok")
             return ([],[],False)
@@ -311,7 +313,7 @@ def design_opt_cbpf(fs, gain, mainwin):
         try:
             taps = filter.optfir.complex_band_pass(gain, fs, sb1, pb1, pb2, sb2,
                                                    ripple, atten)
-        except RuntimeError, e:
+        except RuntimeError as e:
             reply = QtGui.QMessageBox.information(mainwin, "Filter did not converge",
                                                   e.args[0], "&Ok")
             return ([],[],False)
@@ -343,7 +345,7 @@ def design_opt_bnf(fs, gain, mainwin):
         try:
             taps = filter.optfir.band_reject(gain, fs, pb1, sb1, sb2, pb2,
                                              ripple, atten)
-        except RuntimeError, e:
+        except RuntimeError as e:
             reply = QtGui.QMessageBox.information(mainwin, "Filter did not converge",
                                                   e.args[0], "&Ok")
             return ([],[],False)
@@ -369,10 +371,10 @@ def design_opt_hb(fs, gain, mainwin):
 
     if(ret):
         try:
-            bands = [0,.25 - (trwidth/fs), .25 + (trwidth/fs), 0.5]
+            bands = [0,.25 - (trwidth / fs), .25 + (trwidth / fs), 0.5]
             taps = scipy.signal.remez(int(filtord)+1, bands, [1,0], [1,1])
             taps[abs(taps) <= 1e-6] = 0.
-        except RuntimeError, e:
+        except RuntimeError as e:
             reply = QtGui.QMessageBox.information(mainwin, "Filter Design Error",
                                                   e.args[0], "&Ok")
             return ([],[],False)
@@ -398,7 +400,7 @@ def design_opt_hpf(fs, gain, mainwin):
         try:
             taps = filter.optfir.high_pass(gain, fs, sb, pb,
                                            atten, ripple)
-        except RuntimeError, e:
+        except RuntimeError as e:
             reply = QtGui.QMessageBox.information(mainwin, "Filter did not converge",
                                                   e.args[0], "&Ok")
             return ([],[],False)
diff --git a/gr-filter/python/filter/filterbank.py b/gr-filter/python/filter/filterbank.py
index 4e1456cfb1..9d8d49e719 100644
--- a/gr-filter/python/filter/filterbank.py
+++ b/gr-filter/python/filter/filterbank.py
@@ -19,11 +19,13 @@
 # Boston, MA 02110-1301, USA.
 #
 
-import sys
+from __future__ import print_function
+from __future__ import unicode_literals
+
 from gnuradio import gr
 from gnuradio import fft
 from gnuradio import blocks
-from filter_swig import fft_filter_ccc
+from .filter_swig import fft_filter_ccc
 
 def _generate_synthesis_taps(mpoints):
     return []   # FIXME
@@ -32,7 +34,7 @@ def _generate_synthesis_taps(mpoints):
 def _split_taps(taps, mpoints):
     assert (len(taps) % mpoints) == 0
     result = [list() for x in range(mpoints)]
-    for i in xrange(len(taps)):
+    for i in range(len(taps)):
         (result[i % mpoints]).append(taps[i])
     return [tuple(x) for x in result]
 
@@ -119,7 +121,7 @@ class synthesis_filterbank(gr.hier_block2):
             self.connect((self.v2ss, i), f)
             self.connect(f, (self.ss2s, i))
 
-	self.connect(self.ss2s, self)
+            self.connect(self.ss2s, self)
 
 class analysis_filterbank(gr.hier_block2):
     """
@@ -154,7 +156,7 @@ class analysis_filterbank(gr.hier_block2):
         # split in mpoints separate set of taps
         sub_taps = _split_taps(taps, mpoints)
 
-        # print >> sys.stderr, "mpoints =", mpoints, "len(sub_taps) =", len(sub_taps)
+        # print(>> sys.stderr, "mpoints =", mpoints, "len(sub_taps) =", len(sub_taps))
 
         self.s2ss = blocks.stream_to_streams(item_size, mpoints)
         # filters here
diff --git a/gr-filter/python/filter/freq_xlating_fft_filter.py b/gr-filter/python/filter/freq_xlating_fft_filter.py
index f6ebe0517b..097a4c449b 100644
--- a/gr-filter/python/filter/freq_xlating_fft_filter.py
+++ b/gr-filter/python/filter/freq_xlating_fft_filter.py
@@ -19,13 +19,15 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+from __future__ import unicode_literals
 import math
 import cmath
 
 from gnuradio import gr
 from gnuradio.blocks import rotator_cc
 
-from filter_swig import fft_filter_ccc
+from .filter_swig import fft_filter_ccc
 
 
 __all__ = [ 'freq_xlating_fft_filter_ccc' ]
diff --git a/gr-filter/python/filter/gui/bandgraphicsview.py b/gr-filter/python/filter/gui/bandgraphicsview.py
index 9e609fe2ac..3a9cab2de5 100644
--- a/gr-filter/python/filter/gui/bandgraphicsview.py
+++ b/gr-filter/python/filter/gui/bandgraphicsview.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
 # Copyright 2012 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
diff --git a/gr-filter/python/filter/gui/banditems.py b/gr-filter/python/filter/gui/banditems.py
index 5071fe7b03..fe87bccc47 100644
--- a/gr-filter/python/filter/gui/banditems.py
+++ b/gr-filter/python/filter/gui/banditems.py
@@ -18,11 +18,14 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import unicode_literals
+
 try:
     from PyQt4 import Qt, QtCore, QtGui
 except ImportError:
-    print "Please install PyQt4 to run this script (http://www.riverbankcomputing.co.uk/software/pyqt/download)"
-    raise SystemExit, 1
+    print("Please install PyQt4 to run this script (http://www.riverbankcomputing.co.uk/software/pyqt/download)")
+    raise SystemExit(1)
 
 #Movable solid line for filter ideal-band diagram
 #Enable split to cut the line into two (for bpf)
diff --git a/gr-filter/python/filter/gui/icons_rc.py b/gr-filter/python/filter/gui/icons_rc.py
index 0b20ecb612..e4a4558747 100644
--- a/gr-filter/python/filter/gui/icons_rc.py
+++ b/gr-filter/python/filter/gui/icons_rc.py
@@ -7,6 +7,7 @@
 #
 # WARNING! All changes made in this file will be lost!
 
+from __future__ import unicode_literals
 from PyQt4 import QtCore
 
 qt_resource_data = "\
diff --git a/gr-filter/python/filter/gui/idealbanditems.py b/gr-filter/python/filter/gui/idealbanditems.py
index ce556577eb..67d2223258 100644
--- a/gr-filter/python/filter/gui/idealbanditems.py
+++ b/gr-filter/python/filter/gui/idealbanditems.py
@@ -18,11 +18,15 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
+
 from PyQt4 import QtGui, QtCore, Qt
 import PyQt4.Qwt5 as Qwt
 import scipy
 
-class IdealBandItems():
+class IdealBandItems(object):
     def __init__(self):
         self.idealbandhcurves= [ Qwt.QwtPlotCurve() for i in range(4) ]
         self.idealbandvcurves= [ Qwt.QwtPlotCurve() for i in range(4) ]
@@ -47,27 +51,27 @@ class IdealBandItems():
 
                 x=[self.params["pbend"]]*2
                 y=[20.0*scipy.log10(self.params["gain"]),
-	               plot.axisScaleDiv(Qwt.QwtPlot.yLeft).lowerBound()]
+                   plot.axisScaleDiv(Qwt.QwtPlot.yLeft).lowerBound()]
                 self.idealbandvcurves[0].setData(x, y)
 
-                x=[self.params["sbstart"], self.params["fs"]/2.0]
+                x=[self.params["sbstart"], self.params["fs"] / 2.0]
                 y=[-self.params["atten"]]*2
                 self.idealbandhcurves[1].setData(x, y)
 
                 x=[self.params["sbstart"]]*2
                 y=[-self.params["atten"],
-	               plot.axisScaleDiv(Qwt.QwtPlot.yLeft).lowerBound()]
+                   plot.axisScaleDiv(Qwt.QwtPlot.yLeft).lowerBound()]
                 self.idealbandvcurves[1].setData(x, y)
 
             elif ftype == "High Pass":
                 self.detach_unwantedcurves(plot)
-                x=[self.params["pbstart"],self.params["fs"]/2.0]
+                x=[self.params["pbstart"],self.params["fs"] / 2.0]
                 y=[20.0*scipy.log10(self.params["gain"])]*2
                 self.idealbandhcurves[0].setData(x, y)
 
                 x=[self.params["pbstart"]]*2
                 y=[20.0*scipy.log10(self.params["gain"]),
-	               plot.axisScaleDiv(Qwt.QwtPlot.yLeft).lowerBound()]
+                   plot.axisScaleDiv(Qwt.QwtPlot.yLeft).lowerBound()]
                 self.idealbandvcurves[0].setData(x, y)
 
                 x=[0,self.params["sbend"]]
@@ -76,7 +80,7 @@ class IdealBandItems():
 
                 x=[self.params["sbend"]]*2
                 y=[-self.params["atten"],
-	               plot.axisScaleDiv(Qwt.QwtPlot.yLeft).lowerBound()]
+                   plot.axisScaleDiv(Qwt.QwtPlot.yLeft).lowerBound()]
                 self.idealbandvcurves[1].setData(x, y)
 
             elif ftype == "Band Notch":
@@ -86,12 +90,12 @@ class IdealBandItems():
 
                 x=[self.params["sbstart"]]*2
                 y=[-self.params["atten"],
-	               plot.axisScaleDiv(Qwt.QwtPlot.yLeft).lowerBound()]
+                   plot.axisScaleDiv(Qwt.QwtPlot.yLeft).lowerBound()]
                 self.idealbandvcurves[0].setData(x, y)
 
                 x=[self.params["sbend"]]*2
                 y=[-self.params["atten"],
-	               plot.axisScaleDiv(Qwt.QwtPlot.yLeft).lowerBound()]
+                   plot.axisScaleDiv(Qwt.QwtPlot.yLeft).lowerBound()]
                 self.idealbandvcurves[1].setData(x, y)
 
                 x=[0,self.params["sbstart"]-self.params["tb"]]
@@ -100,16 +104,16 @@ class IdealBandItems():
 
                 x=[self.params["sbstart"]-self.params["tb"]]*2
                 y=[20.0*scipy.log10(self.params["gain"]),
-	               plot.axisScaleDiv(Qwt.QwtPlot.yLeft).lowerBound()]
+                   plot.axisScaleDiv(Qwt.QwtPlot.yLeft).lowerBound()]
                 self.idealbandvcurves[2].setData(x, y)
 
-                x=[self.params["sbend"]+self.params["tb"],self.params["fs"]/2.0]
+                x=[self.params["sbend"]+self.params["tb"],self.params["fs"] / 2.0]
                 y=[20.0*scipy.log10(self.params["gain"])]*2
                 self.idealbandhcurves[2].setData(x, y)
 
                 x=[self.params["sbend"]+self.params["tb"]]*2
                 y=[20.0*scipy.log10(self.params["gain"]),
-	               plot.axisScaleDiv(Qwt.QwtPlot.yLeft).lowerBound()]
+                   plot.axisScaleDiv(Qwt.QwtPlot.yLeft).lowerBound()]
                 self.idealbandvcurves[3].setData(x, y)
 
             elif ftype == "Band Pass":
@@ -119,12 +123,12 @@ class IdealBandItems():
 
                 x=[self.params["pbstart"]]*2
                 y=[20.0*scipy.log10(self.params["gain"]),
-	        	   plot.axisScaleDiv(Qwt.QwtPlot.yLeft).lowerBound()]
+                   plot.axisScaleDiv(Qwt.QwtPlot.yLeft).lowerBound()]
                 self.idealbandvcurves[0].setData(x, y)
 
                 x=[self.params["pbend"]]*2
                 y=[20.0*scipy.log10(self.params["gain"]),
-	        	   plot.axisScaleDiv(Qwt.QwtPlot.yLeft).lowerBound()]
+                   plot.axisScaleDiv(Qwt.QwtPlot.yLeft).lowerBound()]
                 self.idealbandvcurves[1].setData(x, y)
 
                 x=[0,self.params["pbstart"]-self.params["tb"]]
@@ -133,16 +137,16 @@ class IdealBandItems():
 
                 x=[self.params["pbstart"]-self.params["tb"]]*2
                 y=[-self.params["atten"],
-	        	   plot.axisScaleDiv(Qwt.QwtPlot.yLeft).lowerBound()]
+                   plot.axisScaleDiv(Qwt.QwtPlot.yLeft).lowerBound()]
                 self.idealbandvcurves[2].setData(x, y)
 
-                x=[self.params["pbend"]+self.params["tb"],self.params["fs"]/2.0]
+                x=[self.params["pbend"]+self.params["tb"],self.params["fs"] / 2.0]
                 y=[-self.params["atten"]]*2
                 self.idealbandhcurves[2].setData(x, y)
 
                 x=[self.params["pbend"]+self.params["tb"]]*2
                 y=[-self.params["atten"],
-	        	   plot.axisScaleDiv(Qwt.QwtPlot.yLeft).lowerBound()]
+                   plot.axisScaleDiv(Qwt.QwtPlot.yLeft).lowerBound()]
                 self.idealbandvcurves[3].setData(x, y)
 
             elif ftype == "Complex Band Pass":
@@ -152,12 +156,12 @@ class IdealBandItems():
 
                 x=[self.params["pbstart"]]*2
                 y=[20.0*scipy.log10(self.params["gain"]),
-	        	   plot.axisScaleDiv(Qwt.QwtPlot.yLeft).lowerBound()]
+                   plot.axisScaleDiv(Qwt.QwtPlot.yLeft).lowerBound()]
                 self.idealbandvcurves[0].setData(x, y)
 
                 x=[self.params["pbend"]]*2
                 y=[20.0*scipy.log10(self.params["gain"]),
-	        	   plot.axisScaleDiv(Qwt.QwtPlot.yLeft).lowerBound()]
+                   plot.axisScaleDiv(Qwt.QwtPlot.yLeft).lowerBound()]
                 self.idealbandvcurves[1].setData(x, y)
 
                 x=[0,self.params["pbstart"]-self.params["tb"]]
@@ -166,35 +170,38 @@ class IdealBandItems():
 
                 x=[self.params["pbstart"]-self.params["tb"]]*2
                 y=[-self.params["atten"],
-	        	   plot.axisScaleDiv(Qwt.QwtPlot.yLeft).lowerBound()]
+                   plot.axisScaleDiv(Qwt.QwtPlot.yLeft).lowerBound()]
                 self.idealbandvcurves[2].setData(x, y)
 
-                x=[self.params["pbend"]+self.params["tb"],self.params["fs"]/2.0]
+                x=[self.params["pbend"]+self.params["tb"],self.params["fs"] / 2.0]
                 y=[-self.params["atten"]]*2
                 self.idealbandhcurves[2].setData(x, y)
 
                 x=[self.params["pbend"]+self.params["tb"]]*2
                 y=[-self.params["atten"],
-	        	   plot.axisScaleDiv(Qwt.QwtPlot.yLeft).lowerBound()]
+                   plot.axisScaleDiv(Qwt.QwtPlot.yLeft).lowerBound()]
                 self.idealbandvcurves[3].setData(x, y)
             else:
                 self.detach_allidealcurves(plot)
 
         except KeyError:
-            print "All parameters not set for ideal band diagram"
+            print("All parameters not set for ideal band diagram")
             self.detach_allidealcurves(plot)
 
     def detach_allidealcurves(self, plot):
         for c in self.idealbandhcurves:
             c.detach()
+
         for c in self.idealbandvcurves:
             c.detach()
+
         plot.replot()
 
     def detach_unwantedcurves(self, plot):
         for i in range(2,4):
             self.idealbandvcurves[i].detach()
             self.idealbandhcurves[i].detach()
+
         plot.replot()
 
     def attach_allidealcurves(self, plot):
diff --git a/gr-filter/python/filter/gui/polezero_plot.py b/gr-filter/python/filter/gui/polezero_plot.py
index 8f35dc8d78..e738e0e850 100644
--- a/gr-filter/python/filter/gui/polezero_plot.py
+++ b/gr-filter/python/filter/gui/polezero_plot.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
 # Copyright 2012 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
diff --git a/gr-filter/python/filter/gui/pyqt_filter_stacked.py b/gr-filter/python/filter/gui/pyqt_filter_stacked.py
index 98836180e7..813e5ef2c3 100644
--- a/gr-filter/python/filter/gui/pyqt_filter_stacked.py
+++ b/gr-filter/python/filter/gui/pyqt_filter_stacked.py
@@ -7,6 +7,7 @@
 #
 # WARNING! All changes made in this file will be lost!
 
+from __future__ import unicode_literals
 from PyQt4 import QtCore, QtGui
 
 try:
diff --git a/gr-filter/python/filter/optfir.py b/gr-filter/python/filter/optfir.py
index 8ef2a06732..6920bf02e0 100644
--- a/gr-filter/python/filter/optfir.py
+++ b/gr-filter/python/filter/optfir.py
@@ -27,8 +27,13 @@ For a great intro to how all this stuff works, see section 6.6 of
 and Barrie W. Jervis, Adison-Wesley, 1993.  ISBN 0-201-54413-X.
 '''
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
+
+
 import math, cmath
-import filter_swig as filter
+from . import filter_swig as filter
 
 # ----------------------------------------------------------------
 
@@ -102,11 +107,11 @@ def complex_band_pass (gain, Fs, freq_sb1, freq_pb1, freq_pb2, freq_sb2,
         nextra_taps: Extra taps to use in the filter (default=2)
     """
     center_freq = (freq_pb2 + freq_pb1) / 2.0
-    lp_pb = (freq_pb2 - center_freq)/1.0
+    lp_pb = (freq_pb2 - center_freq) / 1.0
     lp_sb = freq_sb2 - center_freq
     lptaps = low_pass(gain, Fs, lp_pb, lp_sb, passband_ripple_db,
                       stopband_atten_db, nextra_taps)
-    spinner = [cmath.exp(2j*cmath.pi*center_freq/Fs*i) for i in xrange(len(lptaps))]
+    spinner = [cmath.exp(2j*cmath.pi*center_freq/Fs*i) for i in range(len(lptaps))]
     taps = [s*t for s,t in zip(spinner, lptaps)]
     return taps
 
@@ -176,11 +181,11 @@ def high_pass (gain, Fs, freq1, freq2, passband_ripple_db, stopband_atten_db,
 
 def stopband_atten_to_dev (atten_db):
     """Convert a stopband attenuation in dB to an absolute value"""
-    return 10**(-atten_db/20)
+    return 10**(-atten_db / 20)
 
 def passband_ripple_to_dev (ripple_db):
     """Convert passband ripple spec expressed in dB to an absolute value"""
-    return (10**(ripple_db/20)-1)/(10**(ripple_db/20)+1)
+    return (10**(old_div(ripple_db / 20)-1),(10**(ripple_db / 20)+1))
 
 # ----------------------------------------------------------------
 
@@ -237,10 +242,10 @@ def remezord (fcuts, mags, devs, fsamp = 2):
     nbands = nm
 
     if nm != nd:
-        raise ValueError, "Length of mags and devs must be equal"
+        raise ValueError("Length of mags and devs must be equal")
 
     if nf != 2 * (nbands - 1):
-        raise ValueError, "Length of f must be 2 * len (mags) - 2"
+        raise ValueError("Length of f must be 2 * len (mags) - 2")
 
     for i in range (len (mags)):
         if mags[i] != 0:                        # if not stopband, get relative deviation
@@ -355,4 +360,3 @@ def bporder (freq1, freq2, delta_p, delta_s):
     ginf = -14.6 * math.log10 (delta_p / delta_s) - 16.9
     n = cinf / df + ginf * df + 1
     return n
-
diff --git a/gr-filter/python/filter/pfb.py b/gr-filter/python/filter/pfb.py
index 9f23d1061b..ea28dea45a 100644
--- a/gr-filter/python/filter/pfb.py
+++ b/gr-filter/python/filter/pfb.py
@@ -20,15 +20,17 @@
 # Boston, MA 02110-1301, USA.
 #
 
-import optfir, math
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
 
-from gnuradio import gr, fft
-import filter_swig as filter
+import math
+
+from gnuradio import gr, fft, blocks
+
+from . import optfir
+from . import filter_swig as filter
 
-try:
-    from gnuradio import blocks
-except ImportError:
-    import blocks_swig as blocks
 
 class channelizer_ccf(gr.hier_block2):
     '''
@@ -71,7 +73,7 @@ class channelizer_ccf(gr.hier_block2):
                                               self._oversample_rate)
         self.connect(self, self.s2ss)
 
-        for i in xrange(self._nchans):
+        for i in range(self._nchans):
             self.connect((self.s2ss,i), (self.pfb,i))
             self.connect((self.pfb,i), (self,i))
 
@@ -147,9 +149,9 @@ class decimator_ccf(gr.hier_block2):
     '''
     def __init__(self, decim, taps=None, channel=0, atten=100,
                  use_fft_rotators=True, use_fft_filters=True):
-	gr.hier_block2.__init__(self, "pfb_decimator_ccf",
-				gr.io_signature(1, 1, gr.sizeof_gr_complex),
-				gr.io_signature(1, 1, gr.sizeof_gr_complex))
+        gr.hier_block2.__init__(self, "pfb_decimator_ccf",
+                                gr.io_signature(1, 1, gr.sizeof_gr_complex),
+                                gr.io_signature(1, 1, gr.sizeof_gr_complex))
 
         self._decim = decim
         self._channel = channel
@@ -181,7 +183,7 @@ class decimator_ccf(gr.hier_block2):
 
         self.connect(self, self.s2ss)
 
-        for i in xrange(self._decim):
+        for i in range(self._decim):
             self.connect((self.s2ss,i), (self.pfb,i))
 
         self.connect(self.pfb, self)
@@ -227,7 +229,7 @@ class arb_resampler_ccf(gr.hier_block2):
             if(self._rate < 1):
                 halfband = 0.5*self._rate
                 bw = percent*halfband
-                tb = (percent/2.0)*halfband
+                tb = (percent / 2.0)*halfband
                 ripple = 0.1
 
                 # As we drop the bw factor, the optfir filter has a harder time converging;
@@ -237,7 +239,7 @@ class arb_resampler_ccf(gr.hier_block2):
             else:
                 halfband = 0.5
                 bw = percent*halfband
-                tb = (percent/2.0)*halfband
+                tb = (percent / 2.0)*halfband
                 ripple = 0.1
 
                 made = False
@@ -255,7 +257,7 @@ class arb_resampler_ccf(gr.hier_block2):
                             raise RuntimeError("optfir could not generate an appropriate filter.")
 
         self.pfb = filter.pfb_arb_resampler_ccf(self._rate, self._taps, self._size)
-        #print "PFB has %d taps\n" % (len(self._taps),)
+        #print("PFB has %d taps\n" % (len(self._taps),))
 
         self.connect(self, self.pfb)
         self.connect(self.pfb, self)
@@ -301,7 +303,7 @@ class arb_resampler_fff(gr.hier_block2):
             if(self._rate < 1):
                 halfband = 0.5*self._rate
                 bw = percent*halfband
-                tb = (percent/2.0)*halfband
+                tb = (percent / 2.0)*halfband
                 ripple = 0.1
 
                 # As we drop the bw factor, the optfir filter has a harder time converging;
@@ -311,7 +313,7 @@ class arb_resampler_fff(gr.hier_block2):
             else:
                 halfband = 0.5
                 bw = percent*halfband
-                tb = (percent/2.0)*halfband
+                tb = (percent / 2.0)*halfband
                 ripple = 0.1
 
                 made = False
@@ -420,7 +422,7 @@ class channelizer_hier_ccf(gr.hier_block2):
         if n_filterbanks > n_chans:
             n_filterbanks = n_chans
         if outchans is None:
-            outchans = range(n_chans)
+            outchans = list(range(n_chans))
         gr.hier_block2.__init__(
             self, "pfb_channelizer_hier_ccf",
             gr.io_signature(1, 1, gr.sizeof_gr_complex),
@@ -436,7 +438,7 @@ class channelizer_hier_ccf(gr.hier_block2):
         self.s2v = blocks.stream_to_vector(gr.sizeof_gr_complex, n_chans)
         # Create a mapping to separate out each filterbank (a group of channels to be processed together)
         # And a list of sets of taps for each filterbank.
-        low_cpp = int(n_chans/n_filterbanks)
+        low_cpp = int(n_chans / n_filterbanks)
         extra = n_chans - low_cpp*n_filterbanks
         cpps = [low_cpp+1]*extra + [low_cpp]*(n_filterbanks-extra)
         splitter_mapping = []
@@ -460,7 +462,7 @@ class channelizer_hier_ccf(gr.hier_block2):
         # Add the final FFT to the channelizer.
         self.fft = fft.fft_vcc(n_chans, forward=True, window=[1.0]*n_chans)
         # Select the desired channels
-        if outchans != range(n_chans):
+        if outchans != list(range(n_chans)):
             selector_mapping = [[(0, i) for i in outchans]]
             self.selector = blocks.vector_map(gr.sizeof_gr_complex, [n_chans], selector_mapping)
         # Convert stream of vectors to a normal stream.
@@ -469,7 +471,7 @@ class channelizer_hier_ccf(gr.hier_block2):
         for i in range(0, n_filterbanks):
             self.connect((self.splitter, i), self.fbs[i], (self.combiner, i))
         self.connect(self.combiner, self.fft)
-        if outchans != range(n_chans):
+        if outchans != list(range(n_chans)):
             self.connect(self.fft, self.selector, self.v2ss)
         else:
             self.connect(self.fft, self.v2ss)
diff --git a/gr-filter/python/filter/qa_dc_blocker.py b/gr-filter/python/filter/qa_dc_blocker.py
old mode 100755
new mode 100644
index 66a69760de..d02af57834
--- a/gr-filter/python/filter/qa_dc_blocker.py
+++ b/gr-filter/python/filter/qa_dc_blocker.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, filter, blocks
 
 class test_dc_blocker(gr_unittest.TestCase):
diff --git a/gr-filter/python/filter/qa_fft_filter.py b/gr-filter/python/filter/qa_fft_filter.py
old mode 100755
new mode 100644
index 172b945441..6de8ecb214
--- a/gr-filter/python/filter/qa_fft_filter.py
+++ b/gr-filter/python/filter/qa_fft_filter.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, filter, blocks
 
 import sys
@@ -88,10 +89,10 @@ def print_complex(x):
 class test_fft_filter(gr_unittest.TestCase):
 
     def setUp(self):
-	pass
+        pass
 
     def tearDown(self):
-	pass
+        pass
 
     def assert_fft_ok2(self, expected_result, result_data):
         expected_result = expected_result[:len(result_data)]
@@ -104,7 +105,7 @@ class test_fft_filter(gr_unittest.TestCase):
                                             abs_eps, rel_eps)
 
     def test_ccc_001(self):
-	tb = gr.top_block()
+        tb = gr.top_block()
         src_data = (0,1,2,3,4,5,6,7)
         taps = (1,)
         expected_result = tuple([complex(x) for x in (0,1,2,3,4,5,6,7)])
@@ -121,7 +122,7 @@ class test_fft_filter(gr_unittest.TestCase):
 
     def test_ccc_002(self):
         # Test nthreads
-	tb = gr.top_block()
+        tb = gr.top_block()
         src_data = (0,1,2,3,4,5,6,7)
         taps = (2,)
         nthreads = 2
@@ -137,7 +138,7 @@ class test_fft_filter(gr_unittest.TestCase):
         self.assertComplexTuplesAlmostEqual (expected_result, result_data, 5)
 
     def test_ccc_003(self):
-	tb = gr.top_block()
+        tb = gr.top_block()
         src_data = (0,1,2,3,4,5,6,7)
         taps = (2,)
         expected_result = tuple([2 * complex(x) for x in (0,1,2,3,4,5,6,7)])
@@ -154,7 +155,7 @@ class test_fft_filter(gr_unittest.TestCase):
 
     def test_ccc_004(self):
         random.seed(0)
-        for i in xrange(25):
+        for i in range(25):
             # sys.stderr.write("\n>>> Loop = %d\n" % (i,))
             src_len = 4*1024
             src_data = make_random_complex_tuple(src_len)
@@ -165,16 +166,16 @@ class test_fft_filter(gr_unittest.TestCase):
             src = blocks.vector_source_c(src_data)
             op = filter.fft_filter_ccc(1, taps)
             dst = blocks.vector_sink_c()
-	    tb = gr.top_block()
+            tb = gr.top_block()
             tb.connect(src, op, dst)
             tb.run()
             result_data = dst.data()
-	    del tb
+            del tb
             self.assert_fft_ok2(expected_result, result_data)
 
     def test_ccc_005(self):
         random.seed(0)
-        for i in xrange(25):
+        for i in range(25):
             # sys.stderr.write("\n>>> Loop = %d\n" % (i,))
             dec = i + 1
             src_len = 4*1024
@@ -187,10 +188,10 @@ class test_fft_filter(gr_unittest.TestCase):
             op = filter.fft_filter_ccc(dec, taps)
             dst = blocks.vector_sink_c()
             tb = gr.top_block()
-	    tb.connect(src, op, dst)
+            tb.connect(src, op, dst)
             tb.run()
             del tb
-	    result_data = dst.data()
+            result_data = dst.data()
 
             self.assert_fft_ok2(expected_result, result_data)
 
@@ -198,7 +199,7 @@ class test_fft_filter(gr_unittest.TestCase):
         # Test decimating with nthreads=2
         random.seed(0)
         nthreads = 2
-        for i in xrange(25):
+        for i in range(25):
             # sys.stderr.write("\n>>> Loop = %d\n" % (i,))
             dec = i + 1
             src_len = 4*1024
@@ -211,10 +212,10 @@ class test_fft_filter(gr_unittest.TestCase):
             op = filter.fft_filter_ccc(dec, taps, nthreads)
             dst = blocks.vector_sink_c()
             tb = gr.top_block()
-	    tb.connect(src, op, dst)
+            tb.connect(src, op, dst)
             tb.run()
             del tb
-	    result_data = dst.data()
+            result_data = dst.data()
 
             self.assert_fft_ok2(expected_result, result_data)
 
@@ -223,7 +224,7 @@ class test_fft_filter(gr_unittest.TestCase):
     # ----------------------------------------------------------------
 
     def test_ccf_001(self):
-	tb = gr.top_block()
+        tb = gr.top_block()
         src_data = (0,1,2,3,4,5,6,7)
         taps = (1,)
         expected_result = tuple([complex(x) for x in (0,1,2,3,4,5,6,7)])
@@ -240,7 +241,7 @@ class test_fft_filter(gr_unittest.TestCase):
 
     def test_ccf_002(self):
         # Test nthreads
-	tb = gr.top_block()
+        tb = gr.top_block()
         src_data = (0,1,2,3,4,5,6,7)
         taps = (2,)
         nthreads = 2
@@ -256,7 +257,7 @@ class test_fft_filter(gr_unittest.TestCase):
         self.assertComplexTuplesAlmostEqual (expected_result, result_data, 5)
 
     def test_ccf_003(self):
-	tb = gr.top_block()
+        tb = gr.top_block()
         src_data = (0,1,2,3,4,5,6,7)
         taps = (2,)
         expected_result = tuple([2 * complex(x) for x in (0,1,2,3,4,5,6,7)])
@@ -273,7 +274,7 @@ class test_fft_filter(gr_unittest.TestCase):
 
     def test_ccf_004(self):
         random.seed(0)
-        for i in xrange(25):
+        for i in range(25):
             # sys.stderr.write("\n>>> Loop = %d\n" % (i,))
             src_len = 4*1024
             src_data = make_random_complex_tuple(src_len)
@@ -284,16 +285,16 @@ class test_fft_filter(gr_unittest.TestCase):
             src = blocks.vector_source_c(src_data)
             op = filter.fft_filter_ccf(1, taps)
             dst = blocks.vector_sink_c()
-	    tb = gr.top_block()
+            tb = gr.top_block()
             tb.connect(src, op, dst)
             tb.run()
             result_data = dst.data()
-	    del tb
+            del tb
             self.assert_fft_ok2(expected_result, result_data)
 
     def test_ccf_005(self):
         random.seed(0)
-        for i in xrange(25):
+        for i in range(25):
             # sys.stderr.write("\n>>> Loop = %d\n" % (i,))
             dec = i + 1
             src_len = 4*1024
@@ -306,10 +307,10 @@ class test_fft_filter(gr_unittest.TestCase):
             op = filter.fft_filter_ccf(dec, taps)
             dst = blocks.vector_sink_c()
             tb = gr.top_block()
-	    tb.connect(src, op, dst)
+            tb.connect(src, op, dst)
             tb.run()
             del tb
-	    result_data = dst.data()
+            result_data = dst.data()
 
             self.assert_fft_ok2(expected_result, result_data)
 
@@ -317,7 +318,7 @@ class test_fft_filter(gr_unittest.TestCase):
         # Test decimating with nthreads=2
         random.seed(0)
         nthreads = 2
-        for i in xrange(25):
+        for i in range(25):
             # sys.stderr.write("\n>>> Loop = %d\n" % (i,))
             dec = i + 1
             src_len = 4*1024
@@ -330,10 +331,10 @@ class test_fft_filter(gr_unittest.TestCase):
             op = filter.fft_filter_ccc(dec, taps, nthreads)
             dst = blocks.vector_sink_c()
             tb = gr.top_block()
-	    tb.connect(src, op, dst)
+            tb.connect(src, op, dst)
             tb.run()
             del tb
-	    result_data = dst.data()
+            result_data = dst.data()
 
             self.assert_fft_ok2(expected_result, result_data)
 
@@ -389,7 +390,7 @@ class test_fft_filter(gr_unittest.TestCase):
 
     def xtest_fff_004(self):
         random.seed(0)
-        for i in xrange(25):
+        for i in range(25):
             sys.stderr.write("\n>>> Loop = %d\n" % (i,))
             src_len = 4096
             src_data = make_random_float_tuple(src_len)
@@ -400,7 +401,7 @@ class test_fft_filter(gr_unittest.TestCase):
             src = blocks.vector_source_f(src_data)
             op = filter.fft_filter_fff(1, taps)
             dst = blocks.vector_sink_f()
-    	    tb = gr.top_block()
+            tb = gr.top_block()
             tb.connect(src, op, dst)
             tb.run()
             result_data = dst.data()
@@ -411,15 +412,15 @@ class test_fft_filter(gr_unittest.TestCase):
             except:
                 expected = open('expected', 'w')
                 for x in expected_result:
-                    expected.write(`x` + '\n')
+                    expected.write(repr(x) + '\n')
                 actual = open('actual', 'w')
                 for x in result_data:
-                    actual.write(`x` + '\n')
+                    actual.write(repr(x) + '\n')
                 raise
 
     def xtest_fff_005(self):
         random.seed(0)
-        for i in xrange(25):
+        for i in range(25):
             sys.stderr.write("\n>>> Loop = %d\n" % (i,))
             src_len = 4*1024
             src_data = make_random_float_tuple(src_len)
@@ -430,7 +431,7 @@ class test_fft_filter(gr_unittest.TestCase):
             src = blocks.vector_source_f(src_data)
             op = filter.fft_filter_fff(1, taps)
             dst = blocks.vector_sink_f()
-    	    tb = gr.top_block()
+            tb = gr.top_block()
             tb.connect(src, op, dst)
             tb.run()
             result_data = dst.data()
@@ -439,7 +440,7 @@ class test_fft_filter(gr_unittest.TestCase):
 
     def xtest_fff_006(self):
         random.seed(0)
-        for i in xrange(25):
+        for i in range(25):
             sys.stderr.write("\n>>> Loop = %d\n" % (i,))
             dec = i + 1
             src_len = 4*1024
@@ -451,7 +452,7 @@ class test_fft_filter(gr_unittest.TestCase):
             src = blocks.vector_source_f(src_data)
             op = filter.fft_filter_fff(dec, taps)
             dst = blocks.vector_sink_f()
-    	    tb = gr.top_block()
+            tb = gr.top_block()
             tb.connect(src, op, dst)
             tb.run()
             result_data = dst.data()
@@ -462,7 +463,7 @@ class test_fft_filter(gr_unittest.TestCase):
         # test decimation with nthreads
         random.seed(0)
         nthreads = 2
-        for i in xrange(25):
+        for i in range(25):
             sys.stderr.write("\n>>> Loop = %d\n" % (i,))
             dec = i + 1
             src_len = 4*1024
@@ -474,7 +475,7 @@ class test_fft_filter(gr_unittest.TestCase):
             src = blocks.vector_source_f(src_data)
             op = filter.fft_filter_fff(dec, taps, nthreads)
             dst = blocks.vector_sink_f()
-    	    tb = gr.top_block()
+            tb = gr.top_block()
             tb.connect(src, op, dst)
             tb.run()
             result_data = dst.data()
@@ -483,7 +484,7 @@ class test_fft_filter(gr_unittest.TestCase):
 
     def test_fff_get0(self):
         random.seed(0)
-        for i in xrange(25):
+        for i in range(25):
             ntaps = int(random.uniform(2, 100))
             taps = make_random_float_tuple(ntaps)
 
@@ -495,7 +496,7 @@ class test_fft_filter(gr_unittest.TestCase):
 
     def test_ccc_get0(self):
         random.seed(0)
-        for i in xrange(25):
+        for i in range(25):
             ntaps = int(random.uniform(2, 100))
             taps = make_random_complex_tuple(ntaps)
 
@@ -508,4 +509,3 @@ class test_fft_filter(gr_unittest.TestCase):
 
 if __name__ == '__main__':
     gr_unittest.run(test_fft_filter, "test_fft_filter.xml")
-
diff --git a/gr-filter/python/filter/qa_filter_delay_fc.py b/gr-filter/python/filter/qa_filter_delay_fc.py
old mode 100755
new mode 100644
index 79acace234..61567089e3
--- a/gr-filter/python/filter/qa_filter_delay_fc.py
+++ b/gr-filter/python/filter/qa_filter_delay_fc.py
@@ -20,18 +20,20 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+
 from gnuradio import gr, gr_unittest, filter, blocks
 
 import math
 
 def sin_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)
+    t = [float(x) / samp_rate for x in range(N)]
+    y = [math.sin(2.*math.pi*freq*x) for x in t]
     return y
 
 def cos_source_f(samp_rate, freq, amp, N):
-    t = map(lambda x: float(x)/samp_rate, xrange(N))
-    y = map(lambda x: math.cos(2.*math.pi*freq*x), t)
+    t = [float(x) / samp_rate for x in range(N)]
+    y = [math.cos(2.*math.pi*freq*x) for x in t]
     return y
 
 def fir_filter(x, taps, delay):
@@ -78,7 +80,7 @@ class test_filter_delay_fc(gr_unittest.TestCase):
         taps = filter.firdes.hilbert(ntaps, filter.firdes.WIN_HAMMING)
         hd = filter.filter_delay_fc(taps)
 
-        expected_result = fir_filter(data, taps, (ntaps-1)/2)
+        expected_result = fir_filter(data, taps, (ntaps-1) // 2)
 
         tb.connect(src1, hd)
         tb.connect(hd, dst2)
@@ -106,7 +108,7 @@ class test_filter_delay_fc(gr_unittest.TestCase):
         taps = filter.firdes.hilbert(ntaps, filter.firdes.WIN_HAMMING)
         hd = filter.filter_delay_fc(taps)
 
-        expected_result = fir_filter2(data, data, taps, (ntaps-1)/2)
+        expected_result = fir_filter2(data, data, taps, (ntaps-1) // 2)
 
         tb.connect(src1, (hd,0))
         tb.connect(src1, (hd,1))
@@ -135,7 +137,7 @@ class test_filter_delay_fc(gr_unittest.TestCase):
         taps = filter.firdes.hilbert(ntaps, filter.firdes.WIN_HAMMING)
         hd = filter.filter_delay_fc(taps)
 
-        expected_result = fir_filter2(data1, data2, taps, (ntaps-1)/2)
+        expected_result = fir_filter2(data1, data2, taps, (ntaps-1) // 2)
 
         dst2 = blocks.vector_sink_c()
 
diff --git a/gr-filter/python/filter/qa_filterbank.py b/gr-filter/python/filter/qa_filterbank.py
index 3423b10524..9a99c6832f 100644
--- a/gr-filter/python/filter/qa_filterbank.py
+++ b/gr-filter/python/filter/qa_filterbank.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 import time
 import random
 import math
diff --git a/gr-filter/python/filter/qa_fir_filter.py b/gr-filter/python/filter/qa_fir_filter.py
old mode 100755
new mode 100644
index 172d64a8dc..cfd5a7e2b2
--- a/gr-filter/python/filter/qa_fir_filter.py
+++ b/gr-filter/python/filter/qa_fir_filter.py
@@ -19,6 +19,7 @@
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 #
 
+
 from gnuradio import gr, gr_unittest, filter, blocks
 
 def fir_filter(x, taps, decim=1):
diff --git a/gr-filter/python/filter/qa_firdes.py b/gr-filter/python/filter/qa_firdes.py
old mode 100755
new mode 100644
index b32e5b2f91..21521c4637
--- a/gr-filter/python/filter/qa_firdes.py
+++ b/gr-filter/python/filter/qa_firdes.py
@@ -20,16 +20,17 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, filter
 import sys
 
 class test_firdes(gr_unittest.TestCase):
 
     def setUp(self):
-	pass
+        pass
 
     def tearDown(self):
-	pass
+        pass
 
     def test_low_pass(self):
         known_taps = (0.0024871660862118006, -4.403502608370943e-18,
@@ -187,4 +188,3 @@ class test_firdes(gr_unittest.TestCase):
 
 if __name__ == '__main__':
     gr_unittest.run(test_firdes, "test_firdes.xml")
-
diff --git a/gr-filter/python/filter/qa_fractional_interpolator.py b/gr-filter/python/filter/qa_fractional_interpolator.py
old mode 100755
new mode 100644
index 839ff28d8b..05f5a2388b
--- a/gr-filter/python/filter/qa_fractional_interpolator.py
+++ b/gr-filter/python/filter/qa_fractional_interpolator.py
@@ -20,19 +20,21 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+
 from gnuradio import gr, gr_unittest, filter, blocks
 
 import math
 
 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)
+    t = [float(x) / samp_rate for x in range(N)]
+    y = [math.sin(2.*math.pi*freq*x) for x in t]
     return y
 
 def sig_source_c(samp_rate, freq, amp, N):
-    t = map(lambda x: float(x)/samp_rate, xrange(N))
-    y = map(lambda x: math.cos(2.*math.pi*freq*x) + \
-                1j*math.sin(2.*math.pi*freq*x), t)
+    t = [float(x) / samp_rate for x in range(N)]
+    y = [math.cos(2.*math.pi*freq*x) + \
+                1j*math.sin(2.*math.pi*freq*x) for x in t]
     return y
 
 class test_fractional_resampler(gr_unittest.TestCase):
@@ -59,10 +61,10 @@ class test_fractional_resampler(gr_unittest.TestCase):
 
         Ntest = 5000
         L = len(snk.data())
-        t = map(lambda x: float(x)/(fs/rrate), xrange(L))
+        t = [float(x) / (fs / rrate) for x in range(L)]
 
         phase = 0.1884
-        expected_data = map(lambda x: math.sin(2.*math.pi*freq*x+phase), t)
+        expected_data = [math.sin(2.*math.pi*freq*x+phase) for x in t]
 
         dst_data = snk.data()
 
@@ -85,11 +87,11 @@ class test_fractional_resampler(gr_unittest.TestCase):
 
         Ntest = 5000
         L = len(snk.data())
-        t = map(lambda x: float(x)/(fs/rrate), xrange(L))
+        t = [float(x) / (fs / rrate) for x in range(L)]
 
         phase = 0.1884
-        expected_data = map(lambda x: math.cos(2.*math.pi*freq*x+phase) + \
-                                1j*math.sin(2.*math.pi*freq*x+phase), t)
+        expected_data = [math.cos(2.*math.pi*freq*x+phase) + \
+                                1j*math.sin(2.*math.pi*freq*x+phase) for x in t]
 
         dst_data = snk.data()
 
diff --git a/gr-filter/python/filter/qa_fractional_resampler.py b/gr-filter/python/filter/qa_fractional_resampler.py
index 2580b8dd16..025bed82cb 100644
--- a/gr-filter/python/filter/qa_fractional_resampler.py
+++ b/gr-filter/python/filter/qa_fractional_resampler.py
@@ -20,19 +20,21 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+
 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)
+    t = [float(x) / samp_rate for x in range(N)]
+    y = [math.sin(2.*math.pi*freq*x) for x in t]
     return y
 
 def sig_source_c(samp_rate, freq, amp, N):
-    t = map(lambda x: float(x)/samp_rate, xrange(N))
-    y = map(lambda x: math.cos(2.*math.pi*freq*x) + \
-                1j*math.sin(2.*math.pi*freq*x), t)
+    t = [float(x) / samp_rate for x in range(N)]
+    y = [math.cos(2.*math.pi*freq*x) + \
+                1j*math.sin(2.*math.pi*freq*x) for x in t]
     return y
 
 def const_source_f(amp, N):
@@ -63,10 +65,10 @@ class test_fractional_resampler(gr_unittest.TestCase):
 
         Ntest = 5000
         L = len(snk.data())
-        t = map(lambda x: float(x)/(fs/rrate), xrange(L))
+        t = [float(x) / (fs / rrate) for x in range(L)]
 
         phase = 0.1884
-        expected_data = map(lambda x: math.sin(2.*math.pi*freq*x+phase), t)
+        expected_data = [math.sin(2.*math.pi*freq*x+phase) for x in t]
 
         dst_data = snk.data()
 
@@ -88,11 +90,11 @@ class test_fractional_resampler(gr_unittest.TestCase):
 
         Ntest = 5000
         L = len(snk.data())
-        t = map(lambda x: float(x)/(fs/rrate), xrange(L))
+        t = [float(x) / (fs / rrate) for x in range(L)]
 
         phase = 0.1884
-        expected_data = map(lambda x: math.cos(2.*math.pi*freq*x+phase) + \
-                                1j*math.sin(2.*math.pi*freq*x+phase), t)
+        expected_data = [math.cos(2.*math.pi*freq*x+phase) + \
+                                1j*math.sin(2.*math.pi*freq*x+phase) for x in t]
 
         dst_data = snk.data()
 
@@ -117,10 +119,10 @@ class test_fractional_resampler(gr_unittest.TestCase):
 
         Ntest = 5000
         L = len(snk.data())
-        t = map(lambda x: float(x)/(fs/rrate), xrange(L))
+        t = [float(x) / (fs / rrate) for x in range(L)]
 
         phase = 0.1884
-        expected_data = map(lambda x: math.sin(2.*math.pi*freq*x+phase), t)
+        expected_data = [math.sin(2.*math.pi*freq*x+phase) for x in t]
 
         dst_data = snk.data()
 
@@ -145,11 +147,11 @@ class test_fractional_resampler(gr_unittest.TestCase):
 
         Ntest = 5000
         L = len(snk.data())
-        t = map(lambda x: float(x)/(fs/rrate), xrange(L))
+        t = [float(x) / (fs / rrate) for x in range(L)]
 
         phase = 0.1884
-        expected_data = map(lambda x: math.cos(2.*math.pi*freq*x+phase) + \
-                                1j*math.sin(2.*math.pi*freq*x+phase), t)
+        expected_data = [math.cos(2.*math.pi*freq*x+phase) + \
+                                1j*math.sin(2.*math.pi*freq*x+phase) for x in t]
 
         dst_data = snk.data()
 
diff --git a/gr-filter/python/filter/qa_freq_xlating_fft_filter.py b/gr-filter/python/filter/qa_freq_xlating_fft_filter.py
old mode 100755
new mode 100644
index d5c7d41dd9..0a7bc88178
--- a/gr-filter/python/filter/qa_freq_xlating_fft_filter.py
+++ b/gr-filter/python/filter/qa_freq_xlating_fft_filter.py
@@ -19,6 +19,8 @@
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 #
 
+from __future__ import division
+
 from gnuradio import gr, gr_unittest, filter, blocks
 
 import cmath, math
@@ -34,14 +36,14 @@ def fir_filter(x, taps, decim=1):
     return y
 
 def sig_source_s(samp_rate, freq, amp, N):
-    t = map(lambda x: float(x)/samp_rate, xrange(N))
-    y = map(lambda x: int(100*math.sin(2.*math.pi*freq*x)), t)
+    t = [float(x) / samp_rate for x in range(N)]
+    y = [int(100*math.sin(2.*math.pi*freq*x)) for x in t]
     return y
 
 def sig_source_c(samp_rate, freq, amp, N):
-    t = map(lambda x: float(x)/samp_rate, xrange(N))
-    y = map(lambda x: math.cos(2.*math.pi*freq*x) + \
-                1j*math.sin(2.*math.pi*freq*x), t)
+    t = [float(x) / samp_rate for x in range(N)]
+    y = [math.cos(2.*math.pi*freq*x) + \
+                1j*math.sin(2.*math.pi*freq*x) for x in t]
     return y
 
 def mix(lo, data):
@@ -60,17 +62,17 @@ class test_freq_xlating_filter(gr_unittest.TestCase):
         self.fs = fs = 1
         self.fc = fc = 0.3
         self.bw = bw = 0.1
-        self.taps = filter.firdes.low_pass(1, fs, bw, bw/4)
-        times = xrange(1024)
-        self.src_data = map(lambda t: cmath.exp(-2j*cmath.pi*fc/fs*(t/100.0)), times)
+        self.taps = filter.firdes.low_pass(1, fs, bw, bw / 4)
+        times = list(range(1024))
+        self.src_data = [cmath.exp(-2j*cmath.pi*fc/fs*(t / 100.0)) for t in times]
 
     def generate_ccc_source(self):
         self.fs = fs = 1
         self.fc = fc = 0.3
         self.bw = bw = 0.1
-        self.taps = filter.firdes.complex_band_pass(1, fs, -bw/2, bw/2, bw/4)
-        times = xrange(1024)
-        self.src_data = map(lambda t: cmath.exp(-2j*cmath.pi*fc/fs*(t/100.0)), times)
+        self.taps = filter.firdes.complex_band_pass(1, fs, -bw / 2, bw / 2, bw / 4)
+        times = list(range(1024))
+        self.src_data = [cmath.exp(-2j*cmath.pi*fc/fs*(t / 100.0)) for t in times]
 
     def assert_fft_ok(self, expected_result, result_data):
         expected_result = expected_result[:len(result_data)]
diff --git a/gr-filter/python/filter/qa_freq_xlating_fir_filter.py b/gr-filter/python/filter/qa_freq_xlating_fir_filter.py
old mode 100755
new mode 100644
index ca5245db64..f40197b964
--- a/gr-filter/python/filter/qa_freq_xlating_fir_filter.py
+++ b/gr-filter/python/filter/qa_freq_xlating_fir_filter.py
@@ -19,6 +19,8 @@
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 #
 
+from __future__ import division
+
 from gnuradio import gr, gr_unittest, filter, blocks
 
 import cmath, math
@@ -34,14 +36,14 @@ def fir_filter(x, taps, decim=1):
     return y
 
 def sig_source_s(samp_rate, freq, amp, N):
-    t = map(lambda x: float(x)/samp_rate, xrange(N))
-    y = map(lambda x: int(100*math.sin(2.*math.pi*freq*x)), t)
+    t = [float(x) / samp_rate for x in range(N)]
+    y = [int(100*math.sin(2.*math.pi*freq*x)) for x in t]
     return y
 
 def sig_source_c(samp_rate, freq, amp, N):
-    t = map(lambda x: float(x)/samp_rate, xrange(N))
-    y = map(lambda x: math.cos(2.*math.pi*freq*x) + \
-                1j*math.sin(2.*math.pi*freq*x), t)
+    t = [float(x) / samp_rate for x in range(N)]
+    y = [math.cos(2.*math.pi*freq*x) + \
+                1j*math.sin(2.*math.pi*freq*x) for x in t]
     return y
 
 def mix(lo, data):
@@ -60,49 +62,49 @@ class test_freq_xlating_filter(gr_unittest.TestCase):
         self.fs = fs = 1
         self.fc = fc = 0.3
         self.bw = bw = 0.1
-        self.taps = filter.firdes.low_pass(1, fs, bw, bw/4)
-        times = xrange(100)
-        self.src_data = map(lambda t: cmath.exp(-2j*cmath.pi*fc/fs*(t/100.0)), times)
+        self.taps = filter.firdes.low_pass(1, fs, bw, bw / 4)
+        times = list(range(100))
+        self.src_data = [cmath.exp(-2j*cmath.pi*fc/fs*(t / 100.0)) for t in times]
 
     def generate_ccc_source(self):
         self.fs = fs = 1
         self.fc = fc = 0.3
         self.bw = bw = 0.1
-        self.taps = filter.firdes.complex_band_pass(1, fs, -bw/2, bw/2, bw/4)
-        times = xrange(100)
-        self.src_data = map(lambda t: cmath.exp(-2j*cmath.pi*fc/fs*(t/100.0)), times)
+        self.taps = filter.firdes.complex_band_pass(1, fs, -bw / 2, bw / 2, bw / 4)
+        times = list(range(100))
+        self.src_data = [cmath.exp(-2j*cmath.pi*fc/fs*(t / 100.0)) for t in times]
 
     def generate_fcf_source(self):
         self.fs = fs = 1
         self.fc = fc = 0.3
         self.bw = bw = 0.1
-        self.taps = filter.firdes.low_pass(1, fs, bw, bw/4)
-        times = xrange(100)
-        self.src_data = map(lambda t: math.sin(2*cmath.pi*fc/fs*(t/100.0)), times)
+        self.taps = filter.firdes.low_pass(1, fs, bw, bw / 4)
+        times = list(range(100))
+        self.src_data = [math.sin(2*cmath.pi*fc/fs*(t / 100.0)) for t in times]
 
     def generate_fcc_source(self):
         self.fs = fs = 1
         self.fc = fc = 0.3
         self.bw = bw = 0.1
-        self.taps = filter.firdes.complex_band_pass(1, fs, -bw/2, bw/2, bw/4)
-        times = xrange(100)
-        self.src_data = map(lambda t: math.sin(2*cmath.pi*fc/fs*(t/100.0)), times)
+        self.taps = filter.firdes.complex_band_pass(1, fs, -bw / 2, bw / 2, bw / 4)
+        times = list(range(100))
+        self.src_data = [math.sin(2*cmath.pi*fc/fs*(t / 100.0)) for t in times]
 
     def generate_scf_source(self):
         self.fs = fs = 1
         self.fc = fc = 0.3
         self.bw = bw = 0.12
-        self.taps = filter.firdes.low_pass(1, fs, bw, bw/4)
-        times = xrange(100)
-        self.src_data = map(lambda t: int(100*math.sin(2*cmath.pi*fc/fs*(t/100.0))), times)
+        self.taps = filter.firdes.low_pass(1, fs, bw, bw / 4)
+        times = list(range(100))
+        self.src_data = [int(100*math.sin(2*cmath.pi*fc/fs*(t / 100.0))) for t in times]
 
     def generate_scc_source(self):
         self.fs = fs = 1
         self.fc = fc = 0.3
         self.bw = bw = 0.12
-        self.taps = filter.firdes.complex_band_pass(1, fs, -bw/2, bw/2, bw/4)
-        times = xrange(100)
-        self.src_data = map(lambda t: int(100*math.sin(2*cmath.pi*fc/fs*(t/100.0))), times)
+        self.taps = filter.firdes.complex_band_pass(1, fs, -bw / 2, bw / 2, bw / 4)
+        times = list(range(100))
+        self.src_data = [int(100*math.sin(2*cmath.pi*fc/fs*(t / 100.0))) for t in times]
 
 
     def test_fir_filter_ccf_001(self):
diff --git a/gr-filter/python/filter/qa_hilbert.py b/gr-filter/python/filter/qa_hilbert.py
old mode 100755
new mode 100644
index e8550a5932..c1f048ba14
--- a/gr-filter/python/filter/qa_hilbert.py
+++ b/gr-filter/python/filter/qa_hilbert.py
@@ -20,18 +20,20 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+
 from gnuradio import gr, gr_unittest, filter, blocks
 import math
 
 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)
+    t = [float(x) / samp_rate for x in range(N)]
+    y = [math.sin(2.*math.pi*freq*x) for x in t]
     return y
 
 def fir_filter(x, taps):
     y = []
     x2 = (len(taps)-1)*[0,] + x
-    delay = (len(taps)-1)/2
+    delay = (len(taps)-1) // 2
     for i in range(len(x)):
         yi = 0
         for j in range(len(taps)):
diff --git a/gr-filter/python/filter/qa_iir_filter.py b/gr-filter/python/filter/qa_iir_filter.py
old mode 100755
new mode 100644
index 0a89dc4d89..fa8a6af29d
--- a/gr-filter/python/filter/qa_iir_filter.py
+++ b/gr-filter/python/filter/qa_iir_filter.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, filter, blocks
 
 class test_iir_filter(gr_unittest.TestCase):
diff --git a/gr-filter/python/filter/qa_interp_fir_filter.py b/gr-filter/python/filter/qa_interp_fir_filter.py
old mode 100755
new mode 100644
index 536ab1bb85..66580c9745
--- a/gr-filter/python/filter/qa_interp_fir_filter.py
+++ b/gr-filter/python/filter/qa_interp_fir_filter.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, filter, blocks
 
 import math
diff --git a/gr-filter/python/filter/qa_pfb_arb_resampler.py b/gr-filter/python/filter/qa_pfb_arb_resampler.py
old mode 100755
new mode 100644
index 0bac3e5c15..01124f58cb
--- a/gr-filter/python/filter/qa_pfb_arb_resampler.py
+++ b/gr-filter/python/filter/qa_pfb_arb_resampler.py
@@ -20,18 +20,20 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+
 from gnuradio import gr, gr_unittest, filter, blocks
 import math
 
 def sig_source_c(samp_rate, freq, amp, N):
-    t = map(lambda x: float(x)/samp_rate, xrange(N))
-    y = map(lambda x: math.cos(2.*math.pi*freq*x) + \
-                1j*math.sin(2.*math.pi*freq*x), t)
+    t = [float(x) / samp_rate for x in range(N)]
+    y = [math.cos(2.*math.pi*freq*x) + \
+                1j*math.sin(2.*math.pi*freq*x) for x in t]
     return y
 
 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)
+    t = [float(x) / samp_rate for x in range(N)]
+    y = [math.sin(2.*math.pi*freq*x) for x in t]
     return y
 
 class test_pfb_arb_resampler(gr_unittest.TestCase):
@@ -48,7 +50,7 @@ class test_pfb_arb_resampler(gr_unittest.TestCase):
         rrate = 2.3421  # resampling rate
 
         nfilts = 32
-        taps = filter.firdes.low_pass_2(nfilts, nfilts*fs, fs/2, fs/10,
+        taps = filter.firdes.low_pass_2(nfilts, nfilts*fs, fs / 2, fs / 10,
                                         attenuation_dB=80,
                                         window=filter.firdes.WIN_BLACKMAN_hARRIS)
 
@@ -69,10 +71,10 @@ class test_pfb_arb_resampler(gr_unittest.TestCase):
         phase = pfb.phase_offset(freq, fs)
 
         # Create a timeline offset by the filter's group delay
-        t = map(lambda x: float(x)/(fs*rrate), xrange(-delay, L-delay))
+        t = [float(x) / (fs*rrate) for x in range(-delay, L-delay)]
 
         # Data of the sinusoid at frequency freq with the delay and phase offset.
-        expected_data = map(lambda x: math.sin(2.*math.pi*freq*x+phase), t)
+        expected_data = [math.sin(2.*math.pi*freq*x+phase) for x in t]
 
         dst_data = snk.data()
 
@@ -84,7 +86,7 @@ class test_pfb_arb_resampler(gr_unittest.TestCase):
         rrate = 2.4321   # resampling rate
 
         nfilts = 32
-        taps = filter.firdes.low_pass_2(nfilts, nfilts*fs, fs/2, fs/10,
+        taps = filter.firdes.low_pass_2(nfilts, nfilts*fs, fs / 2, fs / 10,
                                         attenuation_dB=80,
                                         window=filter.firdes.WIN_BLACKMAN_hARRIS)
 
@@ -105,11 +107,11 @@ class test_pfb_arb_resampler(gr_unittest.TestCase):
         phase = pfb.phase_offset(freq, fs)
 
         # Create a timeline offset by the filter's group delay
-        t = map(lambda x: float(x)/(fs*rrate), xrange(-delay, L-delay))
+        t = [float(x) / (fs*rrate) for x in range(-delay, L-delay)]
 
         # Data of the sinusoid at frequency freq with the delay and phase offset.
-        expected_data = map(lambda x: math.cos(2.*math.pi*freq*x+phase) + \
-                                1j*math.sin(2.*math.pi*freq*x+phase), t)
+        expected_data = [math.cos(2.*math.pi*freq*x+phase) + \
+                                1j*math.sin(2.*math.pi*freq*x+phase) for x in t]
 
         dst_data = snk.data()
 
@@ -121,7 +123,7 @@ class test_pfb_arb_resampler(gr_unittest.TestCase):
         rrate = 0.75     # resampling rate
 
         nfilts = 32
-        taps = filter.firdes.low_pass_2(nfilts, nfilts*fs, fs/4, fs/10,
+        taps = filter.firdes.low_pass_2(nfilts, nfilts*fs, fs / 4, fs / 10,
                                         attenuation_dB=80,
                                         window=filter.firdes.WIN_BLACKMAN_hARRIS)
 
@@ -142,11 +144,11 @@ class test_pfb_arb_resampler(gr_unittest.TestCase):
         phase = pfb.phase_offset(freq, fs)
 
         # Create a timeline offset by the filter's group delay
-        t = map(lambda x: float(x)/(fs*rrate), xrange(-delay, L-delay))
+        t = [float(x) / (fs*rrate) for x in range(-delay, L-delay)]
 
         # Data of the sinusoid at frequency freq with the delay and phase offset.
-        expected_data = map(lambda x: math.cos(2.*math.pi*freq*x+phase) + \
-                                1j*math.sin(2.*math.pi*freq*x+phase), t)
+        expected_data = [math.cos(2.*math.pi*freq*x+phase) + \
+                                1j*math.sin(2.*math.pi*freq*x+phase) for x in t]
 
         dst_data = snk.data()
 
@@ -158,7 +160,7 @@ class test_pfb_arb_resampler(gr_unittest.TestCase):
         rrate = 3.4321   # resampling rate
 
         nfilts = 32
-        taps = filter.firdes.complex_band_pass_2(nfilts, nfilts*fs, 50, 400, fs/10,
+        taps = filter.firdes.complex_band_pass_2(nfilts, nfilts*fs, 50, 400, fs / 10,
                                                  attenuation_dB=80,
                                                  window=filter.firdes.WIN_BLACKMAN_hARRIS)
 
@@ -179,11 +181,11 @@ class test_pfb_arb_resampler(gr_unittest.TestCase):
         phase = pfb.phase_offset(freq, fs)
 
         # Create a timeline offset by the filter's group delay
-        t = map(lambda x: float(x)/(fs*rrate), xrange(-delay, L-delay))
+        t = [float(x) / (fs*rrate) for x in range(-delay, L-delay)]
 
         # Data of the sinusoid at frequency freq with the delay and phase offset.
-        expected_data = map(lambda x: math.cos(2.*math.pi*freq*x+phase) + \
-                                1j*math.sin(2.*math.pi*freq*x+phase), t)
+        expected_data = [math.cos(2.*math.pi*freq*x+phase) + \
+                                1j*math.sin(2.*math.pi*freq*x+phase) for x in t]
 
         dst_data = snk.data()
 
@@ -195,7 +197,7 @@ class test_pfb_arb_resampler(gr_unittest.TestCase):
         rrate = 0.715    # resampling rate
 
         nfilts = 32
-        taps = filter.firdes.complex_band_pass_2(nfilts, nfilts*fs, 50, 400, fs/10,
+        taps = filter.firdes.complex_band_pass_2(nfilts, nfilts*fs, 50, 400, fs / 10,
                                                  attenuation_dB=80,
                                                  window=filter.firdes.WIN_BLACKMAN_hARRIS)
 
@@ -216,11 +218,11 @@ class test_pfb_arb_resampler(gr_unittest.TestCase):
         phase = pfb.phase_offset(freq, fs)
 
         # Create a timeline offset by the filter's group delay
-        t = map(lambda x: float(x)/(fs*rrate), xrange(-delay, L-delay))
+        t = [float(x) / (fs*rrate) for x in range(-delay, L-delay)]
 
         # Data of the sinusoid at frequency freq with the delay and phase offset.
-        expected_data = map(lambda x: math.cos(2.*math.pi*freq*x+phase) + \
-                                1j*math.sin(2.*math.pi*freq*x+phase), t)
+        expected_data = [math.cos(2.*math.pi*freq*x+phase) + \
+                                1j*math.sin(2.*math.pi*freq*x+phase) for x in t]
 
         dst_data = snk.data()
 
diff --git a/gr-filter/python/filter/qa_pfb_channelizer.py b/gr-filter/python/filter/qa_pfb_channelizer.py
old mode 100755
new mode 100644
index e370f510ea..902c360296
--- a/gr-filter/python/filter/qa_pfb_channelizer.py
+++ b/gr-filter/python/filter/qa_pfb_channelizer.py
@@ -20,13 +20,15 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+
 from gnuradio import gr, gr_unittest, filter, blocks, analog
 import math, cmath
 
 def sig_source_c(samp_rate, freq, amp, N):
-    t = map(lambda x: float(x)/samp_rate, xrange(N))
-    y = map(lambda x: math.cos(2.*math.pi*freq*x) + \
-                1j*math.sin(2.*math.pi*freq*x), t)
+    t = [float(x) / samp_rate for x in range(N)]
+    y = [math.cos(2.*math.pi*freq*x) + \
+                1j*math.sin(2.*math.pi*freq*x) for x in t]
     return y
 
 
@@ -45,7 +47,7 @@ class test_pfb_channelizer(gr_unittest.TestCase):
         self.ifs = self.M*self.fs
 
         self.taps = filter.firdes.low_pass_2(
-            1, self.ifs, self.fs/2, self.fs/10,
+            1, self.ifs, self.fs / 2, self.fs / 10,
             attenuation_dB=80,
             window=filter.firdes.WIN_BLACKMAN_hARRIS)
 
@@ -67,7 +69,7 @@ class test_pfb_channelizer(gr_unittest.TestCase):
         """Test roundig error handling for oversample rate (ok)."""
         channels, oversample = 36, 25.
         filter.pfb.channelizer_ccf(channels, taps=self.taps,
-                                   oversample_rate=channels/oversample)
+                                   oversample_rate=channels / oversample)
 
     def test_0003(self):
         """Test roundig error handling for oversample rate, (bad)."""
@@ -83,7 +85,7 @@ class test_pfb_channelizer(gr_unittest.TestCase):
         tb = gr.top_block()
         signals = []
         add = blocks.add_cc()
-        for i in xrange(len(self.freqs)):
+        for i in range(len(self.freqs)):
             f = self.freqs[i] + i*self.fs
             signals.append(analog.sig_source_c(self.ifs, analog.GR_SIN_WAVE, f, 1))
             tb.connect(signals[i], (add,i))
@@ -97,7 +99,7 @@ class test_pfb_channelizer(gr_unittest.TestCase):
     def check_channelizer(self, channelizer_block):
         signals = list()
         add = blocks.add_cc()
-        for i in xrange(len(self.freqs)):
+        for i in range(len(self.freqs)):
             f = self.freqs[i] + i*self.fs
             data = sig_source_c(self.ifs, f, 1, self.N)
             signals.append(blocks.vector_source_c(data))
@@ -109,7 +111,7 @@ class test_pfb_channelizer(gr_unittest.TestCase):
         self.tb.connect(add, channelizer_block)
 
         snks = list()
-        for i in xrange(self.M):
+        for i in range(self.M):
             snks.append(blocks.vector_sink_c())
             #self.tb.connect((s2ss,i), (channelizer_block,i))
             self.tb.connect((channelizer_block, i), snks[i])
@@ -128,8 +130,8 @@ class test_pfb_channelizer(gr_unittest.TestCase):
         Ntest = 50
         expected = expected[-Ntest:]
         received = received[-Ntest:]
-        expected = [x/expected[0] for x in expected]
-        received = [x/received[0] for x in received]
+        expected = [x / expected[0] for x in expected]
+        received = [x / received[0] for x in received]
         self.assertComplexTuplesAlmostEqual(expected, received, 3)
 
 
@@ -142,7 +144,7 @@ class test_pfb_channelizer(gr_unittest.TestCase):
             if diff < -math.pi:
                 diff += 2*math.pi
             freqs.append(diff)
-        freq = float(sum(freqs))/len(freqs)
+        freq = float(sum(freqs)) / len(freqs)
         freq /= 2*math.pi
         return freq
 
@@ -154,12 +156,12 @@ class test_pfb_channelizer(gr_unittest.TestCase):
         delay = int(delay)
 
         # Create a time scale that's delayed to match the filter delay
-        t = map(lambda x: float(x)/self.fs, xrange(delay, L+delay))
+        t = [float(x) / self.fs for x in range(delay, L+delay)]
 
         # Create known data as complex sinusoids at the different baseband freqs
         # the different channel numbering is due to channelizer output order.
-        expected_data = [map(lambda x: math.cos(2.*math.pi*f*x) +
-                             1j*math.sin(2.*math.pi*f*x), t) for f in self.freqs]
+        expected_data = [[math.cos(2.*math.pi*f*x) +
+                             1j*math.sin(2.*math.pi*f*x) for x in t] for f in self.freqs]
         return expected_data
 
 
diff --git a/gr-filter/python/filter/qa_pfb_decimator.py b/gr-filter/python/filter/qa_pfb_decimator.py
old mode 100755
new mode 100644
index 4366e85eec..5d11533cd4
--- a/gr-filter/python/filter/qa_pfb_decimator.py
+++ b/gr-filter/python/filter/qa_pfb_decimator.py
@@ -20,13 +20,15 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+
 from gnuradio import gr, gr_unittest, filter, blocks
 import math
 
 def sig_source_c(samp_rate, freq, amp, N):
-    t = map(lambda x: float(x)/samp_rate, xrange(N))
-    y = map(lambda x: math.cos(2.*math.pi*freq*x) + \
-                1j*math.sin(2.*math.pi*freq*x), t)
+    t = [float(x) / samp_rate for x in range(N)]
+    y = [math.cos(2.*math.pi*freq*x) + \
+                1j*math.sin(2.*math.pi*freq*x) for x in t]
     return y
 
 def run_test(tb, channel, fft_rotate, fft_filter):
@@ -35,16 +37,16 @@ def run_test(tb, channel, fft_rotate, fft_filter):
         fs = 5000.0      # baseband sampling rate
         ifs = M*fs       # input samp rate to decimator
 
-        taps = filter.firdes.low_pass_2(1, ifs, fs/2, fs/10,
+        taps = filter.firdes.low_pass_2(1, ifs, fs / 2, fs / 10,
                                         attenuation_dB=80,
                                         window=filter.firdes.WIN_BLACKMAN_hARRIS)
 
         signals = list()
         add = blocks.add_cc()
         freqs = [-230., 121., 110., -513., 203.]
-        Mch = ((len(freqs)-1)/2 + channel) % len(freqs)
-        for i in xrange(len(freqs)):
-            f = freqs[i] + (M/2-M+i+1)*fs
+        Mch = ((len(freqs)-1) // 2 + channel) % len(freqs)
+        for i in range(len(freqs)):
+            f = freqs[i] + (M // 2-M+i+1)*fs
             data = sig_source_c(ifs, f, 1, N)
             signals.append(blocks.vector_source_c(data))
             tb.connect(signals[i], (add,i))
@@ -54,7 +56,7 @@ def run_test(tb, channel, fft_rotate, fft_filter):
         snk = blocks.vector_sink_c()
 
         tb.connect(add, s2ss)
-        for i in xrange(M):
+        for i in range(M):
             tb.connect((s2ss,i), (pfb,i))
         tb.connect(pfb, snk)
         tb.run()
@@ -75,12 +77,12 @@ def run_test(tb, channel, fft_rotate, fft_filter):
         delay = int(delay)
 
         # Create a time scale that's delayed to match the filter delay
-        t = map(lambda x: float(x)/fs, xrange(delay, L+delay))
+        t = [float(x) / fs for x in range(delay, L+delay)]
 
         # Create known data as complex sinusoids for the baseband freq
         # of the extracted channel is due to decimator output order.
-        expected_data = map(lambda x: math.cos(2.*math.pi*freqs[Mch]*x+phase) + \
-                                1j*math.sin(2.*math.pi*freqs[Mch]*x+phase), t)
+        expected_data = [math.cos(2.*math.pi*freqs[Mch]*x+phase) + \
+                                1j*math.sin(2.*math.pi*freqs[Mch]*x+phase) for x in t]
         dst_data = snk.data()
 
         return (dst_data, expected_data)
diff --git a/gr-filter/python/filter/qa_pfb_interpolator.py b/gr-filter/python/filter/qa_pfb_interpolator.py
old mode 100755
new mode 100644
index b7ed4feef6..c6aeb8e4c2
--- a/gr-filter/python/filter/qa_pfb_interpolator.py
+++ b/gr-filter/python/filter/qa_pfb_interpolator.py
@@ -20,14 +20,16 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+
 from gnuradio import gr, gr_unittest, filter, blocks
 
 import math
 
 def sig_source_c(samp_rate, freq, amp, N):
-    t = map(lambda x: float(x)/samp_rate, xrange(N))
-    y = map(lambda x: math.cos(2.*math.pi*freq*x) + \
-                1j*math.sin(2.*math.pi*freq*x), t)
+    t = [float(x) / samp_rate for x in range(N)]
+    y = [math.cos(2.*math.pi*freq*x) + \
+                1j*math.sin(2.*math.pi*freq*x) for x in t]
     return y
 
 class test_pfb_interpolator(gr_unittest.TestCase):
@@ -44,7 +46,7 @@ class test_pfb_interpolator(gr_unittest.TestCase):
         fs = 1000        # baseband sampling rate
         ofs = M*fs       # output samp rate of interpolator
 
-        taps = filter.firdes.low_pass_2(M, ofs, fs/4, fs/10,
+        taps = filter.firdes.low_pass_2(M, ofs, fs / 4, fs / 10,
                                         attenuation_dB=80,
                                         window=filter.firdes.WIN_BLACKMAN_hARRIS)
 
@@ -66,12 +68,12 @@ class test_pfb_interpolator(gr_unittest.TestCase):
         phase = 4.8870112969978994
 
         # Create a time scale
-        t = map(lambda x: float(x)/ofs, xrange(0, L))
+        t = [float(x) / ofs for x in range(0, L)]
 
         # Create known data as complex sinusoids for the baseband freq
         # of the extracted channel is due to decimator output order.
-        expected_data = map(lambda x: math.cos(2.*math.pi*freq*x+phase) + \
-                                1j*math.sin(2.*math.pi*freq*x+phase), t)
+        expected_data = [math.cos(2.*math.pi*freq*x+phase) + \
+                                1j*math.sin(2.*math.pi*freq*x+phase) for x in t]
 
         dst_data = snk.data()
 
diff --git a/gr-filter/python/filter/qa_pfb_synthesizer.py b/gr-filter/python/filter/qa_pfb_synthesizer.py
old mode 100755
new mode 100644
index 0b3f8b27a2..42f891a545
--- a/gr-filter/python/filter/qa_pfb_synthesizer.py
+++ b/gr-filter/python/filter/qa_pfb_synthesizer.py
@@ -20,14 +20,16 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+
 from gnuradio import gr, gr_unittest, filter, blocks
 
 import math
 
 def sig_source_c(samp_rate, freq, amp, N):
-    t = map(lambda x: float(x)/samp_rate, xrange(N))
-    y = map(lambda x: math.cos(2.*math.pi*freq*x) + \
-                1j*math.sin(2.*math.pi*freq*x), t)
+    t = [float(x) / samp_rate for x in range(N)]
+    y = [math.cos(2.*math.pi*freq*x) + \
+                1j*math.sin(2.*math.pi*freq*x) for x in t]
     return y
 
 class test_pfb_synthesizer(gr_unittest.TestCase):
@@ -44,20 +46,20 @@ class test_pfb_synthesizer(gr_unittest.TestCase):
         fs = 1000        # baseband sampling rate
         ofs = M*fs       # input samp rate to decimator
 
-        taps = filter.firdes.low_pass_2(M, ofs, fs/2, fs/10,
+        taps = filter.firdes.low_pass_2(M, ofs, fs / 2, fs / 10,
                                         attenuation_dB=80,
                                         window=filter.firdes.WIN_BLACKMAN_hARRIS)
 
         signals = list()
         freqs = [0, 100, 200, -200, -100]
-        for i in xrange(len(freqs)):
+        for i in range(len(freqs)):
             data = sig_source_c(fs, freqs[i], 1, N)
             signals.append(blocks.vector_source_c(data))
 
         pfb = filter.pfb_synthesizer_ccf(M, taps)
         snk = blocks.vector_sink_c()
 
-        for i in xrange(M):
+        for i in range(M):
             self.tb.connect(signals[i], (pfb,i))
 
         self.tb.connect(pfb, snk)
@@ -73,13 +75,13 @@ class test_pfb_synthesizer(gr_unittest.TestCase):
 
         Ntest = 1000
         L = len(snk.data())
-        t = map(lambda x: float(x)/ofs, xrange(L))
+        t = [float(x) / ofs for x in range(L)]
 
         # Create known data as sum of complex sinusoids at freqs
         # of the output channels.
         freqs = [-2200, -1100, 0, 1100, 2200]
         expected_data = len(t)*[0,]
-        for i in xrange(len(t)):
+        for i in range(len(t)):
             expected_data[i] = math.cos(2.*math.pi*freqs[0]*t[i] + p3) + \
                             1j*math.sin(2.*math.pi*freqs[0]*t[i] + p3) + \
                                math.cos(2.*math.pi*freqs[1]*t[i] + p4) + \
diff --git a/gr-filter/python/filter/qa_pm_remez.py b/gr-filter/python/filter/qa_pm_remez.py
old mode 100755
new mode 100644
index af85f9eedf..dd1b514f7c
--- a/gr-filter/python/filter/qa_pm_remez.py
+++ b/gr-filter/python/filter/qa_pm_remez.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+
 from gnuradio import gr, gr_unittest, filter
 import sys, math
 
@@ -28,11 +30,11 @@ import sys, math
 
 def stopband_atten_to_dev (atten_db):
     """Convert a stopband attenuation in dB to an absolute value"""
-    return 10**(-atten_db/20)
+    return 10**(-atten_db / 20)
 
 def passband_ripple_to_dev (ripple_db):
     """Convert passband ripple spec expressed in dB to an absolute value"""
-    return (10**(ripple_db/20)-1)/(10**(ripple_db/20)+1)
+    return (10**(ripple_db / 20)-1) / (10**(ripple_db / 20)+1)
 
 # ----------------------------------------------------------------
 
@@ -55,10 +57,10 @@ def remezord (fcuts, mags, devs, fsamp = 2):
     nbands = nm
 
     if nm != nd:
-        raise ValueError, "Length of mags and devs must be equal"
+        raise ValueError("Length of mags and devs must be equal")
 
     if nf != 2 * (nbands - 1):
-        raise ValueError, "Length of f must be 2 * len (mags) - 2"
+        raise ValueError("Length of f must be 2 * len (mags) - 2")
 
     for i in range (len (mags)):
         if mags[i] != 0:                        # if not stopband, get relative deviation
@@ -140,10 +142,10 @@ def lporder (freq1, freq2, delta_p, delta_s):
 class test_pm_remez(gr_unittest.TestCase):
 
     def setUp(self):
-	pass
+        pass
 
     def tearDown(self):
-	pass
+        pass
 
     def test_low_pass(self):
         gain = 1
@@ -184,4 +186,3 @@ class test_pm_remez(gr_unittest.TestCase):
 
 if __name__ == '__main__':
     gr_unittest.run(test_pm_remez, "test_pm_remez.xml")
-
diff --git a/gr-filter/python/filter/qa_rational_resampler.py b/gr-filter/python/filter/qa_rational_resampler.py
old mode 100755
new mode 100644
index a03673d76f..c413bb10ed
--- a/gr-filter/python/filter/qa_rational_resampler.py
+++ b/gr-filter/python/filter/qa_rational_resampler.py
@@ -20,6 +20,9 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import division
+
 from gnuradio import gr, gr_unittest, filter, blocks
 import math
 import random
@@ -28,7 +31,7 @@ import sys
 
 def random_floats(n):
     r = []
-    for x in xrange(n):
+    for x in range(n):
        # r.append(float(random.randint(-32768, 32768)))
         r.append(float(random.random()))
     return tuple(r)
@@ -72,10 +75,10 @@ def reference_interp_dec_filter(src_data, interp, decim, taps):
 class test_rational_resampler (gr_unittest.TestCase):
 
     def setUp(self):
-	random.seed(0)
+        random.seed(0)
 
     def tearDown(self):
-	pass
+        pass
 
 
     def test_000_1_to_1(self):
@@ -84,7 +87,7 @@ class test_rational_resampler (gr_unittest.TestCase):
         xr = (1186, -112, 339, -460, -167, 582)
         expected_result = tuple([float(x) for x in xr])
 
-	tb = gr.top_block()
+        tb = gr.top_block()
         src = blocks.vector_source_f(src_data)
         op = filter.rational_resampler_base_fff(1, 1, taps)
         dst = blocks.vector_sink_f()
@@ -107,7 +110,7 @@ class test_rational_resampler (gr_unittest.TestCase):
               1700.0,17000.0,170000.0, 0.0)
         expected_result = tuple([float(x) for x in xr])
 
-	tb = gr.top_block()
+        tb = gr.top_block()
         src = blocks.vector_source_f(src_data)
         op = filter.rational_resampler_base_fff(interpolation, 1, taps)
         dst = blocks.vector_sink_f()
@@ -124,7 +127,7 @@ class test_rational_resampler (gr_unittest.TestCase):
 
         expected_result = reference_interp_filter(src_data, interpolation, taps)
 
-	tb = gr.top_block()
+        tb = gr.top_block()
         src = blocks.vector_source_f(src_data)
         op = filter.rational_resampler_base_fff(interpolation, 1, taps)
         dst = blocks.vector_sink_f()
@@ -144,7 +147,7 @@ class test_rational_resampler (gr_unittest.TestCase):
 
         expected_result = reference_dec_filter(src_data, decimation, taps)
 
-	tb = gr.top_block()
+        tb = gr.top_block()
         src = blocks.vector_source_f(src_data)
         op = filter.rational_resampler_base_fff(1, decimation, taps)
         dst = blocks.vector_sink_f()
@@ -155,8 +158,8 @@ class test_rational_resampler (gr_unittest.TestCase):
 
         N = 10
         offset = 10#len(taps)-1
-        print expected_result[100+offset:100+offset+N]
-        print result_data[100:100+N]
+        print(expected_result[100+offset:100+offset+N])
+        print(result_data[100:100+N])
         #self.assertEqual(expected_result[offset:offset+N], result_data[0:N])
 
     # FIXME disabled.  Triggers hang on SuSE 10.0
@@ -167,9 +170,9 @@ class test_rational_resampler (gr_unittest.TestCase):
 
         random.seed(0)    # we want reproducibility
 
-        for ntaps in xrange(1, MAX_TAPS + 1):
-            for decim in xrange(1, MAX_DECIM+1):
-                for ilen in xrange(ntaps + decim, ntaps + OUTPUT_LEN*decim):
+        for ntaps in range(1, MAX_TAPS + 1):
+            for decim in range(1, MAX_DECIM+1):
+                for ilen in range(ntaps + decim, ntaps + OUTPUT_LEN*decim):
                     src_data = random_floats(ilen)
                     taps = random_floats(ntaps)
                     expected_result = reference_dec_filter(src_data, decim, taps)
@@ -201,9 +204,9 @@ class test_rational_resampler (gr_unittest.TestCase):
 
         random.seed(0)    # we want reproducibility
 
-        for ntaps in xrange(1, MAX_TAPS + 1):
-            for interp in xrange(1, MAX_INTERP+1):
-                for ilen in xrange(ntaps, ntaps + INPUT_LEN):
+        for ntaps in range(1, MAX_TAPS + 1):
+            for interp in range(1, MAX_INTERP+1):
+                for ilen in range(ntaps, ntaps + INPUT_LEN):
                     src_data = random_floats(ilen)
                     taps = random_floats(ntaps)
                     expected_result = reference_interp_filter(src_data, interp, taps)
@@ -236,7 +239,7 @@ class test_rational_resampler (gr_unittest.TestCase):
 
         expected_result = reference_interp_dec_filter(src_data, interp, decimation, taps)
 
-	tb = gr.top_block()
+        tb = gr.top_block()
         src = blocks.vector_source_f(src_data)
         op = filter.rational_resampler_base_fff(interp, decimation, taps)
         dst = blocks.vector_sink_f()
@@ -246,11 +249,10 @@ class test_rational_resampler (gr_unittest.TestCase):
         result_data = dst.data()
 
         N = 1000
-        offset = len(taps)/2
+        offset = len(taps) // 2
         self.assertFloatTuplesAlmostEqual(expected_result[offset:offset+N], result_data[0:N], 5)
 
 
 if __name__ == '__main__':
     # FIXME: Disabled, see ticket:210
     gr_unittest.run(test_rational_resampler, "test_rational_resampler.xml")
-
diff --git a/gr-filter/python/filter/qa_single_pole_iir.py b/gr-filter/python/filter/qa_single_pole_iir.py
old mode 100755
new mode 100644
index 5ca9bcdb45..a1f7cddb42
--- a/gr-filter/python/filter/qa_single_pole_iir.py
+++ b/gr-filter/python/filter/qa_single_pole_iir.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, filter, blocks
 
 class test_single_pole_iir_filter(gr_unittest.TestCase):
diff --git a/gr-filter/python/filter/rational_resampler.py b/gr-filter/python/filter/rational_resampler.py
index 961ffc6880..fb07e26c04 100644
--- a/gr-filter/python/filter/rational_resampler.py
+++ b/gr-filter/python/filter/rational_resampler.py
@@ -19,11 +19,16 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
+
 from gnuradio import gr, gru
-import filter_swig as filter
+from . import filter_swig as filter
 
 _plot = None
 
+
 def design_filter(interpolation, decimation, fractional_bw):
     """
     Given the interpolation rate, decimation rate and a fractional bandwidth,
@@ -38,17 +43,17 @@ def design_filter(interpolation, decimation, fractional_bw):
     """
 
     if fractional_bw >= 0.5 or fractional_bw <= 0:
-        raise ValueError, "Invalid fractional_bandwidth, must be in (0, 0.5)"
+        raise ValueError("Invalid fractional_bandwidth, must be in (0, 0.5)")
 
     beta = 7.0
     halfband = 0.5
-    rate = float(interpolation)/float(decimation)
+    rate = float(interpolation) / float(decimation)
     if(rate >= 1.0):
         trans_width = halfband - fractional_bw
-        mid_transition_band = halfband - trans_width/2.0
+        mid_transition_band = halfband - trans_width / 2.0
     else:
         trans_width = rate*(halfband - fractional_bw)
-        mid_transition_band = rate*halfband - trans_width/2.0
+        mid_transition_band = rate*halfband - trans_width / 2.0
 
     taps = filter.firdes.low_pass(interpolation,                     # gain
                                   interpolation,                     # Fs
@@ -82,10 +87,10 @@ class _rational_resampler_base(gr.hier_block2):
         """
 
         if not isinstance(interpolation, int) or interpolation < 1:
-            raise ValueError, "interpolation must be an integer >= 1"
+            raise ValueError("interpolation must be an integer >= 1")
 
         if not isinstance(decimation, int) or decimation < 1:
-            raise ValueError, "decimation must be an integer >= 1"
+            raise ValueError("decimation must be an integer >= 1")
 
         if taps is None and fractional_bw is None:
             fractional_bw = 0.4
@@ -108,11 +113,11 @@ class _rational_resampler_base(gr.hier_block2):
             taps = design_filter(interpolation, decimation, fractional_bw)
 
         self.resampler = resampler_base(interpolation, decimation, taps)
-	gr.hier_block2.__init__(self, "rational_resampler",
-				gr.io_signature(1, 1, self.resampler.input_signature().sizeof_stream_item(0)),
-				gr.io_signature(1, 1, self.resampler.output_signature().sizeof_stream_item(0)))
+        gr.hier_block2.__init__(self, "rational_resampler",
+                                gr.io_signature(1, 1, self.resampler.input_signature().sizeof_stream_item(0)),
+                                gr.io_signature(1, 1, self.resampler.output_signature().sizeof_stream_item(0)))
 
-	self.connect(self, self.resampler, self)
+        self.connect(self, self.resampler, self)
 
     def taps(self):
         return self.resampler.taps()
@@ -124,7 +129,7 @@ class rational_resampler_fff(_rational_resampler_base):
         float input, float output and float taps.
         """
         _rational_resampler_base.__init__(self, filter.rational_resampler_base_fff,
-				          interpolation, decimation, taps, fractional_bw)
+                                          interpolation, decimation, taps, fractional_bw)
 
 class rational_resampler_ccf(_rational_resampler_base):
     def __init__(self, interpolation, decimation, taps=None, fractional_bw=None):
diff --git a/gr-qtgui/apps/gr_constellation_plot b/gr-qtgui/apps/gr_constellation_plot
index ff5db1a9a6..fe5bdb56df 100755
--- a/gr-qtgui/apps/gr_constellation_plot
+++ b/gr-qtgui/apps/gr_constellation_plot
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+
 from gnuradio import gr
 from gnuradio import blocks
 from gnuradio.eng_arg import eng_float, intx
@@ -31,13 +33,13 @@ try:
     from PyQt4 import QtGui, QtCore
     import sip
 except ImportError:
-    print "Error: Program requires PyQt4 and gr-qtgui."
+    print("Error: Program requires PyQt4 and gr-qtgui.")
     sys.exit(1)
 
 try:
     import scipy
 except ImportError:
-    print "Error: Scipy required (www.scipy.org)."
+    print("Error: Scipy required (www.scipy.org).")
     sys.exit(1)
 
 try:
diff --git a/gr-qtgui/apps/plot_base.py b/gr-qtgui/apps/plot_base.py
index 7a039e2135..ce409000bd 100644
--- a/gr-qtgui/apps/plot_base.py
+++ b/gr-qtgui/apps/plot_base.py
@@ -20,6 +20,10 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
+
 from gnuradio import gr, blocks
 import os, sys
 
@@ -30,13 +34,13 @@ try:
     from PyQt4 import QtGui, QtCore
     import sip
 except ImportError:
-    print "Error: Program requires PyQt4 and gr-qtgui."
+    print("Error: Program requires PyQt4 and gr-qtgui.")
     sys.exit(1)
 
 try:
     import scipy
 except ImportError:
-    print "Error: Scipy required (www.scipy.org)."
+    print("Error: Scipy required (www.scipy.org).")
     sys.exit(1)
 
 try:
@@ -64,8 +68,8 @@ def read_samples(filename, start, in_size, min_size, dtype, dtype_size):
 
     if(min_size > 0):
         if(len(data) < in_size):
-            print "Warning: read in {0} samples but asked for {1} samples.".format(
-                len(data), in_size)
+            print("Warning: read in {0} samples but asked for {1} samples.".format(
+                len(data), in_size))
     else:
         # If we have to, append 0's to create min_size samples of data
         if(len(data) < min_size):
@@ -108,8 +112,8 @@ def read_samples_c(filename, start, in_size, min_size=0):
 
     if(min_size > 0):
         if(len(data) < in_size):
-            print "Warning: read in {0} samples but asked for {1} samples.".format(
-                len(data), in_size)
+            print("Warning: read in {0} samples but asked for {1} samples.".format(
+                len(data), in_size))
     else:
         # If we have to, append 0's to create min_size samples of data
         if(len(data) < min_size):
@@ -119,9 +123,9 @@ def read_samples_c(filename, start, in_size, min_size=0):
 
 class source_ints_to_float(gr.hier_block2):
     def __init__(self, data):
-	gr.hier_block2.__init__(self, "ints_to_floats",
-				gr.io_signature(0, 0, 0),
-				gr.io_signature(1, 1, gr.sizeof_float))
+        gr.hier_block2.__init__(self, "ints_to_floats",
+                                gr.io_signature(0, 0, 0),
+                                gr.io_signature(1, 1, gr.sizeof_float))
         self.src = blocks.vector_source_i(data)
         self.cvt = blocks.int_to_float()
         self.connect(self.src, self.cvt, self)
@@ -131,9 +135,9 @@ class source_ints_to_float(gr.hier_block2):
 
 class source_shorts_to_float(gr.hier_block2):
     def __init__(self, data):
-	gr.hier_block2.__init__(self, "shorts_to_floats",
-				gr.io_signature(0, 0, 0),
-				gr.io_signature(1, 1, gr.sizeof_float))
+        gr.hier_block2.__init__(self, "shorts_to_floats",
+                                gr.io_signature(0, 0, 0),
+                                gr.io_signature(1, 1, gr.sizeof_float))
         self.src = blocks.vector_source_s(data)
         self.cvt = blocks.short_to_float()
         self.connect(self.src, self.cvt, self)
@@ -143,9 +147,9 @@ class source_shorts_to_float(gr.hier_block2):
 
 class source_chars_to_float(gr.hier_block2):
     def __init__(self, data):
-	gr.hier_block2.__init__(self, "chars_to_floats",
-				gr.io_signature(0, 0, 0),
-				gr.io_signature(1, 1, gr.sizeof_float))
+        gr.hier_block2.__init__(self, "chars_to_floats",
+                                gr.io_signature(0, 0, 0),
+                                gr.io_signature(1, 1, gr.sizeof_float))
         self.src = blocks.vector_source_b(data)
         self.cvt = blocks.char_to_float()
         self.connect(self.src, self.cvt, self)
diff --git a/gr-qtgui/apps/plot_constellation_form.py b/gr-qtgui/apps/plot_constellation_form.py
index 01c6ed1865..81cb76e233 100644
--- a/gr-qtgui/apps/plot_constellation_form.py
+++ b/gr-qtgui/apps/plot_constellation_form.py
@@ -20,6 +20,10 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
+
 import sys
 from gnuradio import filter
 
@@ -27,7 +31,7 @@ try:
     from PyQt4 import QtGui, QtCore
     import sip
 except ImportError:
-    print "Error: Program requires PyQt4."
+    print("Error: Program requires PyQt4.")
     sys.exit(1)
 
 try:
@@ -48,8 +52,8 @@ class plot_constellation_form(plot_form):
         # Set the bar to go from 0.001 to max
         self.ybar.setMinimum(1)
         self.ybar.setMaximum(self._pos_scale*self.top_block._y_max)
-        self.ybar.setSingleStep(self._pos_scale*(max(self.top_block._y_range/10, 0.010)))
-        self.ybar.setPageStep(self._pos_scale*(max(self.top_block._y_range/2, 0.010)))
+        self.ybar.setSingleStep(self._pos_scale*(max(self.top_block._y_range / 10, 0.010)))
+        self.ybar.setPageStep(self._pos_scale*(max(self.top_block._y_range / 2, 0.010)))
 
         self.auto_scale = QtGui.QCheckBox("Auto Scale", self)
         if(self.top_block._auto_scale):
diff --git a/gr-qtgui/apps/plot_form.py b/gr-qtgui/apps/plot_form.py
index 931565bd3e..af262b97c3 100644
--- a/gr-qtgui/apps/plot_form.py
+++ b/gr-qtgui/apps/plot_form.py
@@ -20,11 +20,15 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
+
 try:
     from PyQt4 import QtGui, QtCore
     import sip
 except ImportError:
-    print "Error: Program requires PyQt4."
+    print("Error: Program requires PyQt4.")
     sys.exit(1)
 
 import numpy
@@ -129,8 +133,8 @@ class plot_form(QtGui.QWidget):
         self.ybar = QtGui.QSlider(QtCore.Qt.Vertical, self)
         self.ybar.setMinimum(self._pos_scale*_ymin)
         self.ybar.setMaximum(self._pos_scale*_ymax)
-        self.ybar.setSingleStep(self._pos_scale*(_yrng/10))
-        self.ybar.setPageStep(self._pos_scale*(_yrng/2))
+        self.ybar.setSingleStep(self._pos_scale*(_yrng / 10))
+        self.ybar.setPageStep(self._pos_scale*(_yrng / 2))
         self.ybar.setValue(self._pos_scale*_ymax)
         self.connect(self.ybar, QtCore.SIGNAL("valueChanged(int)"),
                      self.update_yaxis_slider)
@@ -171,7 +175,7 @@ class plot_form(QtGui.QWidget):
         self._style_edit = []
         self._marker_edit = []
         self._alpha_edit = []
-        for n in xrange(self.top_block._nsigs):
+        for n in range(self.top_block._nsigs):
             self._line_pages.append(QtGui.QDialog())
             self._line_forms.append(QtGui.QFormLayout(self._line_pages[-1]))
 
@@ -341,7 +345,7 @@ class plot_form(QtGui.QWidget):
 
     def update_yaxis_slider(self, value):
         if(not self.top_block._auto_scale):
-            value = value/self._pos_scale
+            value = value / self._pos_scale
             self.top_block._y_value = value
             self._y_min = value - self.top_block._y_range
             self._y_max = value
diff --git a/gr-qtgui/apps/plot_psd_base.py b/gr-qtgui/apps/plot_psd_base.py
index c3c03ec977..896371affb 100644
--- a/gr-qtgui/apps/plot_psd_base.py
+++ b/gr-qtgui/apps/plot_psd_base.py
@@ -20,6 +20,9 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import unicode_literals
+
 from gnuradio import gr, blocks
 from gnuradio.eng_arg import eng_float, intx
 from argparse import ArgumentParser
@@ -30,13 +33,13 @@ try:
     from PyQt4 import QtGui, QtCore
     import sip
 except ImportError:
-    print "Error: Program requires PyQt4 and gr-qtgui."
+    print("Error: Program requires PyQt4 and gr-qtgui.")
     sys.exit(1)
 
 try:
     import scipy
 except ImportError:
-    print "Error: Scipy required (www.scipy.org)."
+    print("Error: Scipy required (www.scipy.org).")
     sys.exit(1)
 
 try:
@@ -76,8 +79,8 @@ class plot_base(gr.top_block):
 
         n = 0
         self.srcs = list()
-        self._data_min = sys.maxint
-        self._data_max = -sys.maxint - 1
+        self._data_min = sys.maxsize
+        self._data_max = -sys.maxsize - 1
         for f in self._filelist:
             data,_min,_max = self.read_samples(f, self._start,
                                                self._nsamps, self._psd_size)
@@ -127,8 +130,8 @@ class plot_base(gr.top_block):
 
         self._start = newstart
 
-        self._data_min = sys.maxint
-        self._data_max = -sys.maxint - 1
+        self._data_min = sys.maxsize
+        self._data_max = -sys.maxsize - 1
         for s,f in zip(self.srcs, self._filelist):
             data,_min,_max = self.read_samples(f, self._start, newnsamps, self._psd_size)
             if(_min < self._data_min):
diff --git a/gr-qtgui/apps/plot_psd_form.py b/gr-qtgui/apps/plot_psd_form.py
index 2d1fcd10bc..93166f4faf 100644
--- a/gr-qtgui/apps/plot_psd_form.py
+++ b/gr-qtgui/apps/plot_psd_form.py
@@ -20,6 +20,9 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import unicode_literals
+
 import sys
 from gnuradio import filter
 
@@ -27,7 +30,7 @@ try:
     from PyQt4 import QtGui, QtCore
     import sip
 except ImportError:
-    print "Error: Program requires PyQt4."
+    print("Error: Program requires PyQt4.")
     sys.exit(1)
 
 try:
diff --git a/gr-qtgui/apps/plot_spectrogram_base.py b/gr-qtgui/apps/plot_spectrogram_base.py
index f568100719..3527f3fa7b 100644
--- a/gr-qtgui/apps/plot_spectrogram_base.py
+++ b/gr-qtgui/apps/plot_spectrogram_base.py
@@ -20,6 +20,10 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
+
 from gnuradio import gr, blocks
 from gnuradio.eng_arg import eng_float, intx
 from argparse import ArgumentParser
@@ -30,13 +34,13 @@ try:
     from PyQt4 import QtGui, QtCore
     import sip
 except ImportError:
-    print "Error: Program requires PyQt4 and gr-qtgui."
+    print("Error: Program requires PyQt4 and gr-qtgui.")
     sys.exit(1)
 
 try:
     import scipy
 except ImportError:
-    print "Error: Scipy required (www.scipy.org)."
+    print("Error: Scipy required (www.scipy.org).")
     sys.exit(1)
 
 try:
@@ -76,8 +80,8 @@ class plot_base(gr.top_block):
 
         n = 0
         self.srcs = list()
-        self._data_min = sys.maxint
-        self._data_max = -sys.maxint - 1
+        self._data_min = sys.maxsize
+        self._data_max = -sys.maxsize - 1
         for f in self._filelist:
             data,_min,_max = self.read_samples(f, self._start,
                                                self._nsamps, self._psd_size)
@@ -100,7 +104,7 @@ class plot_base(gr.top_block):
             self.connect(s, (self.gui_snk, i+1))
 
         self.gui_snk.set_update_time(0);
-        self.gui_snk.set_time_per_fft(self._psd_size/self._samp_rate)
+        self.gui_snk.set_time_per_fft(self._psd_size / self._samp_rate)
         self.gui_snk.enable_menu(False)
         self.gui_snk.set_fft_average(self._avg)
 
@@ -127,13 +131,13 @@ class plot_base(gr.top_block):
         self.stop()
         self.wait()
         self.gui_snk.clear_data()
-        self.gui_snk.set_time_per_fft(self._psd_size/self._samp_rate)
+        self.gui_snk.set_time_per_fft(self._psd_size / self._samp_rate)
 
         self._start = newstart
         self._nsamps = newnsamps
 
-        self._data_min = sys.maxint
-        self._data_max = -sys.maxint - 1
+        self._data_min = sys.maxsize
+        self._data_max = -sys.maxsize - 1
         for s,f in zip(self.srcs, self._filelist):
             data,_min,_max = self.read_samples(f, self._start, newnsamps, self._psd_size)
             if(_min < self._data_min):
diff --git a/gr-qtgui/apps/plot_spectrogram_form.py b/gr-qtgui/apps/plot_spectrogram_form.py
index 17cb0335bd..6d1b17de67 100644
--- a/gr-qtgui/apps/plot_spectrogram_form.py
+++ b/gr-qtgui/apps/plot_spectrogram_form.py
@@ -20,6 +20,9 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import unicode_literals
+
 import sys
 from gnuradio import filter
 
@@ -27,7 +30,7 @@ try:
     from PyQt4 import QtGui, QtCore
     import sip
 except ImportError:
-    print "Error: Program requires PyQt4."
+    print("Error: Program requires PyQt4.")
     sys.exit(1)
 
 try:
@@ -113,7 +116,7 @@ class plot_spectrogram_form(plot_form):
         self._style_edit = []
         self._marker_edit = []
         self._alpha_edit = []
-        for n in xrange(self.top_block._nsigs):
+        for n in range(self.top_block._nsigs):
             self._line_pages.append(QtGui.QDialog())
             self._line_forms.append(QtGui.QFormLayout(self._line_pages[-1]))
 
diff --git a/gr-qtgui/apps/plot_time_base.py b/gr-qtgui/apps/plot_time_base.py
index cfbe5dc6cb..7078e332cd 100644
--- a/gr-qtgui/apps/plot_time_base.py
+++ b/gr-qtgui/apps/plot_time_base.py
@@ -20,6 +20,9 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import unicode_literals
+
 from gnuradio import gr, blocks
 from gnuradio.eng_arg import eng_float, intx
 from argparse import ArgumentParser
@@ -30,13 +33,13 @@ try:
     from PyQt4 import QtGui, QtCore
     import sip
 except ImportError:
-    print "Error: Program requires PyQt4 and gr-qtgui."
+    print("Error: Program requires PyQt4 and gr-qtgui.")
     sys.exit(1)
 
 try:
     import scipy
 except ImportError:
-    print "Error: Scipy required (www.scipy.org)."
+    print("Error: Scipy required (www.scipy.org).")
     sys.exit(1)
 
 try:
@@ -75,8 +78,8 @@ class plot_base(gr.top_block):
 
         n = 0
         self.srcs = list()
-        self._data_min = sys.maxint
-        self._data_max = -sys.maxint - 1
+        self._data_min = sys.maxsize
+        self._data_max = -sys.maxsize - 1
         for f in self._filelist:
             data,_min,_max = self.read_samples(f, self._start, self._nsamps)
             if(_min < self._data_min):
@@ -131,8 +134,8 @@ class plot_base(gr.top_block):
 
         self._start = newstart
 
-        self._data_min = sys.maxint
-        self._data_max = -sys.maxint - 1
+        self._data_min = sys.maxsize
+        self._data_max = -sys.maxsize - 1
         for s,f in zip(self.srcs, self._filelist):
             data,_min,_max = self.read_samples(f, self._start, newnsamps)
             if(_min < self._data_min):
diff --git a/gr-qtgui/apps/plot_time_form.py b/gr-qtgui/apps/plot_time_form.py
index 0ab94e6cfe..0a16aa6241 100644
--- a/gr-qtgui/apps/plot_time_form.py
+++ b/gr-qtgui/apps/plot_time_form.py
@@ -20,6 +20,9 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import unicode_literals
+
 import sys
 from gnuradio import filter
 
@@ -27,7 +30,7 @@ try:
     from PyQt4 import QtGui, QtCore
     import sip
 except ImportError:
-    print "Error: Program requires PyQt4."
+    print("Error: Program requires PyQt4.")
     sys.exit(1)
 
 try:
@@ -70,7 +73,7 @@ class plot_time_form(plot_form):
             index = self._qwtmarkers['Circle']+1
         else:
             index = self._qwtmarkers['None']+1
-        for n in xrange(self.top_block._nsigs):
+        for n in range(self.top_block._nsigs):
             self._marker_edit[n].setCurrentIndex(index)
 
     def update_samp_rate(self):
diff --git a/gr-qtgui/apps/plot_time_raster_base.py b/gr-qtgui/apps/plot_time_raster_base.py
index e84b84c295..4eb6ec4613 100644
--- a/gr-qtgui/apps/plot_time_raster_base.py
+++ b/gr-qtgui/apps/plot_time_raster_base.py
@@ -20,6 +20,9 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import unicode_literals
+
 from gnuradio import gr, blocks
 from gnuradio.eng_arg import eng_float, intx
 from argparse import ArgumentParser
@@ -30,13 +33,13 @@ try:
     from PyQt4 import QtGui, QtCore
     import sip
 except ImportError:
-    print "Error: Program requires PyQt4 and gr-qtgui."
+    print("Error: Program requires PyQt4 and gr-qtgui.")
     sys.exit(1)
 
 try:
     import scipy
 except ImportError:
-    print "Error: Scipy required (www.scipy.org)."
+    print("Error: Scipy required (www.scipy.org).")
     sys.exit(1)
 
 try:
@@ -75,8 +78,8 @@ class plot_base(gr.top_block):
 
         n = 0
         self.srcs = list()
-        self._data_min = sys.maxint
-        self._data_max = -sys.maxint - 1
+        self._data_min = sys.maxsize
+        self._data_max = -sys.maxsize - 1
         for f in self._filelist:
             data,_min,_max = self.read_samples(f, self._start, self._nsamps)
             if(_min < self._data_min):
@@ -129,8 +132,8 @@ class plot_base(gr.top_block):
 
         self._start = newstart
 
-        self._data_min = sys.maxint
-        self._data_max = -sys.maxint - 1
+        self._data_min = sys.maxsize
+        self._data_max = -sys.maxsize - 1
         for s,f in zip(self.srcs, self._filelist):
             data,_min,_max = self.read_samples(f, self._start, newnsamps)
             if(_min < self._data_min):
diff --git a/gr-qtgui/apps/plot_time_raster_form.py b/gr-qtgui/apps/plot_time_raster_form.py
index 32fbba0765..fd27d9574d 100644
--- a/gr-qtgui/apps/plot_time_raster_form.py
+++ b/gr-qtgui/apps/plot_time_raster_form.py
@@ -20,6 +20,9 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import unicode_literals
+
 import sys, math
 from gnuradio import filter
 
@@ -27,7 +30,7 @@ try:
     from PyQt4 import QtGui, QtCore
     import sip
 except ImportError:
-    print "Error: Program requires PyQt4."
+    print("Error: Program requires PyQt4.")
     sys.exit(1)
 
 try:
@@ -81,7 +84,7 @@ class plot_time_raster_form(plot_form):
         self._style_edit = []
         self._marker_edit = []
         self._alpha_edit = []
-        for n in xrange(self.top_block._nsigs):
+        for n in range(self.top_block._nsigs):
             self._line_pages.append(QtGui.QDialog())
             self._line_forms.append(QtGui.QFormLayout(self._line_pages[-1]))
 
@@ -153,5 +156,3 @@ class plot_time_raster_form(plot_form):
 
         nsamps = int(math.ceil(self.top_block._ncols*(n+1)))
         self.top_block.reset(self._start, nsamps)
-
-
diff --git a/gr-qtgui/apps/uhd_display.py b/gr-qtgui/apps/uhd_display.py
old mode 100755
new mode 100644
index 0e0c8a177d..58494f3af3
--- a/gr-qtgui/apps/uhd_display.py
+++ b/gr-qtgui/apps/uhd_display.py
@@ -20,6 +20,9 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import filter
 from gnuradio import blocks
@@ -34,14 +37,14 @@ try:
     from PyQt4 import QtGui, QtCore
     import sip
 except ImportError:
-    print "Error: Program requires PyQt4 and gr-qtgui."
+    print("Error: Program requires PyQt4 and gr-qtgui.")
     sys.exit(1)
 
 try:
     from usrp_display_qtgui import Ui_MainWindow
 except ImportError:
-    print "Error: could not find usrp_display_qtgui.py:"
-    print "\t\"pyuic4 usrp_display_qtgui.ui -o usrp_display_qtgui.py\""
+    print("Error: could not find usrp_display_qtgui.py:")
+    print("\t\"pyuic4 usrp_display_qtgui.ui -o usrp_display_qtgui.py\"")
     sys.exit(1)
 
 
@@ -182,13 +185,13 @@ class my_top_block(gr.top_block):
         if options.gain is None:
             # if no gain was specified, use the mid-point in dB
             g = self.u.get_gain_range()
-            options.gain = float(g.start()+g.stop())/2
+            options.gain = float(g.start()+g.stop()) / 2
         self.set_gain(options.gain)
 
         if options.freq is None:
             # if no freq was specified, use the mid-point
             r = self.u.get_freq_range()
-            options.freq = float(r.start()+r.stop())/2
+            options.freq = float(r.start()+r.stop()) / 2
         self.set_frequency(options.freq)
 
         self._fftsize = options.fft_size
@@ -212,9 +215,9 @@ class my_top_block(gr.top_block):
         self.connect(self.u, self.amp, self.snk)
 
         if self.show_debug_info:
-            print "Bandwidth: ", self.u.get_samp_rate()
-            print "Center Freq: ", self.u.get_center_freq()
-            print "Freq Range: ", self.u.get_freq_range()
+            print("Bandwidth: ", self.u.get_samp_rate())
+            print("Center Freq: ", self.u.get_center_freq())
+            print("Freq Range: ", self.u.get_freq_range())
 
         # Get the reference pointer to the SpectrumDisplayForm QWidget
         # Wrap the pointer as a PyQt SIP object
diff --git a/gr-qtgui/apps/usrp_display_qtgui.py b/gr-qtgui/apps/usrp_display_qtgui.py
index 4c9de3a53c..68c5d6cfb7 100644
--- a/gr-qtgui/apps/usrp_display_qtgui.py
+++ b/gr-qtgui/apps/usrp_display_qtgui.py
@@ -7,6 +7,7 @@
 #
 # WARNING! All changes made in this file will be lost!
 
+from __future__ import unicode_literals
 from PyQt4 import QtCore, QtGui
 
 class Ui_MainWindow(object):
diff --git a/gr-qtgui/examples/pyqt_const_c.py b/gr-qtgui/examples/pyqt_const_c.py
old mode 100755
new mode 100644
index 0bb6c20d59..e789e013bf
--- a/gr-qtgui/examples/pyqt_const_c.py
+++ b/gr-qtgui/examples/pyqt_const_c.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import unicode_literals
 from gnuradio import gr, filter
 from gnuradio import blocks
 import sys
@@ -109,14 +111,14 @@ class control_box(QtWidgets.QWidget):
             newfreq = float(self.freq1Edit.text())
             self.signal1.set_frequency(newfreq)
         except ValueError:
-            print "Bad frequency value entered"
+            print("Bad frequency value entered")
 
     def amp1EditText(self):
         try:
             newamp = float(self.amp1Edit.text())
             self.signal1.set_amplitude(newamp)
         except ValueError:
-            print "Bad amplitude value entered"
+            print("Bad amplitude value entered")
 
 
     def freq2EditText(self):
@@ -124,14 +126,14 @@ class control_box(QtWidgets.QWidget):
             newfreq = float(self.freq2Edit.text())
             self.signal2.set_frequency(newfreq)
         except ValueError:
-            print "Bad frequency value entered"
+            print("Bad frequency value entered")
 
     def amp2EditText(self):
         try:
             newamp = float(self.amp2Edit.text())
             self.signal2.set_amplitude(newamp)
         except ValueError:
-            print "Bad amplitude value entered"
+            print("Bad amplitude value entered")
 
 
 class my_top_block(gr.top_block):
diff --git a/gr-qtgui/examples/pyqt_example_c.py b/gr-qtgui/examples/pyqt_example_c.py
old mode 100755
new mode 100644
index 89ca7b2820..5854d968c0
--- a/gr-qtgui/examples/pyqt_example_c.py
+++ b/gr-qtgui/examples/pyqt_example_c.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import unicode_literals
 from gnuradio import gr, filter
 from gnuradio import blocks
 import sys
@@ -110,14 +112,14 @@ class control_box(QtWidgets.QWidget):
             newfreq = float(self.freq1Edit.text())
             self.signal1.set_frequency(newfreq)
         except ValueError:
-            print "Bad frequency value entered"
+            print("Bad frequency value entered")
 
     def amp1EditText(self):
         try:
             newamp = float(self.amp1Edit.text())
             self.signal1.set_amplitude(newamp)
         except ValueError:
-            print "Bad amplitude value entered"
+            print("Bad amplitude value entered")
 
 
     def freq2EditText(self):
@@ -125,14 +127,14 @@ class control_box(QtWidgets.QWidget):
             newfreq = float(self.freq2Edit.text())
             self.signal2.set_frequency(newfreq)
         except ValueError:
-            print "Bad frequency value entered"
+            print("Bad frequency value entered")
 
     def amp2EditText(self):
         try:
             newamp = float(self.amp2Edit.text())
             self.signal2.set_amplitude(newamp)
         except ValueError:
-            print "Bad amplitude value entered"
+            print("Bad amplitude value entered")
 
 
 class my_top_block(gr.top_block):
diff --git a/gr-qtgui/examples/pyqt_example_f.py b/gr-qtgui/examples/pyqt_example_f.py
old mode 100755
new mode 100644
index 77a7478aa2..e2f41b57cf
--- a/gr-qtgui/examples/pyqt_example_f.py
+++ b/gr-qtgui/examples/pyqt_example_f.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import unicode_literals
 from gnuradio import gr, filter
 from gnuradio import blocks
 import sys
@@ -104,14 +106,14 @@ class control_box(QtWidgets.QWidget):
             newfreq = float(self.freq1Edit.text())
             self.signal1.set_frequency(newfreq)
         except ValueError:
-            print "Bad frequency value entered"
+            print("Bad frequency value entered")
 
     def amp1EditText(self):
         try:
             newamp = float(self.amp1Edit.text())
             self.signal1.set_amplitude(newamp)
         except ValueError:
-            print "Bad amplitude value entered"
+            print("Bad amplitude value entered")
 
 
     def freq2EditText(self):
@@ -119,14 +121,14 @@ class control_box(QtWidgets.QWidget):
             newfreq = float(self.freq2Edit.text())
             self.signal2.set_frequency(newfreq)
         except ValueError:
-            print "Bad frequency value entered"
+            print("Bad frequency value entered")
 
     def amp2EditText(self):
         try:
             newamp = float(self.amp2Edit.text())
             self.signal2.set_amplitude(newamp)
         except ValueError:
-            print "Bad amplitude value entered"
+            print("Bad amplitude value entered")
 
 
 class my_top_block(gr.top_block):
diff --git a/gr-qtgui/examples/pyqt_freq_c.py b/gr-qtgui/examples/pyqt_freq_c.py
old mode 100755
new mode 100644
index 954a078df8..9140bbb882
--- a/gr-qtgui/examples/pyqt_freq_c.py
+++ b/gr-qtgui/examples/pyqt_freq_c.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import unicode_literals
 from gnuradio import gr, filter
 from gnuradio import blocks
 import sys
@@ -110,14 +112,14 @@ class control_box(QtWidgets.QWidget):
             newfreq = float(self.freq1Edit.text())
             self.signal1.set_frequency(newfreq)
         except ValueError:
-            print "Bad frequency value entered"
+            print("Bad frequency value entered")
 
     def amp1EditText(self):
         try:
             newamp = float(self.amp1Edit.text())
             self.signal1.set_amplitude(newamp)
         except ValueError:
-            print "Bad amplitude value entered"
+            print("Bad amplitude value entered")
 
 
     def freq2EditText(self):
@@ -125,14 +127,14 @@ class control_box(QtWidgets.QWidget):
             newfreq = float(self.freq2Edit.text())
             self.signal2.set_frequency(newfreq)
         except ValueError:
-            print "Bad frequency value entered"
+            print("Bad frequency value entered")
 
     def amp2EditText(self):
         try:
             newamp = float(self.amp2Edit.text())
             self.signal2.set_amplitude(newamp)
         except ValueError:
-            print "Bad amplitude value entered"
+            print("Bad amplitude value entered")
 
 
 class my_top_block(gr.top_block):
diff --git a/gr-qtgui/examples/pyqt_freq_f.py b/gr-qtgui/examples/pyqt_freq_f.py
old mode 100755
new mode 100644
index d7d389b736..06a6d95b0b
--- a/gr-qtgui/examples/pyqt_freq_f.py
+++ b/gr-qtgui/examples/pyqt_freq_f.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import unicode_literals
 from gnuradio import gr, filter
 from gnuradio import blocks
 import sys
@@ -105,14 +107,14 @@ class control_box(QtWidgets.QWidget):
             newfreq = float(self.freq1Edit.text())
             self.signal1.set_frequency(newfreq)
         except ValueError:
-            print "Bad frequency value entered"
+            print("Bad frequency value entered")
 
     def amp1EditText(self):
         try:
             newamp = float(self.amp1Edit.text())
             self.signal1.set_amplitude(newamp)
         except ValueError:
-            print "Bad amplitude value entered"
+            print("Bad amplitude value entered")
 
 
     def freq2EditText(self):
@@ -120,14 +122,14 @@ class control_box(QtWidgets.QWidget):
             newfreq = float(self.freq2Edit.text())
             self.signal2.set_frequency(newfreq)
         except ValueError:
-            print "Bad frequency value entered"
+            print("Bad frequency value entered")
 
     def amp2EditText(self):
         try:
             newamp = float(self.amp2Edit.text())
             self.signal2.set_amplitude(newamp)
         except ValueError:
-            print "Bad amplitude value entered"
+            print("Bad amplitude value entered")
 
 
 class my_top_block(gr.top_block):
diff --git a/gr-qtgui/examples/pyqt_histogram_f.py b/gr-qtgui/examples/pyqt_histogram_f.py
old mode 100755
new mode 100644
index 81f7b9d40b..cf2f59b9a3
--- a/gr-qtgui/examples/pyqt_histogram_f.py
+++ b/gr-qtgui/examples/pyqt_histogram_f.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import blocks
 import sys
@@ -118,21 +120,21 @@ class control_box(QtWidgets.QWidget):
             newfreq = float(self.freq1Edit.text())
             self.signal1.set_frequency(newfreq)
         except ValueError:
-            print "Bad frequency value entered"
+            print("Bad frequency value entered")
 
     def amp1EditText(self):
         try:
             newamp = float(self.amp1Edit.text())
             self.signal1.set_amplitude(newamp)
         except ValueError:
-            print "Bad amplitude value entered"
+            print("Bad amplitude value entered")
 
     def amp2EditText(self):
         try:
             newamp = float(self.amp2Edit.text())
             self.signal2.set_amplitude(newamp)
         except ValueError:
-            print "Bad amplitude value entered"
+            print("Bad amplitude value entered")
 
     def set_nsamps(self):
         res = self.hist_npts.text().toInt()
diff --git a/gr-qtgui/examples/pyqt_time_c.py b/gr-qtgui/examples/pyqt_time_c.py
old mode 100755
new mode 100644
index b595c8ff85..8196b62dcc
--- a/gr-qtgui/examples/pyqt_time_c.py
+++ b/gr-qtgui/examples/pyqt_time_c.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import blocks
 import sys
@@ -110,14 +112,14 @@ class control_box(QtWidgets.QWidget):
             newfreq = float(self.freq1Edit.text())
             self.signal1.set_frequency(newfreq)
         except ValueError:
-            print "Bad frequency value entered"
+            print("Bad frequency value entered")
 
     def amp1EditText(self):
         try:
             newamp = float(self.amp1Edit.text())
             self.signal1.set_amplitude(newamp)
         except ValueError:
-            print "Bad amplitude value entered"
+            print("Bad amplitude value entered")
 
 
     def freq2EditText(self):
@@ -125,14 +127,14 @@ class control_box(QtWidgets.QWidget):
             newfreq = float(self.freq2Edit.text())
             self.signal2.set_frequency(newfreq)
         except ValueError:
-            print "Bad frequency value entered"
+            print("Bad frequency value entered")
 
     def amp2EditText(self):
         try:
             newamp = float(self.amp2Edit.text())
             self.signal2.set_amplitude(newamp)
         except ValueError:
-            print "Bad amplitude value entered"
+            print("Bad amplitude value entered")
 
 
 class my_top_block(gr.top_block):
diff --git a/gr-qtgui/examples/pyqt_time_f.py b/gr-qtgui/examples/pyqt_time_f.py
old mode 100755
new mode 100644
index 3689ebff54..9fc9dd5e4c
--- a/gr-qtgui/examples/pyqt_time_f.py
+++ b/gr-qtgui/examples/pyqt_time_f.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import blocks
 import sys
@@ -104,14 +106,14 @@ class control_box(QtWidgets.QWidget):
             newfreq = float(self.freq1Edit.text())
             self.signal1.set_frequency(newfreq)
         except ValueError:
-            print "Bad frequency value entered"
+            print("Bad frequency value entered")
 
     def amp1EditText(self):
         try:
             newamp = float(self.amp1Edit.text())
             self.signal1.set_amplitude(newamp)
         except ValueError:
-            print "Bad amplitude value entered"
+            print("Bad amplitude value entered")
 
 
     def freq2EditText(self):
@@ -119,14 +121,14 @@ class control_box(QtWidgets.QWidget):
             newfreq = float(self.freq2Edit.text())
             self.signal2.set_frequency(newfreq)
         except ValueError:
-            print "Bad frequency value entered"
+            print("Bad frequency value entered")
 
     def amp2EditText(self):
         try:
             newamp = float(self.amp2Edit.text())
             self.signal2.set_amplitude(newamp)
         except ValueError:
-            print "Bad amplitude value entered"
+            print("Bad amplitude value entered")
 
 
 class my_top_block(gr.top_block):
diff --git a/gr-qtgui/examples/pyqt_time_raster_b.py b/gr-qtgui/examples/pyqt_time_raster_b.py
old mode 100755
new mode 100644
index 7a94400283..278cb90ed0
--- a/gr-qtgui/examples/pyqt_time_raster_b.py
+++ b/gr-qtgui/examples/pyqt_time_raster_b.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import blocks
 from gnuradio import blocks
@@ -30,7 +32,7 @@ try:
     from PyQt5 import QtWidgets, Qt
     import sip
 except ImportError:
-    print "Error: Program requires PyQt5 and gr-qtgui."
+    print("Error: Program requires PyQt5 and gr-qtgui.")
     sys.exit(1)
 
 class dialog_box(QtWidgets.QWidget):
diff --git a/gr-qtgui/examples/pyqt_time_raster_f.py b/gr-qtgui/examples/pyqt_time_raster_f.py
old mode 100755
new mode 100644
index 0f9de94bcb..249ec07010
--- a/gr-qtgui/examples/pyqt_time_raster_f.py
+++ b/gr-qtgui/examples/pyqt_time_raster_f.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import blocks
 import sys
@@ -29,7 +31,7 @@ try:
     from PyQt5 import QtWidgets, Qt
     import sip
 except ImportError:
-    print "Error: Program requires PyQt5 and gr-qtgui."
+    print("Error: Program requires PyQt5 and gr-qtgui.")
     sys.exit(1)
 
 class dialog_box(QtWidgets.QWidget):
diff --git a/gr-qtgui/examples/pyqt_waterfall_c.py b/gr-qtgui/examples/pyqt_waterfall_c.py
old mode 100755
new mode 100644
index 3f7119f97f..2c183a99ac
--- a/gr-qtgui/examples/pyqt_waterfall_c.py
+++ b/gr-qtgui/examples/pyqt_waterfall_c.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import unicode_literals
 from gnuradio import gr, filter
 from gnuradio import blocks
 import sys
@@ -110,14 +112,14 @@ class control_box(QtWidgets.QWidget):
             newfreq = float(self.freq1Edit.text())
             self.signal1.set_frequency(newfreq)
         except ValueError:
-            print "Bad frequency value entered"
+            print("Bad frequency value entered")
 
     def amp1EditText(self):
         try:
             newamp = float(self.amp1Edit.text())
             self.signal1.set_amplitude(newamp)
         except ValueError:
-            print "Bad amplitude value entered"
+            print("Bad amplitude value entered")
 
 
     def freq2EditText(self):
@@ -125,14 +127,14 @@ class control_box(QtWidgets.QWidget):
             newfreq = float(self.freq2Edit.text())
             self.signal2.set_frequency(newfreq)
         except ValueError:
-            print "Bad frequency value entered"
+            print("Bad frequency value entered")
 
     def amp2EditText(self):
         try:
             newamp = float(self.amp2Edit.text())
             self.signal2.set_amplitude(newamp)
         except ValueError:
-            print "Bad amplitude value entered"
+            print("Bad amplitude value entered")
 
 
 class my_top_block(gr.top_block):
diff --git a/gr-qtgui/examples/pyqt_waterfall_f.py b/gr-qtgui/examples/pyqt_waterfall_f.py
old mode 100755
new mode 100644
index 71c72afad6..660e7595f2
--- a/gr-qtgui/examples/pyqt_waterfall_f.py
+++ b/gr-qtgui/examples/pyqt_waterfall_f.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import unicode_literals
 from gnuradio import gr, filter
 from gnuradio import blocks
 import sys
@@ -104,14 +106,14 @@ class control_box(QtWidgets.QWidget):
             newfreq = float(self.freq1Edit.text())
             self.signal1.set_frequency(newfreq)
         except ValueError:
-            print "Bad frequency value entered"
+            print("Bad frequency value entered")
 
     def amp1EditText(self):
         try:
             newamp = float(self.amp1Edit.text())
             self.signal1.set_amplitude(newamp)
         except ValueError:
-            print "Bad amplitude value entered"
+            print("Bad amplitude value entered")
 
 
     def freq2EditText(self):
@@ -119,14 +121,14 @@ class control_box(QtWidgets.QWidget):
             newfreq = float(self.freq2Edit.text())
             self.signal2.set_frequency(newfreq)
         except ValueError:
-            print "Bad frequency value entered"
+            print("Bad frequency value entered")
 
     def amp2EditText(self):
         try:
             newamp = float(self.amp2Edit.text())
             self.signal2.set_amplitude(newamp)
         except ValueError:
-            print "Bad amplitude value entered"
+            print("Bad amplitude value entered")
 
 
 class my_top_block(gr.top_block):
diff --git a/gr-qtgui/python/qtgui/CMakeLists.txt b/gr-qtgui/python/qtgui/CMakeLists.txt
index 5df3a7d91b..f3fc70351d 100644
--- a/gr-qtgui/python/qtgui/CMakeLists.txt
+++ b/gr-qtgui/python/qtgui/CMakeLists.txt
@@ -51,6 +51,6 @@ if(ENABLE_TESTING)
   file(GLOB py_qa_test_files "qa_*.py")
   foreach(py_qa_test_file ${py_qa_test_files})
     get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE)
-    GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${py_qa_test_file})
+    GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} -B ${py_qa_test_file})
   endforeach(py_qa_test_file)
 endif(ENABLE_TESTING)
diff --git a/gr-qtgui/python/qtgui/__init__.py b/gr-qtgui/python/qtgui/__init__.py
index 8b60dc6dbe..c5527410aa 100644
--- a/gr-qtgui/python/qtgui/__init__.py
+++ b/gr-qtgui/python/qtgui/__init__.py
@@ -22,17 +22,18 @@
 '''
 Provides a GUI interface using the QT backend.
 '''
+from __future__ import unicode_literals
 
 # The presence of this file turns this directory into a Python package
 import os
 
 
 try:
-    from qtgui_swig import *
+    from .qtgui_swig import *
 except ImportError:
     dirname, filename = os.path.split(os.path.abspath(__file__))
     __path__.append(os.path.join(dirname, "..", "..", "swig"))
-    from qtgui_swig import *
+    from .qtgui_swig import *
 
-from range import Range, RangeWidget
-import util
+from .range import Range, RangeWidget
+from . import util
diff --git a/gr-qtgui/python/qtgui/qa_qtgui.py b/gr-qtgui/python/qtgui/qa_qtgui.py
old mode 100755
new mode 100644
index d98cf1fc28..e46301071b
--- a/gr-qtgui/python/qtgui/qa_qtgui.py
+++ b/gr-qtgui/python/qtgui/qa_qtgui.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, qtgui
 
 class test_qtgui(gr_unittest.TestCase):
diff --git a/gr-qtgui/python/qtgui/util.py.cmakein b/gr-qtgui/python/qtgui/util.py.cmakein
index ec654d9ba2..4014fc1db1 100644
--- a/gr-qtgui/python/qtgui/util.py.cmakein
+++ b/gr-qtgui/python/qtgui/util.py.cmakein
@@ -21,7 +21,10 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+
 @PY_QT_IMPORT@
+
 from gnuradio import gr
 
 def check_set_qss():
@@ -31,4 +34,4 @@ def check_set_qss():
         try:
             app.setStyleSheet(open(qssfile).read())
         except:
-            print "WARNING: bad QSS file, %s"%(qssfile)
+            print("WARNING: bad QSS file, %s"%(qssfile))
diff --git a/gr-trellis/doc/make_numbered_listing.py b/gr-trellis/doc/make_numbered_listing.py
old mode 100755
new mode 100644
index c295dc8763..09a82cfaa4
--- a/gr-trellis/doc/make_numbered_listing.py
+++ b/gr-trellis/doc/make_numbered_listing.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+from __future__ import unicode_literals
 import sys
 import os, os.path
 from optparse import OptionParser
diff --git a/gr-trellis/doc/test_tcm.py b/gr-trellis/doc/test_tcm.py
index 61ab00f1c8..e9a0ba59eb 100644
--- a/gr-trellis/doc/test_tcm.py
+++ b/gr-trellis/doc/test_tcm.py
@@ -1,5 +1,8 @@
 #!/usr/bin/env python
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import audio
 from gnuradio import trellis, digital, blocks
@@ -20,14 +23,14 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed):
 
     # TX
     src = blocks.lfsr_32k_source_s()
-    src_head = blocks.head (gr.sizeof_short,Kb/16) # packet size in shorts
+    src_head = blocks.head (gr.sizeof_short,Kb / 16) # packet size in shorts
     s2fsmi = blocks.packed_to_unpacked_ss(bitspersymbol,gr.GR_MSB_FIRST) # unpack shorts to symbols compatible with the FSM input cardinality
     enc = trellis.encoder_ss(f,0) # initial state = 0
     mod = digital.chunks_to_symbols_sf(constellation,dimensionality)
 
     # CHANNEL
     add = blocks.add_ff()
-    noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed)
+    noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0 / 2),seed)
 
     # RX
     metrics = trellis.metrics_f(f.O(),dimensionality,constellation,digital.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for Viterbi
@@ -67,31 +70,31 @@ def main(args):
     # system parameters
     f=trellis.fsm(fname) # get the FSM specification from a file
     Kb=1024*16  # packet size in bits (make it multiple of 16 so it can be packed in a short)
-    bitspersymbol = int(round(math.log(f.I())/math.log(2))) # bits per FSM input symbol
-    K=Kb/bitspersymbol # packet size in trellis steps
+    bitspersymbol = int(round(math.log(f.I()) / math.log(2))) # bits per FSM input symbol
+    K=Kb / bitspersymbol # packet size in trellis steps
     modulation = fsm_utils.psk4 # see fsm_utlis.py for available predefined modulations
     dimensionality = modulation[0]
     constellation = modulation[1]
-    if len(constellation)/dimensionality != f.O():
+    if len(constellation) / dimensionality != f.O():
         sys.stderr.write ('Incompatible FSM output cardinality and modulation size.\n')
         sys.exit (1)
     # calculate average symbol energy
     Es = 0
     for i in range(len(constellation)):
         Es = Es + constellation[i]**2
-    Es = Es / (len(constellation)/dimensionality)
-    N0=Es/pow(10.0,esn0_db/10.0); # noise variance
+    Es = Es / (old_div(len(constellation,dimensionality)))
+    N0=Es / pow(10.0,old_div(esn0_db,10.0)); # noise variance
 
     tot_s=0
     terr_s=0
     for i in range(rep):
-        (s,e)=run_test(f,Kb,bitspersymbol,K,dimensionality,constellation,N0,-long(666+i)) # run experiment with different seed to get different noise realizations
+        (s,e)=run_test(f,Kb,bitspersymbol,K,dimensionality,constellation,N0,-int(666+i)) # run experiment with different seed to get different noise realizations
         tot_s=tot_s+s
         terr_s=terr_s+e
         if (i%100==0):
-            print i,s,e,tot_s,terr_s, '%e' % ((1.0*terr_s)/tot_s)
+            print(i,s,e,tot_s,terr_s, '%e' % ((1.0*terr_s) / tot_s))
     # estimate of the (short) error rate
-    print tot_s,terr_s, '%e' % ((1.0*terr_s)/tot_s)
+    print(tot_s,terr_s, '%e' % ((1.0*terr_s) / tot_s))
 
 
 if __name__ == '__main__':
diff --git a/gr-trellis/doc/test_viterbi_equalization1.py b/gr-trellis/doc/test_viterbi_equalization1.py
old mode 100755
new mode 100644
index c1a831d0bb..95cb119edf
--- a/gr-trellis/doc/test_viterbi_equalization1.py
+++ b/gr-trellis/doc/test_viterbi_equalization1.py
@@ -1,5 +1,8 @@
 #!/usr/bin/env python
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import audio
 from gnuradio import trellis, digital, filter, blocks
@@ -34,7 +37,7 @@ def run_test (f,Kb,bitspersymbol,K,channel,modulation,dimensionality,tot_constel
     # CHANNEL
     isi = filter.fir_filter_fff(1,channel)
     add = blocks.add_ff()
-    noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed)
+    noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0 / 2),seed)
 
     # RX
     skip = blocks.skiphead(gr.sizeof_float, L) # skip the first L samples since you know they are coming from the L zero symbols
@@ -78,14 +81,14 @@ def main(args):
     modulation = fsm_utils.pam4 # see fsm_utlis.py for available predefined modulations
     channel = fsm_utils.c_channel # see fsm_utlis.py for available predefined test channels
     f=trellis.fsm(len(modulation[1]),len(channel)) # generate the FSM automatically
-    bitspersymbol = int(round(math.log(f.I())/math.log(2))) # bits per FSM input symbol
-    K=Kb/bitspersymbol # packet size in trellis steps
+    bitspersymbol = int(round(math.log(f.I()) / math.log(2))) # bits per FSM input symbol
+    K=Kb / bitspersymbol # packet size in trellis steps
 
     tot_channel = fsm_utils.make_isi_lookup(modulation,channel,True) # generate the lookup table (normalize energy to 1)
     dimensionality = tot_channel[0]
     tot_constellation = tot_channel[1]
-    N0=pow(10.0,-esn0_db/10.0); # noise variance
-    if len(tot_constellation)/dimensionality != f.O():
+    N0=pow(10.0,-esn0_db / 10.0); # noise variance
+    if len(tot_constellation) / dimensionality != f.O():
         sys.stderr.write ('Incompatible FSM output cardinality and lookup table size.\n')
         sys.exit (1)
 
@@ -94,14 +97,14 @@ def main(args):
     terr_p=0 # total number of packets in error
 
     for i in range(rep):
-        (s,e)=run_test(f,Kb,bitspersymbol,K,channel,modulation,dimensionality,tot_constellation,N0,-long(666+i)) # run experiment with different seed to get different data and noise realizations
+        (s,e)=run_test(f,Kb,bitspersymbol,K,channel,modulation,dimensionality,tot_constellation,N0,-int(666+i)) # run experiment with different seed to get different data and noise realizations
         tot_s=tot_s+s
         terr_s=terr_s+e
         terr_p=terr_p+(terr_s!=0)
         if ((i+1)%100==0) : # display progress
-            print i+1,terr_p, '%.2e' % ((1.0*terr_p)/(i+1)),tot_s,terr_s, '%.2e' % ((1.0*terr_s)/tot_s)
+            print(i+1,terr_p, '%.2e' % ((1.0*terr_p) / (i+1)),tot_s,terr_s, '%.2e' % ((1.0*terr_s) / tot_s))
     # estimate of the (short or symbol) error rate
-    print rep,terr_p, '%.2e' % ((1.0*terr_p)/(i+1)),tot_s,terr_s, '%.2e' % ((1.0*terr_s)/tot_s)
+    print(rep,terr_p, '%.2e' % ((1.0*terr_p) / (i+1)),tot_s,terr_s, '%.2e' % ((1.0*terr_s) / tot_s))
 
 
 if __name__ == '__main__':
diff --git a/gr-trellis/examples/python/test_tcm.py b/gr-trellis/examples/python/test_tcm.py
old mode 100755
new mode 100644
index dfc565616e..e2eb87fcd7
--- a/gr-trellis/examples/python/test_tcm.py
+++ b/gr-trellis/examples/python/test_tcm.py
@@ -1,5 +1,8 @@
 #!/usr/bin/env python
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import trellis, digital, blocks
 from gnuradio import eng_notation
@@ -33,7 +36,7 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed):
 
     # CHANNEL
     add = blocks.add_ff()
-    noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),long(seed))
+    noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0 / 2),int(seed))
 
     # RX
     va = trellis.viterbi_combined_fs(f,K,0,0,dimensionality,constellation,digital.TRELLIS_EUCLIDEAN) # Put -1 if the Initial/Final states are not set.
@@ -56,7 +59,7 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed):
     #print "final state = " , enc.ST()
 
     if len(dst.data()) != len(packet):
-        print "Error: not enough data:", len(dst.data()), len(packet)
+        print("Error: not enough data:", len(dst.data()), len(packet))
     ntotal=len(packet)
     nwrong = sum(abs(packet-numpy.array(dst.data())));
     return (ntotal,nwrong,abs(packet-numpy.array(dst.data())))
@@ -73,7 +76,7 @@ def main():
     (options, args) = parser.parse_args ()
     if len(args) != 0:
         parser.print_help()
-        raise SystemExit, 1
+        raise SystemExit(1)
 
     fname=options.fsm_file
     esn0_db=float(options.esn0)
@@ -84,20 +87,20 @@ def main():
     # alternatively you can specify the fsm from its generator matrix
     #f=trellis.fsm(1,2,[5,7])
     Kb=1024*16  # packet size in bits (make it multiple of 16 so it can be packed in a short)
-    bitspersymbol = int(round(math.log(f.I())/math.log(2))) # bits per FSM input symbol
-    K=Kb/bitspersymbol # packet size in trellis steps
+    bitspersymbol = int(round(math.log(f.I()) / math.log(2))) # bits per FSM input symbol
+    K=Kb / bitspersymbol # packet size in trellis steps
     modulation = fsm_utils.psk4 # see fsm_utlis.py for available predefined modulations
     dimensionality = modulation[0]
     constellation = modulation[1]
-    if len(constellation)/dimensionality != f.O():
+    if len(constellation) / dimensionality != f.O():
         sys.stderr.write ('Incompatible FSM output cardinality and modulation size.\n')
         sys.exit (1)
     # calculate average symbol energy
     Es = 0
     for i in range(len(constellation)):
         Es = Es + constellation[i]**2
-    Es = Es / (len(constellation)/dimensionality)
-    N0=Es/pow(10.0,esn0_db/10.0); # calculate noise variance
+    Es = Es / (old_div(len(constellation,dimensionality)))
+    N0=Es / pow(10.0,old_div(esn0_db,10.0)); # calculate noise variance
 
     tot_b=0 # total number of transmitted bits
     terr_b=0 # total number of bits in error
@@ -108,14 +111,14 @@ def main():
         terr_b=terr_b+e
         terr_p=terr_p+(e!=0)
         if ((i+1)%100==0) : # display progress
-            print i+1,terr_p, '%.2e' % ((1.0*terr_p)/(i+1)),tot_b,terr_b, '%.2e' % ((1.0*terr_b)/tot_b)
+            print(i+1,terr_p, '%.2e' % ((1.0*terr_p) / (i+1)),tot_b,terr_b, '%.2e' % ((1.0*terr_b) / tot_b))
 	if e!=0:
-            print "rep=",i, e
+            print("rep=",i, e)
             for k in range(Kb):
                 if pattern[k]!=0:
-                    print k
+                    print(k)
     # estimate of the bit error rate
-    print rep,terr_p, '%.2e' % ((1.0*terr_p)/(i+1)),tot_b,terr_b, '%.2e' % ((1.0*terr_b)/tot_b)
+    print(rep,terr_p, '%.2e' % ((1.0*terr_p) / (i+1)),tot_b,terr_b, '%.2e' % ((1.0*terr_b) / tot_b))
 
 
 
diff --git a/gr-trellis/python/trellis/CMakeLists.txt b/gr-trellis/python/trellis/CMakeLists.txt
index 10fd9d5c0e..94a160b310 100644
--- a/gr-trellis/python/trellis/CMakeLists.txt
+++ b/gr-trellis/python/trellis/CMakeLists.txt
@@ -44,6 +44,6 @@ if(ENABLE_TESTING)
   file(GLOB py_qa_test_files "qa_*.py")
   foreach(py_qa_test_file ${py_qa_test_files})
     get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE)
-    GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${py_qa_test_file})
+    GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} -B ${py_qa_test_file})
   endforeach(py_qa_test_file)
 endif(ENABLE_TESTING)
diff --git a/gr-trellis/python/trellis/__init__.py b/gr-trellis/python/trellis/__init__.py
index a6b5ed0038..445a381424 100644
--- a/gr-trellis/python/trellis/__init__.py
+++ b/gr-trellis/python/trellis/__init__.py
@@ -21,15 +21,16 @@
 '''
 Blocks and utilities for trellis coding and related.
 '''
+from __future__ import unicode_literals
 
 # The presence of this file turns this directory into a Python package
 import os
 
 try:
-    from trellis_swig import *
+    from .trellis_swig import *
 except ImportError:
     dirname, filename = os.path.split(os.path.abspath(__file__))
     __path__.append(os.path.join(dirname, "..", "..", "swig"))
-    from trellis_swig import *
+    from .trellis_swig import *
 
 # import any pure python here
diff --git a/gr-trellis/python/trellis/fsm_utils.py b/gr-trellis/python/trellis/fsm_utils.py
old mode 100755
new mode 100644
index 72aa1d3660..efc526c0e7
--- a/gr-trellis/python/trellis/fsm_utils.py
+++ b/gr-trellis/python/trellis/fsm_utils.py
@@ -20,11 +20,13 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
 
-import re
 import math
 import sys
-import operator
+
 import numpy
 
 #from gnuradio import trellis
@@ -32,7 +34,7 @@ import numpy
 try:
     import scipy.linalg
 except ImportError:
-    print "Error: Program requires scipy (see: www.scipy.org)."
+    print("Error: Program requires scipy (see: www.scipy.org).")
     sys.exit(1)
 
 
@@ -43,13 +45,13 @@ except ImportError:
 # to base 'base' (most significant symbol first).
 ######################################################################
 def dec2base(num,base,l):
-    s=range(l)
+    s=list(range(l))
     n=num
     for i in range(l):
         s[l-i-1]=n%base
-        n=int(n/base)
+        n=int(n / base)
     if n!=0:
-        print 'Number ', num, ' requires more than ', l, 'digits.'
+        print('Number ', num, ' requires more than ', l, 'digits.')
     return s
 
 
@@ -84,9 +86,9 @@ def make_isi_lookup(mod,channel,normalize):
         for i in range(len(channel)):
             p = p + channel[i]**2
         for i in range(len(channel)):
-            channel[i] = channel[i]/math.sqrt(p)
+            channel[i] = channel[i] / math.sqrt(p)
 
-    lookup=range(len(constellation)**len(channel))
+    lookup=list(range(len(constellation)**len(channel)))
     for o in range(len(constellation)**len(channel)):
         ss=dec2base(o,len(constellation),len(channel))
         ll=0
@@ -109,11 +111,11 @@ def make_isi_lookup(mod,channel,normalize):
 ######################################################################
 def make_cpm_signals(K,P,M,L,q,frac):
 
-    Q=numpy.size(q)/L
-    h=(1.0*K)/P
+    Q=numpy.size(q) / L
+    h=(1.0*K) / P
     f0=-h*(M-1)/2
     dt=0.0; # maybe start at t=0.5
-    t=(dt+numpy.arange(0,Q))/Q
+    t=(dt+numpy.arange(0 / Q),Q)
     qq=numpy.zeros(Q)
     for m in range(L):
        qq=qq + q[m*Q:m*Q+Q]
@@ -122,46 +124,46 @@ def make_cpm_signals(K,P,M,L,q,frac):
     X=(M**L)*P
     PSI=numpy.empty((X,Q))
     for x in range(X):
-       xv=dec2base(x/P,M,L)
+       xv=dec2base(x / P,M,L)
        xv=numpy.append(xv, x%P)
        qq1=numpy.zeros(Q)
        for m in range(L):
           qq1=qq1+xv[m]*q[m*Q:m*Q+Q]
        psi=2*math.pi*h*xv[-1]+4*math.pi*h*qq1+w
-       #print psi
+       #print(psi)
        PSI[x]=psi
     PSI = numpy.transpose(PSI)
     SS=numpy.exp(1j*PSI) # contains all signals as columns
-    #print SS
+    #print(SS)
 
 
     # Now we need to orthogonalize the signals
     F = scipy.linalg.orth(SS) # find an orthonormal basis for SS
-    #print numpy.dot(numpy.transpose(F.conjugate()),F) # check for orthonormality
+    #print(numpy.dot(numpy.transpose(F.conjugate()),F) # check for orthonormality)
     S = numpy.dot(numpy.transpose(F.conjugate()),SS)
-    #print F
-    #print S
+    #print(F)
+    #print(S)
 
     # We only want to keep those dimensions that contain most
     # of the energy of the overall constellation (eg, frac=0.9 ==> 90%)
     # evaluate mean energy in each dimension
-    E=numpy.sum(numpy.absolute(S)**2,axis=1)/Q
-    E=E/numpy.sum(E)
-    #print E
+    E=numpy.sum(numpy.absolute(S)**2, axis=1) / Q
+    E=E / numpy.sum(E)
+    #print(E)
     Es = -numpy.sort(-E)
     Esi = numpy.argsort(-E)
-    #print Es
-    #print Esi
+    #print(Es)
+    #print(Esi)
     Ecum=numpy.cumsum(Es)
-    #print Ecum
+    #print(Ecum)
     v0=numpy.searchsorted(Ecum,frac)
     N = v0+1
-    #print v0
-    #print Esi[0:v0+1]
+    #print(v0)
+    #print(Esi[0:v0+1])
     Ff=numpy.transpose(numpy.transpose(F)[Esi[0:v0+1]])
-    #print Ff
+    #print(Ff)
     Sf = S[Esi[0:v0+1]]
-    #print Sf
+    #print(Sf)
 
 
     return (f0,SS,S,F,Sf,Ff,N)
diff --git a/gr-trellis/python/trellis/qa_trellis.py b/gr-trellis/python/trellis/qa_trellis.py
old mode 100755
new mode 100644
index 86c740a730..f248832204
--- a/gr-trellis/python/trellis/qa_trellis.py
+++ b/gr-trellis/python/trellis/qa_trellis.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+
 import math
 import os
 
@@ -71,7 +73,7 @@ class test_trellis (gr_unittest.TestCase):
         Runs some coding/decoding tests with a few different FSM
         specs.
         """
-        for name, args in fsm_args.items():
+        for name, args in list(fsm_args.items()):
             constellation = constells[args[2]]
             fsms = trellis.fsm(*args)
             noise = 0.1
@@ -85,7 +87,7 @@ class trellis_tb(gr.top_block):
     """
     A simple top block for use testing gr-trellis.
     """
-    def __init__(self, constellation, f, N0=0.25, seed=-666L):
+    def __init__(self, constellation, f, N0=0.25, seed=-666):
         """
         constellation - a constellation object used for modulation.
         f - a finite state machine specification used for coding.
@@ -96,14 +98,14 @@ class trellis_tb(gr.top_block):
         # packet size in bits (make it multiple of 16 so it can be packed in a short)
         packet_size = 1024*16
         # bits per FSM input symbol
-        bitspersymbol = int(round(math.log(f.I())/math.log(2))) # bits per FSM input symbol
+        bitspersymbol = int(round(math.log(f.I()) / math.log(2))) # bits per FSM input symbol
         # packet size in trellis steps
-        K = packet_size/bitspersymbol
+        K = packet_size // bitspersymbol
 
         # TX
         src = blocks.lfsr_32k_source_s()
         # packet size in shorts
-        src_head = blocks.head(gr.sizeof_short, packet_size/16)
+        src_head = blocks.head(gr.sizeof_short, packet_size // 16)
         # unpack shorts to symbols compatible with the FSM input cardinality
         s2fsmi = blocks.packed_to_unpacked_ss(bitspersymbol, gr.GR_MSB_FIRST)
         # initial FSM state = 0
@@ -112,7 +114,7 @@ class trellis_tb(gr.top_block):
 
         # CHANNEL
         add = blocks.add_cc()
-        noise = analog.noise_source_c(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed)
+        noise = analog.noise_source_c(analog.GR_GAUSSIAN,math.sqrt(N0 / 2),seed)
 
         # RX
         # data preprocessing to generate metrics for Viterbi
diff --git a/gr-trellis/swig/trellis_swig.py.in b/gr-trellis/swig/trellis_swig.py.in
index fac5f631e2..f49e04e0a3 100644
--- a/gr-trellis/swig/trellis_swig.py.in
+++ b/gr-trellis/swig/trellis_swig.py.in
@@ -19,5 +19,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
-from trellis_swig0 import *
-from trellis_swig1 import *
+from __future__ import absolute_import
+
+from .trellis_swig0 import *
+from .trellis_swig1 import *
diff --git a/gr-uhd/apps/uhd_app.py b/gr-uhd/apps/uhd_app.py
index f9b08a6457..893919337f 100644
--- a/gr-uhd/apps/uhd_app.py
+++ b/gr-uhd/apps/uhd_app.py
@@ -24,6 +24,8 @@ USRP Helper Module: Common tasks for uhd-based apps.
 """
 
 from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
 import sys
 import time
 import argparse
@@ -176,17 +178,17 @@ class UHDApp(object):
         # Set the subdevice spec:
         args.spec = self.normalize_subdev_sel(args.spec)
         if args.spec:
-            for mb_idx in xrange(self.usrp.get_num_mboards()):
+            for mb_idx in range(self.usrp.get_num_mboards()):
                 if isinstance(args.spec, list):
                     self.usrp.set_subdev_spec(args.spec[mb_idx], mb_idx)
                 else:
                     self.usrp.set_subdev_spec(args.spec, mb_idx)
         # Set the clock and/or time source:
         if args.clock_source is not None:
-            for mb_idx in xrange(self.usrp.get_num_mboards()):
+            for mb_idx in range(self.usrp.get_num_mboards()):
                 self.usrp.set_clock_source(args.clock_source, mb_idx)
         if args.time_source is not None:
-            for mb_idx in xrange(self.usrp.get_num_mboards()):
+            for mb_idx in range(self.usrp.get_num_mboards()):
                 self.usrp.set_time_source(args.time_source, mb_idx)
         # Sampling rate:
         self.usrp.set_samp_rate(args.samp_rate)
@@ -246,7 +248,7 @@ class UHDApp(object):
                 self.usrp.set_time_unknown_pps(uhd.time_spec())
             cmd_time = self.usrp.get_time_now() + uhd.time_spec(COMMAND_DELAY)
             try:
-                for mb_idx in xrange(self.usrp.get_num_mboards()):
+                for mb_idx in range(self.usrp.get_num_mboards()):
                     self.usrp.set_command_time(cmd_time, mb_idx)
                 command_time_set = True
             except RuntimeError:
@@ -259,7 +261,7 @@ class UHDApp(object):
                 ))
                 exit(1)
         if command_time_set:
-            for mb_idx in xrange(self.usrp.get_num_mboards()):
+            for mb_idx in range(self.usrp.get_num_mboards()):
                 self.usrp.clear_command_time(mb_idx)
             self.vprint("Syncing channels...".format(prefix=self.prefix))
             time.sleep(COMMAND_DELAY)
@@ -294,7 +296,7 @@ class UHDApp(object):
         """
         Safely tune all channels to freq.
         """
-        self.vprint("Tuning all channels to {freq} MHz.".format(freq=freq/1e6))
+        self.vprint("Tuning all channels to {freq} MHz.".format(freq=freq / 1e6))
         # Set frequency (tune request takes lo_offset):
         if hasattr(self.args, 'lo_offset') and self.args.lo_offset is not None:
             treq = uhd.tune_request(freq, self.args.lo_offset)
@@ -321,7 +323,7 @@ class UHDApp(object):
         if len(self.channels) > 1 and not skip_sync:
             cmd_time = self.usrp.get_time_now() + uhd.time_spec(COMMAND_DELAY)
             try:
-                for mb_idx in xrange(self.usrp.get_num_mboards()):
+                for mb_idx in range(self.usrp.get_num_mboards()):
                     self.usrp.set_command_time(cmd_time, mb_idx)
                 command_time_set = True
             except RuntimeError:
@@ -334,12 +336,12 @@ class UHDApp(object):
                 ))
                 exit(1)
         if command_time_set:
-            for mb_idx in xrange(self.usrp.get_num_mboards()):
+            for mb_idx in range(self.usrp.get_num_mboards()):
                 self.usrp.clear_command_time(mb_idx)
             self.vprint("Syncing channels...".format(prefix=self.prefix))
             time.sleep(COMMAND_DELAY)
         self.freq = self.usrp.get_center_freq(0)
-        self.vprint("First channel has freq: {freq} MHz.".format(freq=self.freq/1e6))
+        self.vprint("First channel has freq: {freq} MHz.".format(freq=self.freq / 1e6))
 
     @staticmethod
     def setup_argparser(
diff --git a/gr-uhd/apps/uhd_siggen_base.py b/gr-uhd/apps/uhd_siggen_base.py
index cc699dd145..98dda1084b 100644
--- a/gr-uhd/apps/uhd_siggen_base.py
+++ b/gr-uhd/apps/uhd_siggen_base.py
@@ -24,6 +24,8 @@ Provide a base flow graph for USRP signal generators.
 """
 
 from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
 import math
 try:
     from uhd_app import UHDApp
@@ -124,7 +126,7 @@ class USRPSiggen(gr.top_block, pubsub, UHDApp):
         """
         When sampling rate is updated, also update the signal sources.
         """
-        self.vprint("Setting sampling rate to: {rate} Msps".format(rate=samp_rate/1e6))
+        self.vprint("Setting sampling rate to: {rate} Msps".format(rate=samp_rate / 1e6))
         self.usrp.set_samp_rate(samp_rate)
         samp_rate = self.usrp.get_samp_rate()
         if self[TYPE_KEY] in (analog.GR_SIN_WAVE, analog.GR_CONST_WAVE):
@@ -137,7 +139,7 @@ class USRPSiggen(gr.top_block, pubsub, UHDApp):
             self._src2.set_sampling_freq(self[WAVEFORM_FREQ_KEY]*2*math.pi/self[SAMP_RATE_KEY])
         else:
             return True # Waveform not yet set
-        self.vprint("Set sample rate to: {rate} Msps".format(rate=samp_rate/1e6))
+        self.vprint("Set sample rate to: {rate} Msps".format(rate=samp_rate / 1e6))
         return True
 
     def set_waveform_freq(self, freq):
@@ -184,14 +186,14 @@ class USRPSiggen(gr.top_block, pubsub, UHDApp):
             self._src1 = analog.sig_source_c(self[SAMP_RATE_KEY],
                                              analog.GR_SIN_WAVE,
                                              self[WAVEFORM_FREQ_KEY],
-                                             self[AMPLITUDE_KEY]/2.0,
+                                             self[AMPLITUDE_KEY] / 2.0,
                                              0)
             if self[WAVEFORM2_FREQ_KEY] is None:
                 self[WAVEFORM2_FREQ_KEY] = -self[WAVEFORM_FREQ_KEY]
             self._src2 = analog.sig_source_c(self[SAMP_RATE_KEY],
                                              analog.GR_SIN_WAVE,
                                              self[WAVEFORM2_FREQ_KEY],
-                                             self[AMPLITUDE_KEY]/2.0,
+                                             self[AMPLITUDE_KEY] / 2.0,
                                              0)
             self._src = blocks.add_cc()
             self.connect(self._src1, (self._src, 0))
@@ -213,7 +215,7 @@ class USRPSiggen(gr.top_block, pubsub, UHDApp):
             self.connect(self._src1, self._src2, self._src)
         else:
             raise RuntimeError("[UHD-SIGGEN] Unknown waveform waveform_type")
-        for chan in xrange(len(self.channels)):
+        for chan in range(len(self.channels)):
             self.connect(self._src, (self.usrp, chan))
         if self.extra_sink is not None:
             self.connect(self._src, self.extra_sink)
@@ -226,7 +228,7 @@ class USRPSiggen(gr.top_block, pubsub, UHDApp):
             self.vprint("Tone 1: %sHz" % (n2s(self[WAVEFORM_FREQ_KEY]),))
             self.vprint("Tone 2: %sHz" % (n2s(self[WAVEFORM2_FREQ_KEY]),))
         elif waveform_type == "sweep":
-            self.vprint("Sweeping across %sHz to %sHz" % (n2s(-self[WAVEFORM_FREQ_KEY]/2.0), n2s(self[WAVEFORM_FREQ_KEY]/2.0)))
+            self.vprint("Sweeping across %sHz to %sHz" % (n2s(-self[WAVEFORM_FREQ_KEY] / 2.0), n2s(self[WAVEFORM_FREQ_KEY] / 2.0)))
             self.vprint("Sweep rate: %sHz" % (n2s(self[WAVEFORM2_FREQ_KEY]),))
         self.vprint("TX amplitude:", self[AMPLITUDE_KEY])
 
@@ -240,8 +242,8 @@ class USRPSiggen(gr.top_block, pubsub, UHDApp):
         if self[TYPE_KEY] in (analog.GR_SIN_WAVE, analog.GR_CONST_WAVE, analog.GR_GAUSSIAN, analog.GR_UNIFORM):
             self._src.set_amplitude(amplitude)
         elif self[TYPE_KEY] == "2tone":
-            self._src1.set_amplitude(amplitude/2.0)
-            self._src2.set_amplitude(amplitude/2.0)
+            self._src1.set_amplitude(amplitude / 2.0)
+            self._src2.set_amplitude(amplitude / 2.0)
         elif self[TYPE_KEY] == "sweep":
             self._src.set_k(amplitude)
         else:
@@ -293,7 +295,7 @@ def main():
         print(ex)
         exit(1)
     tb.start()
-    raw_input('[UHD-SIGGEN] Press Enter to quit:\n')
+    eval(input('[UHD-SIGGEN] Press Enter to quit:\n'))
     tb.stop()
     tb.wait()
 
diff --git a/gr-uhd/grc/gen_uhd_usrp_blocks.py b/gr-uhd/grc/gen_uhd_usrp_blocks.py
index e99de0d7d0..8d16c4e936 100644
--- a/gr-uhd/grc/gen_uhd_usrp_blocks.py
+++ b/gr-uhd/grc/gen_uhd_usrp_blocks.py
@@ -21,27 +21,27 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 MAIN_TMPL = """\
 <?xml version="1.0"?>
 <block>
-	<name>UHD: USRP $sourk.title()</name>
-	<key>uhd_usrp_$(sourk)</key>
-	<flags>throttle</flags>
-	<import>from gnuradio import uhd</import>
-	<import>import time</import>
-	<make>uhd.usrp_$(sourk)(
-	",".join((\$dev_addr, \$dev_args)),
-	uhd.stream_args(
-		cpu_format="\$type",
-		\#if \$otw()
-		otw_format=\$otw,
-		\#end if
-		\#if \$stream_args()
-		args=\$stream_args,
-		\#end if
-		\#if \$stream_chans()
-		channels=\$stream_chans,
-		\#else
-		channels=range(\$nchan),
-		\#end if
-	),$lentag_arg
+        <name>UHD: USRP $sourk.title()</name>
+        <key>uhd_usrp_$(sourk)</key>
+        <flags>throttle</flags>
+        <import>from gnuradio import uhd</import>
+        <import>import time</import>
+        <make>uhd.usrp_$(sourk)(
+        ",".join((\$dev_addr, \$dev_args)),
+        uhd.stream_args(
+                cpu_format="\$type",
+                \#if \$otw()
+                otw_format=\$otw,
+                \#end if
+                \#if \$stream_args()
+                args=\$stream_args,
+                \#end if
+                \#if \$stream_chans()
+                channels=\$stream_chans,
+                \#else
+                channels=range(\$nchan),
+                \#end if
+        ),$lentag_arg
 )
 \#if \$clock_rate()
 self.\$(id).set_clock_rate(\$clock_rate, uhd.ALL_MBOARDS)
@@ -75,309 +75,309 @@ self.\$(id).set_normalized_gain(\$gain$(n), $n)
 \#else
 self.\$(id).set_gain(\$gain$(n), $n)
 \#end if
-	\#if \$ant$(n)()
+        \#if \$ant$(n)()
 self.\$(id).set_antenna(\$ant$(n), $n)
-	\#end if
-	\#if \$bw$(n)()
+        \#end if
+        \#if \$bw$(n)()
 self.\$(id).set_bandwidth(\$bw$(n), $n)
-	\#end if
+        \#end if
 #if $sourk == 'source'
-	\#if \$lo_export$(n)() and not \$hide_lo_controls()
+        \#if \$lo_export$(n)() and not \$hide_lo_controls()
 self.\$(id).set_lo_export_enabled(\$lo_export$(n), uhd.ALL_LOS, $n)
-	\#end if
+        \#end if
     \#if \$lo_source$(n)() and not \$hide_lo_controls()
 self.\$(id).set_lo_source(\$lo_source$(n), uhd.ALL_LOS, $n)
-	\#end if
-	\#if \$dc_offs_enb$(n)()
+        \#end if
+        \#if \$dc_offs_enb$(n)()
 self.\$(id).set_auto_dc_offset(\$dc_offs_enb$(n), $n)
-	\#end if
-	\#if \$iq_imbal_enb$(n)()
+        \#end if
+        \#if \$iq_imbal_enb$(n)()
 self.\$(id).set_auto_iq_balance(\$iq_imbal_enb$(n), $n)
-	\#end if
+        \#end if
 #end if
 \#end if
 #end for
 </make>
-	<callback>set_samp_rate(\$samp_rate)</callback>
-	#for $n in range($max_nchan)
-	<callback>set_center_freq(\$center_freq$(n), $n)</callback>
-	<callback>\#if \$norm_gain${n}()
+        <callback>set_samp_rate(\$samp_rate)</callback>
+        #for $n in range($max_nchan)
+        <callback>set_center_freq(\$center_freq$(n), $n)</callback>
+        <callback>\#if \$norm_gain${n}()
 self.\$(id).set_normalized_gain(\$gain$(n), $n)
 \#else
 self.\$(id).set_gain(\$gain$(n), $n)
 \#end if
-	</callback>
-	<callback>\#if not \$hide_lo_controls()
+        </callback>
+        <callback>\#if not \$hide_lo_controls()
 set_lo_source(\$lo_source$(n), uhd.ALL_LOS, $n)
 \#end if
-	</callback>
+        </callback>
     <callback>\#if not \$hide_lo_controls()
 set_lo_export_enabled(\$lo_export$(n), uhd.ALL_LOS, $n)
 \#end if
-	</callback>
-	<callback>set_antenna(\$ant$(n), $n)</callback>
-	<callback>set_bandwidth(\$bw$(n), $n)</callback>
-	#end for
-	<param>
-		<name>$(direction.title())put Type</name>
-		<key>type</key>
-		<type>enum</type>
-		<option>
-			<name>Complex float32</name>
-			<key>fc32</key>
-			<opt>type:fc32</opt>
-		</option>
-		<option>
-			<name>Complex int16</name>
-			<key>sc16</key>
-			<opt>type:sc16</opt>
-		</option>
-		<option>
-			<name>VITA word32</name>
-			<key>item32</key>
-			<opt>type:s32</opt>
-		</option>
-	</param>
-	<param>
-		<name>Wire Format</name>
-		<key>otw</key>
-		<value></value>
-		<type>string</type>
-		<hide>
-			\#if \$otw()
-				none
-			\#else
-				part
-			\#end if
-		</hide>
-		<option>
-			<name>Automatic</name>
-			<key></key>
-		</option>
-		<option>
-			<name>Complex int16</name>
-			<key>sc16</key>
-		</option>
-		<option>
-			<name>Complex int12</name>
-			<key>sc12</key>
-		</option>
-		<option>
-			<name>Complex int8</name>
-			<key>sc8</key>
-		</option>
-	</param>
-	<param>
-		<name>Stream args</name>
-		<key>stream_args</key>
-		<value></value>
-		<type>string</type>
-		<hide>
-			\#if \$stream_args()
-				none
-			\#else
-				part
-			\#end if
-		</hide>
-		<option>
-			<name>peak=0.003906</name>
-			<key>peak=0.003906</key>
-		</option>
-	</param>
-	<param>
-		<name>Stream channels</name>
-		<key>stream_chans</key>
-		<value>[]</value>
-		<type>int_vector</type>
-		<hide>
-			\#if \$stream_chans()
-				none
-			\#else
-				part
-			\#end if
-		</hide>
-	</param>
-	<param>
-		<name>Device Address</name>
-		<key>dev_addr</key>
-		<value>""</value>
-		<type>string</type>
-		<hide>
-			\#if \$dev_addr()
-				none
-			\#else
-				part
-			\#end if
-		</hide>
-	</param>
-	<param>
-		<name>Device Arguments</name>
-		<key>dev_args</key>
-		<value>""</value>
-		<type>string</type>
-		<hide>
-			\#if \$dev_args()
-				none
-			\#else
-				part
-			\#end if
-		</hide>
-	</param>
-	<param>
-		<name>Sync</name>
-		<key>sync</key>
-		<value></value>
-		<type>enum</type>
-		<hide>\#if \$sync() then 'none' else 'part'#</hide>
-		<option>
-			<name>unknown PPS</name>
-			<key>sync</key>
-		</option>
-		<option>
-			<name>PC Clock</name>
-			<key>pc_clock</key>
-		</option>
-		<option>
-			<name>don't sync</name>
-			<key></key>
-		</option>
-	</param>
-	<param>
-		<name>Clock Rate (Hz)</name>
-		<key>clock_rate</key>
-		<value>0.0</value>
-		<type>real</type>
-		<hide>\#if \$clock_rate() then 'none' else 'part'#</hide>
-		<option>
-			<name>Default</name>
-			<key>0.0</key>
-		</option>
-		<option>
-			<name>200 MHz</name>
-			<key>200e6</key>
-		</option>
-		<option>
-			<name>184.32 MHz</name>
-			<key>184.32e6</key>
-		</option>
-		<option>
-			<name>120 MHz</name>
-			<key>120e6</key>
-		</option>
-		<option>
-			<name>30.72 MHz</name>
-			<key>30.72e6</key>
-		</option>
-	</param>
-	<param>
-		<name>Num Mboards</name>
-		<key>num_mboards</key>
-		<value>1</value>
-		<type>int</type>
-		<hide>part</hide>
-		#for $m in range(1, $max_mboards+1)
-		<option>
-			<name>$(m)</name>
-			<key>$m</key>
-		</option>
-		#end for
-	</param>
-	#for $m in range($max_mboards)
-	<param>
-		<name>Mb$(m): Clock Source</name>
-		<key>clock_source$(m)</key>
-		<value></value>
-		<type>string</type>
-		<hide>
-			\#if not \$num_mboards() > $m
-				all
-			\#elif \$clock_source$(m)()
-				none
-			\#else
-				part
-			\#end if
-		</hide>
-		<option><name>Default</name><key></key></option>
-		<option><name>Internal</name><key>internal</key></option>
-		<option><name>External</name><key>external</key></option>
-		<option><name>MIMO Cable</name><key>mimo</key></option>
-		<option><name>O/B GPSDO</name><key>gpsdo</key></option>
-	</param>
-	<param>
-		<name>Mb$(m): Time Source</name>
-		<key>time_source$(m)</key>
-		<value></value>
-		<type>string</type>
-		<hide>
-			\#if not \$num_mboards() > $m
-				all
-			\#elif \$time_source$(m)()
-				none
-			\#else
-				part
-			\#end if
-		</hide>
-		<option><name>Default</name><key></key></option>
-		<option><name>External</name><key>external</key></option>
-		<option><name>MIMO Cable</name><key>mimo</key></option>
-		<option><name>O/B GPSDO</name><key>gpsdo</key></option>
-	</param>
-	<param>
-		<name>Mb$(m): Subdev Spec</name>
-		<key>sd_spec$(m)</key>
-		<value></value>
-		<type>string</type>
-		<hide>
-			\#if not \$num_mboards() > $m
-				all
-			\#elif \$sd_spec$(m)()
-				none
-			\#else
-				part
-			\#end if
-		</hide>
-	</param>
-	#end for
-	<param>
-		<name>Num Channels</name>
-		<key>nchan</key>
-		<value>1</value>
-		<type>int</type>
-		#for $n in range(1, $max_nchan+1)
-		<option>
-			<name>$(n)</name>
-			<key>$n</key>
-		</option>
-		#end for
-	</param>
-	<param>
-		<name>Samp Rate (Sps)</name>
-		<key>samp_rate</key>
-		<value>samp_rate</value>
-		<type>real</type>
-	</param>
-	$params
-	<check>$max_nchan >= \$nchan</check>
-	<check>\$nchan > 0</check>
-	<check>$max_mboards >= \$num_mboards</check>
-	<check>\$num_mboards > 0</check>
-	<check>\$nchan >= \$num_mboards</check>
-	<check>(not \$stream_chans()) or (\$nchan == len(\$stream_chans))</check>
-	#for $n in range($max_nchan)
-	<check>(\$norm_gain${n} and \$gain${n} &gt;= 0 and \$gain${n} &lt;= 1) or not \$norm_gain${n}</check>
-	#end for
-	<sink>
-		<name>command</name>
-		<type>message</type>
-		<optional>1</optional>
-		<hide>\$hide_cmd_port</hide>
-	</sink>
-	<$sourk>
-		<name>$direction</name>
-		<type>\$type.type</type>
-		<nports>\$nchan</nports>
-	</$sourk>
-	<doc>
+        </callback>
+        <callback>set_antenna(\$ant$(n), $n)</callback>
+        <callback>set_bandwidth(\$bw$(n), $n)</callback>
+        #end for
+        <param>
+                <name>$(direction.title())put Type</name>
+                <key>type</key>
+                <type>enum</type>
+                <option>
+                        <name>Complex float32</name>
+                        <key>fc32</key>
+                        <opt>type:fc32</opt>
+                </option>
+                <option>
+                        <name>Complex int16</name>
+                        <key>sc16</key>
+                        <opt>type:sc16</opt>
+                </option>
+                <option>
+                        <name>VITA word32</name>
+                        <key>item32</key>
+                        <opt>type:s32</opt>
+                </option>
+        </param>
+        <param>
+                <name>Wire Format</name>
+                <key>otw</key>
+                <value></value>
+                <type>string</type>
+                <hide>
+                        \#if \$otw()
+                                none
+                        \#else
+                                part
+                        \#end if
+                </hide>
+                <option>
+                        <name>Automatic</name>
+                        <key></key>
+                </option>
+                <option>
+                        <name>Complex int16</name>
+                        <key>sc16</key>
+                </option>
+                <option>
+                        <name>Complex int12</name>
+                        <key>sc12</key>
+                </option>
+                <option>
+                        <name>Complex int8</name>
+                        <key>sc8</key>
+                </option>
+        </param>
+        <param>
+                <name>Stream args</name>
+                <key>stream_args</key>
+                <value></value>
+                <type>string</type>
+                <hide>
+                        \#if \$stream_args()
+                                none
+                        \#else
+                                part
+                        \#end if
+                </hide>
+                <option>
+                        <name>peak=0.003906</name>
+                        <key>peak=0.003906</key>
+                </option>
+        </param>
+        <param>
+                <name>Stream channels</name>
+                <key>stream_chans</key>
+                <value>[]</value>
+                <type>int_vector</type>
+                <hide>
+                        \#if \$stream_chans()
+                                none
+                        \#else
+                                part
+                        \#end if
+                </hide>
+        </param>
+        <param>
+                <name>Device Address</name>
+                <key>dev_addr</key>
+                <value>""</value>
+                <type>string</type>
+                <hide>
+                        \#if \$dev_addr()
+                                none
+                        \#else
+                                part
+                        \#end if
+                </hide>
+        </param>
+        <param>
+                <name>Device Arguments</name>
+                <key>dev_args</key>
+                <value>""</value>
+                <type>string</type>
+                <hide>
+                        \#if \$dev_args()
+                                none
+                        \#else
+                                part
+                        \#end if
+                </hide>
+        </param>
+        <param>
+                <name>Sync</name>
+                <key>sync</key>
+                <value></value>
+                <type>enum</type>
+                <hide>\#if \$sync() then 'none' else 'part'#</hide>
+                <option>
+                        <name>unknown PPS</name>
+                        <key>sync</key>
+                </option>
+                <option>
+                        <name>PC Clock</name>
+                        <key>pc_clock</key>
+                </option>
+                <option>
+                        <name>don't sync</name>
+                        <key></key>
+                </option>
+        </param>
+        <param>
+                <name>Clock Rate (Hz)</name>
+                <key>clock_rate</key>
+                <value>0.0</value>
+                <type>real</type>
+                <hide>\#if \$clock_rate() then 'none' else 'part'#</hide>
+                <option>
+                        <name>Default</name>
+                        <key>0.0</key>
+                </option>
+                <option>
+                        <name>200 MHz</name>
+                        <key>200e6</key>
+                </option>
+                <option>
+                        <name>184.32 MHz</name>
+                        <key>184.32e6</key>
+                </option>
+                <option>
+                        <name>120 MHz</name>
+                        <key>120e6</key>
+                </option>
+                <option>
+                        <name>30.72 MHz</name>
+                        <key>30.72e6</key>
+                </option>
+        </param>
+        <param>
+                <name>Num Mboards</name>
+                <key>num_mboards</key>
+                <value>1</value>
+                <type>int</type>
+                <hide>part</hide>
+                #for $m in range(1, $max_mboards+1)
+                <option>
+                        <name>$(m)</name>
+                        <key>$m</key>
+                </option>
+                #end for
+        </param>
+        #for $m in range($max_mboards)
+        <param>
+                <name>Mb$(m): Clock Source</name>
+                <key>clock_source$(m)</key>
+                <value></value>
+                <type>string</type>
+                <hide>
+                        \#if not \$num_mboards() > $m
+                                all
+                        \#elif \$clock_source$(m)()
+                                none
+                        \#else
+                                part
+                        \#end if
+                </hide>
+                <option><name>Default</name><key></key></option>
+                <option><name>Internal</name><key>internal</key></option>
+                <option><name>External</name><key>external</key></option>
+                <option><name>MIMO Cable</name><key>mimo</key></option>
+                <option><name>O/B GPSDO</name><key>gpsdo</key></option>
+        </param>
+        <param>
+                <name>Mb$(m): Time Source</name>
+                <key>time_source$(m)</key>
+                <value></value>
+                <type>string</type>
+                <hide>
+                        \#if not \$num_mboards() > $m
+                                all
+                        \#elif \$time_source$(m)()
+                                none
+                        \#else
+                                part
+                        \#end if
+                </hide>
+                <option><name>Default</name><key></key></option>
+                <option><name>External</name><key>external</key></option>
+                <option><name>MIMO Cable</name><key>mimo</key></option>
+                <option><name>O/B GPSDO</name><key>gpsdo</key></option>
+        </param>
+        <param>
+                <name>Mb$(m): Subdev Spec</name>
+                <key>sd_spec$(m)</key>
+                <value></value>
+                <type>string</type>
+                <hide>
+                        \#if not \$num_mboards() > $m
+                                all
+                        \#elif \$sd_spec$(m)()
+                                none
+                        \#else
+                                part
+                        \#end if
+                </hide>
+        </param>
+        #end for
+        <param>
+                <name>Num Channels</name>
+                <key>nchan</key>
+                <value>1</value>
+                <type>int</type>
+                #for $n in range(1, $max_nchan+1)
+                <option>
+                        <name>$(n)</name>
+                        <key>$n</key>
+                </option>
+                #end for
+        </param>
+        <param>
+                <name>Samp Rate (Sps)</name>
+                <key>samp_rate</key>
+                <value>samp_rate</value>
+                <type>real</type>
+        </param>
+        $params
+        <check>$max_nchan >= \$nchan</check>
+        <check>\$nchan > 0</check>
+        <check>$max_mboards >= \$num_mboards</check>
+        <check>\$num_mboards > 0</check>
+        <check>\$nchan >= \$num_mboards</check>
+        <check>(not \$stream_chans()) or (\$nchan == len(\$stream_chans))</check>
+        #for $n in range($max_nchan)
+        <check>(\$norm_gain${n} and \$gain${n} &gt;= 0 and \$gain${n} &lt;= 1) or not \$norm_gain${n}</check>
+        #end for
+        <sink>
+                <name>command</name>
+                <type>message</type>
+                <optional>1</optional>
+                <hide>\$hide_cmd_port</hide>
+        </sink>
+        <$sourk>
+                <name>$direction</name>
+                <type>\$type.type</type>
+                <nports>\$nchan</nports>
+        </$sourk>
+        <doc>
 The UHD USRP $sourk.title() Block:
 
 Device Address:
@@ -452,31 +452,31 @@ to determine transmit burst lengths.
 
 See the UHD manual for more detailed documentation:
 http://uhd.ettus.com
-	</doc>
+        </doc>
 </block>
 """
 
 PARAMS_TMPL = """	<param>
-		<name>Ch$(n): Center Freq (Hz)</name>
-		<key>center_freq$(n)</key>
-		<value>0</value>
-		<type>real</type>
-		<hide>\#if \$nchan() > $n then 'none' else 'all'#</hide>
-		<tab>RF Options</tab>
-	</param>
-	<param>
-		<name>Ch$(n): Gain Value</name>
-		<key>gain$(n)</key>
-		<value>0</value>
-		<type>float</type>
-		<hide>\#if \$nchan() > $n then 'none' else 'all'#</hide>
-		<tab>RF Options</tab>
-	</param>
-	<param>
-		<name>Ch$(n): Gain Type</name>
-		<key>norm_gain$(n)</key>
-		<value>False</value>
-		<type>bool</type>
+                <name>Ch$(n): Center Freq (Hz)</name>
+                <key>center_freq$(n)</key>
+                <value>0</value>
+                <type>real</type>
+                <hide>\#if \$nchan() > $n then 'none' else 'all'#</hide>
+                <tab>RF Options</tab>
+        </param>
+        <param>
+                <name>Ch$(n): Gain Value</name>
+                <key>gain$(n)</key>
+                <value>0</value>
+                <type>float</type>
+                <hide>\#if \$nchan() > $n then 'none' else 'all'#</hide>
+                <tab>RF Options</tab>
+        </param>
+        <param>
+                <name>Ch$(n): Gain Type</name>
+                <key>norm_gain$(n)</key>
+                <value>False</value>
+                <type>bool</type>
                 <hide>\#if \$nchan() &lt;= $n
                 all
                 \#elif bool(\$norm_gain${n}())
@@ -484,227 +484,227 @@ PARAMS_TMPL = """	<param>
                 \#else
                 part
                 \#end if</hide>
-		<option>
-			<name>Absolute (dB)</name>
-			<key>False</key>
-		</option>
-		<option>
-			<name>Normalized</name>
-			<key>True</key>
-		</option>
-		<tab>RF Options</tab>
-	</param>
-	<param>
-		<name>Ch$(n): Antenna</name>
-		<key>ant$(n)</key>
-		<value></value>
-		<type>string</type>
-		<hide>
-			\#if not \$nchan() > $n
-				all
-			\#elif \$ant$(n)()
-				none
-			\#else
-				part
-			\#end if
-		</hide>
-		<option>
-			<name>TX/RX</name>
-			<key>TX/RX</key>
-		</option>
+                <option>
+                        <name>Absolute (dB)</name>
+                        <key>False</key>
+                </option>
+                <option>
+                        <name>Normalized</name>
+                        <key>True</key>
+                </option>
+                <tab>RF Options</tab>
+        </param>
+        <param>
+                <name>Ch$(n): Antenna</name>
+                <key>ant$(n)</key>
+                <value></value>
+                <type>string</type>
+                <hide>
+                        \#if not \$nchan() > $n
+                                all
+                        \#elif \$ant$(n)()
+                                none
+                        \#else
+                                part
+                        \#end if
+                </hide>
+                <option>
+                        <name>TX/RX</name>
+                        <key>TX/RX</key>
+                </option>
 #if $sourk == 'source'
-		<option>
-			<name>RX2</name>
-			<key>RX2</key>
-		</option>
+                <option>
+                        <name>RX2</name>
+                        <key>RX2</key>
+                </option>
 #end if
-		<tab>RF Options</tab>
-	</param>
-	<param>
-		<name>Ch$(n): Bandwidth (Hz)</name>
-		<key>bw$(n)</key>
-		<value>0</value>
-		<type>real</type>
-		<hide>
-			\#if not \$nchan() > $n
-				all
-			\#elif \$bw$(n)()
-				none
-			\#else
-				part
-			\#end if
-		</hide>
-		<tab>RF Options</tab>
-	</param>
+                <tab>RF Options</tab>
+        </param>
+        <param>
+                <name>Ch$(n): Bandwidth (Hz)</name>
+                <key>bw$(n)</key>
+                <value>0</value>
+                <type>real</type>
+                <hide>
+                        \#if not \$nchan() > $n
+                                all
+                        \#elif \$bw$(n)()
+                                none
+                        \#else
+                                part
+                        \#end if
+                </hide>
+                <tab>RF Options</tab>
+        </param>
 #if $sourk == 'source'
-	<param>
-		<name>Ch$(n): LO Source</name>
-		<key>lo_source$(n)</key>
-		<value>internal</value>
-		<type>string</type>
-		<hide>
-			\#if not \$nchan() > $n
-				all
-			\#elif \$hide_lo_controls()
-				all
-			\#else
-				none
-			\#end if
-		</hide>
-		<option>
-			<name>Internal</name>
-			<key>internal</key>
-		</option>
-		<option>
-			<name>External</name>
-			<key>external</key>
-		</option>
-		<option>
-			<name>Companion</name>
-			<key>companion</key>
-		</option>
-		<tab>RF Options</tab>
-	</param>
+        <param>
+                <name>Ch$(n): LO Source</name>
+                <key>lo_source$(n)</key>
+                <value>internal</value>
+                <type>string</type>
+                <hide>
+                        \#if not \$nchan() > $n
+                                all
+                        \#elif \$hide_lo_controls()
+                                all
+                        \#else
+                                none
+                        \#end if
+                </hide>
+                <option>
+                        <name>Internal</name>
+                        <key>internal</key>
+                </option>
+                <option>
+                        <name>External</name>
+                        <key>external</key>
+                </option>
+                <option>
+                        <name>Companion</name>
+                        <key>companion</key>
+                </option>
+                <tab>RF Options</tab>
+        </param>
 #end if
 #if $sourk == 'source'
-	<param>
-		<name>Ch$(n): LO Export</name>
-		<key>lo_export$(n)</key>
-		<value>False</value>
-		<type>bool</type>
-		<hide>
-			\#if not \$nchan() > $n
-				all
-			\#elif \$hide_lo_controls()
-				all
-			\#else
-				none
-			\#end if
-		</hide>
-		<option>
-			<name>True</name>
-			<key>True</key>
-		</option>
-		<option>
-			<name>False</name>
-			<key>False</key>
-		</option>
-		<tab>RF Options</tab>
-	</param>
+        <param>
+                <name>Ch$(n): LO Export</name>
+                <key>lo_export$(n)</key>
+                <value>False</value>
+                <type>bool</type>
+                <hide>
+                        \#if not \$nchan() > $n
+                                all
+                        \#elif \$hide_lo_controls()
+                                all
+                        \#else
+                                none
+                        \#end if
+                </hide>
+                <option>
+                        <name>True</name>
+                        <key>True</key>
+                </option>
+                <option>
+                        <name>False</name>
+                        <key>False</key>
+                </option>
+                <tab>RF Options</tab>
+        </param>
 #end if
 #if $sourk == 'source'
-	<param>
-		<name>Ch$(n): Enable DC Offset Correction</name>
-		<key>dc_offs_enb$(n)</key>
-		<value>""</value>
-		<type>raw</type>
-		<hide>
-			\#if not \$nchan() > $n
-				all
-			\#else
-				part
-			\#end if
-		</hide>
-		<tab>FE Corrections</tab>
-	</param>
-	<param>
-		<name>Ch$(n): Enable IQ Imbalance Correction</name>
-		<key>iq_imbal_enb$(n)</key>
-		<value>""</value>
-		<type>raw</type>
-		<hide>
-			\#if not \$nchan() > $n
-				all
-			\#else
-				part
-			\#end if
-		</hide>
-		<tab>FE Corrections</tab>
-	</param>
+        <param>
+                <name>Ch$(n): Enable DC Offset Correction</name>
+                <key>dc_offs_enb$(n)</key>
+                <value>""</value>
+                <type>raw</type>
+                <hide>
+                        \#if not \$nchan() > $n
+                                all
+                        \#else
+                                part
+                        \#end if
+                </hide>
+                <tab>FE Corrections</tab>
+        </param>
+        <param>
+                <name>Ch$(n): Enable IQ Imbalance Correction</name>
+                <key>iq_imbal_enb$(n)</key>
+                <value>""</value>
+                <type>raw</type>
+                <hide>
+                        \#if not \$nchan() > $n
+                                all
+                        \#else
+                                part
+                        \#end if
+                </hide>
+                <tab>FE Corrections</tab>
+        </param>
 #end if
 """
 
 SHOW_CMD_PORT_PARAM = """
-	<param>
-		<name>Show Command Port</name>
-		<key>hide_cmd_port</key>
-		<value>False</value>
-		<type>enum</type>
-		<hide>part</hide>
-		<option>
-			<name>Yes</name>
-			<key>False</key>
-		</option>
-		<option>
-			<name>No</name>
-			<key>True</key>
-		</option>
-		<tab>Advanced</tab>
-	</param>
+        <param>
+                <name>Show Command Port</name>
+                <key>hide_cmd_port</key>
+                <value>False</value>
+                <type>enum</type>
+                <hide>part</hide>
+                <option>
+                        <name>Yes</name>
+                        <key>False</key>
+                </option>
+                <option>
+                        <name>No</name>
+                        <key>True</key>
+                </option>
+                <tab>Advanced</tab>
+        </param>
 """
 
 SHOW_LO_CONTROLS_PARAM = """
-	<param>
-		<name>Show LO Controls</name>
-		<key>hide_lo_controls</key>
-		<value>True</value>
-		<type>bool</type>
-		<hide>part</hide>
-		<option>
-			<name>Yes</name>
-			<key>False</key>
-		</option>
-		<option>
-			<name>No</name>
-			<key>True</key>
-		</option>
-		<tab>Advanced</tab>
-	</param>
+        <param>
+                <name>Show LO Controls</name>
+                <key>hide_lo_controls</key>
+                <value>True</value>
+                <type>bool</type>
+                <hide>part</hide>
+                <option>
+                        <name>Yes</name>
+                        <key>False</key>
+                </option>
+                <option>
+                        <name>No</name>
+                        <key>True</key>
+                </option>
+                <tab>Advanced</tab>
+        </param>
 """
 
 TSBTAG_PARAM = """	<param>
-		<name>TSB tag name</name>
-		<key>len_tag_name</key>
-		<value></value>
-		<type>string</type>
-		<hide>\#if len(str(\$len_tag_name())) then 'none' else 'part'#</hide>
-	</param>"""
+                <name>TSB tag name</name>
+                <key>len_tag_name</key>
+                <value></value>
+                <type>string</type>
+                <hide>\#if len(str(\$len_tag_name())) then 'none' else 'part'#</hide>
+        </param>"""
 
 TSBTAG_ARG = """
-	#if $len_tag_name()
-	$len_tag_name,
-	#end if"""
+        #if $len_tag_name()
+        $len_tag_name,
+        #end if"""
 
 def parse_tmpl(_tmpl, **kwargs):
-	from Cheetah import Template
-	return str(Template.Template(_tmpl, kwargs))
+        from Cheetah import Template
+        return str(Template.Template(_tmpl, kwargs))
 
 max_num_mboards = 8
 max_num_channels = max_num_mboards*4
 
 if __name__ == '__main__':
-	import sys
-	for file in sys.argv[1:]:
-		if file.endswith ('source.xml'):
-			sourk = 'source'
-			direction = 'out'
-		elif file.endswith ('sink.xml'):
-			sourk = 'sink'
-			direction = 'in'
-		else: raise Exception, 'is %s a source or sink?'%file
+        import sys
+        for file in sys.argv[1:]:
+                if file.endswith ('source.xml'):
+                        sourk = 'source'
+                        direction = 'out'
+                elif file.endswith ('sink.xml'):
+                        sourk = 'sink'
+                        direction = 'in'
+                else: raise Exception('is %s a source or sink?'%file)
 
-		params = ''.join([parse_tmpl(PARAMS_TMPL, n=n, sourk=sourk) for n in range(max_num_channels)])
-		params += SHOW_CMD_PORT_PARAM
-		params += SHOW_LO_CONTROLS_PARAM
-		if sourk == 'sink':
-			params += TSBTAG_PARAM
-			lentag_arg = TSBTAG_ARG
-		else: lentag_arg = ''
-		open(file, 'w').write(parse_tmpl(MAIN_TMPL,
-			lentag_arg=lentag_arg,
-			max_nchan=max_num_channels,
-			max_mboards=max_num_mboards,
-			params=params,
-			sourk=sourk,
-			direction=direction,
-		))
+                params = ''.join([parse_tmpl(PARAMS_TMPL, n=n, sourk=sourk) for n in range(max_num_channels)])
+                params += SHOW_CMD_PORT_PARAM
+                params += SHOW_LO_CONTROLS_PARAM
+                if sourk == 'sink':
+                        params += TSBTAG_PARAM
+                        lentag_arg = TSBTAG_ARG
+                else: lentag_arg = ''
+                open(file, 'w').write(parse_tmpl(MAIN_TMPL,
+                        lentag_arg=lentag_arg,
+                        max_nchan=max_num_channels,
+                        max_mboards=max_num_mboards,
+                        params=params,
+                        sourk=sourk,
+                        direction=direction,
+                ))
diff --git a/gr-uhd/python/uhd/CMakeLists.txt b/gr-uhd/python/uhd/CMakeLists.txt
index ee69e8eb7d..e736edebf0 100644
--- a/gr-uhd/python/uhd/CMakeLists.txt
+++ b/gr-uhd/python/uhd/CMakeLists.txt
@@ -44,6 +44,6 @@ include(GrTest)
 file(GLOB py_qa_test_files "qa_*.py")
 foreach(py_qa_test_file ${py_qa_test_files})
     get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE)
-    GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${py_qa_test_file})
+    GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} -B ${py_qa_test_file})
 endforeach(py_qa_test_file)
 endif(ENABLE_TESTING)
diff --git a/gr-uhd/python/uhd/__init__.py b/gr-uhd/python/uhd/__init__.py
index 6d7f232466..ad342ee30d 100644
--- a/gr-uhd/python/uhd/__init__.py
+++ b/gr-uhd/python/uhd/__init__.py
@@ -25,17 +25,20 @@ Used to send and receive data between the Ettus Research, LLC product
 line.
 '''
 
+from __future__ import absolute_import
+from __future__ import unicode_literals
+
 ########################################################################
 # Prepare uhd swig module to make it more pythonic
 ########################################################################
 def _prepare_uhd_swig():
     try:
-        import uhd_swig
+        from . import uhd_swig
     except ImportError:
         import os
         dirname, filename = os.path.split(os.path.abspath(__file__))
         __path__.append(os.path.join(dirname, "..", "..", "swig"))
-        import uhd_swig
+        from . import uhd_swig
 
     #some useful typedefs for the user
     setattr(uhd_swig, 'freq_range_t', uhd_swig.meta_range_t)
@@ -50,7 +53,7 @@ def _prepare_uhd_swig():
         def __float__(self): return self.target_freq
         def __init__(self, *args, **kwargs):
             super(tune_request_t, self).__init__(*args)
-            for key, val in kwargs.iteritems(): setattr(self, key, val)
+            for key, val in list(kwargs.items()): setattr(self, key, val)
     setattr(uhd_swig, 'tune_request_t', tune_request_t)
 
     #Make the python tune request object inherit from string
@@ -64,14 +67,14 @@ def _prepare_uhd_swig():
         def __init__(self, *args, **kwargs):
             super(device_addr_t, self).__init__(*args)
             if args and isinstance(args[0], device_addr_t):
-                for key in args[0].keys(): self[key] = args[0][key]
+                for key in list(args[0].keys()): self[key] = args[0][key]
     setattr(uhd_swig, 'device_addr_t', device_addr_t)
 
     #make the streamer args take **kwargs on init
     class stream_args_t(uhd_swig.stream_args_t):
         def __init__(self, *args, **kwargs):
             super(stream_args_t, self).__init__(*args)
-            for key, val in kwargs.iteritems():
+            for key, val in list(kwargs.items()):
                 #for some reason, i cant assign a list in the constructor
                 #but what i can do is append the elements individually
                 if key == 'channels':
@@ -97,7 +100,7 @@ def _prepare_uhd_swig():
     def find_devices(*args, **kwargs):
         def to_pythonized_dev_addr(dev_addr):
             new_dev_addr = uhd_swig.device_addr_t()
-            for key in dev_addr.keys(): new_dev_addr[key] = dev_addr.get(key)
+            for key in list(dev_addr.keys()): new_dev_addr[key] = dev_addr.get(key)
             return new_dev_addr
         return __builtins__['map'](to_pythonized_dev_addr, uhd_swig.find_devices_raw(*args, **kwargs))
     setattr(uhd_swig, 'find_devices', find_devices)
@@ -114,11 +117,11 @@ def _prepare_uhd_swig():
                 ):
                     try:
                         if len(args) > index: args[index] = cast(args[index])
-                        if kwargs.has_key(key): kwargs[key] = cast(kwargs[key])
+                        if key in kwargs: kwargs[key] = cast(kwargs[key])
                     except: pass
                 #dont pass kwargs, it confuses swig, map into args list:
                 for key in ('device_addr', 'stream_args', 'io_type', 'num_channels', 'msgq'):
-                    if kwargs.has_key(key): args.append(kwargs[key])
+                    if key in kwargs: args.append(kwargs[key])
                 return old_constructor(*args)
             return constructor_interceptor
         setattr(uhd_swig, attr, constructor_factory(getattr(uhd_swig, attr)))
@@ -133,4 +136,4 @@ def _prepare_uhd_swig():
 # Initialize this module with the contents of uhd swig
 ########################################################################
 _prepare_uhd_swig()
-from uhd_swig import *
+from .uhd_swig import *
diff --git a/gr-uhd/python/uhd/qa_uhd.py b/gr-uhd/python/uhd/qa_uhd.py
index 4df0d4273e..bab029a9a8 100644
--- a/gr-uhd/python/uhd/qa_uhd.py
+++ b/gr-uhd/python/uhd/qa_uhd.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+
 from gnuradio import gr, gr_unittest, uhd
 
 class test_uhd(gr_unittest.TestCase):
@@ -50,7 +52,7 @@ class test_uhd(gr_unittest.TestCase):
         sa = uhd.stream_args_t()
         sa.channels.append(1)
         sa.channels.append(0)
-        print sa.channels
+        print(sa.channels)
         self.assertEqual(len(sa.channels), 2)
         self.assertEqual(sa.channels[0], 1)
         self.assertEqual(sa.channels[1], 0)
diff --git a/gr-utils/python/modtool/__init__.py b/gr-utils/python/modtool/__init__.py
index 897ff97fce..b6d719ac1d 100644
--- a/gr-utils/python/modtool/__init__.py
+++ b/gr-utils/python/modtool/__init__.py
@@ -1,3 +1,5 @@
+from __future__ import absolute_import
+from __future__ import unicode_literals
 #
 # Copyright 2013-2014 Free Software Foundation, Inc.
 #
@@ -19,17 +21,17 @@
 # Boston, MA 02110-1301, USA.
 #
 
-from cmakefile_editor import CMakeFileEditor
-from grc_xml_generator import GRCXMLGenerator
-from modtool_base import ModTool, ModToolException, get_modtool_modules
-from modtool_add import ModToolAdd
-from modtool_disable import ModToolDisable
-from modtool_info import ModToolInfo
-from modtool_makexml import ModToolMakeXML
-from modtool_newmod import ModToolNewModule
-from modtool_rm import ModToolRemove
-from modtool_rename import ModToolRename
-from templates import Templates
+from .cmakefile_editor import CMakeFileEditor
+from .grc_xml_generator import GRCXMLGenerator
+from .modtool_base import ModTool, ModToolException, get_modtool_modules
+from .modtool_add import ModToolAdd
+from .modtool_disable import ModToolDisable
+from .modtool_info import ModToolInfo
+from .modtool_makexml import ModToolMakeXML
+from .modtool_newmod import ModToolNewModule
+from .modtool_rm import ModToolRemove
+from .modtool_rename import ModToolRename
+from .templates import Templates
 # Leave this at the end
-from parser_cc_block import ParserCCBlock
-from util_functions import *
+from .parser_cc_block import ParserCCBlock
+from .util_functions import *
diff --git a/gr-utils/python/modtool/cmakefile_editor.py b/gr-utils/python/modtool/cmakefile_editor.py
index d57c650c5e..eee555476f 100644
--- a/gr-utils/python/modtool/cmakefile_editor.py
+++ b/gr-utils/python/modtool/cmakefile_editor.py
@@ -20,6 +20,9 @@
 #
 """ Edit CMakeLists.txt files """
 
+from __future__ import print_function
+from __future__ import unicode_literals
+
 import re
 
 class CMakeFileEditor(object):
@@ -126,9 +129,9 @@ class CMakeFileEditor(object):
             comment_out_re = r'\n' + self.indent + comment_out_re
         (self.cfile, nsubs) = re.subn(r'(\b'+fname+r'\b)\s*', comment_out_re, self.cfile)
         if nsubs == 0:
-            print "Warning: A replacement failed when commenting out %s. Check the CMakeFile.txt manually." % fname
+            print("Warning: A replacement failed when commenting out %s. Check the CMakeFile.txt manually." % fname)
         elif nsubs > 1:
-            print "Warning: Replaced %s %d times (instead of once). Check the CMakeFile.txt manually." % (fname, nsubs)
+            print("Warning: Replaced %s %d times (instead of once). Check the CMakeFile.txt manually." % (fname, nsubs))
 
     def comment_out_lines(self, pattern, comment_str='#'):
         """ Comments out all lines that match with pattern """
diff --git a/gr-utils/python/modtool/code_generator.py b/gr-utils/python/modtool/code_generator.py
index 326b2d5986..d95434f577 100644
--- a/gr-utils/python/modtool/code_generator.py
+++ b/gr-utils/python/modtool/code_generator.py
@@ -19,14 +19,16 @@
 # Boston, MA 02110-1301, USA.
 #
 """ A code generator (needed by ModToolAdd) """
+from __future__ import absolute_import
+from __future__ import unicode_literals
 
 from mako.template import Template
-from templates import Templates
-from util_functions import str_to_fancyc_comment
-from util_functions import str_to_python_comment
-from util_functions import strip_default_values
-from util_functions import strip_arg_types
-from util_functions import strip_arg_types_grc
+from .templates import Templates
+from .util_functions import str_to_fancyc_comment
+from .util_functions import str_to_python_comment
+from .util_functions import strip_default_values
+from .util_functions import strip_arg_types
+from .util_functions import strip_arg_types_grc
 
 GRTYPELIST = {
     'sync': 'sync_block',
diff --git a/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrMiscUtils.cmake b/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrMiscUtils.cmake
index 319581c05e..c65a8ca725 100644
--- a/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrMiscUtils.cmake
+++ b/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrMiscUtils.cmake
@@ -341,7 +341,7 @@ if __name__ == '__main__':
   add_custom_command(
     OUTPUT ${expanded_files_h}
     DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
-    COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+    COMMAND ${PYTHON_EXECUTABLE} -B
     ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
     ${root} ${root}.h.t ${ARGN}
   )
@@ -387,7 +387,7 @@ if __name__ == '__main__':
   add_custom_command(
     OUTPUT ${expanded_files_cc}
     DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.cc.t
-    COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+    COMMAND ${PYTHON_EXECUTABLE} -B
     ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
     ${root} ${root}.cc.t ${ARGN}
   )
@@ -396,7 +396,7 @@ if __name__ == '__main__':
   add_custom_command(
     OUTPUT ${expanded_files_h}
     DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
-    COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+    COMMAND ${PYTHON_EXECUTABLE} -B
     ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
     ${root} ${root}.h.t ${ARGN}
   )
@@ -450,7 +450,7 @@ if __name__ == '__main__':
   add_custom_command(
     OUTPUT ${expanded_files_cc_impl}
     DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}_impl.cc.t
-    COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+    COMMAND ${PYTHON_EXECUTABLE} -B
     ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
     ${root} ${root}_impl.cc.t ${ARGN}
   )
@@ -459,7 +459,7 @@ if __name__ == '__main__':
   add_custom_command(
     OUTPUT ${expanded_files_h_impl}
     DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}_impl.h.t
-    COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+    COMMAND ${PYTHON_EXECUTABLE} -B
     ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
     ${root} ${root}_impl.h.t ${ARGN}
   )
diff --git a/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrPython.cmake b/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrPython.cmake
index 0bfa92db8d..6b997c0869 100644
--- a/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrPython.cmake
+++ b/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrPython.cmake
@@ -36,11 +36,12 @@ if(PYTHON_EXECUTABLE)
 else(PYTHON_EXECUTABLE)
 
     #use the built-in find script
+    set(Python_ADDITIONAL_VERSIONS 3.4 3.5 3.6)
     find_package(PythonInterp 2)
 
     #and if that fails use the find program routine
     if(NOT PYTHONINTERP_FOUND)
-        find_program(PYTHON_EXECUTABLE NAMES python python2 python2.7 python2.6 python2.5)
+        find_program(PYTHON_EXECUTABLE NAMES python python2 python2.7)
         if(PYTHON_EXECUTABLE)
             set(PYTHONINTERP_FOUND TRUE)
         endif(PYTHON_EXECUTABLE)
@@ -86,7 +87,7 @@ macro(GR_PYTHON_CHECK_MODULE desc mod cmd have)
 try:
     import ${mod}
     assert ${cmd}
-except ImportError, AssertionError: exit(-1)
+except (ImportError, AssertionError): exit(-1)
 except: pass
 #########################################"
         RESULT_VARIABLE ${have}
@@ -106,7 +107,7 @@ endmacro(GR_PYTHON_CHECK_MODULE)
 if(NOT DEFINED GR_PYTHON_DIR)
 execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "
 from distutils import sysconfig
-print sysconfig.get_python_lib(plat_specific=True, prefix='')
+print(sysconfig.get_python_lib(plat_specific=True, prefix=''))
 " OUTPUT_VARIABLE GR_PYTHON_DIR OUTPUT_STRIP_TRAILING_WHITESPACE
 )
 endif()
@@ -119,7 +120,7 @@ file(TO_CMAKE_PATH ${GR_PYTHON_DIR} GR_PYTHON_DIR)
 function(GR_UNIQUE_TARGET desc)
     file(RELATIVE_PATH reldir ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR})
     execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import re, hashlib
-unique = hashlib.md5('${reldir}${ARGN}').hexdigest()[:5]
+unique = hashlib.md5(b'${reldir}${ARGN}').hexdigest()[:5]
 print(re.sub('\\W', '_', '${desc} ${reldir} ' + unique))"
     OUTPUT_VARIABLE _target OUTPUT_STRIP_TRAILING_WHITESPACE)
     add_custom_target(${_target} ALL DEPENDS ${ARGN})
@@ -233,7 +234,7 @@ endfunction(GR_PYTHON_INSTALL)
 file(WRITE ${CMAKE_BINARY_DIR}/python_compile_helper.py "
 import sys, py_compile
 files = sys.argv[1:]
-srcs, gens = files[:len(files)/2], files[len(files)/2:]
+srcs, gens = files[:len(files)//2], files[len(files)//2:]
 for src, gen in zip(srcs, gens):
     py_compile.compile(file=src, cfile=gen, doraise=True)
 ")
diff --git a/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrSwig.cmake b/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrSwig.cmake
index 58699a7be0..2c163cac01 100644
--- a/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrSwig.cmake
+++ b/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrSwig.cmake
@@ -76,7 +76,7 @@ function(GR_SWIG_MAKE_DOCS output_file)
         add_custom_command(
             OUTPUT ${output_file}
             DEPENDS ${input_files} ${stamp-file} ${OUTPUT_DIRECTORY}/xml/index.xml
-            COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+            COMMAND ${PYTHON_EXECUTABLE} -B
                 ${CMAKE_SOURCE_DIR}/docs/doxygen/swig_doc.py
                 ${OUTPUT_DIRECTORY}/xml
                 ${output_file}
diff --git a/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/__init__.py b/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/__init__.py
index 5cd0b3c6c5..b7a8884519 100644
--- a/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/__init__.py
+++ b/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/__init__.py
@@ -63,8 +63,9 @@ This line is uninformative and is only to test line breaks in the comments.
 u'Outputs the vital aadvark statistics.'
 
 """
+from __future__ import unicode_literals
 
-from doxyindex import DoxyIndex, DoxyFunction, DoxyParam, DoxyClass, DoxyFile, DoxyNamespace, DoxyGroup, DoxyFriend, DoxyOther
+from .doxyindex import DoxyIndex, DoxyFunction, DoxyParam, DoxyClass, DoxyFile, DoxyNamespace, DoxyGroup, DoxyFriend, DoxyOther
 
 def _test():
     import os
diff --git a/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/base.py b/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/base.py
index e8f026ab90..0f0adf255b 100644
--- a/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/base.py
+++ b/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/base.py
@@ -24,24 +24,26 @@ A base class is created.
 Classes based upon this are used to make more user-friendly interfaces
 to the doxygen xml docs than the generated classes provide.
 """
+from __future__ import print_function
+from __future__ import unicode_literals
 
 import os
 import pdb
 
 from xml.parsers.expat import ExpatError
 
-from generated import compound
+from .generated import compound
 
 
 class Base(object):
 
-    class Duplicate(StandardError):
+    class Duplicate(Exception):
         pass
 
-    class NoSuchMember(StandardError):
+    class NoSuchMember(Exception):
         pass
 
-    class ParsingError(StandardError):
+    class ParsingError(Exception):
         pass
 
     def __init__(self, parse_data, top=None):
@@ -94,7 +96,7 @@ class Base(object):
         for cls in self.mem_classes:
             if cls.can_parse(mem):
                 return cls
-        raise StandardError(("Did not find a class for object '%s'." \
+        raise Exception(("Did not find a class for object '%s'." \
                                  % (mem.get_name())))
 
     def convert_mem(self, mem):
@@ -102,11 +104,11 @@ class Base(object):
             cls = self.get_cls(mem)
             converted = cls.from_parse_data(mem, self.top)
             if converted is None:
-                raise StandardError('No class matched this object.')
+                raise Exception('No class matched this object.')
             self.add_ref(converted)
             return converted
-        except StandardError, e:
-            print e
+        except Exception as e:
+            print(e)
 
     @classmethod
     def includes(cls, inst):
diff --git a/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/doxyindex.py b/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/doxyindex.py
index 78e8153768..4284af25ec 100644
--- a/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/doxyindex.py
+++ b/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/doxyindex.py
@@ -22,12 +22,14 @@
 Classes providing more user-friendly interfaces to the doxygen xml
 docs than the generated classes provide.
 """
+from __future__ import absolute_import
+from __future__ import unicode_literals
 
 import os
 
-from generated import index
-from base import Base
-from text import description
+from .generated import index
+from .base import Base
+from .text import description
 
 class DoxyIndex(Base):
     """
diff --git a/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/__init__.py b/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/__init__.py
index 39823979f6..23095c1f34 100644
--- a/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/__init__.py
+++ b/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/__init__.py
@@ -5,3 +5,4 @@ These do the real work of parsing the doxygen xml files but the
 resultant classes are not very friendly to navigate so the rest of the
 doxyxml module processes them further.
 """
+from __future__ import unicode_literals
diff --git a/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/compound.py b/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/compound.py
index 1522ac23f1..acfa0dd5c6 100644
--- a/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/compound.py
+++ b/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/compound.py
@@ -3,15 +3,17 @@
 """
 Generated Mon Feb  9 19:08:05 2009 by generateDS.py.
 """
+from __future__ import absolute_import
+from __future__ import unicode_literals
+
 
-from string import lower as str_lower
 from xml.dom import minidom
 from xml.dom import Node
 
 import sys
 
-import compoundsuper as supermod
-from compoundsuper import MixedContainer
+from . import compoundsuper as supermod
+from .compoundsuper import MixedContainer
 
 
 class DoxygenTypeSub(supermod.DoxygenType):
diff --git a/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/compoundsuper.py b/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/compoundsuper.py
index 6255dda163..6e984e13ec 100644
--- a/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/compoundsuper.py
+++ b/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/compoundsuper.py
@@ -4,12 +4,17 @@
 # Generated Thu Jun 11 18:44:25 2009 by generateDS.py.
 #
 
+from __future__ import print_function
+from __future__ import unicode_literals
+
 import sys
-import getopt
-from string import lower as str_lower
+
 from xml.dom import minidom
 from xml.dom import Node
 
+import six
+
+
 #
 # User methods
 #
@@ -19,9 +24,9 @@ from xml.dom import Node
 
 try:
     from generatedssuper import GeneratedsSuper
-except ImportError, exp:
+except ImportError as exp:
 
-    class GeneratedsSuper:
+    class GeneratedsSuper(object):
         def format_string(self, input_data, input_name=''):
             return input_data
         def format_integer(self, input_data, input_name=''):
@@ -64,7 +69,7 @@ def showIndent(outfile, level):
         outfile.write('    ')
 
 def quote_xml(inStr):
-    s1 = (isinstance(inStr, basestring) and inStr or
+    s1 = (isinstance(inStr, six.string_types) and inStr or
           '%s' % inStr)
     s1 = s1.replace('&', '&amp;')
     s1 = s1.replace('<', '&lt;')
@@ -72,7 +77,7 @@ def quote_xml(inStr):
     return s1
 
 def quote_attrib(inStr):
-    s1 = (isinstance(inStr, basestring) and inStr or
+    s1 = (isinstance(inStr, six.string_types) and inStr or
           '%s' % inStr)
     s1 = s1.replace('&', '&amp;')
     s1 = s1.replace('<', '&lt;')
@@ -102,7 +107,7 @@ def quote_python(inStr):
             return '"""%s"""' % s1
 
 
-class MixedContainer:
+class MixedContainer(object):
     # Constants for category:
     CategoryNone = 0
     CategoryText = 1
@@ -4221,7 +4226,7 @@ class codelineType(GeneratedsSuper):
         if attrs.get('lineno'):
             try:
                 self.lineno = int(attrs.get('lineno').value)
-            except ValueError, exp:
+            except ValueError as exp:
                 raise ValueError('Bad integer attribute (lineno): %s' % exp)
         if attrs.get('refkind'):
             self.refkind = attrs.get('refkind').value
@@ -4504,12 +4509,12 @@ class referenceType(GeneratedsSuper):
         if attrs.get('endline'):
             try:
                 self.endline = int(attrs.get('endline').value)
-            except ValueError, exp:
+            except ValueError as exp:
                 raise ValueError('Bad integer attribute (endline): %s' % exp)
         if attrs.get('startline'):
             try:
                 self.startline = int(attrs.get('startline').value)
-            except ValueError, exp:
+            except ValueError as exp:
                 raise ValueError('Bad integer attribute (startline): %s' % exp)
         if attrs.get('refid'):
             self.refid = attrs.get('refid').value
@@ -4627,17 +4632,17 @@ class locationType(GeneratedsSuper):
         if attrs.get('bodystart'):
             try:
                 self.bodystart = int(attrs.get('bodystart').value)
-            except ValueError, exp:
+            except ValueError as exp:
                 raise ValueError('Bad integer attribute (bodystart): %s' % exp)
         if attrs.get('line'):
             try:
                 self.line = int(attrs.get('line').value)
-            except ValueError, exp:
+            except ValueError as exp:
                 raise ValueError('Bad integer attribute (line): %s' % exp)
         if attrs.get('bodyend'):
             try:
                 self.bodyend = int(attrs.get('bodyend').value)
-            except ValueError, exp:
+            except ValueError as exp:
                 raise ValueError('Bad integer attribute (bodyend): %s' % exp)
         if attrs.get('bodyfile'):
             self.bodyfile = attrs.get('bodyfile').value
@@ -6778,12 +6783,12 @@ class docTableType(GeneratedsSuper):
         if attrs.get('rows'):
             try:
                 self.rows = int(attrs.get('rows').value)
-            except ValueError, exp:
+            except ValueError as exp:
                 raise ValueError('Bad integer attribute (rows): %s' % exp)
         if attrs.get('cols'):
             try:
                 self.cols = int(attrs.get('cols').value)
-            except ValueError, exp:
+            except ValueError as exp:
                 raise ValueError('Bad integer attribute (cols): %s' % exp)
     def buildChildren(self, child_, nodeName_):
         if child_.nodeType == Node.ELEMENT_NODE and \
@@ -7108,7 +7113,7 @@ class docHeadingType(GeneratedsSuper):
         if attrs.get('level'):
             try:
                 self.level = int(attrs.get('level').value)
-            except ValueError, exp:
+            except ValueError as exp:
                 raise ValueError('Bad integer attribute (level): %s' % exp)
     def buildChildren(self, child_, nodeName_):
         if child_.nodeType == Node.TEXT_NODE:
@@ -8283,7 +8288,7 @@ Options:
 """
 
 def usage():
-    print USAGE_TEXT
+    print(USAGE_TEXT)
     sys.exit(1)
 
 
@@ -8339,4 +8344,3 @@ if __name__ == '__main__':
     main()
     #import pdb
     #pdb.run('main()')
-
diff --git a/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/index.py b/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/index.py
index 7a70e14a1a..0c63512119 100644
--- a/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/index.py
+++ b/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/index.py
@@ -3,14 +3,16 @@
 """
 Generated Mon Feb  9 19:08:05 2009 by generateDS.py.
 """
+from __future__ import absolute_import
+from __future__ import unicode_literals
 
 from xml.dom import minidom
 
 import os
 import sys
-import compound
+from . import compound
 
-import indexsuper as supermod
+from . import indexsuper as supermod
 
 class DoxygenTypeSub(supermod.DoxygenType):
     def __init__(self, version=None, compound=None):
diff --git a/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/indexsuper.py b/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/indexsuper.py
index a991530198..11312db635 100644
--- a/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/indexsuper.py
+++ b/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/indexsuper.py
@@ -4,12 +4,16 @@
 # Generated Thu Jun 11 18:43:54 2009 by generateDS.py.
 #
 
+from __future__ import print_function
+from __future__ import unicode_literals
+
 import sys
-import getopt
-from string import lower as str_lower
+
 from xml.dom import minidom
 from xml.dom import Node
 
+import six
+
 #
 # User methods
 #
@@ -19,9 +23,9 @@ from xml.dom import Node
 
 try:
     from generatedssuper import GeneratedsSuper
-except ImportError, exp:
+except ImportError as exp:
 
-    class GeneratedsSuper:
+    class GeneratedsSuper(object):
         def format_string(self, input_data, input_name=''):
             return input_data
         def format_integer(self, input_data, input_name=''):
@@ -64,7 +68,7 @@ def showIndent(outfile, level):
         outfile.write('    ')
 
 def quote_xml(inStr):
-    s1 = (isinstance(inStr, basestring) and inStr or
+    s1 = (isinstance(inStr, six.string_types) and inStr or
           '%s' % inStr)
     s1 = s1.replace('&', '&amp;')
     s1 = s1.replace('<', '&lt;')
@@ -72,7 +76,7 @@ def quote_xml(inStr):
     return s1
 
 def quote_attrib(inStr):
-    s1 = (isinstance(inStr, basestring) and inStr or
+    s1 = (isinstance(inStr, six.string_types) and inStr or
           '%s' % inStr)
     s1 = s1.replace('&', '&amp;')
     s1 = s1.replace('<', '&lt;')
@@ -102,7 +106,7 @@ def quote_python(inStr):
             return '"""%s"""' % s1
 
 
-class MixedContainer:
+class MixedContainer(object):
     # Constants for category:
     CategoryNone = 0
     CategoryText = 1
@@ -462,7 +466,7 @@ Options:
 """
 
 def usage():
-    print USAGE_TEXT
+    print(USAGE_TEXT)
     sys.exit(1)
 
 
@@ -520,4 +524,3 @@ if __name__ == '__main__':
     main()
     #import pdb
     #pdb.run('main()')
-
diff --git a/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/text.py b/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/text.py
index 629edd180d..de2d19b532 100644
--- a/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/text.py
+++ b/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/text.py
@@ -21,12 +21,13 @@
 """
 Utilities for extracting text from generated classes.
 """
+from __future__ import unicode_literals
 
 def is_string(txt):
     if isinstance(txt, str):
         return True
     try:
-        if isinstance(txt, unicode):
+        if isinstance(txt, str):
             return True
     except NameError:
         pass
@@ -49,7 +50,7 @@ def description_bit(obj):
     elif is_string(obj):
         return obj
     else:
-        raise StandardError('Expecting a string or something with content, content_ or value attribute')
+        raise Exception('Expecting a string or something with content, content_ or value attribute')
     # If this bit is a paragraph then add one some line breaks.
     if hasattr(obj, 'name') and obj.name == 'para':
         result += "\n\n"
diff --git a/gr-utils/python/modtool/gr-newmod/docs/doxygen/swig_doc.py b/gr-utils/python/modtool/gr-newmod/docs/doxygen/swig_doc.py
index d3536db8d0..c735b1291b 100644
--- a/gr-utils/python/modtool/gr-newmod/docs/doxygen/swig_doc.py
+++ b/gr-utils/python/modtool/gr-newmod/docs/doxygen/swig_doc.py
@@ -26,6 +26,7 @@ The file instructs SWIG to transfer the doxygen comments into the
 python docstrings.
 
 """
+from __future__ import unicode_literals
 
 import sys, time
 
@@ -309,7 +310,7 @@ if __name__ == "__main__":
     # Parse command line options and set up doxyxml.
     err_msg = "Execute using: python swig_doc.py xml_path outputfilename"
     if len(sys.argv) != 3:
-        raise StandardError(err_msg)
+        raise Exception(err_msg)
     xml_path = sys.argv[1]
     swigdocfilename = sys.argv[2]
     di = DoxyIndex(xml_path)
diff --git a/gr-utils/python/modtool/gr-newmod/python/__init__.py b/gr-utils/python/modtool/gr-newmod/python/__init__.py
index ed385a0abe..806f287cc3 100644
--- a/gr-utils/python/modtool/gr-newmod/python/__init__.py
+++ b/gr-utils/python/modtool/gr-newmod/python/__init__.py
@@ -22,6 +22,7 @@
 This is the GNU Radio HOWTO module. Place your Python package
 description here (python/__init__.py).
 '''
+from __future__ import unicode_literals
 
 # import swig generated symbols into the howto namespace
 try:
diff --git a/gr-utils/python/modtool/gr-newmod/python/build_utils.py b/gr-utils/python/modtool/gr-newmod/python/build_utils.py
index cf58a97637..0b26844cbf 100644
--- a/gr-utils/python/modtool/gr-newmod/python/build_utils.py
+++ b/gr-utils/python/modtool/gr-newmod/python/build_utils.py
@@ -21,15 +21,17 @@
 
 """Misc utilities used at build time
 """
+from __future__ import absolute_import
+from __future__ import unicode_literals
 
 import re, os, os.path
-from build_utils_codes import *
+from .build_utils_codes import *
 
 
 # set srcdir to the directory that contains Makefile.am
 try:
     srcdir = os.environ['srcdir']
-except KeyError, e:
+except KeyError as e:
     srcdir = "."
 srcdir = srcdir + '/'
 
@@ -39,7 +41,7 @@ try:
         do_makefile = False
     else:
         do_makefile = True
-except KeyError, e:
+except KeyError as e:
     do_makefile = False
 
 # set do_sources to either true or false dependeing on the environment
@@ -48,7 +50,7 @@ try:
         do_sources = False
     else:
         do_sources = True
-except KeyError, e:
+except KeyError as e:
     do_sources = True
 
 name_dict = {}
@@ -127,7 +129,7 @@ def extract_extension (template_name):
     # we return everything between the penultimate . and .t
     mo = re.search (r'\.([a-z]+)\.t$', template_name)
     if not mo:
-        raise ValueError, "Incorrectly formed template_name '%s'" % (template_name,)
+        raise ValueError("Incorrectly formed template_name '%s'" % (template_name,))
     return mo.group (1)
 
 def open_src (name, mode):
diff --git a/gr-utils/python/modtool/gr-newmod/python/build_utils_codes.py b/gr-utils/python/modtool/gr-newmod/python/build_utils_codes.py
index 9ea96baae4..22a6bdb99b 100644
--- a/gr-utils/python/modtool/gr-newmod/python/build_utils_codes.py
+++ b/gr-utils/python/modtool/gr-newmod/python/build_utils_codes.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
 #
 # Copyright 2004 Free Software Foundation, Inc.
 #
diff --git a/gr-utils/python/modtool/grc_xml_generator.py b/gr-utils/python/modtool/grc_xml_generator.py
index af17ca1822..1109701f7e 100644
--- a/gr-utils/python/modtool/grc_xml_generator.py
+++ b/gr-utils/python/modtool/grc_xml_generator.py
@@ -1,3 +1,4 @@
+from __future__ import absolute_import
 #
 # Copyright 2013 Free Software Foundation, Inc.
 #
@@ -19,7 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 import xml.etree.ElementTree as ET
-from util_functions import is_number, xml_indent
+from .util_functions import is_number, xml_indent
 
 try:
     import lxml.etree
diff --git a/gr-utils/python/modtool/modtool_add.py b/gr-utils/python/modtool/modtool_add.py
index b7d33c6113..74f11318d0 100644
--- a/gr-utils/python/modtool/modtool_add.py
+++ b/gr-utils/python/modtool/modtool_add.py
@@ -20,14 +20,18 @@
 #
 """ Module to add new blocks """
 
+from __future__ import print_function
+from __future__ import absolute_import
+from __future__ import unicode_literals
+
 import os
 import re
 
-from util_functions import append_re_line_sequence, ask_yes_no
-from cmakefile_editor import CMakeFileEditor
-from modtool_base import ModTool, ModToolException
-from templates import Templates
-from code_generator import render_template
+from .util_functions import append_re_line_sequence, ask_yes_no
+from .cmakefile_editor import CMakeFileEditor
+from .modtool_base import ModTool, ModToolException
+from .templates import Templates
+from .code_generator import render_template
 
 class ModToolAdd(ModTool):
     """ Add block to the out-of-tree module. """
@@ -69,44 +73,44 @@ class ModToolAdd(ModTool):
 
         self._info['blocktype'] = options.block_type
         if self._info['blocktype'] is None:
-            # Print list out of blocktypes to user for reference
-            print str(self._block_types)
+            # Print(list out of blocktypes to user for reference)
+            print(str(self._block_types))
             while self._info['blocktype'] not in self._block_types:
-                self._info['blocktype'] = raw_input("Enter block type: ")
+                self._info['blocktype'] = eval(input("Enter block type: "))
                 if self._info['blocktype'] not in self._block_types:
-                    print 'Must be one of ' + str(self._block_types)
+                    print('Must be one of ' + str(self._block_types))
         # Allow user to specify language interactively if not set
         self._info['lang'] = options.lang
         if self._info['lang'] is None:
             while self._info['lang'] not in ['c++', 'cpp', 'python']:
-                self._info['lang'] = raw_input("Language (python/cpp): ")
+                self._info['lang'] = eval(input("Language (python/cpp): "))
         if self._info['lang'] == 'c++':
             self._info['lang'] = 'cpp'
 
-        print "Language: %s" % {'cpp': 'C++', 'python': 'Python'}[self._info['lang']]
+        print("Language: %s" % {'cpp': 'C++', 'python': 'Python'}[self._info['lang']])
 
         if ((self._skip_subdirs['lib'] and self._info['lang'] == 'cpp')
              or (self._skip_subdirs['python'] and self._info['lang'] == 'python')):
             raise ModToolException('Missing or skipping relevant subdir.')
 
         if self._info['blockname'] is None:
-            self._info['blockname'] = raw_input("Enter name of block/code (without module name prefix): ")
+            self._info['blockname'] = eval(input("Enter name of block/code (without module name prefix): "))
         if not re.match('[a-zA-Z0-9_]+', self._info['blockname']):
             raise ModToolException('Invalid block name.')
-        print "Block/code identifier: " + self._info['blockname']
+        print("Block/code identifier: " + self._info['blockname'])
         self._info['fullblockname'] = self._info['modname'] + '_' + self._info['blockname']
         if not options.license_file:
             self._info['copyrightholder'] = options.copyright
             if self._info['copyrightholder'] is None:
                 self._info['copyrightholder'] = '<+YOU OR YOUR COMPANY+>'
             elif self._info['is_component']:
-                print "For GNU Radio components the FSF is added as copyright holder"
+                print("For GNU Radio components the FSF is added as copyright holder")
         self._license_file = options.license_file
         self._info['license'] = self.setup_choose_license()
         if options.argument_list is not None:
             self._info['arglist'] = options.argument_list
         else:
-            self._info['arglist'] = raw_input('Enter valid argument list, including default arguments: ')
+            self._info['arglist'] = eval(input('Enter valid argument list, including default arguments: '))
 
         if not (self._info['blocktype'] in ('noblock') or self._skip_subdirs['python']):
             self._add_py_qa = options.add_python_qa
@@ -118,8 +122,8 @@ class ModToolAdd(ModTool):
                 self._add_cc_qa = ask_yes_no('Add C++ QA code?', not self._add_py_qa)
         self._skip_cmakefiles = options.skip_cmakefiles
         if self._info['version'] == 'autofoo' and not self._skip_cmakefiles:
-            print "Warning: Autotools modules are not supported. ",
-            print "Files will be created, but Makefiles will not be edited."
+            print("Warning: Autotools modules are not supported. ",
+                  "Files will be created, but Makefiles will not be edited.")
             self._skip_cmakefiles = True
 
     def setup_choose_license(self):
@@ -143,7 +147,7 @@ class ModToolAdd(ModTool):
     def _write_tpl(self, tpl, path, fname):
         """ Shorthand for writing a substituted template to a file"""
         path_to_file = os.path.join(path, fname)
-        print "Adding file '%s'..." % path_to_file
+        print("Adding file '%s'..." % path_to_file)
         open(path_to_file, 'w').write(render_template(tpl, **self._info))
         self.scm.add_files((path_to_file,))
 
@@ -197,7 +201,7 @@ class ModToolAdd(ModTool):
                                             )
                     self.scm.mark_files_updated((self._file['qalib'],))
                 except IOError:
-                    print "Can't add C++ QA files."
+                    print("Can't add C++ QA files.")
         fname_cc = None
         fname_h  = None
         if self._info['version']  == '37':
@@ -218,9 +222,9 @@ class ModToolAdd(ModTool):
             if self._info['version'] == '37':
                 _add_qa()
             elif self._info['version'] == '36':
-                print "Warning: C++ QA files not supported for 3.6-style OOTs."
+                print("Warning: C++ QA files not supported for 3.6-style OOTs.")
             elif self._info['version'] == 'autofoo':
-                print "Warning: C++ QA files not supported for autotools."
+                print("Warning: C++ QA files not supported for autotools.")
         if not self._skip_cmakefiles:
             ed = CMakeFileEditor(self._file['cmlib'])
             cmake_list_var = '[a-z]*_?' + self._info['modname'] + '_sources'
@@ -237,9 +241,9 @@ class ModToolAdd(ModTool):
         - Edit main *.i file
         """
         if self._get_mainswigfile() is None:
-            print 'Warning: No main swig file found.'
+            print('Warning: No main swig file found.')
             return
-        print "Editing %s..." % self._file['swig']
+        print("Editing %s..." % self._file['swig'])
         mod_block_sep = '/'
         if self._info['version'] == '36':
             mod_block_sep = '_'
@@ -266,11 +270,11 @@ class ModToolAdd(ModTool):
         """
         fname_py_qa = 'qa_' + self._info['blockname'] + '.py'
         self._write_tpl('qa_python', self._info['pydir'], fname_py_qa)
-        os.chmod(os.path.join(self._info['pydir'], fname_py_qa), 0755)
+        os.chmod(os.path.join(self._info['pydir'], fname_py_qa), 0o755)
         self.scm.mark_files_updated((os.path.join(self._info['pydir'], fname_py_qa),))
         if self._skip_cmakefiles or CMakeFileEditor(self._file['cmpython']).check_for_glob('qa_*.py'):
             return
-        print "Editing %s/CMakeLists.txt..." % self._info['pydir']
+        print("Editing %s/CMakeLists.txt..." % self._info['pydir'])
         open(self._file['cmpython'], 'a').write(
                 'GR_ADD_TEST(qa_%s ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/%s)\n' % \
                   (self._info['blockname'], fname_py_qa))
@@ -307,7 +311,7 @@ class ModToolAdd(ModTool):
         ed = CMakeFileEditor(self._file['cmgrc'], '\n    ')
         if self._skip_cmakefiles or ed.check_for_glob('*.xml'):
             return
-        print "Editing grc/CMakeLists.txt..."
+        print("Editing grc/CMakeLists.txt...")
         ed.append_value('install', fname_grc, to_ignore_end='DESTINATION[^()]+')
         ed.write()
         self.scm.mark_files_updated((self._file['cmgrc'],))
diff --git a/gr-utils/python/modtool/modtool_base.py b/gr-utils/python/modtool/modtool_base.py
index 990e63af14..e0ae963f20 100644
--- a/gr-utils/python/modtool/modtool_base.py
+++ b/gr-utils/python/modtool/modtool_base.py
@@ -20,13 +20,17 @@
 #
 """ Base class for the modules """
 
+from __future__ import print_function
+from __future__ import absolute_import
+from __future__ import unicode_literals
+
 import os
 import re
 from argparse import ArgumentParser, RawDescriptionHelpFormatter
 
 from gnuradio import gr
-from util_functions import get_modname
-from scm import SCMRepoFactory
+from .util_functions import get_modname
+from .scm import SCMRepoFactory
 
 class ModToolException(BaseException):
     """ Standard exception for modtool classes. """
@@ -94,7 +98,7 @@ class ModTool(object):
             self._info['modname'] = get_modname()
         if self._info['modname'] is None:
             raise ModToolException('No GNU Radio module found in the given directory.')
-        print "GNU Radio module name identified: " + self._info['modname']
+        print("GNU Radio module name identified: " + self._info['modname'])
         if self._info['version'] == '36' and (
                 os.path.isdir(os.path.join('include', self._info['modname'])) or
                 os.path.isdir(os.path.join('include', 'gnuradio', self._info['modname']))
@@ -144,7 +148,7 @@ class ModTool(object):
         else:
             self.scm = SCMRepoFactory(self.options, '.').make_empty_scm_manager()
         if self.scm is None:
-            print "Error: Can't set up SCM."
+            print("Error: Can't set up SCM.")
             exit(1)
 
     def _check_directory(self, directory):
@@ -156,7 +160,7 @@ class ModTool(object):
             files = os.listdir(directory)
             os.chdir(directory)
         except OSError:
-            print "Can't read or chdir to directory %s." % directory
+            print("Can't read or chdir to directory %s." % directory)
             return False
         self._info['is_component'] = False
         for f in files:
@@ -170,11 +174,11 @@ class ModTool(object):
                     has_makefile = True
             # TODO search for autofoo
             elif os.path.isdir(f):
-                if (f in self._has_subdirs.keys()):
+                if (f in list(self._has_subdirs.keys())):
                     self._has_subdirs[f] = True
                 else:
                     self._skip_subdirs[f] = True
-        return bool(has_makefile and (self._has_subdirs.values()))
+        return bool(has_makefile and (list(self._has_subdirs.values())))
 
     def _get_mainswigfile(self):
         """ Find out which name the main SWIG file has. In particular, is it
diff --git a/gr-utils/python/modtool/modtool_disable.py b/gr-utils/python/modtool/modtool_disable.py
index 1772a740f3..629a810cb0 100644
--- a/gr-utils/python/modtool/modtool_disable.py
+++ b/gr-utils/python/modtool/modtool_disable.py
@@ -20,12 +20,16 @@
 #
 """ Disable blocks module """
 
+from __future__ import print_function
+from __future__ import absolute_import
+from __future__ import unicode_literals
+
 import os
 import re
 import sys
 
-from modtool_base import ModTool
-from cmakefile_editor import CMakeFileEditor
+from .modtool_base import ModTool
+from .cmakefile_editor import CMakeFileEditor
 
 
 class ModToolDisable(ModTool):
@@ -46,7 +50,7 @@ class ModToolDisable(ModTool):
         if options.blockname is not None:
             self._info['pattern'] = options.blockname
         else:
-            self._info['pattern'] = raw_input('Which blocks do you want to disable? (Regex): ')
+            self._info['pattern'] = eval(input('Which blocks do you want to disable? (Regex): '))
         if len(self._info['pattern']) == 0:
             self._info['pattern'] = '.'
 
@@ -62,7 +66,7 @@ class ModToolDisable(ModTool):
             try:
                 initfile = open(self._file['pyinit']).read()
             except IOError:
-                print "Could not edit __init__.py, that might be a problem."
+                print("Could not edit __init__.py, that might be a problem.")
                 return False
             pymodname = os.path.splitext(fname)[0]
             initfile = re.sub(r'((from|import)\s+\b'+pymodname+r'\b)', r'#\1', initfile)
@@ -93,14 +97,14 @@ class ModToolDisable(ModTool):
                                         self._info['modname'], fname),
                                         r'//\1', swigfile)
             if nsubs > 0:
-                print "Changing %s..." % self._file['swig']
+                print("Changing %s..." % self._file['swig'])
             if nsubs > 1: # Need to find a single BLOCK_MAGIC
                 blockname = os.path.splitext(fname[len(self._info['modname'])+1:])[0]
                 if self._info['version'] == '37':
                     blockname = os.path.splitext(fname)[0]
                 (swigfile, nsubs) = re.subn('(GR_SWIG_BLOCK_MAGIC2?.+%s.+;)' % blockname, r'//\1', swigfile)
                 if nsubs > 1:
-                    print "Hm, changed more then expected while editing %s." % self._file['swig']
+                    print("Hm, changed more then expected while editing %s." % self._file['swig'])
             open(self._file['swig'], 'w').write(swigfile)
             self.scm.mark_file_updated(self._file['swig'])
             return False
@@ -112,7 +116,7 @@ class ModToolDisable(ModTool):
             if self._info['version'] == '37':
                 blockname = os.path.splitext(fname)[0]
             swigfile = re.sub('(%include\s+"'+fname+'")', r'//\1', swigfile)
-            print "Changing %s..." % self._file['swig']
+            print("Changing %s..." % self._file['swig'])
             swigfile = re.sub('(GR_SWIG_BLOCK_MAGIC2?.+'+blockname+'.+;)', r'//\1', swigfile)
             open(self._file['swig'], 'w').write(swigfile)
             self.scm.mark_file_updated(self._file['swig'])
@@ -135,13 +139,13 @@ class ModToolDisable(ModTool):
                 cmake = CMakeFileEditor(os.path.join(subdir, 'CMakeLists.txt'))
             except IOError:
                 continue
-            print "Traversing %s..." % subdir
+            print("Traversing %s..." % subdir)
             filenames = cmake.find_filenames_match(self._info['pattern'])
             yes = self._info['yes']
             for fname in filenames:
                 file_disabled = False
                 if not yes:
-                    ans = raw_input("Really disable %s? [Y/n/a/q]: " % fname).lower().strip()
+                    ans = input("Really disable %s? [Y/n/a/q]: " % fname).lower().strip()
                     if ans == 'a':
                         yes = True
                     if ans == 'q':
@@ -155,5 +159,5 @@ class ModToolDisable(ModTool):
                     cmake.disable_file(fname)
             cmake.write()
             self.scm.mark_files_updated((os.path.join(subdir, 'CMakeLists.txt'),))
-        print "Careful: 'gr_modtool disable' does not resolve dependencies."
+        print("Careful: 'gr_modtool disable' does not resolve dependencies.")
 
diff --git a/gr-utils/python/modtool/modtool_info.py b/gr-utils/python/modtool/modtool_info.py
index 317948239e..4be302e03e 100644
--- a/gr-utils/python/modtool/modtool_info.py
+++ b/gr-utils/python/modtool/modtool_info.py
@@ -1,4 +1,3 @@
-#
 # Copyright 2013 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
@@ -20,10 +19,14 @@
 #
 """ Returns information about a module """
 
+from __future__ import print_function
+from __future__ import absolute_import
+from __future__ import unicode_literals
+
 import os
 
-from modtool_base import ModTool, ModToolException
-from util_functions import get_modname
+from .modtool_base import ModTool, ModToolException
+from .util_functions import get_modname
 
 
 class ModToolInfo(ModTool):
@@ -70,7 +73,7 @@ class ModToolInfo(ModTool):
                 ):
             self._info['version'] = '37'
         mod_info['version'] = self._info['version']
-        if 'is_component' in self._info.keys() and self._info['is_component']:
+        if 'is_component' in list(self._info.keys()) and self._info['is_component']:
             mod_info['is_component'] = True
         mod_info['incdirs'] = []
         mod_incl_dir = os.path.join(mod_info['base_dir'], 'include')
@@ -83,7 +86,7 @@ class ModToolInfo(ModTool):
             mod_info['build_dir'] = build_dir
             mod_info['incdirs'] += self._get_include_dirs(mod_info)
         if self._python_readable:
-            print str(mod_info)
+            print(str(mod_info))
         else:
             self._pretty_print(mod_info)
 
@@ -106,7 +109,7 @@ class ModToolInfo(ModTool):
         If that hasn't happened, the build dir cannot be detected, unless it's
         called 'build', which is then assumed to be the build dir. """
         base_build_dir = mod_info['base_dir']
-        if 'is_component' in mod_info.keys():
+        if 'is_component' in list(mod_info.keys()):
             (base_build_dir, rest_dir) = os.path.split(base_build_dir)
         has_build_dir = os.path.isdir(os.path.join(base_build_dir , 'build'))
         if (has_build_dir and os.path.isfile(os.path.join(base_build_dir, 'CMakeCache.txt'))):
@@ -123,7 +126,7 @@ class ModToolInfo(ModTool):
         """ Figure out include dirs for the make process. """
         inc_dirs = []
         path_or_internal = {True: 'INTERNAL',
-                            False: 'PATH'}['is_component' in mod_info.keys()]
+                            False: 'PATH'}['is_component' in list(mod_info.keys())]
         try:
             cmakecache_fid = open(os.path.join(mod_info['build_dir'], 'CMakeCache.txt'))
             for line in cmakecache_fid:
@@ -135,19 +138,19 @@ class ModToolInfo(ModTool):
             inc_dirs = [os.path.normpath(path) for path in self._suggested_dirs.split(':') if os.path.isdir(path)]
         return inc_dirs
 
-    def _pretty_print(self, mod_info):
+    def _pretty_print(elf, mod_info):
         """ Output the module info in human-readable format """
         index_names = {'base_dir': 'Base directory',
                        'modname':  'Module name',
                        'is_component':  'Is GR component',
                        'build_dir': 'Build directory',
                        'incdirs': 'Include directories'}
-        for key in mod_info.keys():
+        for key in list(mod_info.keys()):
             if key == 'version':
-                print "        API version: %s" % {
+                print("        API version: %s" % {
                         '36': 'pre-3.7',
                         '37': 'post-3.7',
                         'autofoo': 'Autotools (pre-3.5)'
-                        }[mod_info['version']]
+                        }[mod_info['version']])
             else:
-                print '%19s: %s' % (index_names[key], mod_info[key])
+                print('%19s: %s' % (index_names[key], mod_info[key]))
diff --git a/gr-utils/python/modtool/modtool_makexml.py b/gr-utils/python/modtool/modtool_makexml.py
index 5f53749163..f4c24c7463 100644
--- a/gr-utils/python/modtool/modtool_makexml.py
+++ b/gr-utils/python/modtool/modtool_makexml.py
@@ -20,15 +20,19 @@
 #
 """ Automatically create XML bindings for GRC from block code """
 
+from __future__ import print_function
+from __future__ import absolute_import
+from __future__ import unicode_literals
+
 import os
 import re
 import glob
 
-from modtool_base import ModTool, ModToolException
-from parser_cc_block import ParserCCBlock
-from grc_xml_generator import GRCXMLGenerator
-from cmakefile_editor import CMakeFileEditor
-from util_functions import ask_yes_no
+from .modtool_base import ModTool, ModToolException
+from .parser_cc_block import ParserCCBlock
+from .grc_xml_generator import GRCXMLGenerator
+from .cmakefile_editor import CMakeFileEditor
+from .util_functions import ask_yes_no
 
 
 class ModToolMakeXML(ModTool):
@@ -54,13 +58,13 @@ class ModToolMakeXML(ModTool):
         if options.blockname is not None:
             self._info['pattern'] = options.blockname
         else:
-            self._info['pattern'] = raw_input('Which blocks do you want to parse? (Regex): ')
+            self._info['pattern'] = eval(input('Which blocks do you want to parse? (Regex): '))
         if len(self._info['pattern']) == 0:
             self._info['pattern'] = '.'
 
     def run(self, options):
         """ Go, go, go! """
-        print "Warning: This is an experimental feature. Don't expect any magic."
+        print("Warning: This is an experimental feature. Don't expect any magic.")
         self.setup(options)
         # 1) Go through lib/
         if not self._skip_subdirs['lib']:
@@ -80,12 +84,12 @@ class ModToolMakeXML(ModTool):
         """ Search for files matching pattern in the given path. """
         files = glob.glob("%s/%s"% (path, path_glob))
         files_filt = []
-        print "Searching for matching files in %s/:" % path
+        print("Searching for matching files in %s/:" % path)
         for f in files:
             if re.search(self._info['pattern'], os.path.basename(f)) is not None:
                 files_filt.append(f)
         if len(files_filt) == 0:
-            print "None found."
+            print("None found.")
         return files_filt
 
     def _make_grc_xml_from_block_data(self, params, iosig, blockname):
@@ -110,7 +114,7 @@ class ModToolMakeXML(ModTool):
                     return
             else:
                 file_exists = True
-                print "Warning: Overwriting existing GRC file."
+                print("Warning: Overwriting existing GRC file.")
         grc_generator = GRCXMLGenerator(
                 modname=self._info['modname'],
                 blockname=blockname,
@@ -125,7 +129,7 @@ class ModToolMakeXML(ModTool):
         if not self._skip_subdirs['grc']:
             ed = CMakeFileEditor(self._file['cmgrc'])
             if re.search(fname_xml, ed.cfile) is None and not ed.check_for_glob('*.xml'):
-                print "Adding GRC bindings to grc/CMakeLists.txt..."
+                print("Adding GRC bindings to grc/CMakeLists.txt...")
                 ed.append_value('install', fname_xml, to_ignore_end='DESTINATION[^()]+')
                 ed.write()
                 self.scm.mark_files_updated(self._file['cmgrc'])
@@ -158,7 +162,7 @@ class ModToolMakeXML(ModTool):
             blockname = blockname.replace(self._info['modname']+'_', '', 1)
             return (blockname, fname_h)
         # Go, go, go
-        print "Making GRC bindings for %s..." % fname_cc
+        print("Making GRC bindings for %s..." % fname_cc)
         (blockname, fname_h) = _get_blockdata(fname_cc)
         try:
             parser = ParserCCBlock(fname_cc,
diff --git a/gr-utils/python/modtool/modtool_newmod.py b/gr-utils/python/modtool/modtool_newmod.py
index 4382d9be7d..b3e384d122 100644
--- a/gr-utils/python/modtool/modtool_newmod.py
+++ b/gr-utils/python/modtool/modtool_newmod.py
@@ -20,12 +20,16 @@
 #
 """ Create a whole new out-of-tree module """
 
+from __future__ import print_function
+from __future__ import absolute_import
+from __future__ import unicode_literals
+
 import shutil
 import os
 import re
 from gnuradio import gr
-from modtool_base import ModTool, ModToolException
-from scm import SCMRepoFactory
+from .modtool_base import ModTool, ModToolException
+from .scm import SCMRepoFactory
 
 class ModToolNewModule(ModTool):
     """ Create a new out-of-tree module """
@@ -49,7 +53,7 @@ class ModToolNewModule(ModTool):
             if options.module_name:
                 self._info['modname'] = options.module_name
             else:
-                self._info['modname'] = raw_input('Name of the new module: ')
+                self._info['modname'] = eval(input('Name of the new module: '))
         if not re.match('[a-zA-Z0-9_]+$', self._info['modname']):
             raise ModToolException('Invalid module name.')
         self._dir = options.directory
@@ -76,7 +80,7 @@ class ModToolNewModule(ModTool):
         * Rename files and directories that contain the word howto
         """
         self.setup(options)
-        print "Creating out-of-tree module in %s..." % self._dir,
+        print("Creating out-of-tree module in %s..." % (self._dir,))
         try:
             shutil.copytree(self._srcdir, self._dir)
             os.chdir(self._dir)
@@ -93,8 +97,8 @@ class ModToolNewModule(ModTool):
                     os.rename(f, os.path.join(root, filename.replace('howto', self._info['modname'])))
             if os.path.basename(root) == 'howto':
                 os.rename(root, os.path.join(os.path.dirname(root), self._info['modname']))
-        print "Done."
+        print("Done.")
         if self.scm.init_repo(path_to_repo="."):
-            print "Created repository... you might want to commit before continuing."
-        print "Use 'gr_modtool add' to add a new block to this currently empty module."
+            print("Created repository... you might want to commit before continuing.")
+        print("Use 'gr_modtool add' to add a new block to this currently empty module.")
 
diff --git a/gr-utils/python/modtool/modtool_rename.py b/gr-utils/python/modtool/modtool_rename.py
index f0ff412a89..4973aa9e78 100644
--- a/gr-utils/python/modtool/modtool_rename.py
+++ b/gr-utils/python/modtool/modtool_rename.py
@@ -20,13 +20,17 @@
 #
 """ Module to rename blocks """
 
+from __future__ import print_function
+from __future__ import absolute_import
+from __future__ import unicode_literals
+
 import os
 import re
 
-from util_functions import append_re_line_sequence, ask_yes_no
-from cmakefile_editor import CMakeFileEditor
-from modtool_base import ModTool, ModToolException
-from templates import Templates
+from .util_functions import append_re_line_sequence, ask_yes_no
+from .cmakefile_editor import CMakeFileEditor
+from .modtool_base import ModTool, ModToolException
+from .templates import Templates
 
 class ModToolRename(ModTool):
     """ Rename a block in the out-of-tree module. """
@@ -58,20 +62,20 @@ class ModToolRename(ModTool):
         # first make sure the old block name is provided
         self._info['oldname'] = options.blockname
         if self._info['oldname'] is None:
-            self._info['oldname'] = raw_input("Enter name of block/code to rename (without module name prefix): ")
+            self._info['oldname'] = eval(input("Enter name of block/code to rename (without module name prefix): "))
         if not re.match('[a-zA-Z0-9_]+', self._info['oldname']):
             raise ModToolException('Invalid block name.')
-        print "Block/code to rename identifier: " + self._info['oldname']
+        print("Block/code to rename identifier: " + self._info['oldname'])
         self._info['fulloldname'] = self._info['modname'] + '_' + self._info['oldname']
 
         # now get the new block name
         if options.new_name is None:
-            self._info['newname'] = raw_input("Enter name of block/code (without module name prefix): ")
+            self._info['newname'] = eval(input("Enter name of block/code (without module name prefix): "))
         else:
             self._info['newname'] = options.new_name[0]
         if not re.match('[a-zA-Z0-9_]+', self._info['newname']):
             raise ModToolException('Invalid block name.')
-        print "Block/code identifier: " + self._info['newname']
+        print("Block/code identifier: " + self._info['newname'])
         self._info['fullnewname'] = self._info['modname'] + '_' + self._info['newname']
 
     def run(self, options):
@@ -80,7 +84,7 @@ class ModToolRename(ModTool):
         module = self._info['modname']
         oldname = self._info['oldname']
         newname = self._info['newname']
-        print "In module '%s' rename block '%s' to '%s'" % (module, oldname, newname)
+        print("In module '%s' rename block '%s' to '%s'" % (module, oldname, newname))
         self._run_swig_rename(self._file['swig'], oldname, newname)
         self._run_grc_rename(self._info['modname'], oldname, newname)
         self._run_python_qa(self._info['modname'], oldname, newname)
@@ -93,11 +97,11 @@ class ModToolRename(ModTool):
         """ Rename SWIG includes and block_magic """
         nsubs = self._run_file_replace(swigfilename, old, new)
         if nsubs < 1:
-            print "Couldn't find '%s' in file '%s'." % (old, swigfilename)
+            print("Couldn't find '%s' in file '%s'." % (old, swigfilename))
         if nsubs == 2:
-            print "Changing 'noblock' type file"
+            print("Changing 'noblock' type file")
         if nsubs > 3:
-            print "Hm, changed more then expected while editing %s." % swigfilename
+            print("Hm, changed more then expected while editing %s." % swigfilename)
         return False
 
     def _run_lib(self, module, old, new):
@@ -117,7 +121,7 @@ class ModToolRename(ModTool):
         filename = 'qa_' + module + '.cc'
         nsubs = self._run_file_replace(path + filename, old, new)
         if nsubs > 0:
-            print "C++ QA code detected, renaming..."
+            print("C++ QA code detected, renaming...")
             filename = 'qa_' + old + '.cc'
             self._run_file_replace(path + filename, old, new)
             filename = 'qa_' + old + '.h'
@@ -125,7 +129,7 @@ class ModToolRename(ModTool):
             self._run_file_replace(path + filename, old.upper(), new.upper())
             self._run_file_rename(path, 'qa_' + old, 'qa_' + new)
         else:
-            print "No C++ QA code detected, skipping..."
+            print("No C++ QA code detected, skipping...")
 
     def _run_include(self, module, old, new):
         path = './include/' + module + '/'
@@ -140,13 +144,13 @@ class ModToolRename(ModTool):
         filename = '__init__.py'
         nsubs = self._run_file_replace(path + filename, old, new)
         if nsubs > 0:
-            print "Python block detected, renaming..."
+            print("Python block detected, renaming...")
             filename = old + '.py'
             self._run_file_replace(path + filename, old, new)
             self._run_cmakelists(path, old, new)
             self._run_file_rename(path, old, new)
         else:
-            print "Not a Python block, nothing to do here..."
+            print("Not a Python block, nothing to do here...")
 
     def _run_python_qa(self, module, old, new):
         new = 'qa_' + new
@@ -166,7 +170,7 @@ class ModToolRename(ModTool):
         filename = path + 'CMakeLists.txt'
         nsubs = self._run_file_replace(filename, first, second)
         if nsubs < 1:
-            print "'%s' wasn't in '%s'." % (first, filename)
+            print("'%s' wasn't in '%s'." % (first, filename))
 
     def _run_file_rename(self, path, old, new):
         files = os.listdir(path)
@@ -175,14 +179,14 @@ class ModToolRename(ModTool):
                 nl = file.replace(old, new)
                 src = path + file
                 dst = path + nl
-                print "Renaming file '%s' to '%s'." % (src, dst)
+                print("Renaming file '%s' to '%s'." % (src, dst))
                 os.rename(src, dst)
 
     def _run_file_replace(self, filename, old, new):
         if not os.path.isfile(filename):
             return False
         else:
-            print "In '%s' renaming occurences of '%s' to '%s'" % (filename, old, new)
+            print("In '%s' renaming occurences of '%s' to '%s'" % (filename, old, new))
 
         cfile = open(filename).read()
         (cfile, nsubs) = re.subn(old, new, cfile)
diff --git a/gr-utils/python/modtool/modtool_rm.py b/gr-utils/python/modtool/modtool_rm.py
index eef743dd61..0cb012fe9e 100644
--- a/gr-utils/python/modtool/modtool_rm.py
+++ b/gr-utils/python/modtool/modtool_rm.py
@@ -20,14 +20,18 @@
 #
 """ Remove blocks module """
 
+from __future__ import print_function
+from __future__ import absolute_import
+from __future__ import unicode_literals
+
 import os
 import re
 import sys
 import glob
 
-from util_functions import remove_pattern_from_file
-from modtool_base import ModTool
-from cmakefile_editor import CMakeFileEditor
+from .util_functions import remove_pattern_from_file
+from .modtool_base import ModTool
+from .cmakefile_editor import CMakeFileEditor
 
 
 class ModToolRemove(ModTool):
@@ -48,7 +52,7 @@ class ModToolRemove(ModTool):
         if options.blockname is not None:
             self._info['pattern'] = options.blockname
         else:
-            self._info['pattern'] = raw_input('Which blocks do you want to delete? (Regex): ')
+            self._info['pattern'] = eval(input('Which blocks do you want to delete? (Regex): '))
         if len(self._info['pattern']) == 0:
             self._info['pattern'] = '.'
 
@@ -132,12 +136,12 @@ class ModToolRemove(ModTool):
         for g in globs:
             files = files + glob.glob("%s/%s"% (path, g))
         files_filt = []
-        print "Searching for matching files in %s/:" % path
+        print("Searching for matching files in %s/:" % path)
         for f in files:
             if re.search(self._info['pattern'], os.path.basename(f)) is not None:
                 files_filt.append(f)
         if len(files_filt) == 0:
-            print "None found."
+            print("None found.")
             return []
         # 2. Delete files, Makefile entries and other occurrences
         files_deleted = []
@@ -146,7 +150,7 @@ class ModToolRemove(ModTool):
         for f in files_filt:
             b = os.path.basename(f)
             if not yes:
-                ans = raw_input("Really delete %s? [Y/n/a/q]: " % f).lower().strip()
+                ans = input("Really delete %s? [Y/n/a/q]: " % f).lower().strip()
                 if ans == 'a':
                     yes = True
                 if ans == 'q':
@@ -154,10 +158,10 @@ class ModToolRemove(ModTool):
                 if ans == 'n':
                     continue
             files_deleted.append(b)
-            print "Deleting %s." % f
+            print("Deleting %s." % f)
             self.scm.remove_file(f)
             os.unlink(f)
-            print "Deleting occurrences of %s from %s/CMakeLists.txt..." % (b, path)
+            print("Deleting occurrences of %s from %s/CMakeLists.txt..." % (b, path))
             for var in makefile_vars:
                 ed.remove_value(var, b)
             if cmakeedit_func is not None:
diff --git a/gr-utils/python/modtool/parser_cc_block.py b/gr-utils/python/modtool/parser_cc_block.py
index 703522c8fb..fffdf309d8 100644
--- a/gr-utils/python/modtool/parser_cc_block.py
+++ b/gr-utils/python/modtool/parser_cc_block.py
@@ -19,6 +19,10 @@
 # Boston, MA 02110-1301, USA.
 #
 ''' A parser for blocks written in C++ '''
+
+from __future__ import print_function
+from __future__ import unicode_literals
+
 import re
 import sys
 
@@ -42,7 +46,7 @@ class ParserCCBlock(object):
             E.g., for sizeof(int), it will return 'int'.
             Returns a list! """
             if 'gr::io_signature::makev' in iosigcall:
-                print 'tbi'
+                print('tbi')
                 raise ValueError
             return {'type': [_typestr_to_iotype(x) for x in typestr.split(',')],
                     'vlen': [_typestr_to_vlen(x)   for x in typestr.split(',')]
@@ -82,15 +86,15 @@ class ParserCCBlock(object):
                                                       iosig_match.group('intype'))
             iosig['in']['min_ports'] = iosig_match.group('inmin')
             iosig['in']['max_ports'] = iosig_match.group('inmax')
-        except ValueError, Exception:
-            print "Error: Can't parse input signature."
+        except Exception:
+            print("Error: Can't parse input signature.")
         try:
             iosig['out'] = _figure_out_iotype_and_vlen(iosig_match.group('outcall'),
                                                        iosig_match.group('outtype'))
             iosig['out']['min_ports'] = iosig_match.group('outmin')
             iosig['out']['max_ports'] = iosig_match.group('outmax')
-        except ValueError, Exception:
-            print "Error: Can't parse output signature."
+        except Exception:
+            print("Error: Can't parse output signature.")
         return iosig
 
 
@@ -213,7 +217,7 @@ class ParserCCBlock(object):
         try:
             params_list = _scan_param_list(make_match.end(0))
         except ValueError as ve:
-            print "Can't parse the argument list: ", ve.args[0]
+            print("Can't parse the argument list: ", ve.args[0])
             sys.exit(0)
         params = []
         for plist in params_list:
diff --git a/gr-utils/python/modtool/scm.py b/gr-utils/python/modtool/scm.py
index ec6023ab3b..f219cc3aaa 100644
--- a/gr-utils/python/modtool/scm.py
+++ b/gr-utils/python/modtool/scm.py
@@ -20,6 +20,9 @@
 #
 """ Class to handle source code management repositories. """
 
+from __future__ import print_function
+from __future__ import unicode_literals
+
 import subprocess
 
 try:
@@ -191,12 +194,12 @@ class SCMRepoFactory(object):
         """ Returns a valid, usable object of type SCMRepository. """
         if self.options.scm_mode == 'no':
             return SCMRepository(self.path_to_repo)
-        for glbl in globals().values():
+        for glbl in list(globals().values()):
             try:
                 if issubclass(glbl, SCMRepository):
                     the_scm = glbl(self.path_to_repo)
                     if the_scm.is_active():
-                        print 'Found SCM of type:', the_scm.handles_scm_type
+                        print('Found SCM of type:', the_scm.handles_scm_type)
                         return the_scm
             except (TypeError, AttributeError, InvalidSCMError):
                 pass
@@ -208,7 +211,7 @@ class SCMRepoFactory(object):
         """ Returns a valid, usable object of type SCMRepository for an unitialized dir. """
         if self.options.scm_mode == 'no':
             return SCMRepository(self.path_to_repo)
-        for glbl in globals().values():
+        for glbl in list(globals().values()):
             try:
                 if issubclass(glbl, SCMRepository):
                     if glbl.handles_scm_type == scm_type:
diff --git a/gr-utils/python/modtool/templates.py b/gr-utils/python/modtool/templates.py
index 3829f7a644..64c99802fe 100644
--- a/gr-utils/python/modtool/templates.py
+++ b/gr-utils/python/modtool/templates.py
@@ -19,6 +19,7 @@
 # Boston, MA 02110-1301, USA.
 #
 ''' All the templates for skeleton files (needed by ModToolAdd) '''
+from __future__ import unicode_literals
 
 from datetime import datetime
 
diff --git a/gr-utils/python/modtool/util_functions.py b/gr-utils/python/modtool/util_functions.py
index de7f3d29b6..6197da638a 100644
--- a/gr-utils/python/modtool/util_functions.py
+++ b/gr-utils/python/modtool/util_functions.py
@@ -19,6 +19,7 @@
 # Boston, MA 02110-1301, USA.
 #
 """ Utility functions for gr_modtool """
+from __future__ import unicode_literals
 
 import re
 import sys
@@ -97,7 +98,7 @@ def get_modname():
     regexp = r'(project\s*\(\s*|GR_REGISTER_COMPONENT\(")gr-(?P<modname>[a-zA-Z0-9-_]+)(\s*(CXX)?|" ENABLE)'
     try:
         modname = re.search(regexp, cmfile, flags=re.MULTILINE).group('modname').strip()
-        if modname in modname_trans.keys():
+        if modname in list(modname_trans.keys()):
             modname = modname_trans[modname]
         return modname
     except AttributeError:
@@ -131,7 +132,7 @@ def ask_yes_no(question, default):
     """ Asks a binary question. Returns True for yes, False for no.
     default is given as a boolean. """
     question += {True: ' [Y/n] ', False: ' [y/N] '}[default]
-    if raw_input(question).lower() != {True: 'n', False: 'y'}[default]:
+    if input(question).lower() != {True: 'n', False: 'y'}[default]:
         return default
     else:
         return not default
diff --git a/gr-utils/python/utils/gr_modtool b/gr-utils/python/utils/gr_modtool
index d9016840be..49c58f5b48 100755
--- a/gr-utils/python/utils/gr_modtool
+++ b/gr-utils/python/utils/gr_modtool
@@ -21,6 +21,8 @@
 #
 """ A tool for editing GNU Radio out-of-tree modules. """
 
+from __future__ import print_function
+
 from gnuradio.modtool import *
 
 
@@ -46,7 +48,7 @@ def main():
     try:
         args.module().run(args)
     except ModToolException as err:
-        print >> sys.stderr, err
+        print(err, file=sys.stderr)
         exit(1)
 
 if __name__ == '__main__':
diff --git a/gr-utils/python/utils/gr_plot_char b/gr-utils/python/utils/gr_plot_char
index ee644557bb..3199919fa9 100755
--- a/gr-utils/python/utils/gr_plot_char
+++ b/gr-utils/python/utils/gr_plot_char
@@ -20,11 +20,13 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+
 try:
     import scipy
 except ImportError:
-    print "Please install SciPy to run this script (http://www.scipy.org/)"
-    raise SystemExit, 1
+    print("Please install SciPy to run this script (http://www.scipy.org/)")
+    raise SystemExit(1)
 
 from argparse import ArgumentParser
 from gnuradio.plot_data import plot_data
diff --git a/gr-utils/python/utils/gr_plot_const b/gr-utils/python/utils/gr_plot_const
index 653a2539b4..2ec54c3585 100755
--- a/gr-utils/python/utils/gr_plot_const
+++ b/gr-utils/python/utils/gr_plot_const
@@ -20,18 +20,20 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+
 try:
     import scipy
 except ImportError:
-    print "Please install SciPy to run this script (http://www.scipy.org/)"
-    raise SystemExit, 1
+    print("Please install SciPy to run this script (http://www.scipy.org/)")
+    raise SystemExit(1)
 
 try:
     from pylab import *
     from matplotlib.font_manager import fontManager, FontProperties
 except ImportError:
-    print "Please install Matplotlib to run this script (http://matplotlib.sourceforge.net/)"
-    raise SystemExit, 1
+    print("Please install Matplotlib to run this script (http://matplotlib.sourceforge.net/)")
+    raise SystemExit(1)
 
 from argparse import ArgumentParser
 
@@ -83,7 +85,7 @@ class draw_constellation:
         try:
             iq = scipy.fromfile(self.hfile, dtype=self.datatype, count=self.block_length)
         except MemoryError:
-            print "End of File"
+            print("End of File")
         else:
             # retesting length here as newer version of scipy does not throw a MemoryError, just
             # returns a zero-length array
@@ -94,7 +96,7 @@ class draw_constellation:
                 self.time = scipy.array([i*(1/self.sample_rate) for i in range(len(self.reals))])
                 return True
             else:
-                print "End of File"
+                print("End of File")
                 return False
 
     def make_plots(self):
@@ -215,9 +217,9 @@ class draw_constellation:
 
 def find(item_in, list_search):
     try:
-	return list_search.index(item_in) != None
+        return list_search.index(item_in) != None
     except ValueError:
-	return False
+        return False
 
 
 def main():
@@ -241,6 +243,3 @@ if __name__ == "__main__":
         main()
     except KeyboardInterrupt:
         pass
-
-
-
diff --git a/gr-utils/python/utils/gr_plot_float b/gr-utils/python/utils/gr_plot_float
index faf8106d70..4fd86549e2 100755
--- a/gr-utils/python/utils/gr_plot_float
+++ b/gr-utils/python/utils/gr_plot_float
@@ -20,11 +20,13 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+
 try:
     import scipy
 except ImportError:
-    print "Please install SciPy to run this script (http://www.scipy.org/)"
-    raise SystemExit, 1
+    print("Please install SciPy to run this script (http://www.scipy.org/)")
+    raise SystemExit(1)
 
 from argparse import ArgumentParser
 from gnuradio.plot_data import plot_data
diff --git a/gr-utils/python/utils/gr_plot_int b/gr-utils/python/utils/gr_plot_int
index c687f13b17..b4051fa15f 100755
--- a/gr-utils/python/utils/gr_plot_int
+++ b/gr-utils/python/utils/gr_plot_int
@@ -23,8 +23,8 @@
 try:
     import scipy
 except ImportError:
-    print "Please install SciPy to run this script (http://www.scipy.org/)"
-    raise SystemExit, 1
+    print("Please install SciPy to run this script (http://www.scipy.org/)")
+    raise SystemExit(1)
 
 from argparse import ArgumentParser
 from gnuradio.plot_data import plot_data
diff --git a/gr-utils/python/utils/gr_plot_iq b/gr-utils/python/utils/gr_plot_iq
index 7409b73909..f27f75d412 100755
--- a/gr-utils/python/utils/gr_plot_iq
+++ b/gr-utils/python/utils/gr_plot_iq
@@ -20,17 +20,19 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+
 try:
     import scipy
 except ImportError:
-    print "Please install SciPy to run this script (http://www.scipy.org/)"
-    raise SystemExit, 1
+    print("Please install SciPy to run this script (http://www.scipy.org/)")
+    raise SystemExit(1)
 
 try:
     from pylab import *
 except ImportError:
-    print "Please install Matplotlib to run this script (http://matplotlib.sourceforge.net/)"
-    raise SystemExit, 1
+    print("Please install Matplotlib to run this script (http://matplotlib.sourceforge.net/)")
+    raise SystemExit(1)
 
 from argparse import ArgumentParser
 
@@ -81,7 +83,7 @@ class draw_iq:
         try:
             self.iq = scipy.fromfile(self.hfile, dtype=self.datatype, count=self.block_length)
         except MemoryError:
-            print "End of File"
+            print("End of File")
         else:
             self.reals = scipy.array([r.real for r in self.iq])
             self.imags = scipy.array([i.imag for i in self.iq])
@@ -144,9 +146,9 @@ class draw_iq:
 
 def find(item_in, list_search):
     try:
-	return list_search.index(item_in) != None
+        return list_search.index(item_in) != None
     except ValueError:
-	return False
+        return False
 
 def main():
     description = "Takes a GNU Radio complex binary file and displays the I&Q data versus time. You can set the block size to specify how many points to read in at a time and the start position in the file. By default, the system assumes a sample rate of 1, so in time, each sample is plotted versus the sample number. To set a true time axis, set the sample rate (-R or --sample-rate) to the sample rate used when capturing the samples."
@@ -170,6 +172,3 @@ if __name__ == "__main__":
         main()
     except KeyboardInterrupt:
         pass
-
-
-
diff --git a/gr-utils/python/utils/gr_plot_qt b/gr-utils/python/utils/gr_plot_qt
index 9205d23a7e..cd2db87fd9 100755
--- a/gr-utils/python/utils/gr_plot_qt
+++ b/gr-utils/python/utils/gr_plot_qt
@@ -4,34 +4,34 @@ try:
     import scipy
     from scipy import fftpack
 except ImportError:
-    print "Please install SciPy to run this script (http://www.scipy.org/)"
-    raise SystemExit, 1
+    print("Please install SciPy to run this script (http://www.scipy.org/)")
+    raise SystemExit(1)
 
 try:
     from matplotlib import mlab
 except ImportError:
-    print "Please install Matplotlib to run this script (http://matplotlib.sourceforge.net)"
-    raise SystemExit, 1
+    print("Please install Matplotlib to run this script (http://matplotlib.sourceforge.net)")
+    raise SystemExit(1)
 
 try:
     from PyQt4 import Qt, QtCore, QtGui
 except ImportError:
-    print "Please install PyQt4 to run this script (http://www.riverbankcomputing.co.uk/software/pyqt/download)"
-    raise SystemExit, 1
+    print("Please install PyQt4 to run this script (http://www.riverbankcomputing.co.uk/software/pyqt/download)")
+    raise SystemExit(1)
 
 try:
     import PyQt4.Qwt5 as Qwt
 except ImportError:
-    print "Please install PyQwt5 to run this script (http://pyqwt.sourceforge.net/)"
-    raise SystemExit, 1
+    print("Please install PyQwt5 to run this script (http://pyqwt.sourceforge.net/)")
+    raise SystemExit(1)
 
 try:
     # FIXME: re-enable this before committing
     #from gnuradio.pyqt_plot import Ui_MainWindow
     from gnuradio.pyqt_plot import Ui_MainWindow
 except ImportError:
-    print "Could not import from pyqt_plot. Please build with \"pyuic4 pyqt_plot.ui -o pyqt_plot.py\""
-    raise SystemExit, 1
+    print("Could not import from pyqt_plot. Please build with \"pyuic4 pyqt_plot.ui -o pyqt_plot.py\"")
+    raise SystemExit(1)
 
 import sys, os
 from optparse import OptionParser
@@ -284,7 +284,7 @@ class gr_plot_qt(QtGui.QMainWindow):
     def open_file(self):
         filename = Qt.QFileDialog.getOpenFileName(self, "Open", ".")
         if(filename != ""):
-            #print filename
+            #print(filename)
             self.initialize(filename)
 
     def reload_file(self):
@@ -320,7 +320,7 @@ class gr_plot_qt(QtGui.QMainWindow):
     def init_data_input(self):
         self.hfile.seek(0, os.SEEK_END)
         self.signal_size = self.hfile.tell()/self.sizeof_data
-        #print "Sizeof File: ", self.signal_size
+        #print("Sizeof File: ", self.signal_size)
         self.hfile.seek(0, os.SEEK_SET)
 
     def get_data(self, start, end):
diff --git a/gr-utils/python/utils/gr_plot_short b/gr-utils/python/utils/gr_plot_short
index f900af1bac..d367ea381f 100755
--- a/gr-utils/python/utils/gr_plot_short
+++ b/gr-utils/python/utils/gr_plot_short
@@ -20,11 +20,13 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+
 try:
     import scipy
 except ImportError:
-    print "Please install SciPy to run this script (http://www.scipy.org/)"
-    raise SystemExit, 1
+    print("Please install SciPy to run this script (http://www.scipy.org/)")
+    raise SystemExit(1)
 
 from argparse import ArgumentParser
 from gnuradio.plot_data import plot_data
diff --git a/gr-utils/python/utils/gr_read_file_metadata b/gr-utils/python/utils/gr_read_file_metadata
index a05e7ad2c7..1a94560ad2 100644
--- a/gr-utils/python/utils/gr_read_file_metadata
+++ b/gr-utils/python/utils/gr_read_file_metadata
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+
 import sys
 from argparse import ArgumentParser
 
@@ -45,7 +47,7 @@ def main(filename, detached=False):
             sys.stderr.write("Could not deserialize header: invalid or corrupt data file.\n")
             sys.exit(1)
 
-        print "HEADER {0}".format(nheaders)
+        print("HEADER {0}".format(nheaders))
         info = parse_file_metadata.parse_header(header, True)
 
         if(info["extra_len"] > 0):
@@ -59,7 +61,7 @@ def main(filename, detached=False):
                 sys.stderr.write("Could not deserialize extras: invalid or corrupt data file.\n")
                 sys.exit(1)
 
-            print "\nExtra Header:"
+            print("\nExtra Header:")
             extra_info = parse_file_metadata.parse_extra_dict(extra, info, True)
 
         nheaders += 1
@@ -67,7 +69,7 @@ def main(filename, detached=False):
         if(not detached):
             nread += info['nbytes']
         handle.seek(nread, 0)
-        print "\n\n"
+        print("\n\n")
 
 
 if __name__ == "__main__":
diff --git a/gr-utils/python/utils/plot_data.py b/gr-utils/python/utils/plot_data.py
index 7d80c714fe..a054147114 100644
--- a/gr-utils/python/utils/plot_data.py
+++ b/gr-utils/python/utils/plot_data.py
@@ -22,20 +22,24 @@
 Utility to help plotting data from files.
 """
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
+
 try:
     import scipy
 except ImportError:
-    print "Please install SciPy to run this script (http://www.scipy.org/)"
-    raise SystemExit, 1
+    print("Please install SciPy to run this script (http://www.scipy.org/)")
+    raise SystemExit(1)
 
 try:
     from pylab import *
 except ImportError:
-    print "Please install Matplotlib to run this script (http://matplotlib.sourceforge.net/)"
-    raise SystemExit, 1
+    print("Please install Matplotlib to run this script (http://matplotlib.sourceforge.net/)")
+    raise SystemExit(1)
 
 
-class plot_data:
+class plot_data(object):
     def __init__(self, datatype, filenames, options):
         self.hfile = list()
         self.legend_text = list()
@@ -86,10 +90,10 @@ class plot_data:
         try:
             f = scipy.fromfile(hfile, dtype=self.datatype, count=self.block_length)
         except MemoryError:
-            print "End of File"
+            print("End of File")
         else:
             self.f = scipy.array(f)
-            self.time = scipy.array([i*(1/self.sample_rate) for i in range(len(self.f))])
+            self.time = scipy.array([i*(1 / self.sample_rate) for i in range(len(self.f))])
 
     def make_plots(self):
         self.sp_f = self.fig.add_subplot(2,1,1, position=[0.075, 0.2, 0.875, 0.6])
@@ -162,6 +166,6 @@ class plot_data:
 
 def find(item_in, list_search):
     try:
-	return list_search.index(item_in) != None
+        return list_search.index(item_in) != None
     except ValueError:
-	return False
+        return False
diff --git a/gr-utils/python/utils/plot_fft_base.py b/gr-utils/python/utils/plot_fft_base.py
old mode 100755
new mode 100644
index c99462147d..c0651529ea
--- a/gr-utils/python/utils/plot_fft_base.py
+++ b/gr-utils/python/utils/plot_fft_base.py
@@ -20,22 +20,26 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
+
 try:
     import scipy
     from scipy import fftpack
 except ImportError:
-    print "Please install SciPy to run this script (http://www.scipy.org/)"
-    raise SystemExit, 1
+    print("Please install SciPy to run this script (http://www.scipy.org/)")
+    raise SystemExit(1)
 
 try:
     from pylab import *
 except ImportError:
-    print "Please install Python Matplotlib (http://matplotlib.sourceforge.net/) and Python TkInter https://wiki.python.org/moin/TkInter to run this script"
-    raise SystemExit, 1
+    print("Please install Python Matplotlib (http://matplotlib.sourceforge.net/) and Python TkInter https://wiki.python.org/moin/TkInter to run this script")
+    raise SystemExit(1)
 
 from argparse import ArgumentParser
 
-class plot_fft_base:
+class plot_fft_base(object):
     def __init__(self, datatype, filename, options):
         self.hfile = open(filename, "r")
         self.block_length = options.block
@@ -79,33 +83,33 @@ class plot_fft_base:
         show()
 
     def get_data(self):
-        self.position = self.hfile.tell()/self.sizeof_data
+        self.position = self.hfile.tell() / self.sizeof_data
         self.text_file_pos.set_text("File Position: %d" % (self.position))
         try:
             self.iq = scipy.fromfile(self.hfile, dtype=self.datatype, count=self.block_length)
         except MemoryError:
-            print "End of File"
+            print("End of File")
         else:
             self.iq_fft = self.dofft(self.iq)
 
             tstep = 1.0 / self.sample_rate
             #self.time = scipy.array([tstep*(self.position + i) for i in xrange(len(self.iq))])
-            self.time = scipy.array([tstep*(i) for i in xrange(len(self.iq))])
+            self.time = scipy.array([tstep*(i) for i in range(len(self.iq))])
 
             self.freq = self.calc_freq(self.time, self.sample_rate)
 
     def dofft(self, iq):
         N = len(iq)
         iq_fft = scipy.fftpack.fftshift(scipy.fft(iq))       # fft and shift axis
-        iq_fft = 20*scipy.log10(abs((iq_fft+1e-15)/N)) # convert to decibels, adjust power
+        iq_fft = 20*scipy.log10(abs((iq_fft+1e-15) / N)) # convert to decibels, adjust power
         # adding 1e-15 (-300 dB) to protect against value errors if an item in iq_fft is 0
         return iq_fft
 
     def calc_freq(self, time, sample_rate):
         N = len(time)
-        Fs = 1.0 / (time.max() - time.min())
+        Fs = 1.0 / (time.max( - time.min()))
         Fn = 0.5 * sample_rate
-        freq = scipy.array([-Fn + i*Fs for i in xrange(N)])
+        freq = scipy.array([-Fn + i*Fs for i in range(N)])
         return freq
 
     def make_plots(self):
@@ -228,9 +232,9 @@ class plot_fft_base:
 
 def find(item_in, list_search):
     try:
-	return list_search.index(item_in) != None
+        return list_search.index(item_in) != None
     except ValueError:
-	return False
+        return False
 
 def main():
     parser = plot_fft_base.setup_options()
@@ -243,6 +247,3 @@ if __name__ == "__main__":
         main()
     except KeyboardInterrupt:
         pass
-
-
-
diff --git a/gr-utils/python/utils/plot_psd_base.py b/gr-utils/python/utils/plot_psd_base.py
old mode 100755
new mode 100644
index 2611ed4be2..7c5138be4d
--- a/gr-utils/python/utils/plot_psd_base.py
+++ b/gr-utils/python/utils/plot_psd_base.py
@@ -20,24 +20,28 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import division
+from __future__ import unicode_literals
+
 try:
     import scipy
     from scipy import fftpack
 except ImportError:
-    print "Please install SciPy to run this script (http://www.scipy.org/)"
-    raise SystemExit, 1
+    print("Please install SciPy to run this script (http://www.scipy.org/)")
+    raise SystemExit(1)
 
 try:
     from pylab import *
 except ImportError:
-    print "Please install Matplotlib to run this script (http://matplotlib.sourceforge.net/)"
-    raise SystemExit, 1
+    print("Please install Matplotlib to run this script (http://matplotlib.sourceforge.net/)")
+    raise SystemExit(1)
 
 from argparse import ArgumentParser
 from scipy import log10
 from gnuradio.eng_arg import eng_float, intx
 
-class plot_psd_base:
+class plot_psd_base(object):
     def __init__(self, datatype, filename, options):
         self.hfile = open(filename, "r")
         self.block_length = options.block
@@ -87,12 +91,12 @@ class plot_psd_base:
         show()
 
     def get_data(self):
-        self.position = self.hfile.tell()/self.sizeof_data
+        self.position = self.hfile.tell() / self.sizeof_data
         self.text_file_pos.set_text("File Position: %d" % self.position)
         try:
             self.iq = scipy.fromfile(self.hfile, dtype=self.datatype, count=self.block_length)
         except MemoryError:
-            print "End of File"
+            print("End of File")
             return False
         else:
             # retesting length here as newer version of scipy does not throw a MemoryError, just
@@ -100,17 +104,17 @@ class plot_psd_base:
             if(len(self.iq) > 0):
                 tstep = 1.0 / self.sample_rate
                 #self.time = scipy.array([tstep*(self.position + i) for i in xrange(len(self.iq))])
-                self.time = scipy.array([tstep*(i) for i in xrange(len(self.iq))])
+                self.time = scipy.array([tstep*(i) for i in range(len(self.iq))])
 
                 self.iq_psd, self.freq = self.dopsd(self.iq)
                 return True
             else:
-                print "End of File"
+                print("End of File")
                 return False
 
     def dopsd(self, iq):
         ''' Need to do this here and plot later so we can do the fftshift '''
-        overlap = self.psdfftsize/4
+        overlap = self.psdfftsize / 4
         winfunc = scipy.blackman
         psd,freq = mlab.psd(iq, self.psdfftsize, self.sample_rate,
                             window = lambda d: d*winfunc(self.psdfftsize),
@@ -174,7 +178,7 @@ class plot_psd_base:
         self.sp_psd.set_xlim([f.min(), f.max()])
 
     def draw_spec(self, t, s):
-        overlap = self.specfftsize/4
+        overlap = self.specfftsize / 4
         winfunc = scipy.blackman
         self.sp_spec.clear()
         self.sp_spec.specgram(s, self.specfftsize, self.sample_rate,
@@ -270,9 +274,9 @@ class plot_psd_base:
 
 def find(item_in, list_search):
     try:
-	return list_search.index(item_in) != None
+        return list_search.index(item_in) != None
     except ValueError:
-	return False
+        return False
 
 def main():
     parser = plot_psd_base.setup_options()
@@ -285,6 +289,3 @@ if __name__ == "__main__":
         main()
     except KeyboardInterrupt:
         pass
-
-
-
diff --git a/gr-utils/python/utils/pyqt_filter.py b/gr-utils/python/utils/pyqt_filter.py
index 0c781f2347..fac17644d3 100644
--- a/gr-utils/python/utils/pyqt_filter.py
+++ b/gr-utils/python/utils/pyqt_filter.py
@@ -7,6 +7,7 @@
 #
 # WARNING! All changes made in this file will be lost!
 
+from __future__ import unicode_literals
 from PyQt4 import QtCore, QtGui
 
 class Ui_MainWindow(object):
diff --git a/gr-utils/python/utils/pyqt_plot.py b/gr-utils/python/utils/pyqt_plot.py
index 5650135abf..80711b4e88 100644
--- a/gr-utils/python/utils/pyqt_plot.py
+++ b/gr-utils/python/utils/pyqt_plot.py
@@ -7,6 +7,7 @@
 #
 # WARNING! All changes made in this file will be lost!
 
+from __future__ import unicode_literals
 from PyQt4 import QtCore, QtGui
 
 class Ui_MainWindow(object):
diff --git a/gr-video-sdl/python/video_sdl/CMakeLists.txt b/gr-video-sdl/python/video_sdl/CMakeLists.txt
index 6465affa10..f4ae6bd29a 100644
--- a/gr-video-sdl/python/video_sdl/CMakeLists.txt
+++ b/gr-video-sdl/python/video_sdl/CMakeLists.txt
@@ -43,6 +43,6 @@ if(ENABLE_TESTING)
   file(GLOB py_qa_test_files "qa_*.py")
   foreach(py_qa_test_file ${py_qa_test_files})
     get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE)
-    GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${py_qa_test_file})
+    GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} -B ${py_qa_test_file})
   endforeach(py_qa_test_file)
 endif(ENABLE_TESTING)
diff --git a/gr-video-sdl/python/video_sdl/__init__.py b/gr-video-sdl/python/video_sdl/__init__.py
index 4bad11831c..1bcf83ad1d 100644
--- a/gr-video-sdl/python/video_sdl/__init__.py
+++ b/gr-video-sdl/python/video_sdl/__init__.py
@@ -21,6 +21,7 @@
 '''
 Blocks and utilities for Video SDL module
 '''
+from __future__ import unicode_literals
 
 # The presence of this file turns this directory into a Python package
 import os
diff --git a/gr-video-sdl/python/video_sdl/qa_video_sdl.py b/gr-video-sdl/python/video_sdl/qa_video_sdl.py
old mode 100755
new mode 100644
index f94957ccc4..cb0201cba2
--- a/gr-video-sdl/python/video_sdl/qa_video_sdl.py
+++ b/gr-video-sdl/python/video_sdl/qa_video_sdl.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, video_sdl
 
 class test_video_sdl (gr_unittest.TestCase):
diff --git a/gr-vocoder/examples/alaw_audio_loopback.py b/gr-vocoder/examples/alaw_audio_loopback.py
old mode 100755
new mode 100644
index 5b800b5bfb..6f43322470
--- a/gr-vocoder/examples/alaw_audio_loopback.py
+++ b/gr-vocoder/examples/alaw_audio_loopback.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import audio
 from gnuradio import blocks
@@ -33,7 +35,7 @@ def build_graph():
     enc = vocoder.alaw_encode_sb()
     dec = vocoder.alaw_decode_bs()
     s2f = blocks.short_to_float()
-    sink_scale = blocks.multiply_const_ff(1.0/32767.)
+    sink_scale = blocks.multiply_const_ff(1.0 / 32767.)
     sink = audio.sink(8000)
     tb.connect(src, src_scale, f2s, enc, dec, s2f, sink_scale, sink)
     return tb
@@ -41,6 +43,6 @@ def build_graph():
 if __name__ == '__main__':
     tb = build_graph()
     tb.start()
-    raw_input ('Press Enter to exit: ')
+    eval(input ('Press Enter to exit: '))
     tb.stop()
     tb.wait()
diff --git a/gr-vocoder/examples/codec2_audio_loopback.py b/gr-vocoder/examples/codec2_audio_loopback.py
old mode 100755
new mode 100644
index b63d508025..9c51d2f49c
--- a/gr-vocoder/examples/codec2_audio_loopback.py
+++ b/gr-vocoder/examples/codec2_audio_loopback.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import audio
 from gnuradio import blocks
@@ -34,7 +36,7 @@ def build_graph():
     enc = vocoder.codec2_encode_sp(codec2.MODE_2400)
     dec = vocoder.codec2_decode_ps(codec2.MODE_2400)
     s2f = blocks.short_to_float()
-    sink_scale = blocks.multiply_const_ff(1.0/32767.)
+    sink_scale = blocks.multiply_const_ff(1.0 / 32767.)
     sink = audio.sink(8000)
     tb.connect(src, src_scale, f2s, enc, dec, s2f, sink_scale, sink)
     return tb
@@ -42,6 +44,6 @@ def build_graph():
 if __name__ == '__main__':
     tb = build_graph()
     tb.start()
-    raw_input ('Press Enter to exit: ')
+    eval(input ('Press Enter to exit: '))
     tb.stop()
     tb.wait()
diff --git a/gr-vocoder/examples/cvsd_audio_loopback.py b/gr-vocoder/examples/cvsd_audio_loopback.py
old mode 100755
new mode 100644
index b9385b7dc6..603a7194a4
--- a/gr-vocoder/examples/cvsd_audio_loopback.py
+++ b/gr-vocoder/examples/cvsd_audio_loopback.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import audio
 from gnuradio import blocks
@@ -43,7 +45,7 @@ def build_graph():
     s2f = blocks.short_to_float()
     decim = filter.rational_resampler_fff(1, 8)
 
-    sink_scale = blocks.multiply_const_ff(1.0/scale_factor)
+    sink_scale = blocks.multiply_const_ff(1.0 / scale_factor)
     sink = audio.sink(sample_rate, "plughw:0,0")
 
     tb.connect(src, src_scale, interp, f2s, enc)
@@ -65,6 +67,6 @@ def build_graph():
 if __name__ == '__main__':
     tb = build_graph()
     tb.start()
-    raw_input ('Press Enter to exit: ')
+    eval(input ('Press Enter to exit: '))
     tb.stop()
     tb.wait()
diff --git a/gr-vocoder/examples/g721_audio_loopback.py b/gr-vocoder/examples/g721_audio_loopback.py
old mode 100755
new mode 100644
index 42abbabf64..790cbfcb48
--- a/gr-vocoder/examples/g721_audio_loopback.py
+++ b/gr-vocoder/examples/g721_audio_loopback.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import audio
 from gnuradio import blocks
@@ -33,7 +35,7 @@ def build_graph():
     enc = vocoder.g721_encode_sb()
     dec = vocoder.g721_decode_bs()
     s2f = blocks.short_to_float()
-    sink_scale = blocks.multiply_const_ff(1.0/32767.)
+    sink_scale = blocks.multiply_const_ff(1.0 / 32767.)
     sink = audio.sink(8000)
     tb.connect(src, src_scale, f2s, enc, dec, s2f, sink_scale, sink)
     return tb
@@ -41,6 +43,6 @@ def build_graph():
 if __name__ == '__main__':
     tb = build_graph()
     tb.start()
-    raw_input ('Press Enter to exit: ')
+    eval(input ('Press Enter to exit: '))
     tb.stop()
     tb.wait()
diff --git a/gr-vocoder/examples/g723_24_audio_loopback.py b/gr-vocoder/examples/g723_24_audio_loopback.py
old mode 100755
new mode 100644
index cade33f295..7390aa0151
--- a/gr-vocoder/examples/g723_24_audio_loopback.py
+++ b/gr-vocoder/examples/g723_24_audio_loopback.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import audio
 from gnuradio import blocks
@@ -33,7 +35,7 @@ def build_graph():
     enc = vocoder.g723_24_encode_sb()
     dec = vocoder.g723_24_decode_bs()
     s2f = blocks.short_to_float()
-    sink_scale = blocks.multiply_const_ff(1.0/32767.)
+    sink_scale = blocks.multiply_const_ff(1.0 / 32767.)
     sink = audio.sink(8000)
     tb.connect(src, src_scale, f2s, enc, dec, s2f, sink_scale, sink)
     return tb
@@ -41,6 +43,6 @@ def build_graph():
 if __name__ == '__main__':
     tb = build_graph()
     tb.start()
-    raw_input ('Press Enter to exit: ')
+    eval(input ('Press Enter to exit: '))
     tb.stop()
     tb.wait()
diff --git a/gr-vocoder/examples/g723_40_audio_loopback.py b/gr-vocoder/examples/g723_40_audio_loopback.py
old mode 100755
new mode 100644
index 77e40884cf..c016193382
--- a/gr-vocoder/examples/g723_40_audio_loopback.py
+++ b/gr-vocoder/examples/g723_40_audio_loopback.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import audio
 from gnuradio import blocks
@@ -33,7 +35,7 @@ def build_graph():
     enc = vocoder.g723_40_encode_sb()
     dec = vocoder.g723_40_decode_bs()
     s2f = blocks.short_to_float()
-    sink_scale = blocks.multiply_const_ff(1.0/32767.)
+    sink_scale = blocks.multiply_const_ff(1.0 / 32767.)
     sink = audio.sink(8000)
     tb.connect(src, src_scale, f2s, enc, dec, s2f, sink_scale, sink)
     return tb
@@ -41,6 +43,6 @@ def build_graph():
 if __name__ == '__main__':
     tb = build_graph()
     tb.start()
-    raw_input ('Press Enter to exit: ')
+    eval(input ('Press Enter to exit: '))
     tb.stop()
     tb.wait()
diff --git a/gr-vocoder/examples/gsm_audio_loopback.py b/gr-vocoder/examples/gsm_audio_loopback.py
old mode 100755
new mode 100644
index 5d5bf9dd72..b21b9da410
--- a/gr-vocoder/examples/gsm_audio_loopback.py
+++ b/gr-vocoder/examples/gsm_audio_loopback.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import audio
 from gnuradio import blocks
@@ -33,7 +35,7 @@ def build_graph():
     enc = vocoder.gsm_fr_encode_sp()
     dec = vocoder.gsm_fr_decode_ps()
     s2f = blocks.short_to_float()
-    sink_scale = blocks.multiply_const_ff(1.0/32767.)
+    sink_scale = blocks.multiply_const_ff(1.0 / 32767.)
     sink = audio.sink(8000)
     tb.connect(src, src_scale, f2s, enc, dec, s2f, sink_scale, sink)
     return tb
@@ -41,6 +43,6 @@ def build_graph():
 if __name__ == '__main__':
     tb = build_graph()
     tb.start()
-    raw_input ('Press Enter to exit: ')
+    eval(input ('Press Enter to exit: '))
     tb.stop()
     tb.wait()
diff --git a/gr-vocoder/examples/ulaw_audio_loopback.py b/gr-vocoder/examples/ulaw_audio_loopback.py
old mode 100755
new mode 100644
index 9f0617622e..aeb7411e0b
--- a/gr-vocoder/examples/ulaw_audio_loopback.py
+++ b/gr-vocoder/examples/ulaw_audio_loopback.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio import gr
 from gnuradio import audio
 from gnuradio import blocks
@@ -33,7 +35,7 @@ def build_graph():
     enc = vocoder.ulaw_encode_sb()
     dec = vocoder.ulaw_decode_bs()
     s2f = blocks.short_to_float()
-    sink_scale = blocks.multiply_const_ff(1.0/32767.)
+    sink_scale = blocks.multiply_const_ff(1.0 / 32767.)
     sink = audio.sink(8000)
     tb.connect(src, src_scale, f2s, enc, dec, s2f, sink_scale, sink)
     return tb
@@ -41,6 +43,6 @@ def build_graph():
 if __name__ == '__main__':
     tb = build_graph()
     tb.start()
-    raw_input ('Press Enter to exit: ')
+    eval(input ('Press Enter to exit: '))
     tb.stop()
     tb.wait()
diff --git a/gr-vocoder/python/vocoder/CMakeLists.txt b/gr-vocoder/python/vocoder/CMakeLists.txt
index d4fe3d9e8c..464cc4ff33 100644
--- a/gr-vocoder/python/vocoder/CMakeLists.txt
+++ b/gr-vocoder/python/vocoder/CMakeLists.txt
@@ -61,6 +61,6 @@ if(ENABLE_TESTING)
   endif()
   foreach(py_qa_test_file ${py_qa_test_files})
     get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE)
-    GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${CMAKE_CURRENT_SOURCE_DIR}/${py_qa_test_file})
+    GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} -B ${CMAKE_CURRENT_SOURCE_DIR}/${py_qa_test_file})
   endforeach(py_qa_test_file)
 endif(ENABLE_TESTING)
diff --git a/gr-vocoder/python/vocoder/__init__.py b/gr-vocoder/python/vocoder/__init__.py
index 7b1b82f847..3f4c301d96 100644
--- a/gr-vocoder/python/vocoder/__init__.py
+++ b/gr-vocoder/python/vocoder/__init__.py
@@ -23,13 +23,16 @@
 This is the gr-vocoder package. This package includes the various
 vocoder blocks in GNU Radio.
 '''
+from __future__ import absolute_import
+from __future__ import unicode_literals
+
 import os
 
 try:
-    from vocoder_swig import *
+    from .vocoder_swig import *
 except ImportError:
     dirname, filename = os.path.split(os.path.abspath(__file__))
     __path__.append(os.path.join(dirname, "..", "..", "swig"))
-    from vocoder_swig import *
+    from .vocoder_swig import *
 
-from cvsd import *
+from .cvsd import *
diff --git a/gr-vocoder/python/vocoder/cvsd.py b/gr-vocoder/python/vocoder/cvsd.py
index b6ce822935..00a24df25f 100644
--- a/gr-vocoder/python/vocoder/cvsd.py
+++ b/gr-vocoder/python/vocoder/cvsd.py
@@ -20,8 +20,11 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+from __future__ import unicode_literals
 from gnuradio import gr, filter, blocks
-import vocoder_swig
+from . import vocoder_swig
+
 
 class cvsd_encode_fb(gr.hier_block2):
     '''
@@ -39,9 +42,9 @@ class cvsd_encode_fb(gr.hier_block2):
         from 1 to 8. A rate of 8k with a resampling rate of 8 provides a good quality signal.
         '''
 
-	gr.hier_block2.__init__(self, "cvsd_encode",
-				gr.io_signature(1, 1, gr.sizeof_float), # Input signature
-				gr.io_signature(1, 1, gr.sizeof_char))  # Output signature
+        gr.hier_block2.__init__(self, "cvsd_encode",
+                                gr.io_signature(1, 1, gr.sizeof_float), # Input signature
+                                gr.io_signature(1, 1, gr.sizeof_char))  # Output signature
 
         scale_factor = 32000.0
         self.interp = resample
@@ -70,9 +73,9 @@ class cvsd_decode_bf(gr.hier_block2):
         When using the CVSD vocoder, appropriate sampling rates are from 8k to 64k with resampling rates
         from 1 to 8. A rate of 8k with a resampling rate of 8 provides a good quality signal.
         '''
-	gr.hier_block2.__init__(self, "cvsd_decode",
-				gr.io_signature(1, 1, gr.sizeof_char),  # Input signature
-				gr.io_signature(1, 1, gr.sizeof_float)) # Output signature
+        gr.hier_block2.__init__(self, "cvsd_decode",
+                                gr.io_signature(1, 1, gr.sizeof_char),  # Input signature
+                                gr.io_signature(1, 1, gr.sizeof_float)) # Output signature
 
         scale_factor = 32000.0
         self.decim = resample
@@ -81,6 +84,6 @@ class cvsd_decode_bf(gr.hier_block2):
         s2f = blocks.short_to_float()
         taps = filter.firdes.low_pass(1, 1, bw, 2*bw)
         decim = filter.fir_filter_fff(self.decim, taps)
-        sink_scale = blocks.multiply_const_ff(1.0/scale_factor)
+        sink_scale = blocks.multiply_const_ff(1.0 / scale_factor)
 
         self.connect(self, dec, s2f, decim, sink_scale, self)
diff --git a/gr-vocoder/python/vocoder/qa_alaw_vocoder.py b/gr-vocoder/python/vocoder/qa_alaw_vocoder.py
old mode 100755
new mode 100644
index 4a2b4c3c8b..e2398a2016
--- a/gr-vocoder/python/vocoder/qa_alaw_vocoder.py
+++ b/gr-vocoder/python/vocoder/qa_alaw_vocoder.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, vocoder, blocks
 
 class test_alaw_vocoder (gr_unittest.TestCase):
diff --git a/gr-vocoder/python/vocoder/qa_codec2_vocoder.py b/gr-vocoder/python/vocoder/qa_codec2_vocoder.py
old mode 100755
new mode 100644
index 8fe3ac56b5..8c7656cb49
--- a/gr-vocoder/python/vocoder/qa_codec2_vocoder.py
+++ b/gr-vocoder/python/vocoder/qa_codec2_vocoder.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, vocoder, blocks
 from gnuradio.vocoder import codec2
 
diff --git a/gr-vocoder/python/vocoder/qa_cvsd_vocoder.py b/gr-vocoder/python/vocoder/qa_cvsd_vocoder.py
old mode 100755
new mode 100644
index 408c6b74c9..b1516e0ef8
--- a/gr-vocoder/python/vocoder/qa_cvsd_vocoder.py
+++ b/gr-vocoder/python/vocoder/qa_cvsd_vocoder.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, vocoder, blocks, filter
 from gnuradio.vocoder import cvsd
 
diff --git a/gr-vocoder/python/vocoder/qa_g721_vocoder.py b/gr-vocoder/python/vocoder/qa_g721_vocoder.py
old mode 100755
new mode 100644
index 8808b8fede..ad1e85471f
--- a/gr-vocoder/python/vocoder/qa_g721_vocoder.py
+++ b/gr-vocoder/python/vocoder/qa_g721_vocoder.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, vocoder, blocks
 
 class test_g721_vocoder (gr_unittest.TestCase):
diff --git a/gr-vocoder/python/vocoder/qa_g723_24_vocoder.py b/gr-vocoder/python/vocoder/qa_g723_24_vocoder.py
old mode 100755
new mode 100644
index c587623e1d..755cde922c
--- a/gr-vocoder/python/vocoder/qa_g723_24_vocoder.py
+++ b/gr-vocoder/python/vocoder/qa_g723_24_vocoder.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, vocoder, blocks
 
 class test_g723_24_vocoder (gr_unittest.TestCase):
diff --git a/gr-vocoder/python/vocoder/qa_g723_40_vocoder.py b/gr-vocoder/python/vocoder/qa_g723_40_vocoder.py
old mode 100755
new mode 100644
index 689102237f..911de9f66f
--- a/gr-vocoder/python/vocoder/qa_g723_40_vocoder.py
+++ b/gr-vocoder/python/vocoder/qa_g723_40_vocoder.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, vocoder, blocks
 
 class test_g723_40_vocoder (gr_unittest.TestCase):
diff --git a/gr-vocoder/python/vocoder/qa_gsm_full_rate.py b/gr-vocoder/python/vocoder/qa_gsm_full_rate.py
old mode 100755
new mode 100644
index 69ea94bbf9..5cca230455
--- a/gr-vocoder/python/vocoder/qa_gsm_full_rate.py
+++ b/gr-vocoder/python/vocoder/qa_gsm_full_rate.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, vocoder, blocks
 
 class test_gsm_vocoder (gr_unittest.TestCase):
diff --git a/gr-vocoder/python/vocoder/qa_ulaw_vocoder.py b/gr-vocoder/python/vocoder/qa_ulaw_vocoder.py
old mode 100755
new mode 100644
index 46c8d490a8..8cfc13fc05
--- a/gr-vocoder/python/vocoder/qa_ulaw_vocoder.py
+++ b/gr-vocoder/python/vocoder/qa_ulaw_vocoder.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, vocoder, blocks
 
 class test_ulaw_vocoder (gr_unittest.TestCase):
diff --git a/gr-wavelet/python/wavelet/CMakeLists.txt b/gr-wavelet/python/wavelet/CMakeLists.txt
index 9e1961d4e0..493a24d1cd 100644
--- a/gr-wavelet/python/wavelet/CMakeLists.txt
+++ b/gr-wavelet/python/wavelet/CMakeLists.txt
@@ -41,6 +41,6 @@ if(ENABLE_TESTING)
   file(GLOB py_qa_test_files "qa_*.py")
   foreach(py_qa_test_file ${py_qa_test_files})
     get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE)
-    GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${py_qa_test_file})
+    GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} -B ${py_qa_test_file})
   endforeach(py_qa_test_file)
 endif(ENABLE_TESTING)
diff --git a/gr-wavelet/python/wavelet/__init__.py b/gr-wavelet/python/wavelet/__init__.py
index 7f3d9afa53..8fbab42f59 100644
--- a/gr-wavelet/python/wavelet/__init__.py
+++ b/gr-wavelet/python/wavelet/__init__.py
@@ -22,11 +22,12 @@
 '''
 Processing blocks for wavelet transforms.
 '''
+from __future__ import unicode_literals
 import os
 
 try:
-    from wavelet_swig import *
+    from .wavelet_swig import *
 except ImportError:
     dirname, filename = os.path.split(os.path.abspath(__file__))
     __path__.append(os.path.join(dirname, "..", "..", "swig"))
-    from wavelet_swig import *
+    from .wavelet_swig import *
diff --git a/gr-wavelet/python/wavelet/qa_classify.py b/gr-wavelet/python/wavelet/qa_classify.py
old mode 100755
new mode 100644
index 4752620f4d..7f562c628e
--- a/gr-wavelet/python/wavelet/qa_classify.py
+++ b/gr-wavelet/python/wavelet/qa_classify.py
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import division
+
 import numpy
 from gnuradio import gr, gr_unittest, wavelet, analog, blocks
 import copy
@@ -79,14 +81,14 @@ class test_classify(gr_unittest.TestCase):
 
     def test_002_(self):
         src_data = numpy.array([-1.0,
-                                -1.0/2.0,
-                                -1.0/3.0,
-                                -1.0/4.0,
-                                -1.0/5.0])
+                                -1.0 / 2.0,
+                                -1.0 / 3.0,
+                                -1.0 / 4.0,
+                                -1.0 / 5.0])
         trg_data = copy.deepcopy(src_data)
 
         src = blocks.vector_source_f(src_data, False, len(src_data))
-        st = blocks.stretch_ff(-1.0/5.0, len(src_data))
+        st = blocks.stretch_ff(-1.0 / 5.0, len(src_data))
         dst = blocks.vector_sink_f(len(src_data))
         self.tb.connect(src, st)
         self.tb.connect(st, dst)
@@ -155,11 +157,11 @@ class test_classify(gr_unittest.TestCase):
         dwav = numpy.array(src_data)
         wvps = numpy.zeros(3)
         # wavelet power spectrum
-        scl = 1.0/sqr(dwav[0])
+        scl = 1.0 / sqr(dwav[0])
         k = 1
         for e in range(len(wvps)):
-            wvps[e] = scl*sqr(dwav[k:k+(01<<e)]).sum()
-            k += 01<<e
+            wvps[e] = scl*sqr(dwav[k:k+(0o1<<e)]).sum()
+            k += 0o1<<e
 
         src = blocks.vector_source_f(src_data, False, len(src_data))
         kon = wavelet.wvps_ff(len(src_data))
diff --git a/gr-zeromq/examples/python/client.py b/gr-zeromq/examples/python/client.py
old mode 100755
new mode 100644
index ca7ad1830a..39055bd3fb
--- a/gr-zeromq/examples/python/client.py
+++ b/gr-zeromq/examples/python/client.py
@@ -1,3 +1,5 @@
+from __future__ import print_function
+from __future__ import unicode_literals
 #
 # Copyright 2013 Free Software Foundation, Inc.
 #
@@ -67,14 +69,14 @@ class top_block(gr.top_block):
         self.rpc_manager.start_watcher()
 
     def start_fg(self):
-        print "Start Flowgraph"
+        print("Start Flowgraph")
         try:
             self.start()
         except RuntimeError:
-            print "Can't start, flowgraph already running!"
+            print("Can't start, flowgraph already running!")
 
     def stop_fg(self):
-        print "Stop Flowgraph"
+        print("Stop Flowgraph")
         self.stop()
         self.wait()
 
@@ -110,7 +112,7 @@ if __name__ == "__main__":
             time.sleep(1)
     except KeyboardInterrupt:
         pass
-    print "Shutting down flowgraph."
+    print("Shutting down flowgraph.")
     tb.rpc_manager.stop_watcher()
     tb.stop()
     tb.wait()
diff --git a/gr-zeromq/examples/python/gui.py b/gr-zeromq/examples/python/gui.py
old mode 100755
new mode 100644
index c932549408..832392f0a2
--- a/gr-zeromq/examples/python/gui.py
+++ b/gr-zeromq/examples/python/gui.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
 #
 # Copyright 2013 Free Software Foundation, Inc.
 #
@@ -112,7 +113,7 @@ class gui(QtGui.QMainWindow):
 
     # plot the data from the queues
     def plot_data(self, plot, samples):
-        self.x = range(0,len(samples),1)
+        self.x = list(range(0,len(samples),1))
         self.y = samples
         # clear the previous points from the plot
         plot.clear()
diff --git a/gr-zeromq/examples/python/server.py b/gr-zeromq/examples/python/server.py
old mode 100755
new mode 100644
index 23951664c1..b2cd8e8ef2
--- a/gr-zeromq/examples/python/server.py
+++ b/gr-zeromq/examples/python/server.py
@@ -1,3 +1,5 @@
+from __future__ import print_function
+from __future__ import unicode_literals
 #
 # Copyright 2013 Free Software Foundation, Inc.
 #
@@ -78,14 +80,14 @@ class top_block(gr.top_block):
         self.rpc_manager.start_watcher()
 
     def start_fg(self):
-        print "Start Flowgraph"
+        print("Start Flowgraph")
         try:
             self.start()
         except RuntimeError:
-            print "Can't start, flowgraph already running!"
+            print("Can't start, flowgraph already running!")
 
     def stop_fg(self):
-        print "Stop Flowgraph"
+        print("Stop Flowgraph")
         self.stop()
         self.wait()
 
@@ -119,7 +121,7 @@ if __name__ == "__main__":
             time.sleep(1)
     except KeyboardInterrupt:
         pass
-    print "Shutting down flowgraph."
+    print("Shutting down flowgraph.")
     tb.rpc_manager.stop_watcher()
     tb.stop()
     tb.wait()
diff --git a/gr-zeromq/python/zeromq/CMakeLists.txt b/gr-zeromq/python/zeromq/CMakeLists.txt
index 66fc65a4b5..100d1028fe 100644
--- a/gr-zeromq/python/zeromq/CMakeLists.txt
+++ b/gr-zeromq/python/zeromq/CMakeLists.txt
@@ -51,6 +51,6 @@ if(ENABLE_TESTING)
   file(GLOB py_qa_test_files "qa_*.py")
   foreach(py_qa_test_file ${py_qa_test_files})
     get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE)
-    GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${py_qa_test_file})
+    GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} -B ${py_qa_test_file})
   endforeach(py_qa_test_file)
 endif(ENABLE_TESTING)
diff --git a/gr-zeromq/python/zeromq/__init__.py b/gr-zeromq/python/zeromq/__init__.py
index cab4b67640..3b3e3869bd 100644
--- a/gr-zeromq/python/zeromq/__init__.py
+++ b/gr-zeromq/python/zeromq/__init__.py
@@ -22,15 +22,17 @@
 '''
 Blocks for interfacing with ZeroMQ endpoints.
 '''
+from __future__ import absolute_import
+from __future__ import unicode_literals
 
 import os
 
 try:
-    from zeromq_swig import *
+    from .zeromq_swig import *
 except ImportError:
     dirname, filename = os.path.split(os.path.abspath(__file__))
     __path__.append(os.path.join(dirname, "..", "..", "swig"))
-    from zeromq_swig import *
+    from .zeromq_swig import *
 
-from probe_manager import probe_manager
-from rpc_manager import rpc_manager
+from .probe_manager import probe_manager
+from .rpc_manager import rpc_manager
diff --git a/gr-zeromq/python/zeromq/probe_manager.py b/gr-zeromq/python/zeromq/probe_manager.py
index c30e6eaaba..b59650cd7b 100644
--- a/gr-zeromq/python/zeromq/probe_manager.py
+++ b/gr-zeromq/python/zeromq/probe_manager.py
@@ -1,3 +1,4 @@
+from __future__ import unicode_literals
 #
 # Copyright 2013 Free Software Foundation, Inc.
 #
@@ -20,10 +21,9 @@
 #
 
 import zmq
-import threading
 import numpy
 
-class probe_manager():
+class probe_manager(object):
     def __init__(self):
         self.zmq_context = zmq.Context()
         self.poller = zmq.Poller()
@@ -31,7 +31,7 @@ class probe_manager():
 
     def add_socket(self, address, data_type, callback_func):
         socket = self.zmq_context.socket(zmq.SUB)
-        socket.setsockopt(zmq.SUBSCRIBE, "")
+        socket.setsockopt(zmq.SUBSCRIBE, b"")
         socket.connect(address)
         # use a tuple to store interface elements
         self.interfaces.append((socket, data_type, callback_func))
diff --git a/gr-zeromq/python/zeromq/qa_zeromq_pub.py b/gr-zeromq/python/zeromq/qa_zeromq_pub.py
old mode 100755
new mode 100644
index 6f08aa544f..1bf3263747
--- a/gr-zeromq/python/zeromq/qa_zeromq_pub.py
+++ b/gr-zeromq/python/zeromq/qa_zeromq_pub.py
@@ -21,6 +21,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest
 from gnuradio import blocks, zeromq
 from gnuradio import eng_notation
@@ -36,7 +37,7 @@ class qa_zeromq_pub (gr_unittest.TestCase):
     def test_001 (self):
         vlen = 10
         self.rx_data = None
-        src_data = range(vlen)*100
+        src_data = list(range(vlen))*100
         src = blocks.vector_source_f(src_data, False, vlen)
         zeromq_pub_sink = zeromq.pub_sink(gr.sizeof_float, vlen, "tcp://127.0.0.1:5555")
         self.tb.connect(src, zeromq_pub_sink)
diff --git a/gr-zeromq/python/zeromq/qa_zeromq_pubsub.py b/gr-zeromq/python/zeromq/qa_zeromq_pubsub.py
old mode 100755
new mode 100644
index 2902f9e1dc..fe28b11caf
--- a/gr-zeromq/python/zeromq/qa_zeromq_pubsub.py
+++ b/gr-zeromq/python/zeromq/qa_zeromq_pubsub.py
@@ -21,6 +21,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest
 from gnuradio import blocks, zeromq
 import time
@@ -35,7 +36,7 @@ class qa_zeromq_pubsub (gr_unittest.TestCase):
 
     def test_001 (self):
         vlen = 10
-        src_data = range(vlen)*100
+        src_data = list(range(vlen))*100
         src = blocks.vector_source_f(src_data, False, vlen)
         zeromq_pub_sink = zeromq.pub_sink(gr.sizeof_float, vlen, "tcp://127.0.0.1:5556", 0)
         zeromq_sub_source = zeromq.sub_source(gr.sizeof_float, vlen, "tcp://127.0.0.1:5556", 0)
diff --git a/gr-zeromq/python/zeromq/qa_zeromq_pushpull.py b/gr-zeromq/python/zeromq/qa_zeromq_pushpull.py
old mode 100755
new mode 100644
index d09b92c130..8ecd531988
--- a/gr-zeromq/python/zeromq/qa_zeromq_pushpull.py
+++ b/gr-zeromq/python/zeromq/qa_zeromq_pushpull.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest, blocks, zeromq
 import time
 
@@ -33,7 +34,7 @@ class qa_zeromq_pushpull (gr_unittest.TestCase):
 
     def test_001 (self):
         vlen = 10
-        src_data = range(vlen)*100
+        src_data = list(range(vlen))*100
         src = blocks.vector_source_f(src_data, False, vlen)
         zeromq_push_sink = zeromq.push_sink(gr.sizeof_float, vlen, "tcp://127.0.0.1:5557")
         zeromq_pull_source = zeromq.pull_source(gr.sizeof_float, vlen, "tcp://127.0.0.1:5557", 0)
diff --git a/gr-zeromq/python/zeromq/qa_zeromq_reqrep.py b/gr-zeromq/python/zeromq/qa_zeromq_reqrep.py
old mode 100755
new mode 100644
index a50e684ea8..664e156528
--- a/gr-zeromq/python/zeromq/qa_zeromq_reqrep.py
+++ b/gr-zeromq/python/zeromq/qa_zeromq_reqrep.py
@@ -21,6 +21,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+
 from gnuradio import gr, gr_unittest
 from gnuradio import blocks, zeromq
 from gnuradio import eng_notation
@@ -36,7 +37,7 @@ class qa_zeromq_reqrep (gr_unittest.TestCase):
 
     def test_001 (self):
         vlen = 10
-        src_data = range(vlen)*100
+        src_data = list(range(vlen))*100
         src = blocks.vector_source_f(src_data, False, vlen)
         zeromq_rep_sink = zeromq.rep_sink(gr.sizeof_float, vlen, "tcp://127.0.0.1:5558", 0)
         zeromq_req_source = zeromq.req_source(gr.sizeof_float, vlen, "tcp://127.0.0.1:5558", 0)
diff --git a/gr-zeromq/python/zeromq/rpc_manager.py b/gr-zeromq/python/zeromq/rpc_manager.py
index 2dce997bd4..f7c972b752 100644
--- a/gr-zeromq/python/zeromq/rpc_manager.py
+++ b/gr-zeromq/python/zeromq/rpc_manager.py
@@ -19,12 +19,15 @@
 # Boston, MA 02110-1301, USA.
 #
 
+from __future__ import print_function
+from __future__ import unicode_literals
+
 import zmq
 import pmt
 import threading
 
 
-class rpc_manager():
+class rpc_manager(object):
     def __init__(self):
         self.zmq_context = zmq.Context()
         self.poller_rep = zmq.Poller()
@@ -39,22 +42,22 @@ class rpc_manager():
     def set_reply_socket(self, address):
         self.rep_socket = self.zmq_context.socket(zmq.REP)
         self.rep_socket.bind(address)
-        print "[RPC] reply socket bound to: ", address
+        print("[RPC] reply socket bound to: ", address)
         self.poller_rep.register(self.rep_socket, zmq.POLLIN)
 
     def set_request_socket(self, address):
         self.req_socket = self.zmq_context.socket(zmq.REQ)
         self.req_socket.connect(address)
-        print "[RPC] request socket connected to: ", address
+        print("[RPC] request socket connected to: ", address)
         self.poller_req_out.register(self.req_socket, zmq.POLLOUT)
         self.poller_req_in.register(self.req_socket, zmq.POLLIN)
 
     def add_interface(self, id_str, callback_func):
-        if not self.interfaces.has_key(id_str):
+        if id_str not in self.interfaces:
             self.interfaces[id_str] = callback_func
-            print "[RPC] added reply interface:", id_str
+            print("[RPC] added reply interface:", id_str)
         else:
-            print "[RPC] ERROR: duplicate id_str:", id_str
+            print("[RPC] ERROR: duplicate id_str:", id_str)
 
     def watcher(self):
         self.keep_running = True
@@ -65,7 +68,7 @@ class rpc_manager():
                 # receive call
                 msg = self.rep_socket.recv()
                 (id_str, args) = pmt.to_python(pmt.deserialize_str(msg))
-                print "[RPC] request:", id_str, ", args:", args
+                print("[RPC] request:", id_str, ", args:", args)
                 reply = self.callback(id_str, args)
                 self.rep_socket.send(pmt.serialize_str(pmt.to_pmt(reply)))
 
@@ -85,11 +88,11 @@ class rpc_manager():
         socks = dict(self.poller_req_in.poll(10))
         if socks.get(self.req_socket) == zmq.POLLIN:
             reply = pmt.to_python(pmt.deserialize_str(self.req_socket.recv()))
-            print "[RPC] reply:", reply
+            print("[RPC] reply:", reply)
             return reply
 
     def callback(self, id_str, args):
-        if self.interfaces.has_key(id_str):
+        if id_str in self.interfaces:
             callback_func = self.interfaces.get(id_str)
             if not args == None:
                 # use unpacking or splat operator * to unpack argument list
@@ -97,5 +100,5 @@ class rpc_manager():
             else:
                 return(callback_func())
         else:
-            print "[RPC] ERROR: id_str not found:", id_str
+            print("[RPC] ERROR: id_str not found:", id_str)
             return None
-- 
cgit v1.2.3


From e98dc6cec7213f45e8ac79e679686b6a2b6224dd Mon Sep 17 00:00:00 2001
From: Bastian Bloessl <mail@bastibl.net>
Date: Sun, 29 Jan 2017 09:26:42 +0100
Subject: doc: log4cpp is mandatory now

---
 docs/doxygen/other/logger.dox | 6 ------
 1 file changed, 6 deletions(-)

(limited to 'docs/doxygen')

diff --git a/docs/doxygen/other/logger.dox b/docs/doxygen/other/logger.dox
index ae6a744d00..6501195750 100644
--- a/docs/doxygen/other/logger.dox
+++ b/docs/doxygen/other/logger.dox
@@ -17,12 +17,6 @@ from log4cpp (http://log4cpp.sourceforge.net/) which is readily
 available in most Linux distributions. This is an optional dependency
 and GNU Radio will work without it.
 
-When configuring GNU Radio, the -DENABLE_GR_LOG=On|Off option to cmake
-will allow the user to toggle use of the logger on and off. The logger
-defaults to "on" and will use log4cpp if it is available. If log4cpp
-is not found, the default logging will output to standard output or
-standard error, depending on the level of the log message.
-
 Logging is useful for blocks to print out certain amounts of data at
 different levels. These levels are:
 
-- 
cgit v1.2.3


From e89cf657583078ccffb873321c632cff44360387 Mon Sep 17 00:00:00 2001
From: Johnathan Corgan <johnathan@corganlabs.com>
Date: Tue, 18 Apr 2017 15:44:58 -0700
Subject: docs: fix stray references to pager, fcd, and noaa

---
 cmake/Modules/GnuradioConfig.cmake.in |  3 ---
 docs/doxygen/Doxyfile.in              | 13 ------------
 docs/doxygen/other/components.dox     |  1 -
 docs/doxygen/other/group_defs.dox     |  8 --------
 docs/sphinx/source/index.rst          | 38 +----------------------------------
 docs/sphinx/source/pager_blocks.rst   | 10 ---------
 6 files changed, 1 insertion(+), 72 deletions(-)
 delete mode 100644 docs/sphinx/source/pager_blocks.rst

(limited to 'docs/doxygen')

diff --git a/cmake/Modules/GnuradioConfig.cmake.in b/cmake/Modules/GnuradioConfig.cmake.in
index b323a0d911..328e7769cc 100644
--- a/cmake/Modules/GnuradioConfig.cmake.in
+++ b/cmake/Modules/GnuradioConfig.cmake.in
@@ -124,12 +124,9 @@ GR_MODULE(AUDIO gnuradio-audio gnuradio/audio/api.h gnuradio-audio)
 GR_MODULE(BLOCKS gnuradio-blocks gnuradio/blocks/api.h gnuradio-blocks)
 GR_MODULE(CHANNELS gnuradio-channels gnuradio/channels/api.h gnuradio-channels)
 GR_MODULE(DIGITAL gnuradio-digital gnuradio/digital/api.h gnuradio-digital)
-GR_MODULE(FCD gnuradio-fcd gnuradio/fcd_api.h gnuradio-fcd)
 GR_MODULE(FEC gnuradio-fec gnuradio/fec/api.h gnuradio-fec)
 GR_MODULE(FFT gnuradio-fft gnuradio/fft/api.h gnuradio-fft)
 GR_MODULE(FILTER gnuradio-filter gnuradio/filter/api.h gnuradio-filter)
-GR_MODULE(NOAA gnuradio-noaa gnuradio/noaa/api.h gnuradio-noaa)
-GR_MODULE(PAGER gnuradio-pager gnuradio/pager/api.h gnuradio-pager)
 GR_MODULE(QTGUI gnuradio-qtgui gnuradio/qtgui/api.h gnuradio-qtgui)
 GR_MODULE(TRELLIS gnuradio-trellis gnuradio/trellis/api.h gnuradio-trellis)
 GR_MODULE(UHD gnuradio-uhd gnuradio/uhd/api.h gnuradio-uhd)
diff --git a/docs/doxygen/Doxyfile.in b/docs/doxygen/Doxyfile.in
index 830bf54e9f..c47a758a5a 100644
--- a/docs/doxygen/Doxyfile.in
+++ b/docs/doxygen/Doxyfile.in
@@ -157,18 +157,12 @@ STRIP_FROM_INC_PATH    = @CMAKE_SOURCE_DIR@/gnuradio-runtime/include \
                          @CMAKE_BINARY_DIR@/gr-digital/include \
                          @CMAKE_SOURCE_DIR@/gr-dtv/include \
                          @CMAKE_BINARY_DIR@/gr-dtv/include \
-                         @CMAKE_SOURCE_DIR@/gr-fcd/include \
-                         @CMAKE_BINARY_DIR@/gr-fcd/include \
                          @CMAKE_SOURCE_DIR@/gr-fec/include \
                          @CMAKE_BINARY_DIR@/gr-fec/include \
                          @CMAKE_SOURCE_DIR@/gr-fft/include \
                          @CMAKE_BINARY_DIR@/gr-fft/include \
                          @CMAKE_SOURCE_DIR@/gr-filter/include \
                          @CMAKE_BINARY_DIR@/gr-filter/include \
-                         @CMAKE_SOURCE_DIR@/gr-noaa/include \
-                         @CMAKE_BINARY_DIR@/gr-noaa/include \
-                         @CMAKE_SOURCE_DIR@/gr-pager/include \
-                         @CMAKE_BINARY_DIR@/gr-pager/include \
                          @CMAKE_SOURCE_DIR@/gr-qtgui/include \
                          @CMAKE_BINARY_DIR@/gr-qtgui/include \
                          @CMAKE_SOURCE_DIR@/gr-trellis/include \
@@ -749,7 +743,6 @@ EXCLUDE                = @abs_top_srcdir@/volk \
                          @abs_top_builddir@/gnuradio-runtime/python/gnuradio/gr/gr_threading.py \
                          @abs_top_builddir@/gnuradio-runtime/python/gnuradio/gr/gr_threading_23.py \
                          @abs_top_builddir@/gnuradio-runtime/python/gnuradio/gr/gr_threading_24.py \
-                         @abs_top_builddir@/gr-pager/swig/pager_swig.py \
                          @abs_top_builddir@/gr-trellis/doc \
                          @abs_top_builddir@/gr-trellis/swig/trellis_swig.py \
                          @abs_top_builddir@/gr-video-sdl/swig/video_sdl_swig.py \
@@ -783,18 +776,12 @@ EXCLUDE                = @abs_top_srcdir@/volk \
                          @abs_top_builddir@/gr-dtv/lib/dvbs2 \
                          @abs_top_srcdir@/gr-dtv/lib/dvbt2 \
                          @abs_top_builddir@/gr-dtv/lib/dvbr2 \
-                         @abs_top_srcdir@/gr-fcd/lib \
-                         @abs_top_builddir@/gr-fcd/lib \
                          @abs_top_srcdir@/gr-fec/lib \
                          @abs_top_builddir@/gr-fec/lib \
                          @abs_top_srcdir@/gr-filter/lib \
                          @abs_top_builddir@/gr-filter/lib \
                          @abs_top_srcdir@/gr-fft/lib \
                          @abs_top_builddir@/gr-fft/lib \
-                         @abs_top_srcdir@/gr-noaa/lib \
-                         @abs_top_builddir@/gr-noaa/lib \
-                         @abs_top_srcdir@/gr-pager/lib \
-                         @abs_top_builddir@/gr-pager/lib \
                          @abs_top_srcdir@/gr-qtgui/lib \
                          @abs_top_builddir@/gr-qtgui/lib \
                          @abs_top_srcdir@/gr-trellis/lib \
diff --git a/docs/doxygen/other/components.dox b/docs/doxygen/other/components.dox
index b1f88d20b6..2b6fc2091a 100644
--- a/docs/doxygen/other/components.dox
+++ b/docs/doxygen/other/components.dox
@@ -32,7 +32,6 @@ All our in-tree components have their own top-level documentation:
 \li \subpage page_ctrlport
 \li \subpage page_digital
 \li \subpage page_packet_comms
-\li \subpage page_fcd
 \li \subpage page_fec
 \li \subpage page_fft
 \li \subpage page_filter
diff --git a/docs/doxygen/other/group_defs.dox b/docs/doxygen/other/group_defs.dox
index fecde8c9c6..7ec67bde23 100644
--- a/docs/doxygen/other/group_defs.dox
+++ b/docs/doxygen/other/group_defs.dox
@@ -29,7 +29,6 @@
 /*! \defgroup deprecated_blk Deprecated */
 /*! \defgroup equalizers_blk Equalizers */
 /*! \defgroup error_coding_blk Error Coding and Decoding */
-/*! \defgroup fcd_blk FCD Interface */
 /*! \defgroup file_operators_blk File Operators */
 /*! \defgroup filter_blk Filters */
 /*! \defgroup fourier_analysis_blk Fourier Analysis */
@@ -41,11 +40,9 @@
 /*! \defgroup misc_blk Miscellaneous */
 /*! \defgroup modulators_blk Modulators and Demodulators */
 /*! \defgroup networking_tools_blk Networking Tools */
-/*! \defgroup noaa_blk NOAA Blocks */
 /*! \defgroup ofdm_blk OFDM Blocks */
 /*! \defgroup packet_operators_blk Packet/Frame Operators */
 /*! \defgroup peak_detectors_blk Peak Detectors */
-/*! \defgroup pager_blk Pager Blocks */
 /*! \defgroup qtgui_blk QT Graphical Interfaces */
 /*! \defgroup resamplers_blk Resamplers */
 /*! \defgroup stream_operators_blk Streams Operators */
@@ -76,11 +73,6 @@
  * @{
  */
 
-/*!
- * \defgroup pager Pager
- * Pager Applications
- */
-
 /*! @} */
 
 /*! \defgroup hardware Misc Hardware Control		*/
diff --git a/docs/sphinx/source/index.rst b/docs/sphinx/source/index.rst
index 26936dfedf..763c04e0a5 100644
--- a/docs/sphinx/source/index.rst
+++ b/docs/sphinx/source/index.rst
@@ -13,12 +13,9 @@ gnuradio
    blocks_comedi <comedi_blocks>
    blocks_digital <digital_blocks>
    blocks_dtv <dtv_blocks>
-   blocks_fcd <fcd_blocks>
    blocks_fec <fec_blocks>
    blocks_fft <fft_blocks>
    blocks_filter <filter_blocks>
-   blocks_noaa <noaa_blocks>
-   blocks_pager <pager_blocks>
    blocks_qtgui <qtgui_blocks>
    blocks_trellis <trellis_blocks>
    blocks_uhd <uhd_blocks>
@@ -522,15 +519,6 @@ Error Coding Blocks
    gnuradio.fec.tagged_encoder
 
 
-FCD Blocks
-----------
-
-.. autosummary::
-   :nosignatures:
-
-   gnuradio.fcd.source_c
-
-
 File Operator Blocks
 --------------------
 
@@ -855,17 +843,6 @@ Networking Tools Blocks
    gnuradio.blocks.udp_source
 
 
-NOAA Blocks
------------
-
-.. autosummary::
-   :nosignatures:
-
-   gnuradio.noaa.hrpt_decoder
-   gnuradio.noaa.hrpt_deframer
-   gnuradio.noaa.hrpt_pll_cf
-
-
 OFDM Blocks
 -----------
 
@@ -909,20 +886,7 @@ Packet Operator Blocks
    gnuradio.digital.simple_correlator
    gnuradio.digital.simple_framer
 
-
-Pager Blocks
-------------
-
-.. autosummary::
-   :nosignatures:
-
-   gnuradio.pager.flex_deinterleave
-   gnuradio.pager.flex_frame
-   gnuradio.pager.flex_parse
-   gnuradio.pager.flex_sync
-   gnuradio.pager.slicer_fb
-
-
+   
 Peak Detector Blocks
 --------------------
 
diff --git a/docs/sphinx/source/pager_blocks.rst b/docs/sphinx/source/pager_blocks.rst
deleted file mode 100644
index 5eef083aa5..0000000000
--- a/docs/sphinx/source/pager_blocks.rst
+++ /dev/null
@@ -1,10 +0,0 @@
-gnuradio.pager
-==============
-
-.. automodule:: gnuradio.pager
-
-.. autoblock:: gnuradio.pager.flex_deinterleave
-.. autoblock:: gnuradio.pager.flex_frame
-.. autoblock:: gnuradio.pager.flex_parse
-.. autoblock:: gnuradio.pager.flex_sync
-.. autoblock:: gnuradio.pager.slicer_fb
-- 
cgit v1.2.3


From 1043222e0de551f00683a1cc9060f194adc4fc85 Mon Sep 17 00:00:00 2001
From: Andrej Rode <mail@andrejro.de>
Date: Thu, 22 Feb 2018 13:28:01 +0100
Subject: blocks: replace gengen with  C++ templates

---
 docs/doxygen/CMakeLists.txt                        |   8 -
 gr-blocks/include/gnuradio/blocks/CMakeLists.txt   |  77 ++---
 gr-blocks/include/gnuradio/blocks/abs_XX.h.t       |  58 ----
 gr-blocks/include/gnuradio/blocks/abs_blk.h        |  62 ++++
 gr-blocks/include/gnuradio/blocks/add_XX.h.t       |  59 ----
 gr-blocks/include/gnuradio/blocks/add_blk.h        |  64 ++++
 gr-blocks/include/gnuradio/blocks/add_const_v.h    |  71 +++++
 .../include/gnuradio/blocks/add_const_vXX.h.t      |  66 -----
 gr-blocks/include/gnuradio/blocks/add_ff.h         |  57 ----
 gr-blocks/include/gnuradio/blocks/and_XX.h.t       |  54 ----
 gr-blocks/include/gnuradio/blocks/and_blk.h        |  58 ++++
 gr-blocks/include/gnuradio/blocks/and_const.h      |  73 +++++
 gr-blocks/include/gnuradio/blocks/and_const_XX.h.t |  69 -----
 gr-blocks/include/gnuradio/blocks/argmax.h         |  65 ++++
 gr-blocks/include/gnuradio/blocks/argmax_XX.h.t    |  63 ----
 gr-blocks/include/gnuradio/blocks/divide.h         |  59 ++++
 gr-blocks/include/gnuradio/blocks/divide_XX.h.t    |  54 ----
 gr-blocks/include/gnuradio/blocks/integrate.h      |  56 ++++
 gr-blocks/include/gnuradio/blocks/integrate_XX.h.t |  51 ----
 gr-blocks/include/gnuradio/blocks/max_XX.h.t       |  61 ----
 gr-blocks/include/gnuradio/blocks/max_blk.h        |  65 ++++
 gr-blocks/include/gnuradio/blocks/min_XX.h.t       |  61 ----
 gr-blocks/include/gnuradio/blocks/min_blk.h        |  64 ++++
 gr-blocks/include/gnuradio/blocks/moving_average.h |  91 ++++++
 .../include/gnuradio/blocks/moving_average_XX.h.t  |  86 ------
 gr-blocks/include/gnuradio/blocks/multiply.h       |  59 ++++
 gr-blocks/include/gnuradio/blocks/multiply_XX.h.t  |  54 ----
 gr-blocks/include/gnuradio/blocks/multiply_cc.h    |  57 ----
 gr-blocks/include/gnuradio/blocks/multiply_const.h |  71 +++++
 .../include/gnuradio/blocks/multiply_const_XX.h.t  |  66 -----
 .../include/gnuradio/blocks/multiply_const_cc.h    |  65 ----
 .../include/gnuradio/blocks/multiply_const_ff.h    |  67 -----
 .../include/gnuradio/blocks/multiply_const_v.h     |  70 +++++
 .../include/gnuradio/blocks/multiply_const_vXX.h.t |  66 -----
 .../include/gnuradio/blocks/multiply_const_vcc.h   |  62 ----
 .../include/gnuradio/blocks/multiply_const_vff.h   |  62 ----
 gr-blocks/include/gnuradio/blocks/multiply_ff.h    |  57 ----
 .../include/gnuradio/blocks/multiply_matrix.h      | 100 +++++++
 .../include/gnuradio/blocks/multiply_matrix_XX.h.t |  97 ------
 gr-blocks/include/gnuradio/blocks/mute.h           |  58 ++++
 gr-blocks/include/gnuradio/blocks/mute_XX.h.t      |  54 ----
 gr-blocks/include/gnuradio/blocks/not_XX.h.t       |  53 ----
 gr-blocks/include/gnuradio/blocks/not_blk.h        |  56 ++++
 gr-blocks/include/gnuradio/blocks/or_XX.h.t        |  53 ----
 gr-blocks/include/gnuradio/blocks/or_blk.h         |  55 ++++
 .../include/gnuradio/blocks/packed_to_unpacked.h   |  78 +++++
 .../gnuradio/blocks/packed_to_unpacked_XX.h.t      |  74 -----
 gr-blocks/include/gnuradio/blocks/peak_detector.h  | 121 ++++++++
 .../include/gnuradio/blocks/peak_detector_XX.h.t   | 118 --------
 gr-blocks/include/gnuradio/blocks/probe_signal.h   |  58 ++++
 .../include/gnuradio/blocks/probe_signal_X.h.t     |  52 ----
 gr-blocks/include/gnuradio/blocks/probe_signal_v.h |  59 ++++
 .../include/gnuradio/blocks/probe_signal_vX.h.t    |  54 ----
 .../include/gnuradio/blocks/sample_and_hold.h      |  59 ++++
 .../include/gnuradio/blocks/sample_and_hold_XX.h.t |  54 ----
 gr-blocks/include/gnuradio/blocks/sub.h            |  59 ++++
 gr-blocks/include/gnuradio/blocks/sub_XX.h.t       |  54 ----
 gr-blocks/include/gnuradio/blocks/sub_ff.h         |  51 ----
 .../include/gnuradio/blocks/tsb_vector_sink.h      |  69 +++++
 .../include/gnuradio/blocks/tsb_vector_sink_X.h.t  |  63 ----
 .../include/gnuradio/blocks/unpacked_to_packed.h   |  77 +++++
 .../gnuradio/blocks/unpacked_to_packed_XX.h.t      |  73 -----
 gr-blocks/include/gnuradio/blocks/vector_insert.h  |  67 +++++
 .../include/gnuradio/blocks/vector_insert_X.h.t    |  61 ----
 gr-blocks/include/gnuradio/blocks/vector_sink.h    |  61 ++++
 .../include/gnuradio/blocks/vector_sink_X.h.t      |  55 ----
 gr-blocks/include/gnuradio/blocks/vector_source.h  |  91 ++++++
 .../include/gnuradio/blocks/vector_source_X.h.t    |  85 ------
 gr-blocks/include/gnuradio/blocks/xor_XX.h.t       |  53 ----
 gr-blocks/include/gnuradio/blocks/xor_blk.h        |  57 ++++
 gr-blocks/lib/CMakeLists.txt                       |  80 ++---
 gr-blocks/lib/abs_XX_impl.cc.t                     |  65 ----
 gr-blocks/lib/abs_XX_impl.h.t                      |  49 ---
 gr-blocks/lib/abs_blk_impl.cc                      |  70 +++++
 gr-blocks/lib/abs_blk_impl.h                       |  49 +++
 gr-blocks/lib/add_XX_impl.cc.t                     |  69 -----
 gr-blocks/lib/add_XX_impl.h.t                      |  49 ---
 gr-blocks/lib/add_blk_impl.cc                      | 106 +++++++
 gr-blocks/lib/add_blk_impl.h                       |  49 +++
 gr-blocks/lib/add_const_vXX_impl.cc.t              |  66 -----
 gr-blocks/lib/add_const_vXX_impl.h.t               |  51 ----
 gr-blocks/lib/add_const_v_impl.cc                  |  72 +++++
 gr-blocks/lib/add_const_v_impl.h                   |  50 ++++
 gr-blocks/lib/add_ff_impl.cc                       |  65 ----
 gr-blocks/lib/add_ff_impl.h                        |  47 ---
 gr-blocks/lib/and_XX_impl.cc.t                     |  69 -----
 gr-blocks/lib/and_XX_impl.h.t                      |  48 ---
 gr-blocks/lib/and_blk_impl.cc                      |  74 +++++
 gr-blocks/lib/and_blk_impl.h                       |  48 +++
 gr-blocks/lib/and_const_XX_impl.cc.t               |  77 -----
 gr-blocks/lib/and_const_XX_impl.h.t                |  51 ----
 gr-blocks/lib/and_const_impl.cc                    |  82 ++++++
 gr-blocks/lib/and_const_impl.h                     |  51 ++++
 gr-blocks/lib/argmax_XX_impl.cc.t                  |  86 ------
 gr-blocks/lib/argmax_XX_impl.h.t                   |  50 ----
 gr-blocks/lib/argmax_impl.cc                       |  91 ++++++
 gr-blocks/lib/argmax_impl.h                        |  49 +++
 gr-blocks/lib/divide_XX_impl.cc.t                  |  69 -----
 gr-blocks/lib/divide_XX_impl.h.t                   |  48 ---
 gr-blocks/lib/divide_cc_impl.cc                    |  66 -----
 gr-blocks/lib/divide_cc_impl.h                     |  47 ---
 gr-blocks/lib/divide_ff_impl.cc                    |  66 -----
 gr-blocks/lib/divide_ff_impl.h                     |  47 ---
 gr-blocks/lib/divide_impl.cc                       | 130 ++++++++
 gr-blocks/lib/divide_impl.h                        |  48 +++
 gr-blocks/lib/integrate_XX_impl.cc.t               |  73 -----
 gr-blocks/lib/integrate_XX_impl.h.t                |  49 ---
 gr-blocks/lib/integrate_impl.cc                    |  79 +++++
 gr-blocks/lib/integrate_impl.h                     |  49 +++
 gr-blocks/lib/max_XX_impl.cc.t                     |  96 ------
 gr-blocks/lib/max_XX_impl.h.t                      |  50 ----
 gr-blocks/lib/max_blk_impl.cc                      | 102 +++++++
 gr-blocks/lib/max_blk_impl.h                       |  50 ++++
 gr-blocks/lib/min_XX_impl.cc.t                     |  96 ------
 gr-blocks/lib/min_XX_impl.h.t                      |  50 ----
 gr-blocks/lib/min_blk_impl.cc                      |  97 ++++++
 gr-blocks/lib/min_blk_impl.h                       |  50 ++++
 gr-blocks/lib/moving_average_XX_impl.cc.t          | 141 ---------
 gr-blocks/lib/moving_average_XX_impl.h.t           |  72 -----
 gr-blocks/lib/moving_average_impl.cc               | 151 ++++++++++
 gr-blocks/lib/moving_average_impl.h                |  72 +++++
 gr-blocks/lib/multiply_XX_impl.cc.t                |  69 -----
 gr-blocks/lib/multiply_XX_impl.h.t                 |  47 ---
 gr-blocks/lib/multiply_cc_impl.cc                  |  66 -----
 gr-blocks/lib/multiply_cc_impl.h                   |  47 ---
 gr-blocks/lib/multiply_const_XX_impl.cc.t          |  77 -----
 gr-blocks/lib/multiply_const_XX_impl.h.t           |  51 ----
 gr-blocks/lib/multiply_const_cc_impl.cc            |  91 ------
 gr-blocks/lib/multiply_const_cc_impl.h             |  52 ----
 gr-blocks/lib/multiply_const_ff_impl.cc            |  89 ------
 gr-blocks/lib/multiply_const_ff_impl.h             |  54 ----
 gr-blocks/lib/multiply_const_impl.cc               | 139 +++++++++
 gr-blocks/lib/multiply_const_impl.h                |  51 ++++
 gr-blocks/lib/multiply_const_vXX_impl.cc.t         |  66 -----
 gr-blocks/lib/multiply_const_vXX_impl.h.t          |  51 ----
 gr-blocks/lib/multiply_const_v_impl.cc             | 138 +++++++++
 gr-blocks/lib/multiply_const_v_impl.h              |  50 ++++
 gr-blocks/lib/multiply_const_vcc_impl.cc           | 100 -------
 gr-blocks/lib/multiply_const_vcc_impl.h            |  52 ----
 gr-blocks/lib/multiply_const_vff_impl.cc           |  96 ------
 gr-blocks/lib/multiply_const_vff_impl.h            |  52 ----
 gr-blocks/lib/multiply_ff_impl.cc                  |  66 -----
 gr-blocks/lib/multiply_ff_impl.h                   |  47 ---
 gr-blocks/lib/multiply_impl.cc                     | 132 +++++++++
 gr-blocks/lib/multiply_impl.h                      |  47 +++
 gr-blocks/lib/multiply_matrix_cc_impl.cc           | 182 ------------
 gr-blocks/lib/multiply_matrix_cc_impl.h            |  56 ----
 gr-blocks/lib/multiply_matrix_ff_impl.cc           | 182 ------------
 gr-blocks/lib/multiply_matrix_ff_impl.h            |  56 ----
 gr-blocks/lib/multiply_matrix_impl.cc              | 327 +++++++++++++++++++++
 gr-blocks/lib/multiply_matrix_impl.h               |  56 ++++
 gr-blocks/lib/mute_XX_impl.cc.t                    |  92 ------
 gr-blocks/lib/mute_XX_impl.h.t                     |  54 ----
 gr-blocks/lib/mute_impl.cc                         |  99 +++++++
 gr-blocks/lib/mute_impl.h                          |  54 ++++
 gr-blocks/lib/not_XX_impl.cc.t                     |  65 ----
 gr-blocks/lib/not_XX_impl.h.t                      |  48 ---
 gr-blocks/lib/not_blk_impl.cc                      |  70 +++++
 gr-blocks/lib/not_blk_impl.h                       |  48 +++
 gr-blocks/lib/or_XX_impl.cc.t                      |  69 -----
 gr-blocks/lib/or_XX_impl.h.t                       |  48 ---
 gr-blocks/lib/or_blk_impl.cc                       |  67 +++++
 gr-blocks/lib/or_blk_impl.h                        |  47 +++
 gr-blocks/lib/packed_to_unpacked_XX_impl.cc.t      | 147 ---------
 gr-blocks/lib/packed_to_unpacked_XX_impl.h.t       |  59 ----
 gr-blocks/lib/packed_to_unpacked_impl.cc           | 152 ++++++++++
 gr-blocks/lib/packed_to_unpacked_impl.h            |  64 ++++
 gr-blocks/lib/peak_detector_XX_impl.cc.t           | 123 --------
 gr-blocks/lib/peak_detector_XX_impl.h.t            |  65 ----
 gr-blocks/lib/peak_detector_impl.cc                | 128 ++++++++
 gr-blocks/lib/peak_detector_impl.h                 |  64 ++++
 gr-blocks/lib/probe_signal_X_impl.cc.t             |  68 -----
 gr-blocks/lib/probe_signal_X_impl.h.t              |  52 ----
 gr-blocks/lib/probe_signal_impl.cc                 |  76 +++++
 gr-blocks/lib/probe_signal_impl.h                  |  52 ++++
 gr-blocks/lib/probe_signal_vX_impl.cc.t            |  69 -----
 gr-blocks/lib/probe_signal_vX_impl.h.t             |  54 ----
 gr-blocks/lib/probe_signal_v_impl.cc               |  76 +++++
 gr-blocks/lib/probe_signal_v_impl.h                |  53 ++++
 gr-blocks/lib/sample_and_hold_XX_impl.cc.t         |  73 -----
 gr-blocks/lib/sample_and_hold_XX_impl.h.t          |  50 ----
 gr-blocks/lib/sample_and_hold_impl.cc              |  80 +++++
 gr-blocks/lib/sample_and_hold_impl.h               |  50 ++++
 gr-blocks/lib/sub_XX_impl.cc.t                     |  69 -----
 gr-blocks/lib/sub_XX_impl.h.t                      |  48 ---
 gr-blocks/lib/sub_ff_impl.cc                       |  81 -----
 gr-blocks/lib/sub_ff_impl.h                        |  47 ---
 gr-blocks/lib/sub_impl.cc                          | 109 +++++++
 gr-blocks/lib/sub_impl.h                           |  48 +++
 gr-blocks/lib/tsb_vector_sink_X_impl.cc.t          |  85 ------
 gr-blocks/lib/tsb_vector_sink_X_impl.h.t           |  58 ----
 gr-blocks/lib/tsb_vector_sink_impl.cc              |  95 ++++++
 gr-blocks/lib/tsb_vector_sink_impl.h               |  58 ++++
 gr-blocks/lib/unpacked_to_packed_XX_impl.cc.t      | 143 ---------
 gr-blocks/lib/unpacked_to_packed_XX_impl.h.t       |  59 ----
 gr-blocks/lib/unpacked_to_packed_impl.cc           | 150 ++++++++++
 gr-blocks/lib/unpacked_to_packed_impl.h            |  61 ++++
 gr-blocks/lib/vector_insert_X_impl.cc.t            | 117 --------
 gr-blocks/lib/vector_insert_X_impl.h.t             |  58 ----
 gr-blocks/lib/vector_insert_impl.cc                | 125 ++++++++
 gr-blocks/lib/vector_insert_impl.h                 |  58 ++++
 gr-blocks/lib/vector_sink_X_impl.cc.t              |  98 ------
 gr-blocks/lib/vector_sink_X_impl.h.t               |  58 ----
 gr-blocks/lib/vector_sink_impl.cc                  | 109 +++++++
 gr-blocks/lib/vector_sink_impl.h                   |  58 ++++
 gr-blocks/lib/vector_source_X_impl.cc.t            | 144 ---------
 gr-blocks/lib/vector_source_X_impl.h.t             |  62 ----
 gr-blocks/lib/vector_source_impl.cc                | 153 ++++++++++
 gr-blocks/lib/vector_source_impl.h                 |  62 ++++
 gr-blocks/lib/xor_XX_impl.cc.t                     |  69 -----
 gr-blocks/lib/xor_XX_impl.h.t                      |  48 ---
 gr-blocks/lib/xor_blk_impl.cc                      |  73 +++++
 gr-blocks/lib/xor_blk_impl.h                       |  48 +++
 gr-blocks/swig/CMakeLists.txt                      |   1 -
 gr-blocks/swig/blocks_swig1.i                      |  66 ++---
 gr-blocks/swig/blocks_swig10.i                     |  74 ++---
 gr-blocks/swig/blocks_swig2.i                      |  28 +-
 gr-blocks/swig/blocks_swig3.i                      |  82 ++----
 gr-blocks/swig/blocks_swig4.i                      |  58 ++--
 gr-blocks/swig/blocks_swig5.i                      |  36 +--
 gr-blocks/swig/blocks_swig6.i                      |  28 +-
 gr-blocks/swig/blocks_swig7.i                      |  40 +--
 gr-blocks/swig/blocks_swig8.i                      |  68 ++---
 gr-blocks/swig/blocks_swig9.i                      |  32 +-
 gr-channels/lib/channel_model2_impl.h              |   2 +-
 gr-channels/lib/channel_model_impl.h               |   2 +-
 gr-channels/lib/dynamic_channel_model_impl.h       |   2 +-
 gr-digital/lib/modulate_vector.cc                  |   4 +-
 gr-digital/lib/ofdm_sync_sc_cfb_impl.cc            |  18 +-
 229 files changed, 7245 insertions(+), 8700 deletions(-)
 delete mode 100644 gr-blocks/include/gnuradio/blocks/abs_XX.h.t
 create mode 100644 gr-blocks/include/gnuradio/blocks/abs_blk.h
 delete mode 100644 gr-blocks/include/gnuradio/blocks/add_XX.h.t
 create mode 100644 gr-blocks/include/gnuradio/blocks/add_blk.h
 create mode 100644 gr-blocks/include/gnuradio/blocks/add_const_v.h
 delete mode 100644 gr-blocks/include/gnuradio/blocks/add_const_vXX.h.t
 delete mode 100644 gr-blocks/include/gnuradio/blocks/add_ff.h
 delete mode 100644 gr-blocks/include/gnuradio/blocks/and_XX.h.t
 create mode 100644 gr-blocks/include/gnuradio/blocks/and_blk.h
 create mode 100644 gr-blocks/include/gnuradio/blocks/and_const.h
 delete mode 100644 gr-blocks/include/gnuradio/blocks/and_const_XX.h.t
 create mode 100644 gr-blocks/include/gnuradio/blocks/argmax.h
 delete mode 100644 gr-blocks/include/gnuradio/blocks/argmax_XX.h.t
 create mode 100644 gr-blocks/include/gnuradio/blocks/divide.h
 delete mode 100644 gr-blocks/include/gnuradio/blocks/divide_XX.h.t
 create mode 100644 gr-blocks/include/gnuradio/blocks/integrate.h
 delete mode 100644 gr-blocks/include/gnuradio/blocks/integrate_XX.h.t
 delete mode 100644 gr-blocks/include/gnuradio/blocks/max_XX.h.t
 create mode 100644 gr-blocks/include/gnuradio/blocks/max_blk.h
 delete mode 100644 gr-blocks/include/gnuradio/blocks/min_XX.h.t
 create mode 100644 gr-blocks/include/gnuradio/blocks/min_blk.h
 create mode 100644 gr-blocks/include/gnuradio/blocks/moving_average.h
 delete mode 100644 gr-blocks/include/gnuradio/blocks/moving_average_XX.h.t
 create mode 100644 gr-blocks/include/gnuradio/blocks/multiply.h
 delete mode 100644 gr-blocks/include/gnuradio/blocks/multiply_XX.h.t
 delete mode 100644 gr-blocks/include/gnuradio/blocks/multiply_cc.h
 create mode 100644 gr-blocks/include/gnuradio/blocks/multiply_const.h
 delete mode 100644 gr-blocks/include/gnuradio/blocks/multiply_const_XX.h.t
 delete mode 100644 gr-blocks/include/gnuradio/blocks/multiply_const_cc.h
 delete mode 100644 gr-blocks/include/gnuradio/blocks/multiply_const_ff.h
 create mode 100644 gr-blocks/include/gnuradio/blocks/multiply_const_v.h
 delete mode 100644 gr-blocks/include/gnuradio/blocks/multiply_const_vXX.h.t
 delete mode 100644 gr-blocks/include/gnuradio/blocks/multiply_const_vcc.h
 delete mode 100644 gr-blocks/include/gnuradio/blocks/multiply_const_vff.h
 delete mode 100644 gr-blocks/include/gnuradio/blocks/multiply_ff.h
 create mode 100644 gr-blocks/include/gnuradio/blocks/multiply_matrix.h
 delete mode 100644 gr-blocks/include/gnuradio/blocks/multiply_matrix_XX.h.t
 create mode 100644 gr-blocks/include/gnuradio/blocks/mute.h
 delete mode 100644 gr-blocks/include/gnuradio/blocks/mute_XX.h.t
 delete mode 100644 gr-blocks/include/gnuradio/blocks/not_XX.h.t
 create mode 100644 gr-blocks/include/gnuradio/blocks/not_blk.h
 delete mode 100644 gr-blocks/include/gnuradio/blocks/or_XX.h.t
 create mode 100644 gr-blocks/include/gnuradio/blocks/or_blk.h
 create mode 100644 gr-blocks/include/gnuradio/blocks/packed_to_unpacked.h
 delete mode 100644 gr-blocks/include/gnuradio/blocks/packed_to_unpacked_XX.h.t
 create mode 100644 gr-blocks/include/gnuradio/blocks/peak_detector.h
 delete mode 100644 gr-blocks/include/gnuradio/blocks/peak_detector_XX.h.t
 create mode 100644 gr-blocks/include/gnuradio/blocks/probe_signal.h
 delete mode 100644 gr-blocks/include/gnuradio/blocks/probe_signal_X.h.t
 create mode 100644 gr-blocks/include/gnuradio/blocks/probe_signal_v.h
 delete mode 100644 gr-blocks/include/gnuradio/blocks/probe_signal_vX.h.t
 create mode 100644 gr-blocks/include/gnuradio/blocks/sample_and_hold.h
 delete mode 100644 gr-blocks/include/gnuradio/blocks/sample_and_hold_XX.h.t
 create mode 100644 gr-blocks/include/gnuradio/blocks/sub.h
 delete mode 100644 gr-blocks/include/gnuradio/blocks/sub_XX.h.t
 delete mode 100644 gr-blocks/include/gnuradio/blocks/sub_ff.h
 create mode 100644 gr-blocks/include/gnuradio/blocks/tsb_vector_sink.h
 delete mode 100644 gr-blocks/include/gnuradio/blocks/tsb_vector_sink_X.h.t
 create mode 100644 gr-blocks/include/gnuradio/blocks/unpacked_to_packed.h
 delete mode 100644 gr-blocks/include/gnuradio/blocks/unpacked_to_packed_XX.h.t
 create mode 100644 gr-blocks/include/gnuradio/blocks/vector_insert.h
 delete mode 100644 gr-blocks/include/gnuradio/blocks/vector_insert_X.h.t
 create mode 100644 gr-blocks/include/gnuradio/blocks/vector_sink.h
 delete mode 100644 gr-blocks/include/gnuradio/blocks/vector_sink_X.h.t
 create mode 100644 gr-blocks/include/gnuradio/blocks/vector_source.h
 delete mode 100644 gr-blocks/include/gnuradio/blocks/vector_source_X.h.t
 delete mode 100644 gr-blocks/include/gnuradio/blocks/xor_XX.h.t
 create mode 100644 gr-blocks/include/gnuradio/blocks/xor_blk.h
 delete mode 100644 gr-blocks/lib/abs_XX_impl.cc.t
 delete mode 100644 gr-blocks/lib/abs_XX_impl.h.t
 create mode 100644 gr-blocks/lib/abs_blk_impl.cc
 create mode 100644 gr-blocks/lib/abs_blk_impl.h
 delete mode 100644 gr-blocks/lib/add_XX_impl.cc.t
 delete mode 100644 gr-blocks/lib/add_XX_impl.h.t
 create mode 100644 gr-blocks/lib/add_blk_impl.cc
 create mode 100644 gr-blocks/lib/add_blk_impl.h
 delete mode 100644 gr-blocks/lib/add_const_vXX_impl.cc.t
 delete mode 100644 gr-blocks/lib/add_const_vXX_impl.h.t
 create mode 100644 gr-blocks/lib/add_const_v_impl.cc
 create mode 100644 gr-blocks/lib/add_const_v_impl.h
 delete mode 100644 gr-blocks/lib/add_ff_impl.cc
 delete mode 100644 gr-blocks/lib/add_ff_impl.h
 delete mode 100644 gr-blocks/lib/and_XX_impl.cc.t
 delete mode 100644 gr-blocks/lib/and_XX_impl.h.t
 create mode 100644 gr-blocks/lib/and_blk_impl.cc
 create mode 100644 gr-blocks/lib/and_blk_impl.h
 delete mode 100644 gr-blocks/lib/and_const_XX_impl.cc.t
 delete mode 100644 gr-blocks/lib/and_const_XX_impl.h.t
 create mode 100644 gr-blocks/lib/and_const_impl.cc
 create mode 100644 gr-blocks/lib/and_const_impl.h
 delete mode 100644 gr-blocks/lib/argmax_XX_impl.cc.t
 delete mode 100644 gr-blocks/lib/argmax_XX_impl.h.t
 create mode 100644 gr-blocks/lib/argmax_impl.cc
 create mode 100644 gr-blocks/lib/argmax_impl.h
 delete mode 100644 gr-blocks/lib/divide_XX_impl.cc.t
 delete mode 100644 gr-blocks/lib/divide_XX_impl.h.t
 delete mode 100644 gr-blocks/lib/divide_cc_impl.cc
 delete mode 100644 gr-blocks/lib/divide_cc_impl.h
 delete mode 100644 gr-blocks/lib/divide_ff_impl.cc
 delete mode 100644 gr-blocks/lib/divide_ff_impl.h
 create mode 100644 gr-blocks/lib/divide_impl.cc
 create mode 100644 gr-blocks/lib/divide_impl.h
 delete mode 100644 gr-blocks/lib/integrate_XX_impl.cc.t
 delete mode 100644 gr-blocks/lib/integrate_XX_impl.h.t
 create mode 100644 gr-blocks/lib/integrate_impl.cc
 create mode 100644 gr-blocks/lib/integrate_impl.h
 delete mode 100644 gr-blocks/lib/max_XX_impl.cc.t
 delete mode 100644 gr-blocks/lib/max_XX_impl.h.t
 create mode 100644 gr-blocks/lib/max_blk_impl.cc
 create mode 100644 gr-blocks/lib/max_blk_impl.h
 delete mode 100644 gr-blocks/lib/min_XX_impl.cc.t
 delete mode 100644 gr-blocks/lib/min_XX_impl.h.t
 create mode 100644 gr-blocks/lib/min_blk_impl.cc
 create mode 100644 gr-blocks/lib/min_blk_impl.h
 delete mode 100644 gr-blocks/lib/moving_average_XX_impl.cc.t
 delete mode 100644 gr-blocks/lib/moving_average_XX_impl.h.t
 create mode 100644 gr-blocks/lib/moving_average_impl.cc
 create mode 100644 gr-blocks/lib/moving_average_impl.h
 delete mode 100644 gr-blocks/lib/multiply_XX_impl.cc.t
 delete mode 100644 gr-blocks/lib/multiply_XX_impl.h.t
 delete mode 100644 gr-blocks/lib/multiply_cc_impl.cc
 delete mode 100644 gr-blocks/lib/multiply_cc_impl.h
 delete mode 100644 gr-blocks/lib/multiply_const_XX_impl.cc.t
 delete mode 100644 gr-blocks/lib/multiply_const_XX_impl.h.t
 delete mode 100644 gr-blocks/lib/multiply_const_cc_impl.cc
 delete mode 100644 gr-blocks/lib/multiply_const_cc_impl.h
 delete mode 100644 gr-blocks/lib/multiply_const_ff_impl.cc
 delete mode 100644 gr-blocks/lib/multiply_const_ff_impl.h
 create mode 100644 gr-blocks/lib/multiply_const_impl.cc
 create mode 100644 gr-blocks/lib/multiply_const_impl.h
 delete mode 100644 gr-blocks/lib/multiply_const_vXX_impl.cc.t
 delete mode 100644 gr-blocks/lib/multiply_const_vXX_impl.h.t
 create mode 100644 gr-blocks/lib/multiply_const_v_impl.cc
 create mode 100644 gr-blocks/lib/multiply_const_v_impl.h
 delete mode 100644 gr-blocks/lib/multiply_const_vcc_impl.cc
 delete mode 100644 gr-blocks/lib/multiply_const_vcc_impl.h
 delete mode 100644 gr-blocks/lib/multiply_const_vff_impl.cc
 delete mode 100644 gr-blocks/lib/multiply_const_vff_impl.h
 delete mode 100644 gr-blocks/lib/multiply_ff_impl.cc
 delete mode 100644 gr-blocks/lib/multiply_ff_impl.h
 create mode 100644 gr-blocks/lib/multiply_impl.cc
 create mode 100644 gr-blocks/lib/multiply_impl.h
 delete mode 100644 gr-blocks/lib/multiply_matrix_cc_impl.cc
 delete mode 100644 gr-blocks/lib/multiply_matrix_cc_impl.h
 delete mode 100644 gr-blocks/lib/multiply_matrix_ff_impl.cc
 delete mode 100644 gr-blocks/lib/multiply_matrix_ff_impl.h
 create mode 100644 gr-blocks/lib/multiply_matrix_impl.cc
 create mode 100644 gr-blocks/lib/multiply_matrix_impl.h
 delete mode 100644 gr-blocks/lib/mute_XX_impl.cc.t
 delete mode 100644 gr-blocks/lib/mute_XX_impl.h.t
 create mode 100644 gr-blocks/lib/mute_impl.cc
 create mode 100644 gr-blocks/lib/mute_impl.h
 delete mode 100644 gr-blocks/lib/not_XX_impl.cc.t
 delete mode 100644 gr-blocks/lib/not_XX_impl.h.t
 create mode 100644 gr-blocks/lib/not_blk_impl.cc
 create mode 100644 gr-blocks/lib/not_blk_impl.h
 delete mode 100644 gr-blocks/lib/or_XX_impl.cc.t
 delete mode 100644 gr-blocks/lib/or_XX_impl.h.t
 create mode 100644 gr-blocks/lib/or_blk_impl.cc
 create mode 100644 gr-blocks/lib/or_blk_impl.h
 delete mode 100644 gr-blocks/lib/packed_to_unpacked_XX_impl.cc.t
 delete mode 100644 gr-blocks/lib/packed_to_unpacked_XX_impl.h.t
 create mode 100644 gr-blocks/lib/packed_to_unpacked_impl.cc
 create mode 100644 gr-blocks/lib/packed_to_unpacked_impl.h
 delete mode 100644 gr-blocks/lib/peak_detector_XX_impl.cc.t
 delete mode 100644 gr-blocks/lib/peak_detector_XX_impl.h.t
 create mode 100644 gr-blocks/lib/peak_detector_impl.cc
 create mode 100644 gr-blocks/lib/peak_detector_impl.h
 delete mode 100644 gr-blocks/lib/probe_signal_X_impl.cc.t
 delete mode 100644 gr-blocks/lib/probe_signal_X_impl.h.t
 create mode 100644 gr-blocks/lib/probe_signal_impl.cc
 create mode 100644 gr-blocks/lib/probe_signal_impl.h
 delete mode 100644 gr-blocks/lib/probe_signal_vX_impl.cc.t
 delete mode 100644 gr-blocks/lib/probe_signal_vX_impl.h.t
 create mode 100644 gr-blocks/lib/probe_signal_v_impl.cc
 create mode 100644 gr-blocks/lib/probe_signal_v_impl.h
 delete mode 100644 gr-blocks/lib/sample_and_hold_XX_impl.cc.t
 delete mode 100644 gr-blocks/lib/sample_and_hold_XX_impl.h.t
 create mode 100644 gr-blocks/lib/sample_and_hold_impl.cc
 create mode 100644 gr-blocks/lib/sample_and_hold_impl.h
 delete mode 100644 gr-blocks/lib/sub_XX_impl.cc.t
 delete mode 100644 gr-blocks/lib/sub_XX_impl.h.t
 delete mode 100644 gr-blocks/lib/sub_ff_impl.cc
 delete mode 100644 gr-blocks/lib/sub_ff_impl.h
 create mode 100644 gr-blocks/lib/sub_impl.cc
 create mode 100644 gr-blocks/lib/sub_impl.h
 delete mode 100644 gr-blocks/lib/tsb_vector_sink_X_impl.cc.t
 delete mode 100644 gr-blocks/lib/tsb_vector_sink_X_impl.h.t
 create mode 100644 gr-blocks/lib/tsb_vector_sink_impl.cc
 create mode 100644 gr-blocks/lib/tsb_vector_sink_impl.h
 delete mode 100644 gr-blocks/lib/unpacked_to_packed_XX_impl.cc.t
 delete mode 100644 gr-blocks/lib/unpacked_to_packed_XX_impl.h.t
 create mode 100644 gr-blocks/lib/unpacked_to_packed_impl.cc
 create mode 100644 gr-blocks/lib/unpacked_to_packed_impl.h
 delete mode 100644 gr-blocks/lib/vector_insert_X_impl.cc.t
 delete mode 100644 gr-blocks/lib/vector_insert_X_impl.h.t
 create mode 100644 gr-blocks/lib/vector_insert_impl.cc
 create mode 100644 gr-blocks/lib/vector_insert_impl.h
 delete mode 100644 gr-blocks/lib/vector_sink_X_impl.cc.t
 delete mode 100644 gr-blocks/lib/vector_sink_X_impl.h.t
 create mode 100644 gr-blocks/lib/vector_sink_impl.cc
 create mode 100644 gr-blocks/lib/vector_sink_impl.h
 delete mode 100644 gr-blocks/lib/vector_source_X_impl.cc.t
 delete mode 100644 gr-blocks/lib/vector_source_X_impl.h.t
 create mode 100644 gr-blocks/lib/vector_source_impl.cc
 create mode 100644 gr-blocks/lib/vector_source_impl.h
 delete mode 100644 gr-blocks/lib/xor_XX_impl.cc.t
 delete mode 100644 gr-blocks/lib/xor_XX_impl.h.t
 create mode 100644 gr-blocks/lib/xor_blk_impl.cc
 create mode 100644 gr-blocks/lib/xor_blk_impl.h

(limited to 'docs/doxygen')

diff --git a/docs/doxygen/CMakeLists.txt b/docs/doxygen/CMakeLists.txt
index 83a9ee29ed..c6d9cf92d0 100644
--- a/docs/doxygen/CMakeLists.txt
+++ b/docs/doxygen/CMakeLists.txt
@@ -45,14 +45,6 @@ if(ENABLE_GNURADIO_RUNTIME)
   list(APPEND GENERATED_DEPS pmt_generated)
 endif(ENABLE_GNURADIO_RUNTIME)
 
-if(ENABLE_GR_BLOCKS)
-  list(APPEND GENERATED_DEPS blocks_generated_includes)
-endif(ENABLE_GR_BLOCKS)
-
-if(ENABLE_GR_ANALOG)
-  list(APPEND GENERATED_DEPS analog_generated_includes)
-endif(ENABLE_GR_ANALOG)
-
 if(ENABLE_GR_DIGITAL)
   list(APPEND GENERATED_DEPS digital_generated_includes)
 endif(ENABLE_GR_DIGITAL)
diff --git a/gr-blocks/include/gnuradio/blocks/CMakeLists.txt b/gr-blocks/include/gnuradio/blocks/CMakeLists.txt
index 6f4915b9ef..e74cef627f 100644
--- a/gr-blocks/include/gnuradio/blocks/CMakeLists.txt
+++ b/gr-blocks/include/gnuradio/blocks/CMakeLists.txt
@@ -17,62 +17,48 @@
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
 
-########################################################################
-# Invoke macro to generate various headers
-########################################################################
-include(GrMiscUtils)
-GR_EXPAND_X_H(blocks abs_XX             ss ii ff)
-GR_EXPAND_X_H(blocks add_XX             ss ii cc)
-GR_EXPAND_X_H(blocks add_const_vXX      bb ss ii ff cc)
-GR_EXPAND_X_H(blocks and_XX             bb ss ii)
-GR_EXPAND_X_H(blocks and_const_XX       bb ss ii)
-GR_EXPAND_X_H(blocks argmax_XX          fs is ss)
-GR_EXPAND_X_H(blocks divide_XX          ss ii ff cc)
-GR_EXPAND_X_H(blocks integrate_XX       ss ii ff cc)
-GR_EXPAND_X_H(blocks max_XX             ss ii ff)
-GR_EXPAND_X_H(blocks min_XX             ss ii ff)
-GR_EXPAND_X_H(blocks moving_average_XX  ss ii ff cc)
-GR_EXPAND_X_H(blocks multiply_XX        ss ii)
-GR_EXPAND_X_H(blocks multiply_const_XX  ss ii)
-GR_EXPAND_X_H(blocks multiply_const_vXX ss ii)
-GR_EXPAND_X_H(blocks multiply_matrix_XX ff cc)
-GR_EXPAND_X_H(blocks mute_XX            ss ii ff cc)
-GR_EXPAND_X_H(blocks not_XX             bb ss ii)
-GR_EXPAND_X_H(blocks or_XX              bb ss ii)
-GR_EXPAND_X_H(blocks peak_detector_XX   fb ib sb)
-GR_EXPAND_X_H(blocks probe_signal_X     b s i f c)
-GR_EXPAND_X_H(blocks probe_signal_vX    b s i f c)
-GR_EXPAND_X_H(blocks sample_and_hold_XX bb ss ii ff)
-GR_EXPAND_X_H(blocks sub_XX             ss ii cc)
-GR_EXPAND_X_H(blocks tsb_vector_sink_X  b s i f c)
-GR_EXPAND_X_H(blocks xor_XX             bb ss ii)
-GR_EXPAND_X_H(blocks packed_to_unpacked_XX bb ss ii)
-GR_EXPAND_X_H(blocks unpacked_to_packed_XX bb ss ii)
-GR_EXPAND_X_H(blocks vector_insert_X    b s i f c)
-GR_EXPAND_X_H(blocks vector_sink_X      b s i f c)
-GR_EXPAND_X_H(blocks vector_source_X    b s i f c)
-
-add_custom_target(blocks_generated_includes DEPENDS
-    ${generated_includes}
-)
-
 ########################################################################
 # Install header files
 ########################################################################
 install(FILES
-    ${generated_includes}
+    abs_blk.h
+    add_blk.h
+    add_const_v.h
+    and_blk.h
     api.h
+    argmax.h
     control_loop.h
     count_bits.h
+    divide.h
     file_sink_base.h
+    integrate.h
     lfsr_15_1_0.h
     lfsr_32k.h
     log2_const.h
+    max_blk.h
+    min_blk.h
+    moving_average.h
+    multiply.h
+    multiply_const.h
+    multiply_matrix.h
+    mute.h
+    not_blk.h
     pack_k_bits.h
+    packed_to_unpacked.h
+    peak_detector.h
+    probe_signal.h
+    probe_signal_v.h
     rotator.h
+    sample_and_hold.h
+    sub.h
+    tsb_vector_sink.h
     unpack_k_bits.h
+    unpacked_to_packed.h
+    vector_insert.h
+    vector_sink.h
+    vector_source.h
     wavfile.h
-    add_ff.h
+    xor_blk.h
     add_const_bb.h
     add_const_ss.h
     add_const_ii.h
@@ -123,18 +109,14 @@ install(FILES
     message_debug.h
     message_strobe.h
     message_strobe_random.h
-    multiply_cc.h
-    multiply_ff.h
     multiply_conjugate_cc.h
-    multiply_const_cc.h
-    multiply_const_vcc.h
-    multiply_const_ff.h
-    multiply_const_vff.h
+    multiply_const_v.h
     multiply_by_tag_value_cc.h
     nlog10_ff.h
     nop.h
     null_sink.h
     null_source.h
+    or_blk.h
     pack_k_bits_bb.h
     patterned_interleaver.h
     pdu.h
@@ -163,7 +145,6 @@ install(FILES
     streams_to_stream.h
     streams_to_vector.h
     stretch_ff.h
-    sub_ff.h
     tag_debug.h
     tag_gate.h
     tag_share.h
diff --git a/gr-blocks/include/gnuradio/blocks/abs_XX.h.t b/gr-blocks/include/gnuradio/blocks/abs_XX.h.t
deleted file mode 100644
index 541716296f..0000000000
--- a/gr-blocks/include/gnuradio/blocks/abs_XX.h.t
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/sync_block.h>
-
-namespace gr {
-  namespace blocks {
-
-    /*!
-     * \brief output[m] = abs(input[m]) for all M streams.
-     * \ingroup boolean_operators_blk
-     *
-     * \details
-     * absolute value of data stream (Strip sign)
-     */
-    class BLOCKS_API @NAME@ : virtual public sync_block
-    {
-
-    public:
-
-      // gr::blocks::@NAME@::sptr
-      typedef boost::shared_ptr<@NAME@> sptr;
-
-      /*!
-       * \brief Create an instance of @NAME@
-       */
-      static sptr make(size_t vlen=1);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-blocks/include/gnuradio/blocks/abs_blk.h b/gr-blocks/include/gnuradio/blocks/abs_blk.h
new file mode 100644
index 0000000000..83e3307e50
--- /dev/null
+++ b/gr-blocks/include/gnuradio/blocks/abs_blk.h
@@ -0,0 +1,62 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef ABS_BLK_H
+#define ABS_BLK_H
+
+#include <gnuradio/blocks/api.h>
+#include <gnuradio/sync_block.h>
+#include <cstdint>
+
+namespace gr {
+  namespace blocks {
+
+    /*!
+     * \brief output[m] = abs(input[m]) for all M streams.
+     * \ingroup boolean_operators_blk
+     *
+     * \details
+     * absolute value of data stream (Strip sign)
+     */
+template<class T>
+    class BLOCKS_API abs_blk : virtual public sync_block
+    {
+
+    public:
+
+      // gr::blocks::abs_blk::sptr
+      typedef boost::shared_ptr< abs_blk<T> > sptr;
+
+      /*!
+       * \brief Create an instance of abs_blk
+       */
+      static sptr make(size_t vlen=1);
+    };
+
+typedef abs_blk<std::int16_t> abs_ss;
+typedef abs_blk<std::int32_t> abs_ii;
+typedef abs_blk<float> abs_ff;
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* ABS_BLK_H */
diff --git a/gr-blocks/include/gnuradio/blocks/add_XX.h.t b/gr-blocks/include/gnuradio/blocks/add_XX.h.t
deleted file mode 100644
index 0a7195d7c3..0000000000
--- a/gr-blocks/include/gnuradio/blocks/add_XX.h.t
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2009,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/sync_block.h>
-
-namespace gr {
-  namespace blocks {
-
-    /*!
-     * \brief output = sum(input[0], input[1], ..., input[M-1])
-     * \ingroup math_operators_blk
-     *
-     * \details
-     * Add samples across all input streams. For all \f$n\f$ samples
-     * on all \f$M\f$ input streams \f$x_m\f$:
-     *
-     * \f[
-     *   y[n] = \sum_{m=0}^{M-1} x_m[n]
-     * \f]
-     */
-    class BLOCKS_API @NAME@ : virtual public sync_block
-    {
-    public:
-
-      // gr::blocks::@NAME@::sptr
-      typedef boost::shared_ptr<@NAME@> sptr;
-
-      static sptr make(size_t vlen=1);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-blocks/include/gnuradio/blocks/add_blk.h b/gr-blocks/include/gnuradio/blocks/add_blk.h
new file mode 100644
index 0000000000..40408f7836
--- /dev/null
+++ b/gr-blocks/include/gnuradio/blocks/add_blk.h
@@ -0,0 +1,64 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2009,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef ADD_BLK_H
+#define ADD_BLK_H
+
+#include <gnuradio/blocks/api.h>
+#include <gnuradio/sync_block.h>
+#include <cstdint>
+
+namespace gr {
+  namespace blocks {
+
+    /*!
+     * \brief output = sum(input[0], input[1], ..., input[M-1])
+     * \ingroup math_operators_blk
+     *
+     * \details
+     * Add samples across all input streams. For all \f$n\f$ samples
+     * on all \f$M\f$ input streams \f$x_m\f$:
+     *
+     * \f[
+     *   y[n] = \sum_{m=0}^{M-1} x_m[n]
+     * \f]
+     */
+template<class T>
+    class BLOCKS_API add_blk : virtual public sync_block
+    {
+    public:
+
+      // gr::blocks::add_blk::sptr
+      typedef boost::shared_ptr< add_blk<T> > sptr;
+
+      static sptr make(size_t vlen=1);
+    };
+
+typedef add_blk<std::int16_t> add_ss;
+typedef add_blk<std::int32_t> add_ii;
+typedef add_blk<gr_complex> add_cc;
+typedef add_blk<float> add_ff;
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* ADD_BLK_H */
diff --git a/gr-blocks/include/gnuradio/blocks/add_const_v.h b/gr-blocks/include/gnuradio/blocks/add_const_v.h
new file mode 100644
index 0000000000..f33393c668
--- /dev/null
+++ b/gr-blocks/include/gnuradio/blocks/add_const_v.h
@@ -0,0 +1,71 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2006,2010,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef ADD_CONST_V_H
+#define ADD_CONST_V_H
+
+#include <gnuradio/blocks/api.h>
+#include <gnuradio/sync_block.h>
+#include <cstdint>
+
+namespace gr {
+  namespace blocks {
+
+    /*!
+     * \brief output[m] = input[m] + constant vector for all M streams.
+     * \ingroup math_operators_blk
+     */
+    template <class T>
+    class BLOCKS_API add_const_v : virtual public sync_block
+    {
+
+    public:
+
+      typedef boost::shared_ptr<add_const_v <T> > sptr;
+
+      /*!
+       * \brief Create an instance of add_const_v
+       * \param k additive constant vector
+       */
+      static sptr make(std::vector<T> k);
+
+      /*!
+       * \brief Return additive constant vector
+       */
+      virtual std::vector<T> k() const = 0;
+
+      /*!
+       * \brief Set additive constant vector
+       */
+      virtual void set_k(std::vector<T> k) = 0;
+    };
+
+    typedef add_const_v<std::uint8_t> add_const_vbb;
+    typedef add_const_v<std::int16_t> add_const_vss;
+    typedef add_const_v<std::int32_t> add_const_vii;
+    typedef add_const_v<float> add_const_vff;
+    typedef add_const_v<gr_complex> add_const_vcc;
+
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* ADD_CONST_V_H */
diff --git a/gr-blocks/include/gnuradio/blocks/add_const_vXX.h.t b/gr-blocks/include/gnuradio/blocks/add_const_vXX.h.t
deleted file mode 100644
index 55b8ce3f73..0000000000
--- a/gr-blocks/include/gnuradio/blocks/add_const_vXX.h.t
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2006,2010,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/sync_block.h>
-
-namespace gr {
-  namespace blocks {
-
-    /*!
-     * \brief output[m] = input[m] + constant vector for all M streams.
-     * \ingroup math_operators_blk
-     */
-    class BLOCKS_API @NAME@ : virtual public sync_block
-    {
-
-    public:
-
-      // gr::blocks::@NAME@::sptr
-      typedef boost::shared_ptr<@NAME@> sptr;
-
-      /*!
-       * \brief Create an instance of @NAME@
-       * \param k additive constant vector
-       */
-      static sptr make(std::vector<@O_TYPE@> k);
-
-      /*!
-       * \brief Return additive constant vector
-       */
-      virtual std::vector<@O_TYPE@> k() const = 0;
-
-      /*!
-       * \brief Set additive constant vector
-       */
-      virtual void set_k(std::vector<@O_TYPE@> k) = 0;
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-blocks/include/gnuradio/blocks/add_ff.h b/gr-blocks/include/gnuradio/blocks/add_ff.h
deleted file mode 100644
index ea56677757..0000000000
--- a/gr-blocks/include/gnuradio/blocks/add_ff.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_BLOCKS_ADD_FF_H
-#define INCLUDED_BLOCKS_ADD_FF_H
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/sync_block.h>
-
-namespace gr {
-  namespace blocks {
-
-    /*!
-     * \brief output = sum (input_0, input_1, ...)
-     * \ingroup math_operators_blk
-     *
-     * \details
-     * Add across all input streams.
-     */
-    class BLOCKS_API add_ff : virtual public sync_block
-    {
-    public:
-
-      // gr::blocks::add_ff::sptr
-      typedef boost::shared_ptr<add_ff> sptr;
-
-      /*!
-       * \brief Add streams of float values
-       * \param vlen Vector length
-       * \ingroup math_blk
-       */
-      static sptr make(size_t vlen=1);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* INCLUDED_BLOCKS_ADD_FF_H */
diff --git a/gr-blocks/include/gnuradio/blocks/and_XX.h.t b/gr-blocks/include/gnuradio/blocks/and_XX.h.t
deleted file mode 100644
index cf2b1ab488..0000000000
--- a/gr-blocks/include/gnuradio/blocks/and_XX.h.t
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/sync_block.h>
-
-namespace gr {
-  namespace blocks {
-
-    /*!
-     * \brief output = input[0] & input[1] & ... & input[M-1]
-     * \ingroup boolean_operators_blk
-     *
-     * \details
-     * bitwise boolean AND across all input streams.
-     */
-    class BLOCKS_API @NAME@ : virtual public sync_block
-    {
-    public:
-
-      // gr::blocks::@NAME@::sptr
-      typedef boost::shared_ptr<@NAME@> sptr;
-
-      static sptr make(size_t vlen=1);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-blocks/include/gnuradio/blocks/and_blk.h b/gr-blocks/include/gnuradio/blocks/and_blk.h
new file mode 100644
index 0000000000..d24781b0f4
--- /dev/null
+++ b/gr-blocks/include/gnuradio/blocks/and_blk.h
@@ -0,0 +1,58 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef AND_BLK_H
+#define AND_BLK_H
+
+#include <gnuradio/blocks/api.h>
+#include <gnuradio/sync_block.h>
+#include <cstdint>
+
+namespace gr {
+  namespace blocks {
+
+    /*!
+     * \brief output = input[0] & input[1] & ... & input[M-1]
+     * \ingroup boolean_operators_blk
+     *
+     * \details
+     * bitwise boolean AND across all input streams.
+     */
+template<class T>
+    class BLOCKS_API and_blk : virtual public sync_block
+    {
+    public:
+
+      // gr::blocks::and_blk::sptr
+      typedef boost::shared_ptr< and_blk<T> > sptr;
+
+      static sptr make(size_t vlen=1);
+    };
+
+typedef and_blk<std::uint8_t> and_bb;
+typedef and_blk<std::int16_t> and_ss;
+typedef and_blk<std::int32_t> and_ii;
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* AND_BLK_H */
diff --git a/gr-blocks/include/gnuradio/blocks/and_const.h b/gr-blocks/include/gnuradio/blocks/and_const.h
new file mode 100644
index 0000000000..dbc664d170
--- /dev/null
+++ b/gr-blocks/include/gnuradio/blocks/and_const.h
@@ -0,0 +1,73 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef AND_CONST_H
+#define AND_CONST_H
+
+#include <gnuradio/blocks/api.h>
+#include <gnuradio/sync_block.h>
+#include <cstdint>
+
+namespace gr {
+  namespace blocks {
+
+    /*!
+     * \brief output[m] = input[m] & value for all M streams.
+     * \ingroup boolean_operators_blk
+     *
+     * \details
+     * Bitwise boolean AND of constant \p k with the data stream.
+     */
+template<class T>
+    class BLOCKS_API and_const : virtual public sync_block
+    {
+
+    public:
+
+      // gr::blocks::and_const::sptr
+      typedef boost::shared_ptr< and_const<T> > sptr;
+
+      /*!
+       * \brief Create an instance of and_const
+       * \param k AND constant
+       */
+      static sptr make(T k);
+
+      /*!
+       * \brief Return AND constant
+       */
+      virtual T k() const = 0;
+
+      /*!
+       * \brief Set AND constant
+       */
+      virtual void set_k(T k) = 0;
+    };
+
+typedef and_const<std::uint8_t> and_const_bb;
+typedef and_const<std::int16_t> and_const_ss;
+typedef and_const<std::int32_t> and_const_ii;
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* AND_CONST_H */
diff --git a/gr-blocks/include/gnuradio/blocks/and_const_XX.h.t b/gr-blocks/include/gnuradio/blocks/and_const_XX.h.t
deleted file mode 100644
index ee2ff3da20..0000000000
--- a/gr-blocks/include/gnuradio/blocks/and_const_XX.h.t
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/sync_block.h>
-
-namespace gr {
-  namespace blocks {
-
-    /*!
-     * \brief output[m] = input[m] & value for all M streams.
-     * \ingroup boolean_operators_blk
-     *
-     * \details
-     * Bitwise boolean AND of constant \p k with the data stream.
-     */
-    class BLOCKS_API @NAME@ : virtual public sync_block
-    {
-
-    public:
-
-      // gr::blocks::@NAME@::sptr
-      typedef boost::shared_ptr<@NAME@> sptr;
-
-      /*!
-       * \brief Create an instance of @NAME@
-       * \param k AND constant
-       */
-      static sptr make(@O_TYPE@ k);
-
-      /*!
-       * \brief Return AND constant
-       */
-      virtual @O_TYPE@ k() const = 0;
-
-      /*!
-       * \brief Set AND constant
-       */
-      virtual void set_k(@O_TYPE@ k) = 0;
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-blocks/include/gnuradio/blocks/argmax.h b/gr-blocks/include/gnuradio/blocks/argmax.h
new file mode 100644
index 0000000000..fe4d750e7b
--- /dev/null
+++ b/gr-blocks/include/gnuradio/blocks/argmax.h
@@ -0,0 +1,65 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007,2013,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef ARGMAX_H
+#define ARGMAX_H
+
+#include <gnuradio/blocks/api.h>
+#include <gnuradio/sync_block.h>
+#include <cstdint>
+
+namespace gr {
+  namespace blocks {
+
+    /*!
+     * \brief Compares vectors from multiple streams and determines
+     * the index in the vector and stream number where the maximum
+     * value occurred.
+     * \ingroup math_operators_blk
+     *
+     * \details
+     * Data is passed in as a vector of length \p vlen from multiple
+     * input sources. It will look through these streams of \p vlen
+     * data items and output two streams:
+     *
+     * \li Stream 0 will contain the index value in the vector where
+     *     the maximum value occurred.
+     *
+     * \li Stream 1 will contain the number of the input stream that
+     *     held the maximum value.
+     */
+    template <class T>
+    class BLOCKS_API argmax : virtual public sync_block
+    {
+    public:
+      typedef boost::shared_ptr< argmax<T> > sptr;
+
+      static sptr make(size_t vlen);
+    };
+
+    typedef argmax<float> argmax_fs;
+    typedef argmax<std::int32_t> argmax_is;
+    typedef argmax<std::int16_t> argmax_ss;
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* ARGMAX_H */
diff --git a/gr-blocks/include/gnuradio/blocks/argmax_XX.h.t b/gr-blocks/include/gnuradio/blocks/argmax_XX.h.t
deleted file mode 100644
index ca0243b6dc..0000000000
--- a/gr-blocks/include/gnuradio/blocks/argmax_XX.h.t
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007,2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/sync_block.h>
-
-namespace gr {
-  namespace blocks {
-
-    /*!
-     * \brief Compares vectors from multiple streams and determines
-     * the index in the vector and stream number where the maximum
-     * value occurred.
-     * \ingroup math_operators_blk
-     *
-     * \details
-     * Data is passed in as a vector of length \p vlen from multiple
-     * input sources. It will look through these streams of \p vlen
-     * data items and output two streams:
-     *
-     * \li Stream 0 will contain the index value in the vector where
-     *     the maximum value occurred.
-     *
-     * \li Stream 1 will contain the number of the input stream that
-     *     held the maximum value.
-     */
-    class BLOCKS_API @NAME@ : virtual public sync_block
-    {
-    public:
-      // gr::blocks::@NAME@::sptr
-      typedef boost::shared_ptr<@NAME@> sptr;
-
-      static sptr make(size_t vlen);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-blocks/include/gnuradio/blocks/divide.h b/gr-blocks/include/gnuradio/blocks/divide.h
new file mode 100644
index 0000000000..0ad62e50b4
--- /dev/null
+++ b/gr-blocks/include/gnuradio/blocks/divide.h
@@ -0,0 +1,59 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2009,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef DIVIDE_H
+#define DIVIDE_H
+
+#include <gnuradio/blocks/api.h>
+#include <gnuradio/sync_block.h>
+#include <cstdint>
+
+namespace gr {
+  namespace blocks {
+
+    /*!
+     * \brief output = input[0] / input[1] / ... / input[M-1]
+     * \ingroup math_operators_blk
+     *
+     * \details
+     * Divide across all input streams.
+     */
+template<class T>
+    class BLOCKS_API divide : virtual public sync_block
+    {
+    public:
+
+      // gr::blocks::divide::sptr
+      typedef boost::shared_ptr< divide<T> > sptr;
+
+      static sptr make(size_t vlen=1);
+    };
+
+typedef divide<std::int16_t> divide_ss;
+typedef divide<std::int32_t> divide_ii;
+typedef divide<float> divide_ff;
+typedef divide<gr_complex> divide_cc;
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* DIVIDE_H */
diff --git a/gr-blocks/include/gnuradio/blocks/divide_XX.h.t b/gr-blocks/include/gnuradio/blocks/divide_XX.h.t
deleted file mode 100644
index 1ceeb5f1df..0000000000
--- a/gr-blocks/include/gnuradio/blocks/divide_XX.h.t
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2009,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/sync_block.h>
-
-namespace gr {
-  namespace blocks {
-
-    /*!
-     * \brief output = input[0] / input[1] / ... / input[M-1]
-     * \ingroup math_operators_blk
-     *
-     * \details
-     * Divide across all input streams.
-     */
-    class BLOCKS_API @NAME@ : virtual public sync_block
-    {
-    public:
-
-      // gr::blocks::@NAME@::sptr
-      typedef boost::shared_ptr<@NAME@> sptr;
-
-      static sptr make(size_t vlen=1);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-blocks/include/gnuradio/blocks/integrate.h b/gr-blocks/include/gnuradio/blocks/integrate.h
new file mode 100644
index 0000000000..b10c6595eb
--- /dev/null
+++ b/gr-blocks/include/gnuradio/blocks/integrate.h
@@ -0,0 +1,56 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2009,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef INTEGRATE_H
+#define INTEGRATE_H
+
+#include <gnuradio/blocks/api.h>
+#include <gnuradio/sync_decimator.h>
+#include <cstdint>
+
+namespace gr {
+  namespace blocks {
+
+    /*!
+     * \brief Integrate successive samples and decimate
+     * \ingroup math_operators_blk
+     */
+template<class T>
+    class BLOCKS_API integrate : virtual public sync_decimator
+    {
+    public:
+
+      // gr::blocks::integrate::sptr
+      typedef boost::shared_ptr< integrate<T> > sptr;
+
+      static sptr make(int decim, int vlen = 1);
+    };
+
+typedef integrate<std::int16_t> integrate_ss;
+typedef integrate<std::int32_t> integrate_ii;
+typedef integrate<float> integrate_ff;
+typedef integrate<gr_complex> integrate_cc;
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* INTEGRATE_H */
diff --git a/gr-blocks/include/gnuradio/blocks/integrate_XX.h.t b/gr-blocks/include/gnuradio/blocks/integrate_XX.h.t
deleted file mode 100644
index 7ec1176558..0000000000
--- a/gr-blocks/include/gnuradio/blocks/integrate_XX.h.t
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2009,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/sync_decimator.h>
-
-namespace gr {
-  namespace blocks {
-
-    /*!
-     * \brief Integrate successive samples and decimate
-     * \ingroup math_operators_blk
-     */
-    class BLOCKS_API @NAME@ : virtual public sync_decimator
-    {
-    public:
-
-      // gr::blocks::@NAME@::sptr
-      typedef boost::shared_ptr<@NAME@> sptr;
-
-      static sptr make(int decim, int vlen = 1);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-blocks/include/gnuradio/blocks/max_XX.h.t b/gr-blocks/include/gnuradio/blocks/max_XX.h.t
deleted file mode 100644
index 6168769d61..0000000000
--- a/gr-blocks/include/gnuradio/blocks/max_XX.h.t
+++ /dev/null
@@ -1,61 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2014,2015 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/sync_block.h>
-
-namespace gr {
-  namespace blocks {
-
-    /*!
-     * \brief Compares vectors from multiple streams and determines
-     * the maximum value from each vector over all streams.
-     * \ingroup math_operators_blk
-     *
-     * \details
-     * Data is passed in as a vector of length \p vlen from multiple
-     * input sources.  If vlen_out == 1 then 
-     * It will look through these streams of \p vlen
-     * data items and the output stream will contain the maximum value
-     * in the vector.
-     * If vlen_out == vlen and not equal to 1 then
-     * output will be a vector with individual items selected from
-     * the maximum corresponding input vector items.
-     */
-    class BLOCKS_API @NAME@ : virtual public sync_block
-    {
-    public:
-      // gr::blocks::@NAME@::sptr
-      typedef boost::shared_ptr<@NAME@> sptr;
-
-      static sptr make(size_t vlen, size_t vlen_out = 1);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-blocks/include/gnuradio/blocks/max_blk.h b/gr-blocks/include/gnuradio/blocks/max_blk.h
new file mode 100644
index 0000000000..dcdc3204d1
--- /dev/null
+++ b/gr-blocks/include/gnuradio/blocks/max_blk.h
@@ -0,0 +1,65 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014,2015,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef MAX_BLK_H
+#define MAX_BLK_H
+
+#include <gnuradio/blocks/api.h>
+#include <gnuradio/sync_block.h>
+#include <cstdint>
+
+namespace gr {
+  namespace blocks {
+
+    /*!
+     * \brief Compares vectors from multiple streams and determines
+     * the maximum value from each vector over all streams.
+     * \ingroup math_operators_blk
+     *
+     * \details
+     * Data is passed in as a vector of length \p vlen from multiple
+     * input sources.  If vlen_out == 1 then
+     * It will look through these streams of \p vlen
+     * data items and the output stream will contain the maximum value
+     * in the vector.
+     * If vlen_out == vlen and not equal to 1 then
+     * output will be a vector with individual items selected from
+     * the maximum corresponding input vector items.
+     */
+template<class T>
+    class BLOCKS_API max_blk : virtual public sync_block
+    {
+    public:
+      // gr::blocks::max_blk::sptr
+      typedef boost::shared_ptr< max_blk<T> > sptr;
+
+      static sptr make(size_t vlen, size_t vlen_out = 1);
+    };
+
+typedef max_blk<std::int16_t> max_ss;
+typedef max_blk<std::int32_t> max_ii;
+typedef max_blk<float> max_ff;
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* MAX_BLK_H */
diff --git a/gr-blocks/include/gnuradio/blocks/min_XX.h.t b/gr-blocks/include/gnuradio/blocks/min_XX.h.t
deleted file mode 100644
index 3f8e6392d3..0000000000
--- a/gr-blocks/include/gnuradio/blocks/min_XX.h.t
+++ /dev/null
@@ -1,61 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2014,2015 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/sync_block.h>
-
-namespace gr {
-  namespace blocks {
-
-    /*!
-     * \brief Compares vectors from multiple streams and determines
-     * the minimum value from each vector over all streams.
-     * \ingroup math_operators_blk
-     *
-     * \details
-     * Data is passed in as a vector of length \p vlen from multiple
-     * input sources.  If vlen_out == 1 then 
-     * It will look through these streams of \p vlen
-     * data items and the output stream will contain the minimum value
-     * in the vector.
-     * If vlen_out == vlen and not equal to 1 then
-     * output will be a vector with individual items selected from
-     * the minimum corresponding input vector items.
-     */
-    class BLOCKS_API @NAME@ : virtual public sync_block
-    {
-    public:
-      // gr::blocks::@NAME@::sptr
-      typedef boost::shared_ptr<@NAME@> sptr;
-
-      static sptr make(size_t vlen, size_t vlen_out = 1);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-blocks/include/gnuradio/blocks/min_blk.h b/gr-blocks/include/gnuradio/blocks/min_blk.h
new file mode 100644
index 0000000000..29dc75ae18
--- /dev/null
+++ b/gr-blocks/include/gnuradio/blocks/min_blk.h
@@ -0,0 +1,64 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014,2015,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef MIN_BLK_H
+#define MIN_BLK_H
+
+#include <gnuradio/blocks/api.h>
+#include <gnuradio/sync_block.h>
+#include <cstdint>
+
+namespace gr {
+  namespace blocks {
+
+    /*!
+     * \brief Compares vectors from multiple streams and determines
+     * the minimum value from each vector over all streams.
+     * \ingroup math_operators_blk
+     *
+     * \details
+     * Data is passed in as a vector of length \p vlen from multiple
+     * input sources.  If vlen_out == 1 then
+     * It will look through these streams of \p vlen
+     * data items and the output stream will contain the minimum value
+     * in the vector.
+     * If vlen_out == vlen and not equal to 1 then
+     * output will be a vector with individual items selected from
+     * the minimum corresponding input vector items.
+     */
+template<class T>
+    class BLOCKS_API min_blk : virtual public sync_block
+    {
+    public:
+      typedef boost::shared_ptr< min_blk<T> > sptr;
+
+      static sptr make(size_t vlen, size_t vlen_out = 1);
+    };
+
+typedef min_blk<std::int16_t> min_ss;
+typedef min_blk<std::int32_t> min_ii;
+typedef min_blk<float> min_ff;
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* MIN_BLK_H */
diff --git a/gr-blocks/include/gnuradio/blocks/moving_average.h b/gr-blocks/include/gnuradio/blocks/moving_average.h
new file mode 100644
index 0000000000..8448c45ded
--- /dev/null
+++ b/gr-blocks/include/gnuradio/blocks/moving_average.h
@@ -0,0 +1,91 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008,2013,2017,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef MOVING_AVERAGE_H
+#define MOVING_AVERAGE_H
+
+#include <gnuradio/blocks/api.h>
+#include <gnuradio/sync_block.h>
+#include <cstdint>
+
+namespace gr {
+  namespace blocks {
+
+    /*!
+     * \brief output is the moving sum of the last N samples, scaled by the scale factor
+     * \ingroup level_controllers_blk
+     */
+template<class T>
+    class BLOCKS_API moving_average : virtual public sync_block
+    {
+    public:
+      // gr::blocks::moving_average::sptr
+      typedef boost::shared_ptr< moving_average<T> > sptr;
+
+      /*!
+       * Create a moving average block.
+       *
+       * \param length Number of samples to use in the average.
+       * \param scale scale factor for the result.
+       * \param max_iter limits how long we go without flushing the accumulator
+       *        This is necessary to avoid numerical instability for float and complex.
+       * \param vlen When > 1, do a per-vector-element moving average
+       */
+      static sptr make(int length, T scale,
+                       int max_iter = 4096,
+                       unsigned int vlen = 1);
+
+      /*!
+       * Get the length used in the avaraging calculation.
+       */
+      virtual int length() const = 0;
+
+      /*!
+       * Get the scale factor being used.
+       */
+      virtual T scale() const = 0;
+
+      /*!
+       * Set both the length and the scale factor together.
+       */
+      virtual void set_length_and_scale(int length, T scale) = 0;
+
+      /*!
+       * Set the length.
+       */
+      virtual void set_length(int length) = 0;
+
+      /*!
+       * Set the scale factor.
+       */
+      virtual void set_scale(T scale) = 0;
+    };
+
+typedef moving_average<std::int16_t> moving_average_ss;
+typedef moving_average<std::int32_t> moving_average_ii;
+typedef moving_average<float> moving_average_ff;
+typedef moving_average<gr_complex> moving_average_cc;
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* MOVING_AVERAGE_H */
diff --git a/gr-blocks/include/gnuradio/blocks/moving_average_XX.h.t b/gr-blocks/include/gnuradio/blocks/moving_average_XX.h.t
deleted file mode 100644
index deabf31832..0000000000
--- a/gr-blocks/include/gnuradio/blocks/moving_average_XX.h.t
+++ /dev/null
@@ -1,86 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2008,2013,2017 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/sync_block.h>
-
-namespace gr {
-  namespace blocks {
-
-    /*!
-     * \brief output is the moving sum of the last N samples, scaled by the scale factor
-     * \ingroup level_controllers_blk
-     */
-    class BLOCKS_API @NAME@ : virtual public sync_block
-    {
-    public:
-      // gr::blocks::@NAME@::sptr
-      typedef boost::shared_ptr<@NAME@> sptr;
-
-      /*!
-       * Create a moving average block.
-       *
-       * \param length Number of samples to use in the average.
-       * \param scale scale factor for the result.
-       * \param max_iter limits how long we go without flushing the accumulator
-       *        This is necessary to avoid numerical instability for float and complex.
-       * \param vlen When > 1, do a per-vector-element moving average
-       */
-      static sptr make(int length, @O_TYPE@ scale,
-                       int max_iter = 4096,
-                       unsigned int vlen = 1);
-
-      /*!
-       * Get the length used in the avaraging calculation.
-       */
-      virtual int length() const = 0;
-
-      /*!
-       * Get the scale factor being used.
-       */
-      virtual @O_TYPE@ scale() const = 0;
-
-      /*!
-       * Set both the length and the scale factor together.
-       */
-      virtual void set_length_and_scale(int length, @O_TYPE@ scale) = 0;
-
-      /*!
-       * Set the length.
-       */
-      virtual void set_length(int length) = 0;
-
-      /*!
-       * Set the scale factor.
-       */
-      virtual void set_scale(@O_TYPE@ scale) = 0;
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-blocks/include/gnuradio/blocks/multiply.h b/gr-blocks/include/gnuradio/blocks/multiply.h
new file mode 100644
index 0000000000..06bda22cbf
--- /dev/null
+++ b/gr-blocks/include/gnuradio/blocks/multiply.h
@@ -0,0 +1,59 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004, 2009, 2012, 2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef MULTIPLY_H
+#define MULTIPLY_H
+
+#include <gnuradio/blocks/api.h>
+#include <gnuradio/sync_block.h>
+#include <cstdint>
+
+namespace gr {
+  namespace blocks {
+
+    /*!
+     * \brief output = prod (input_0, input_1, ...)
+     * \ingroup math_operators_blk
+     *
+     * \details
+     * Multiply across all input streams.
+     */
+template<class T>
+    class BLOCKS_API multiply : virtual public sync_block
+    {
+    public:
+
+      // gr::blocks::multiply::sptr
+      typedef boost::shared_ptr< multiply<T> > sptr;
+
+      static sptr make(size_t vlen=1);
+    };
+
+typedef multiply<std::int16_t> multiply_ss;
+typedef multiply<std::int32_t> multiply_ii;
+typedef multiply<float> multiply_ff;
+typedef multiply<gr_complex> multiply_cc;
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* MULTIPLY_H */
diff --git a/gr-blocks/include/gnuradio/blocks/multiply_XX.h.t b/gr-blocks/include/gnuradio/blocks/multiply_XX.h.t
deleted file mode 100644
index 1071b5b5c5..0000000000
--- a/gr-blocks/include/gnuradio/blocks/multiply_XX.h.t
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004, 2009, 2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/sync_block.h>
-
-namespace gr {
-  namespace blocks {
-
-    /*!
-     * \brief output = prod (input_0, input_1, ...)
-     * \ingroup math_operators_blk
-     *
-     * \details
-     * Multiply across all input streams.
-     */
-    class BLOCKS_API @NAME@ : virtual public sync_block
-    {
-    public:
-
-      // gr::blocks::@NAME@::sptr
-      typedef boost::shared_ptr<@NAME@> sptr;
-
-      static sptr make(size_t vlen=1);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-blocks/include/gnuradio/blocks/multiply_cc.h b/gr-blocks/include/gnuradio/blocks/multiply_cc.h
deleted file mode 100644
index 9adf7d07ff..0000000000
--- a/gr-blocks/include/gnuradio/blocks/multiply_cc.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_GR_MULTIPLY_CC_H
-#define INCLUDED_GR_MULTIPLY_CC_H
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/sync_block.h>
-
-namespace gr {
-  namespace blocks {
-
-    /*!
-     * \brief output = prod (input_0, input_1, ...)
-     * \ingroup math_operators_blk
-     *
-     * \details
-     * Multiply across all input streams.
-     */
-    class BLOCKS_API multiply_cc : virtual public sync_block
-    {
-    public:
-
-      // gr::blocks::multiply_cc::sptr
-      typedef boost::shared_ptr<multiply_cc> sptr;
-
-      /*!
-       * \brief Multiply streams of complex values
-       * \param vlen Vector length
-       * \ingroup math_blk
-       */
-      static sptr make(size_t vlen=1);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* INCLUDED_BLOCKS_MULTIPLY_CC_H */
diff --git a/gr-blocks/include/gnuradio/blocks/multiply_const.h b/gr-blocks/include/gnuradio/blocks/multiply_const.h
new file mode 100644
index 0000000000..c09f3ae79a
--- /dev/null
+++ b/gr-blocks/include/gnuradio/blocks/multiply_const.h
@@ -0,0 +1,71 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef MULTIPLY_CONST_H
+#define MULTIPLY_CONST_H
+
+#include <gnuradio/blocks/api.h>
+#include <gnuradio/sync_block.h>
+#include <cstdint>
+
+namespace gr {
+  namespace blocks {
+
+    /*!
+     * \brief output = input * constant
+     * \ingroup math_operators_blk
+     */
+template<class T>
+    class BLOCKS_API multiply_const : virtual public sync_block
+    {
+
+    public:
+
+      // gr::blocks::multiply_const::sptr
+      typedef boost::shared_ptr< multiply_const<T> > sptr;
+
+      /*!
+       * \brief Create an instance of multiply_const
+       * \param k multiplicative constant
+       */
+      static sptr make(T k);
+
+      /*!
+       * \brief Return multiplicative constant
+       */
+      virtual T k() const = 0;
+
+      /*!
+       * \brief Set multiplicative constant
+       */
+      virtual void set_k(T k) = 0;
+    };
+
+typedef multiply_const<std::int16_t> multiply_const_ss;
+typedef multiply_const<std::int32_t> multiply_const_ii;
+typedef multiply_const<float> multiply_const_ff;
+typedef multiply_const<gr_complex> multiply_const_cc;
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* MULTIPLY_CONST_H */
diff --git a/gr-blocks/include/gnuradio/blocks/multiply_const_XX.h.t b/gr-blocks/include/gnuradio/blocks/multiply_const_XX.h.t
deleted file mode 100644
index 9cb2823f46..0000000000
--- a/gr-blocks/include/gnuradio/blocks/multiply_const_XX.h.t
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/sync_block.h>
-
-namespace gr {
-  namespace blocks {
-
-    /*!
-     * \brief output = input * constant
-     * \ingroup math_operators_blk
-     */
-    class BLOCKS_API @NAME@ : virtual public sync_block
-    {
-
-    public:
-
-      // gr::blocks::@NAME@::sptr
-      typedef boost::shared_ptr<@NAME@> sptr;
-
-      /*!
-       * \brief Create an instance of @NAME@
-       * \param k multiplicative constant
-       */
-      static sptr make(@O_TYPE@ k);
-
-      /*!
-       * \brief Return multiplicative constant
-       */
-      virtual @O_TYPE@ k() const = 0;
-
-      /*!
-       * \brief Set multiplicative constant
-       */
-      virtual void set_k(@O_TYPE@ k) = 0;
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME */
diff --git a/gr-blocks/include/gnuradio/blocks/multiply_const_cc.h b/gr-blocks/include/gnuradio/blocks/multiply_const_cc.h
deleted file mode 100644
index 3e8ed7c889..0000000000
--- a/gr-blocks/include/gnuradio/blocks/multiply_const_cc.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_MULTIPLY_CONST_CC_H
-#define INCLUDED_MULTIPLY_CONST_CC_H
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/sync_block.h>
-
-namespace gr {
-  namespace blocks {
-
-    /*!
-     * \brief output = input * complex constant
-     * \ingroup math_operators_blk
-     */
-    class BLOCKS_API multiply_const_cc : virtual public sync_block
-    {
-
-    public:
-
-      // gr::blocks::multiply_const_cc::sptr
-      typedef boost::shared_ptr<multiply_const_cc> sptr;
-
-      /*!
-       * \brief Create an instance of multiply_const_cc
-       * \param k complex multiplicative constant
-       * \param vlen Vector length of incoming stream
-       */
-      static sptr make(gr_complex k, size_t vlen=1);
-
-      /*!
-       * \brief Return complex multiplicative constant
-       */
-      virtual gr_complex k() const = 0;
-
-      /*!
-       * \brief Set complex multiplicative constant
-       */
-      virtual void set_k(gr_complex k) = 0;
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* INCLUDED_MULTIPLY_CONST_CC_H */
diff --git a/gr-blocks/include/gnuradio/blocks/multiply_const_ff.h b/gr-blocks/include/gnuradio/blocks/multiply_const_ff.h
deleted file mode 100644
index 5d93f04184..0000000000
--- a/gr-blocks/include/gnuradio/blocks/multiply_const_ff.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef INCLUDED_MULTIPLY_CONST_FF_H
-#define INCLUDED_MULTIPLY_CONST_FF_H
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/sync_block.h>
-
-namespace gr {
-  namespace blocks {
-
-    /*!
-     * \brief output = input * real constant
-     * \ingroup math_operators_blk
-     */
-    class BLOCKS_API multiply_const_ff : virtual public sync_block
-    {
-
-    public:
-
-      // gr::blocks::multiply_const_ff::sptr
-      typedef boost::shared_ptr<multiply_const_ff> sptr;
-
-      /*!
-       * \brief Create an instance of multiply_const_ff
-       * \param k real multiplicative constant
-       * \param vlen Vector length of incoming stream
-       */
-      static sptr make(float k, size_t vlen=1);
-
-      /*!
-       * \brief Return real multiplicative constant
-       */
-      virtual float k() const = 0;
-
-      /*!
-       * \brief Set real multiplicative constant
-       */
-      virtual void set_k(float k) = 0;
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* INCLUDED_MULTIPLY_CONST_FF_H */
diff --git a/gr-blocks/include/gnuradio/blocks/multiply_const_v.h b/gr-blocks/include/gnuradio/blocks/multiply_const_v.h
new file mode 100644
index 0000000000..b1cc2dca36
--- /dev/null
+++ b/gr-blocks/include/gnuradio/blocks/multiply_const_v.h
@@ -0,0 +1,70 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2006,2010,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef MULTIPLY_CONST_V_H
+#define MULTIPLY_CONST_V_H
+
+#include <gnuradio/blocks/api.h>
+#include <gnuradio/sync_block.h>
+#include <cstdint>
+
+namespace gr {
+  namespace blocks {
+
+    /*!
+     * \brief output = input * constant vector (element-wise)
+     * \ingroup math_operators_blk
+     */
+    template <class T>
+    class BLOCKS_API multiply_const_v : virtual public sync_block
+    {
+
+    public:
+
+      // gr::blocks::multiply_const_v::sptr
+      typedef boost::shared_ptr< multiply_const_v<T> > sptr;
+
+      /*!
+       * \brief Create an instance of multiply_const_v
+       * \param k multiplicative constant vector
+       */
+      static sptr make(std::vector<T> k);
+
+      /*!
+       * \brief Return multiplicative constant vector
+       */
+      virtual std::vector<T> k() const = 0;
+
+      /*!
+       * \brief Set multiplicative constant vector
+       */
+      virtual void set_k(std::vector<T> k) = 0;
+    };
+
+    typedef multiply_const_v<std::int16_t> multiply_const_vss;
+    typedef multiply_const_v<std::int32_t> multiply_const_vii;
+    typedef multiply_const_v<float> multiply_const_vff;
+    typedef multiply_const_v<gr_complex> multiply_const_vcc;
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* MULTIPLY_CONST_V_H */
diff --git a/gr-blocks/include/gnuradio/blocks/multiply_const_vXX.h.t b/gr-blocks/include/gnuradio/blocks/multiply_const_vXX.h.t
deleted file mode 100644
index 608c52f78a..0000000000
--- a/gr-blocks/include/gnuradio/blocks/multiply_const_vXX.h.t
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2006,2010,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/sync_block.h>
-
-namespace gr {
-  namespace blocks {
-
-    /*!
-     * \brief output = input * constant vector (element-wise)
-     * \ingroup math_operators_blk
-     */
-    class BLOCKS_API @NAME@ : virtual public sync_block
-    {
-
-    public:
-
-      // gr::blocks::@NAME@::sptr
-      typedef boost::shared_ptr<@NAME@> sptr;
-
-      /*!
-       * \brief Create an instance of @NAME@
-       * \param k multiplicative constant vector
-       */
-      static sptr make(std::vector<@O_TYPE@> k);
-
-      /*!
-       * \brief Return multiplicative constant vector
-       */
-      virtual std::vector<@O_TYPE@> k() const = 0;
-
-      /*!
-       * \brief Set multiplicative constant vector
-       */
-      virtual void set_k(std::vector<@O_TYPE@> k) = 0;
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-blocks/include/gnuradio/blocks/multiply_const_vcc.h b/gr-blocks/include/gnuradio/blocks/multiply_const_vcc.h
deleted file mode 100644
index 78d2752751..0000000000
--- a/gr-blocks/include/gnuradio/blocks/multiply_const_vcc.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2014 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_MULTIPLY_CONST_VCC_H
-#define INCLUDED_MULTIPLY_CONST_VCC_H
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/sync_block.h>
-
-namespace gr {
-  namespace blocks {
-
-    /*!
-     * \brief output = input * constant vector (element-wise)
-     * \ingroup math_operators_blk
-     */
-    class BLOCKS_API multiply_const_vcc : virtual public sync_block
-    {
-    public:
-      // gr::blocks::multiply_const_vcc::sptr
-      typedef boost::shared_ptr<multiply_const_vcc> sptr;
-
-      /*!
-       * \brief Create an instance of multiply_const_vcc
-       * \param k multiplicative constant vector
-       */
-      static sptr make(std::vector<gr_complex> k);
-
-      /*!
-       * \brief Return multiplicative constant vector
-       */
-      virtual std::vector<gr_complex> k() const = 0;
-
-      /*!
-       * \brief Set multiplicative constant vector
-       */
-      virtual void set_k(std::vector<gr_complex> k) = 0;
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* INCLUDED_MULTIPLY_CONST_VCC_H */
diff --git a/gr-blocks/include/gnuradio/blocks/multiply_const_vff.h b/gr-blocks/include/gnuradio/blocks/multiply_const_vff.h
deleted file mode 100644
index 884088e288..0000000000
--- a/gr-blocks/include/gnuradio/blocks/multiply_const_vff.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2014 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_MULTIPLY_CONST_VFF_H
-#define INCLUDED_MULTIPLY_CONST_VFF_H
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/sync_block.h>
-
-namespace gr {
-  namespace blocks {
-
-    /*!
-     * \brief output = input * constant vector (element-wise)
-     * \ingroup math_operators_blk
-     */
-    class BLOCKS_API multiply_const_vff : virtual public sync_block
-    {
-    public:
-      // gr::blocks::multiply_const_vff::sptr
-      typedef boost::shared_ptr<multiply_const_vff> sptr;
-
-      /*!
-       * \brief Create an instance of multiply_const_vff
-       * \param k multiplicative constant vector
-       */
-      static sptr make(std::vector<float> k);
-
-      /*!
-       * \brief Return multiplicative constant vector
-       */
-      virtual std::vector<float> k() const = 0;
-
-      /*!
-       * \brief Set multiplicative constant vector
-       */
-      virtual void set_k(std::vector<float> k) = 0;
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* INCLUDED_MULTIPLY_CONST_VFF_H */
diff --git a/gr-blocks/include/gnuradio/blocks/multiply_ff.h b/gr-blocks/include/gnuradio/blocks/multiply_ff.h
deleted file mode 100644
index b6e3ed6ac9..0000000000
--- a/gr-blocks/include/gnuradio/blocks/multiply_ff.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_GR_MULTIPLY_FF_H
-#define INCLUDED_GR_MULTIPLY_FF_H
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/sync_block.h>
-
-namespace gr {
-  namespace blocks {
-
-    /*!
-     * \brief output = prod (input_0, input_1, ...)
-     * \ingroup math_operators_blk
-     *
-     * \details
-     * Multiply across all input streams.
-     */
-    class BLOCKS_API multiply_ff : virtual public sync_block
-    {
-    public:
-
-      // gr::blocks::multiply_ff::sptr
-      typedef boost::shared_ptr<multiply_ff> sptr;
-
-      /*!
-       * \brief Multiply streams of float values
-       * \param vlen Vector length
-       * \ingroup math_blk
-       */
-      static sptr make(size_t vlen=1);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* INCLUDED_BLOCKS_MULTIPLY_FF_H */
diff --git a/gr-blocks/include/gnuradio/blocks/multiply_matrix.h b/gr-blocks/include/gnuradio/blocks/multiply_matrix.h
new file mode 100644
index 0000000000..fba4930fcd
--- /dev/null
+++ b/gr-blocks/include/gnuradio/blocks/multiply_matrix.h
@@ -0,0 +1,100 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014, 2017, 2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef MULTIPLY_MATRIX_H
+#define MULTIPLY_MATRIX_H
+
+#include <gnuradio/blocks/api.h>
+#include <gnuradio/sync_block.h>
+#include <cstdint>
+
+namespace gr {
+  namespace blocks {
+
+    /*!
+     * \brief Matrix multiplexer/multiplier: y(k) = A x(k)
+     * \ingroup blocks
+     *
+     * This block is similar to gr::blocks::multiply_const_ff, the difference
+     * being it can handle several inputs and outputs, and the input-to-output
+     * relation can be described by the following mathematical equation:
+     * \f[
+     *    \mathbf{y}(k) = \mathbf{A} \mathbf{x}(k) \, , \, y \in \mathbb{R}^N, \mathbf{x} \in \mathbb{R}^M, A \in \mathbb{R}^{N \times M}
+     * \f]
+     * \f$\mathbf{y}(k)\f$ and \f$\mathbf{x}(i)\f$ are column-vectors describing the elements on the input port
+     * at time step \f$k\f$ (this is a sync block with no memory).
+     *
+     * Examples for where to use this block include:
+     * - Switch matrices (i.e. switch which ports go where), assuming all ports run on the same rate
+     * - Simulation of static MIMO-Channels (in that case, \f$\mathbf{A}\f$ is the channel matrix)
+     * - Summing up streams with variable coefficients
+     *
+     * This block features a special tag propagation mode: When setting the tag propagation policy
+     * to gr::block::TPP_CUSTOM, a tag is propagated from input \f$k\f$
+     * to output \f$l\f$, if \f$(A)_{l,k} \neq 0\f$.
+     *
+     * \section blocks_matrixmult_msgports_multiply_matrix Message Ports
+     *
+     * This block as one input message port (\p set_A). A message sent to this port will
+     * be converted to a std::vector<std::vector<T> >, and then passed on to set_A().
+     * If no conversion is possible, a warning is issued via the logging interface, and
+     * A remains unchanged.
+     *
+     * *Note*: It is not possible to change the dimension of the matrix after initialization,
+     * as this affects the I/O signature! If a matrix of invalid size is passed to the block,
+     * an alert is raised via the logging interface, and A remains unchanged.
+     */
+template<class T>
+    class BLOCKS_API multiply_matrix : virtual public gr::sync_block
+    {
+     public:
+      typedef boost::shared_ptr< multiply_matrix<T> > sptr;
+
+      /*!
+       * \param A The matrix
+       * \param tag_propagation_policy The tag propagation policy.
+       *                               Note this can be any
+       *                               gr::block::tag_propagation_policy_t
+       *                               value. In case of TPP_CUSTOM, tags are
+       *                               only transferred from input \f$k\f$ to
+       *                               output \f$l \iff (A)_{l,k} \neq 0\f$.
+       */
+      static sptr make(
+          std::vector<std::vector<T> > A,
+          gr::block::tag_propagation_policy_t tag_propagation_policy=gr::block::TPP_ALL_TO_ALL
+      );
+
+      //! Returns the current matrix
+      virtual const std::vector<std::vector<T> >& get_A() const = 0;
+      //! Sets the matrix to a new value \p new_A. Returns true if the new matrix was valid and could be changed.
+      virtual bool set_A(const std::vector<std::vector<T> > &new_A) = 0;
+
+      std::string MSG_PORT_NAME_SET_A;
+    };
+
+    typedef multiply_matrix<float> multiply_matrix_ff;
+    typedef multiply_matrix<gr_complex> multiply_matrix_cc;
+  } // namespace blocks
+} // namespace gr
+
+#endif /* MULTIPLY_MATRIX_H */
diff --git a/gr-blocks/include/gnuradio/blocks/multiply_matrix_XX.h.t b/gr-blocks/include/gnuradio/blocks/multiply_matrix_XX.h.t
deleted file mode 100644
index 710f7d343a..0000000000
--- a/gr-blocks/include/gnuradio/blocks/multiply_matrix_XX.h.t
+++ /dev/null
@@ -1,97 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2014, 2017 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/sync_block.h>
-
-namespace gr {
-  namespace blocks {
-
-    /*!
-     * \brief Matrix multiplexer/multiplier: y(k) = A x(k)
-     * \ingroup blocks
-     *
-     * This block is similar to gr::blocks::multiply_const_ff, the difference
-     * being it can handle several inputs and outputs, and the input-to-output
-     * relation can be described by the following mathematical equation:
-     * \f[
-     *    \mathbf{y}(k) = \mathbf{A} \mathbf{x}(k) \, , \, y \in \mathbb{R}^N, \mathbf{x} \in \mathbb{R}^M, A \in \mathbb{R}^{N \times M}
-     * \f]
-     * \f$\mathbf{y}(k)\f$ and \f$\mathbf{x}(i)\f$ are column-vectors describing the elements on the input port
-     * at time step \f$k\f$ (this is a sync block with no memory).
-     *
-     * Examples for where to use this block include:
-     * - Switch matrices (i.e. switch which ports go where), assuming all ports run on the same rate
-     * - Simulation of static MIMO-Channels (in that case, \f$\mathbf{A}\f$ is the channel matrix)
-     * - Summing up streams with variable coefficients
-     *
-     * This block features a special tag propagation mode: When setting the tag propagation policy
-     * to gr::block::TPP_CUSTOM, a tag is propagated from input \f$k\f$
-     * to output \f$l\f$, if \f$(A)_{l,k} \neq 0\f$.
-     *
-     * \section blocks_matrixmult_msgports_@NAME@ Message Ports
-     *
-     * This block as one input message port (\p set_A). A message sent to this port will
-     * be converted to a std::vector<std::vector<@O_TYPE@> >, and then passed on to set_A().
-     * If no conversion is possible, a warning is issued via the logging interface, and
-     * A remains unchanged.
-     *
-     * *Note*: It is not possible to change the dimension of the matrix after initialization,
-     * as this affects the I/O signature! If a matrix of invalid size is passed to the block,
-     * an alert is raised via the logging interface, and A remains unchanged.
-     */
-    class BLOCKS_API @NAME@ : virtual public gr::sync_block
-    {
-     public:
-      typedef boost::shared_ptr<@NAME@> sptr;
-
-      /*!
-       * \param A The matrix
-       * \param tag_propagation_policy The tag propagation policy.
-       *                               Note this can be any
-       *                               gr::block::tag_propagation_policy_t
-       *                               value. In case of TPP_CUSTOM, tags are
-       *                               only transferred from input \f$k\f$ to
-       *                               output \f$l \iff (A)_{l,k} \neq 0\f$.
-       */
-      static sptr make(
-          std::vector<std::vector<@O_TYPE@> > A,
-          gr::block::tag_propagation_policy_t tag_propagation_policy=gr::block::TPP_ALL_TO_ALL
-      );
-
-      //! Returns the current matrix
-      virtual const std::vector<std::vector<@O_TYPE@> >& get_A() const = 0;
-      //! Sets the matrix to a new value \p new_A. Returns true if the new matrix was valid and could be changed.
-      virtual bool set_A(const std::vector<std::vector<@O_TYPE@> > &new_A) = 0;
-
-      static const std::string MSG_PORT_NAME_SET_A;
-    };
-
-  } // namespace blocks
-} // namespace gr
-
-#endif /* @GUARD_NAME */
diff --git a/gr-blocks/include/gnuradio/blocks/mute.h b/gr-blocks/include/gnuradio/blocks/mute.h
new file mode 100644
index 0000000000..1d5f3a3e22
--- /dev/null
+++ b/gr-blocks/include/gnuradio/blocks/mute.h
@@ -0,0 +1,58 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2013,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef MUTE_H
+#define MUTE_H
+
+#include <gnuradio/blocks/api.h>
+#include <gnuradio/sync_block.h>
+#include <cstdint>
+
+namespace gr {
+  namespace blocks {
+
+    /*!
+     * \brief output = input or zero if muted.
+     * \ingroup level_controllers_blk
+     */
+template<class T>
+    class BLOCKS_API mute_blk : virtual public sync_block
+    {
+    public:
+      typedef boost::shared_ptr< mute_blk<T> > sptr;
+
+      static sptr make(bool mute=false);
+
+      virtual bool mute() const = 0;
+      virtual void set_mute(bool mute=false) = 0;
+    };
+
+typedef mute_blk<std::int16_t> mute_ss;
+typedef mute_blk<std::int32_t> mute_ii;
+typedef mute_blk<float> mute_ff;
+typedef mute_blk<gr_complex> mute_cc;
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* MUTE_H */
+
diff --git a/gr-blocks/include/gnuradio/blocks/mute_XX.h.t b/gr-blocks/include/gnuradio/blocks/mute_XX.h.t
deleted file mode 100644
index ab246c54b5..0000000000
--- a/gr-blocks/include/gnuradio/blocks/mute_XX.h.t
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/sync_block.h>
-
-namespace gr {
-  namespace blocks {
-
-    /*!
-     * \brief output = input or zero if muted.
-     * \ingroup level_controllers_blk
-     */
-    class BLOCKS_API @NAME@ : virtual public sync_block
-    {
-    public:
-      // gr::blocks::@NAME@::sptr
-      typedef boost::shared_ptr<@NAME@> sptr;
-
-      static sptr make(bool mute=false);
-
-      virtual bool mute() const = 0;
-      virtual void set_mute(bool mute=false) = 0;
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
-
diff --git a/gr-blocks/include/gnuradio/blocks/not_XX.h.t b/gr-blocks/include/gnuradio/blocks/not_XX.h.t
deleted file mode 100644
index 1164c1f855..0000000000
--- a/gr-blocks/include/gnuradio/blocks/not_XX.h.t
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/sync_block.h>
-
-namespace gr {
-  namespace blocks {
-
-    /*!
-     * \brief output = ~input
-     * \ingroup boolean_operators_blk
-     *
-     * bitwise boolean not of input streams.
-     */
-    class BLOCKS_API @NAME@ : virtual public sync_block
-    {
-    public:
-
-      // gr::blocks::@NAME@::sptr
-      typedef boost::shared_ptr<@NAME@> sptr;
-
-      static sptr make(size_t vlen=1);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-blocks/include/gnuradio/blocks/not_blk.h b/gr-blocks/include/gnuradio/blocks/not_blk.h
new file mode 100644
index 0000000000..7484e127e5
--- /dev/null
+++ b/gr-blocks/include/gnuradio/blocks/not_blk.h
@@ -0,0 +1,56 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef NOT_BLK_H
+#define NOT_BLK_H
+
+#include <gnuradio/blocks/api.h>
+#include <gnuradio/sync_block.h>
+#include <cstdint>
+
+namespace gr {
+  namespace blocks {
+
+    /*!
+     * \brief output = ~input
+     * \ingroup boolean_operators_blk
+     *
+     * bitwise boolean not of input streams.
+     */
+template<class T>
+    class BLOCKS_API not_blk : virtual public sync_block
+    {
+    public:
+
+      typedef boost::shared_ptr< not_blk<T> > sptr;
+
+      static sptr make(size_t vlen=1);
+    };
+
+typedef not_blk<std::uint8_t> not_bb;
+typedef not_blk<std::int16_t> not_ss;
+typedef not_blk<std::int32_t> not_ii;
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* NOT_BLK_H */
diff --git a/gr-blocks/include/gnuradio/blocks/or_XX.h.t b/gr-blocks/include/gnuradio/blocks/or_XX.h.t
deleted file mode 100644
index fbc691c5ed..0000000000
--- a/gr-blocks/include/gnuradio/blocks/or_XX.h.t
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/sync_block.h>
-
-namespace gr {
-  namespace blocks {
-
-    /*!
-     * \brief output = input_0 | input_1 | , ... | input_N)
-     * \ingroup boolean_operators_blk
-     *
-     * Bitwise boolean or across all input streams.
-     */
-    class BLOCKS_API @NAME@ : virtual public sync_block
-    {
-    public:
-
-      // gr::blocks::@NAME@::sptr
-      typedef boost::shared_ptr<@NAME@> sptr;
-
-      static sptr make(size_t vlen=1);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-blocks/include/gnuradio/blocks/or_blk.h b/gr-blocks/include/gnuradio/blocks/or_blk.h
new file mode 100644
index 0000000000..d84925bd13
--- /dev/null
+++ b/gr-blocks/include/gnuradio/blocks/or_blk.h
@@ -0,0 +1,55 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef OR_BLK_H
+#define OR_BLK_H
+
+#include <gnuradio/blocks/api.h>
+#include <gnuradio/sync_block.h>
+
+namespace gr {
+  namespace blocks {
+
+    /*!
+     * \brief output = input_0 | input_1 | , ... | input_N)
+     * \ingroup boolean_operators_blk
+     *
+     * Bitwise boolean or across all input streams.
+     */
+    template<class T>
+    class BLOCKS_API or_blk : virtual public sync_block
+    {
+    public:
+
+      // gr::blocks::or_blk::sptr
+      typedef boost::shared_ptr<or_blk<T> > sptr;
+
+      static sptr make(size_t vlen=1);
+    };
+
+    typedef or_blk<short> or_ss;
+    typedef or_blk<int> or_ii;
+    typedef or_blk<char> or_bb;
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* OR_BLK_H */
diff --git a/gr-blocks/include/gnuradio/blocks/packed_to_unpacked.h b/gr-blocks/include/gnuradio/blocks/packed_to_unpacked.h
new file mode 100644
index 0000000000..0a9c0d7c3c
--- /dev/null
+++ b/gr-blocks/include/gnuradio/blocks/packed_to_unpacked.h
@@ -0,0 +1,78 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006,2013,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef PACKED_TO_UNPACKED_H
+#define PACKED_TO_UNPACKED_H
+
+#include <gnuradio/blocks/api.h>
+#include <gnuradio/block.h>
+#include <gnuradio/endianness.h>
+#include <cstdint>
+
+namespace gr {
+  namespace blocks {
+
+    /*!
+     * \brief Convert a stream of packed bytes or shorts to stream of unpacked bytes or shorts.
+     * \ingroup byte_operators_blk
+     *
+     * \details
+     * input: stream of T; output: stream of T
+     *
+     * This is the inverse of gr::blocks::unpacked_to_packed_XX.
+     *
+     * The bits in the bytes or shorts input stream are grouped into
+     * chunks of \p bits_per_chunk bits and each resulting chunk is
+     * written right- justified to the output stream of bytes or
+     * shorts. All b or 16 bits of the each input bytes or short are
+     * processed. The right thing is done if bits_per_chunk is not a
+     * power of two.
+     *
+     * The combination of gr::blocks::packed_to_unpacked_XX_ followed by
+     * gr_chunks_to_symbols_Xf or gr_chunks_to_symbols_Xc handles the
+     * general case of mapping from a stream of bytes or shorts into
+     * arbitrary float or complex symbols.
+     *
+     * \sa gr::blocks::packed_to_unpacked_bb, gr::blocks::unpacked_to_packed_bb,
+     * \sa gr::blocks::packed_to_unpacked_ss, gr::blocks::unpacked_to_packed_ss,
+     * \sa gr::blocks::chunks_to_symbols_bf, gr::blocks::chunks_to_symbols_bc.
+     * \sa gr::blocks::chunks_to_symbols_sf, gr::blocks::chunks_to_symbols_sc.
+     */
+template<class T>
+    class BLOCKS_API packed_to_unpacked : virtual public block
+    {
+    public:
+      // gr::blocks::packed_to_unpacked::sptr
+      typedef boost::shared_ptr< packed_to_unpacked<T> > sptr;
+
+      static sptr make(unsigned int bits_per_chunk,
+                       endianness_t endianness);
+    };
+
+typedef packed_to_unpacked<std::uint8_t> packed_to_unpacked_bb;
+typedef packed_to_unpacked<std::int16_t> packed_to_unpacked_ss;
+typedef packed_to_unpacked<std::int32_t> packed_to_unpacked_ii;
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* PACKED_TO_UNPACKED_H */
diff --git a/gr-blocks/include/gnuradio/blocks/packed_to_unpacked_XX.h.t b/gr-blocks/include/gnuradio/blocks/packed_to_unpacked_XX.h.t
deleted file mode 100644
index 98b7df2658..0000000000
--- a/gr-blocks/include/gnuradio/blocks/packed_to_unpacked_XX.h.t
+++ /dev/null
@@ -1,74 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2006,2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/block.h>
-#include <gnuradio/endianness.h>
-
-namespace gr {
-  namespace blocks {
-
-    /*!
-     * \brief Convert a stream of packed bytes or shorts to stream of unpacked bytes or shorts.
-     * \ingroup byte_operators_blk
-     *
-     * \details
-     * input: stream of @I_TYPE@; output: stream of @O_TYPE@
-     *
-     * This is the inverse of gr::blocks::unpacked_to_packed_XX.
-     *
-     * The bits in the bytes or shorts input stream are grouped into
-     * chunks of \p bits_per_chunk bits and each resulting chunk is
-     * written right- justified to the output stream of bytes or
-     * shorts. All b or 16 bits of the each input bytes or short are
-     * processed. The right thing is done if bits_per_chunk is not a
-     * power of two.
-     *
-     * The combination of gr::blocks::packed_to_unpacked_XX_ followed by
-     * gr_chunks_to_symbols_Xf or gr_chunks_to_symbols_Xc handles the
-     * general case of mapping from a stream of bytes or shorts into
-     * arbitrary float or complex symbols.
-     *
-     * \sa gr::blocks::packed_to_unpacked_bb, gr::blocks::unpacked_to_packed_bb,
-     * \sa gr::blocks::packed_to_unpacked_ss, gr::blocks::unpacked_to_packed_ss,
-     * \sa gr::blocks::chunks_to_symbols_bf, gr::blocks::chunks_to_symbols_bc.
-     * \sa gr::blocks::chunks_to_symbols_sf, gr::blocks::chunks_to_symbols_sc.
-     */
-    class BLOCKS_API @NAME@ : virtual public block
-    {
-    public:
-      // gr::blocks::@NAME@::sptr
-      typedef boost::shared_ptr<@NAME@> sptr;
-
-      static sptr make(unsigned int bits_per_chunk,
-                       endianness_t endianness);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-blocks/include/gnuradio/blocks/peak_detector.h b/gr-blocks/include/gnuradio/blocks/peak_detector.h
new file mode 100644
index 0000000000..4cc7dbd627
--- /dev/null
+++ b/gr-blocks/include/gnuradio/blocks/peak_detector.h
@@ -0,0 +1,121 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007,2013,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef PEAK_DETECTOR_H
+#define PEAK_DETECTOR_H
+
+#include <gnuradio/blocks/api.h>
+#include <gnuradio/sync_block.h>
+#include <cstdint>
+
+namespace gr {
+  namespace blocks {
+
+    /*!
+     * \brief Detect the peak of a signal
+     * \ingroup peak_detectors_blk
+     *
+     * \details
+     * If a peak is detected, this block outputs a 1,
+     * or it outputs 0's.
+     */
+    template <class T>
+    class BLOCKS_API peak_detector : virtual public sync_block
+    {
+    public:
+      typedef boost::shared_ptr< peak_detector<T> > sptr;
+
+      /*!
+       * Make a peak detector block.
+       *
+       * \param threshold_factor_rise The threshold factor determines
+       *        when a peak has started. An average of the signal is
+       *        calculated and when the value of the signal goes over
+       *        threshold_factor_rise*average, we start looking for a
+       *        peak.
+       * \param threshold_factor_fall The threshold factor determines
+       *        when a peak has ended. An average of the signal is
+       *        calculated and when the value of the signal goes
+       *        below threshold_factor_fall*average, we stop looking
+       *        for a peak.
+       * \param look_ahead The look-ahead value is used when the
+       *        threshold is found to look if there another peak
+       *        within this step range. If there is a larger value,
+       *        we set that as the peak and look ahead again. This is
+       *        continued until the highest point is found with This
+       *        look-ahead range.
+       * \param alpha The gain value of a moving average filter
+       */
+      static sptr make(float threshold_factor_rise = 0.25,
+                       float threshold_factor_fall = 0.40,
+                       int look_ahead = 10,
+                       float alpha = 0.001);
+
+      /*! \brief Set the threshold factor value for the rise time
+       *  \param thr new threshold factor
+       */
+      virtual void set_threshold_factor_rise(float thr) = 0;
+
+      /*! \brief Set the threshold factor value for the fall time
+       *  \param thr new threshold factor
+       */
+      virtual void set_threshold_factor_fall(float thr) = 0;
+
+      /*! \brief Set the look-ahead factor
+       *  \param look new look-ahead factor
+       */
+      virtual void set_look_ahead(int look) = 0;
+
+      /*! \brief Set the running average alpha
+       *  \param alpha new alpha for running average
+       */
+      virtual void set_alpha(float alpha) = 0;
+
+      /*! \brief Get the threshold factor value for the rise time
+       *  \return threshold factor
+       */
+      virtual float threshold_factor_rise() = 0;
+
+      /*! \brief Get the threshold factor value for the fall time
+       *  \return threshold factor
+       */
+      virtual float threshold_factor_fall() = 0;
+
+      /*! \brief Get the look-ahead factor value
+       *  \return look-ahead factor
+       */
+      virtual int look_ahead() = 0;
+
+      /*! \brief Get the alpha value of the running average
+       *  \return alpha
+       */
+      virtual float alpha() = 0;
+    };
+
+    typedef peak_detector<float> peak_detector_fb;
+    typedef peak_detector<std::int32_t> peak_detector_ib;
+    typedef peak_detector<std::int16_t> peak_detector_sb;
+
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* PEAK_DETECTOR_H */
diff --git a/gr-blocks/include/gnuradio/blocks/peak_detector_XX.h.t b/gr-blocks/include/gnuradio/blocks/peak_detector_XX.h.t
deleted file mode 100644
index 6e151c0cbd..0000000000
--- a/gr-blocks/include/gnuradio/blocks/peak_detector_XX.h.t
+++ /dev/null
@@ -1,118 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007,2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/sync_block.h>
-
-namespace gr {
-  namespace blocks {
-
-    /*!
-     * \brief Detect the peak of a signal
-     * \ingroup peak_detectors_blk
-     *
-     * \details
-     * If a peak is detected, this block outputs a 1,
-     * or it outputs 0's.
-     */
-    class BLOCKS_API @NAME@ : virtual public sync_block
-    {
-    public:
-      // gr::blocks::@NAME@::sptr
-      typedef boost::shared_ptr<@NAME@> sptr;
-
-      /*!
-       * Make a peak detector block.
-       *
-       * \param threshold_factor_rise The threshold factor determines
-       *        when a peak has started. An average of the signal is
-       *        calculated and when the value of the signal goes over
-       *        threshold_factor_rise*average, we start looking for a
-       *        peak.
-       * \param threshold_factor_fall The threshold factor determines
-       *        when a peak has ended. An average of the signal is
-       *        calculated and when the value of the signal goes
-       *        below threshold_factor_fall*average, we stop looking
-       *        for a peak.
-       * \param look_ahead The look-ahead value is used when the
-       *        threshold is found to look if there another peak
-       *        within this step range. If there is a larger value,
-       *        we set that as the peak and look ahead again. This is
-       *        continued until the highest point is found with This
-       *        look-ahead range.
-       * \param alpha The gain value of a moving average filter
-       */
-      static sptr make(float threshold_factor_rise = 0.25,
-                       float threshold_factor_fall = 0.40,
-                       int look_ahead = 10,
-                       float alpha = 0.001);
-
-      /*! \brief Set the threshold factor value for the rise time
-       *  \param thr new threshold factor
-       */
-      virtual void set_threshold_factor_rise(float thr) = 0;
-
-      /*! \brief Set the threshold factor value for the fall time
-       *  \param thr new threshold factor
-       */
-      virtual void set_threshold_factor_fall(float thr) = 0;
-
-      /*! \brief Set the look-ahead factor
-       *  \param look new look-ahead factor
-       */
-      virtual void set_look_ahead(int look) = 0;
-
-      /*! \brief Set the running average alpha
-       *  \param alpha new alpha for running average
-       */
-      virtual void set_alpha(float alpha) = 0;
-
-      /*! \brief Get the threshold factor value for the rise time
-       *  \return threshold factor
-       */
-      virtual float threshold_factor_rise() = 0;
-
-      /*! \brief Get the threshold factor value for the fall time
-       *  \return threshold factor
-       */
-      virtual float threshold_factor_fall() = 0;
-
-      /*! \brief Get the look-ahead factor value
-       *  \return look-ahead factor
-       */
-      virtual int look_ahead() = 0;
-
-      /*! \brief Get the alpha value of the running average
-       *  \return alpha
-       */
-      virtual float alpha() = 0;
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-blocks/include/gnuradio/blocks/probe_signal.h b/gr-blocks/include/gnuradio/blocks/probe_signal.h
new file mode 100644
index 0000000000..39754ed7a0
--- /dev/null
+++ b/gr-blocks/include/gnuradio/blocks/probe_signal.h
@@ -0,0 +1,58 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2005,2012-2013,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef PROBE_SIGNAL_H
+#define PROBE_SIGNAL_H
+
+#include <gnuradio/blocks/api.h>
+#include <gnuradio/sync_block.h>
+#include <cstdint>
+
+namespace gr {
+  namespace blocks {
+
+    /*!
+     * \brief Sink that allows a sample to be grabbed from Python.
+     * \ingroup measurement_tools_blk
+     */
+template<class T>
+    class BLOCKS_API probe_signal : virtual public sync_block
+    {
+    public:
+      // gr::blocks::probe_signal::sptr
+      typedef boost::shared_ptr< probe_signal<T> > sptr;
+
+      static sptr make();
+
+      virtual T level() const = 0;
+    };
+
+typedef probe_signal<std::uint8_t> probe_signal_b;
+typedef probe_signal<std::int16_t> probe_signal_s;
+typedef probe_signal<std::int32_t> probe_signal_i;
+typedef probe_signal<float> probe_signal_f;
+typedef probe_signal<gr_complex> probe_signal_c;
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* PROBE_SIGNAL_H */
diff --git a/gr-blocks/include/gnuradio/blocks/probe_signal_X.h.t b/gr-blocks/include/gnuradio/blocks/probe_signal_X.h.t
deleted file mode 100644
index 5b45fd2864..0000000000
--- a/gr-blocks/include/gnuradio/blocks/probe_signal_X.h.t
+++ /dev/null
@@ -1,52 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2005,2012-2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/sync_block.h>
-
-namespace gr {
-  namespace blocks {
-
-    /*!
-     * \brief Sink that allows a sample to be grabbed from Python.
-     * \ingroup measurement_tools_blk
-     */
-    class BLOCKS_API @NAME@ : virtual public sync_block
-    {
-    public:
-      // gr::blocks::@NAME@::sptr
-      typedef boost::shared_ptr<@NAME@> sptr;
-
-      static sptr make();
-
-      virtual @TYPE@ level() const = 0;
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-blocks/include/gnuradio/blocks/probe_signal_v.h b/gr-blocks/include/gnuradio/blocks/probe_signal_v.h
new file mode 100644
index 0000000000..2d088cbd5f
--- /dev/null
+++ b/gr-blocks/include/gnuradio/blocks/probe_signal_v.h
@@ -0,0 +1,59 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2005,2012-2013,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef PROBE_SIGNAL_V_H
+#define PROBE_SIGNAL_V_H
+
+#include <vector>
+#include <gnuradio/blocks/api.h>
+#include <gnuradio/sync_block.h>
+#include <cstdint>
+
+namespace gr {
+  namespace blocks {
+
+    /*!
+     * \brief Sink that allows a vector of samples to be grabbed from Python.
+     * \ingroup sink_blk
+     * \ingroup measurement_tools_blk
+     */
+    template <class T>
+    class BLOCKS_API probe_signal_v : virtual public sync_block
+    {
+    public:
+      typedef boost::shared_ptr< probe_signal_v<T> > sptr;
+
+      static sptr make(size_t size);
+
+      virtual std::vector<T> level() const = 0;
+    };
+
+    typedef probe_signal_v<std::uint8_t> probe_signal_vb;
+    typedef probe_signal_v<std::int16_t> probe_signal_vs;
+    typedef probe_signal_v<std::int32_t> probe_signal_vi;
+    typedef probe_signal_v<float> probe_signal_vf;
+    typedef probe_signal_v<gr_complex> probe_signal_vc;
+
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* PROBE_SIGNAL_V_H */
diff --git a/gr-blocks/include/gnuradio/blocks/probe_signal_vX.h.t b/gr-blocks/include/gnuradio/blocks/probe_signal_vX.h.t
deleted file mode 100644
index 9f24731663..0000000000
--- a/gr-blocks/include/gnuradio/blocks/probe_signal_vX.h.t
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2005,2012-2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <vector>
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/sync_block.h>
-
-namespace gr {
-  namespace blocks {
-
-    /*!
-     * \brief Sink that allows a vector of samples to be grabbed from Python.
-     * \ingroup sink_blk
-     * \ingroup measurement_tools_blk
-     */
-    class BLOCKS_API @NAME@ : virtual public sync_block
-    {
-    public:
-      // gr::blocks::@NAME@::sptr
-      typedef boost::shared_ptr<@NAME@> sptr;
-
-      static sptr make(size_t size);
-
-      virtual std::vector<@TYPE@> level() const = 0;
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-blocks/include/gnuradio/blocks/sample_and_hold.h b/gr-blocks/include/gnuradio/blocks/sample_and_hold.h
new file mode 100644
index 0000000000..a6172a75c5
--- /dev/null
+++ b/gr-blocks/include/gnuradio/blocks/sample_and_hold.h
@@ -0,0 +1,59 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007,2013,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef SAMPLE_AND_HOLD_H
+#define SAMPLE_AND_HOLD_H
+
+#include <gnuradio/blocks/api.h>
+#include <gnuradio/sync_block.h>
+#include <cstdint>
+
+namespace gr {
+  namespace blocks {
+
+    /*!
+     * \brief sample and hold circuit
+     * \ingroup level_controllers_blk
+     *
+     * \details
+     * Samples the data stream (input stream 0) and holds the value if
+     * the control signal is 1 (intput stream 1).
+     */
+template<class T>
+    class BLOCKS_API sample_and_hold : virtual public sync_block
+    {
+    public:
+      // gr::blocks::sample_and_hold::sptr
+      typedef boost::shared_ptr< sample_and_hold<T> > sptr;
+
+      static sptr make();
+    };
+
+typedef sample_and_hold<std::uint8_t> sample_and_hold_bb;
+typedef sample_and_hold<std::int16_t> sample_and_hold_ss;
+typedef sample_and_hold<std::int32_t> sample_and_hold_ii;
+typedef sample_and_hold<float> sample_and_hold_ff;
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* SAMPLE_AND_HOLD_H */
diff --git a/gr-blocks/include/gnuradio/blocks/sample_and_hold_XX.h.t b/gr-blocks/include/gnuradio/blocks/sample_and_hold_XX.h.t
deleted file mode 100644
index a87ae0f423..0000000000
--- a/gr-blocks/include/gnuradio/blocks/sample_and_hold_XX.h.t
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007,2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/sync_block.h>
-
-namespace gr {
-  namespace blocks {
-
-    /*!
-     * \brief sample and hold circuit
-     * \ingroup level_controllers_blk
-     *
-     * \details
-     * Samples the data stream (input stream 0) and holds the value if
-     * the control signal is 1 (intput stream 1).
-     */
-    class BLOCKS_API @NAME@ : virtual public sync_block
-    {
-    public:
-      // gr::blocks::@NAME@::sptr
-      typedef boost::shared_ptr<@NAME@> sptr;
-
-      static sptr make();
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-blocks/include/gnuradio/blocks/sub.h b/gr-blocks/include/gnuradio/blocks/sub.h
new file mode 100644
index 0000000000..942cd727d2
--- /dev/null
+++ b/gr-blocks/include/gnuradio/blocks/sub.h
@@ -0,0 +1,59 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2009,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef SUB_H
+#define SUB_H
+
+#include <gnuradio/blocks/api.h>
+#include <gnuradio/sync_block.h>
+#include <cstdint>
+
+namespace gr {
+  namespace blocks {
+
+    /*!
+     * \brief output = input_0 -  input_1 - ...)
+     * \ingroup math_operators_blk
+     *
+     * \details
+     * Subtract across all input streams.
+     */
+template<class T>
+    class BLOCKS_API sub : virtual public sync_block
+    {
+    public:
+
+      // gr::blocks::sub::sptr
+      typedef boost::shared_ptr< sub<T> > sptr;
+
+      static sptr make(size_t vlen=1);
+    };
+
+typedef sub<std::int16_t> sub_ss;
+typedef sub<std::int32_t> sub_ii;
+typedef sub<gr_complex> sub_cc;
+typedef sub<float> sub_ff;
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* SUB_H */
diff --git a/gr-blocks/include/gnuradio/blocks/sub_XX.h.t b/gr-blocks/include/gnuradio/blocks/sub_XX.h.t
deleted file mode 100644
index 44da6e16c4..0000000000
--- a/gr-blocks/include/gnuradio/blocks/sub_XX.h.t
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2009,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/sync_block.h>
-
-namespace gr {
-  namespace blocks {
-
-    /*!
-     * \brief output = input_0 -  input_1 - ...)
-     * \ingroup math_operators_blk
-     *
-     * \details
-     * Subtract across all input streams.
-     */
-    class BLOCKS_API @NAME@ : virtual public sync_block
-    {
-    public:
-
-      // gr::blocks::@NAME@::sptr
-      typedef boost::shared_ptr<@NAME@> sptr;
-
-      static sptr make(size_t vlen=1);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-blocks/include/gnuradio/blocks/sub_ff.h b/gr-blocks/include/gnuradio/blocks/sub_ff.h
deleted file mode 100644
index 3cc844f888..0000000000
--- a/gr-blocks/include/gnuradio/blocks/sub_ff.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2014 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_BLOCKS_SUB_FF_H
-#define INCLUDED_BLOCKS_SUB_FF_H
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/sync_block.h>
-
-namespace gr {
-  namespace blocks {
-
-    /*!
-     * \brief output = input_0 -  input_1 - ...)
-     * \ingroup math_operators_blk
-     *
-     * \details
-     * Subtract across all input streams.
-     */
-    class BLOCKS_API sub_ff : virtual public sync_block
-    {
-    public:
-      // gr::blocks::sub_ff::sptr
-      typedef boost::shared_ptr<sub_ff> sptr;
-
-      static sptr make(size_t vlen=1);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* INCLUDED_BLOCKS_SUB_FF_H */
diff --git a/gr-blocks/include/gnuradio/blocks/tsb_vector_sink.h b/gr-blocks/include/gnuradio/blocks/tsb_vector_sink.h
new file mode 100644
index 0000000000..7d0d3ff981
--- /dev/null
+++ b/gr-blocks/include/gnuradio/blocks/tsb_vector_sink.h
@@ -0,0 +1,69 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef TSB_VECTOR_SINK_H
+#define TSB_VECTOR_SINK_H
+
+#include <gnuradio/blocks/api.h>
+#include <gnuradio/tagged_stream_block.h>
+#include <cstdint>
+
+namespace gr {
+  namespace blocks {
+
+    /*!
+     * \brief A vector sink for tagged streams.
+     *
+     * Unlike a gr::blocks::vector_sink_f, this only works with tagged streams.
+     *
+     * \ingroup blocks
+     */
+template<class T>
+    class BLOCKS_API tsb_vector_sink : virtual public gr::tagged_stream_block
+    {
+     public:
+      typedef boost::shared_ptr< tsb_vector_sink<T> > sptr;
+
+      virtual void reset() = 0;
+      virtual std::vector<std::vector<T> > data() const = 0;
+      /*! Doesn't include the TSB tags.
+       */
+      virtual std::vector<tag_t> tags() const = 0;
+
+      /*!
+       * \param vlen Vector length
+       * \param tsb_key Tagged Stream Key
+       */
+      static sptr make(int vlen=1, const std::string &tsb_key="ts_last");
+    };
+    typedef tsb_vector_sink<std::uint8_t> tsb_vector_sink_b;
+    typedef tsb_vector_sink<std::uint32_t> tsb_vector_sink_i;
+    typedef tsb_vector_sink<std::uint16_t> tsb_vector_sink_s;
+    typedef tsb_vector_sink<float> tsb_vector_sink_f;
+    typedef tsb_vector_sink<gr_complex> tsb_vector_sink_c;
+
+  } // namespace blocks
+} // namespace gr
+
+#endif /* TSB_VECTOR_SINK_H */
+
diff --git a/gr-blocks/include/gnuradio/blocks/tsb_vector_sink_X.h.t b/gr-blocks/include/gnuradio/blocks/tsb_vector_sink_X.h.t
deleted file mode 100644
index 03cc37afd2..0000000000
--- a/gr-blocks/include/gnuradio/blocks/tsb_vector_sink_X.h.t
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2014 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/tagged_stream_block.h>
-
-namespace gr {
-  namespace blocks {
-
-    /*!
-     * \brief A vector sink for tagged streams.
-     *
-     * Unlike a gr::blocks::vector_sink_f, this only works with tagged streams.
-     *
-     * \ingroup blocks
-     */
-    class BLOCKS_API @NAME@ : virtual public gr::tagged_stream_block
-    {
-     public:
-      typedef boost::shared_ptr<@NAME@> sptr;
-
-      virtual void reset() = 0;
-      virtual std::vector<std::vector<@TYPE@> > data() const = 0;
-      /*! Doesn't include the TSB tags.
-       */
-      virtual std::vector<tag_t> tags() const = 0;
-
-      /*!
-       * \param vlen Vector length
-       * \param tsb_key Tagged Stream Key
-       */
-      static sptr make(int vlen=1, const std::string &tsb_key="ts_last");
-    };
-
-  } // namespace blocks
-} // namespace gr
-
-#endif /* @GUARD_NAME@ */
-
diff --git a/gr-blocks/include/gnuradio/blocks/unpacked_to_packed.h b/gr-blocks/include/gnuradio/blocks/unpacked_to_packed.h
new file mode 100644
index 0000000000..d23ff6cc12
--- /dev/null
+++ b/gr-blocks/include/gnuradio/blocks/unpacked_to_packed.h
@@ -0,0 +1,77 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006,2013,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef UNPACKED_TO_PACKED_H
+#define UNPACKED_TO_PACKED_H
+
+#include <gnuradio/blocks/api.h>
+#include <gnuradio/block.h>
+#include <gnuradio/endianness.h>
+#include <cstdint>
+
+namespace gr {
+  namespace blocks {
+
+    /*!
+     * \brief Convert a stream of unpacked bytes or shorts into a stream of packed bytes or shorts.
+     * \ingroup byte_operators_blk
+     *
+     * \details
+     * input: stream of T; output: stream of T
+     *
+     * This is the inverse of gr::blocks::packed_to_unpacked_XX.
+     *
+     * The low \p bits_per_chunk bits are extracted from each input
+     * byte or short.  These bits are then packed densely into the
+     * output bytes or shorts, such that all 8 or 16 bits of the
+     * output bytes or shorts are filled with valid input bits.  The
+     * right thing is done if bits_per_chunk is not a power of two.
+     *
+     * The combination of gr::blocks::packed_to_unpacked_XX followed by
+     * gr_chunks_to_symbols_Xf or gr_chunks_to_symbols_Xc handles the
+     * general case of mapping from a stream of bytes or shorts into
+     * arbitrary float or complex symbols.
+     *
+     * \sa gr::blocks::packed_to_unpacked_bb, gr::blocks::unpacked_to_packed_bb,
+     * \sa gr::blocks::packed_to_unpacked_ss, gr::blocks::unpacked_to_packed_ss,
+     * \sa gr::blocks::chunks_to_symbols_bf, gr::blocks::chunks_to_symbols_bc.
+     * \sa gr::blocks::chunks_to_symbols_sf, gr::blocks::chunks_to_symbols_sc.
+     */
+template<class T>
+    class BLOCKS_API unpacked_to_packed : virtual public block
+    {
+    public:
+      // gr::blocks::unpacked_to_packed::sptr
+      typedef boost::shared_ptr< unpacked_to_packed<T> > sptr;
+
+      static sptr make(unsigned int bits_per_chunk,
+                       endianness_t endianness);
+    };
+
+typedef unpacked_to_packed<std::uint8_t> unpacked_to_packed_bb;
+typedef unpacked_to_packed<std::int16_t> unpacked_to_packed_ss;
+typedef unpacked_to_packed<std::int32_t> unpacked_to_packed_ii;
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* UNPACKED_TO_PACKED_H */
diff --git a/gr-blocks/include/gnuradio/blocks/unpacked_to_packed_XX.h.t b/gr-blocks/include/gnuradio/blocks/unpacked_to_packed_XX.h.t
deleted file mode 100644
index 194d79e0d2..0000000000
--- a/gr-blocks/include/gnuradio/blocks/unpacked_to_packed_XX.h.t
+++ /dev/null
@@ -1,73 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2006,2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/block.h>
-#include <gnuradio/endianness.h>
-
-namespace gr {
-  namespace blocks {
-
-    /*!
-     * \brief Convert a stream of unpacked bytes or shorts into a stream of packed bytes or shorts.
-     * \ingroup byte_operators_blk
-     *
-     * \details
-     * input: stream of @I_TYPE@; output: stream of @O_TYPE@
-     *
-     * This is the inverse of gr::blocks::packed_to_unpacked_XX.
-     *
-     * The low \p bits_per_chunk bits are extracted from each input
-     * byte or short.  These bits are then packed densely into the
-     * output bytes or shorts, such that all 8 or 16 bits of the
-     * output bytes or shorts are filled with valid input bits.  The
-     * right thing is done if bits_per_chunk is not a power of two.
-     *
-     * The combination of gr::blocks::packed_to_unpacked_XX followed by
-     * gr_chunks_to_symbols_Xf or gr_chunks_to_symbols_Xc handles the
-     * general case of mapping from a stream of bytes or shorts into
-     * arbitrary float or complex symbols.
-     *
-     * \sa gr::blocks::packed_to_unpacked_bb, gr::blocks::unpacked_to_packed_bb,
-     * \sa gr::blocks::packed_to_unpacked_ss, gr::blocks::unpacked_to_packed_ss,
-     * \sa gr::blocks::chunks_to_symbols_bf, gr::blocks::chunks_to_symbols_bc.
-     * \sa gr::blocks::chunks_to_symbols_sf, gr::blocks::chunks_to_symbols_sc.
-     */
-    class BLOCKS_API @NAME@ : virtual public block
-    {
-    public:
-      // gr::blocks::@NAME@::sptr
-      typedef boost::shared_ptr<@NAME@> sptr;
-
-      static sptr make(unsigned int bits_per_chunk,
-                       endianness_t endianness);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-blocks/include/gnuradio/blocks/vector_insert.h b/gr-blocks/include/gnuradio/blocks/vector_insert.h
new file mode 100644
index 0000000000..cce50ed445
--- /dev/null
+++ b/gr-blocks/include/gnuradio/blocks/vector_insert.h
@@ -0,0 +1,67 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012-2013,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef VECTOR_INSERT_H
+#define VECTOR_INSERT_H
+
+#include <gnuradio/blocks/api.h>
+#include <gnuradio/block.h>
+#include <cstdint>
+
+namespace gr {
+  namespace blocks {
+
+    /*!
+     * \brief source of T's that gets its data from a vector
+     * \ingroup stream_operators_blk
+     */
+template<class T>
+    class BLOCKS_API vector_insert : virtual public block
+    {
+    public:
+      // gr::blocks::vector_insert::sptr
+      typedef boost::shared_ptr< vector_insert<T> > sptr;
+
+      /*!
+       * Make vector insert block.
+       *
+       * \param data vector of data to insert
+       * \param periodicity number of samples between when to send \p data
+       * \param offset initial item offset of first insert
+       */
+      static sptr make(const std::vector<T> &data,
+                       int periodicity, int offset=0);
+
+      virtual void rewind() = 0;
+      virtual void set_data(const std::vector<T> &data) = 0;
+    };
+
+typedef vector_insert<std::uint8_t> vector_insert_b;
+typedef vector_insert<std::int16_t> vector_insert_s;
+typedef vector_insert<std::int32_t> vector_insert_i;
+typedef vector_insert<float> vector_insert_f;
+typedef vector_insert<gr_complex> vector_insert_c;
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* VECTOR_INSERT_H */
diff --git a/gr-blocks/include/gnuradio/blocks/vector_insert_X.h.t b/gr-blocks/include/gnuradio/blocks/vector_insert_X.h.t
deleted file mode 100644
index 73330b175b..0000000000
--- a/gr-blocks/include/gnuradio/blocks/vector_insert_X.h.t
+++ /dev/null
@@ -1,61 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012-2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/block.h>
-
-namespace gr {
-  namespace blocks {
-
-    /*!
-     * \brief source of @TYPE@'s that gets its data from a vector
-     * \ingroup stream_operators_blk
-     */
-    class BLOCKS_API @NAME@ : virtual public block
-    {
-    public:
-      // gr::blocks::@NAME@::sptr
-      typedef boost::shared_ptr<@NAME@> sptr;
-
-      /*!
-       * Make vector insert block.
-       *
-       * \param data vector of data to insert
-       * \param periodicity number of samples between when to send \p data
-       * \param offset initial item offset of first insert
-       */
-      static sptr make(const std::vector<@TYPE@> &data,
-                       int periodicity, int offset=0);
-
-      virtual void rewind() = 0;
-      virtual void set_data(const std::vector<@TYPE@> &data) = 0;
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-blocks/include/gnuradio/blocks/vector_sink.h b/gr-blocks/include/gnuradio/blocks/vector_sink.h
new file mode 100644
index 0000000000..cd75e8da87
--- /dev/null
+++ b/gr-blocks/include/gnuradio/blocks/vector_sink.h
@@ -0,0 +1,61 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2008,2009,2013,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef VECTOR_SINK_H
+#define VECTOR_SINK_H
+
+#include <gnuradio/blocks/api.h>
+#include <gnuradio/sync_block.h>
+#include <cstdint>
+
+namespace gr {
+  namespace blocks {
+
+    /*!
+     * \brief T sink that writes to a vector
+     * \ingroup debug_tools_blk
+     */
+template<class T>
+    class BLOCKS_API vector_sink : virtual public sync_block
+    {
+    public:
+      // gr::blocks::vector_sink::sptr
+      typedef boost::shared_ptr< vector_sink<T> > sptr;
+
+      static sptr make(int vlen = 1);
+
+      //! Clear the data and tags containers.
+      virtual void reset() = 0;
+      virtual std::vector<T> data() const = 0;
+      virtual std::vector<tag_t> tags() const = 0;
+    };
+
+typedef vector_sink<std::uint8_t> vector_sink_b;
+typedef vector_sink<std::int16_t> vector_sink_s;
+typedef vector_sink<std::int32_t> vector_sink_i;
+typedef vector_sink<float> vector_sink_f;
+typedef vector_sink<gr_complex> vector_sink_c;
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* VECTOR_SINK_H */
diff --git a/gr-blocks/include/gnuradio/blocks/vector_sink_X.h.t b/gr-blocks/include/gnuradio/blocks/vector_sink_X.h.t
deleted file mode 100644
index a4ef38fd04..0000000000
--- a/gr-blocks/include/gnuradio/blocks/vector_sink_X.h.t
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2008,2009,2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/sync_block.h>
-
-namespace gr {
-  namespace blocks {
-
-    /*!
-     * \brief @TYPE@ sink that writes to a vector
-     * \ingroup debug_tools_blk
-     */
-    class BLOCKS_API @NAME@ : virtual public sync_block
-    {
-    public:
-      // gr::blocks::@NAME@::sptr
-      typedef boost::shared_ptr<@NAME@> sptr;
-
-      static sptr make(int vlen = 1);
-
-      //! Clear the data and tags containers.
-      virtual void reset() = 0;
-      virtual std::vector<@TYPE@> data() const = 0;
-      virtual std::vector<tag_t> tags() const = 0;
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-blocks/include/gnuradio/blocks/vector_source.h b/gr-blocks/include/gnuradio/blocks/vector_source.h
new file mode 100644
index 0000000000..189bdadb4b
--- /dev/null
+++ b/gr-blocks/include/gnuradio/blocks/vector_source.h
@@ -0,0 +1,91 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2008,2012-2013,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef VECTOR_SOURCE_H
+#define VECTOR_SOURCE_H
+
+#include <gnuradio/blocks/api.h>
+#include <gnuradio/sync_block.h>
+#include <cstdint>
+
+namespace gr {
+  namespace blocks {
+
+    /*!
+     * \brief Source that streams T items based on the input \p data vector.
+     * \ingroup misc_blk
+     *
+     * \details
+     * This block produces a stream of samples based on an input
+     * vector. In C++, this is a std::vector<T>, and in Python,
+     * this is either a list or tuple. The data can repeat infinitely
+     * until the flowgraph is terminated by some other event or, the
+     * default, run the data once and stop.
+     *
+     * The vector source can also produce stream tags with the
+     * data. Pass in a vector of gr::tag_t objects and they will be
+     * emitted based on the specified offset of the tag.
+     *
+     * GNU Radio provides a utility Python module in gr.tag_utils to
+     * convert between tags and Python objects:
+     * gr.tag_utils.python_to_tag.
+     *
+     * We can create tags as Python lists (or tuples) using the list
+     * structure [int offset, pmt key, pmt value, pmt srcid]. It is
+     * important to define the list/tuple with the values in the
+     * correct order and with the correct data type. A python
+     * dictionary can also be used using the keys: "offset", "key",
+     * "value", and "srcid" with the same data types as for the lists.
+     *
+     * When given a list of tags, the vector source will emit the tags
+     * repeatedly by updating the offset relative to the vector stream
+     * length. That is, if the vector has 500 items and a tag has an
+     * offset of 0, that tag will be placed on item 0, 500, 1000,
+     * 1500, etc.
+     */
+template<class T>
+    class BLOCKS_API vector_source : virtual public sync_block
+    {
+    public:
+      // gr::blocks::vector_source::sptr
+      typedef boost::shared_ptr< vector_source<T> > sptr;
+
+      static sptr make(const std::vector<T> &data,
+                       bool repeat=false, int vlen=1,
+                       const std::vector<tag_t> &tags=std::vector<tag_t>());
+
+      virtual void rewind() = 0;
+      virtual void set_data(const std::vector<T> &data,
+                            const std::vector<tag_t> &tags=std::vector<tag_t>()) = 0;
+      virtual void set_repeat(bool repeat) = 0;
+    };
+
+typedef vector_source<std::uint8_t> vector_source_b;
+typedef vector_source<std::int16_t> vector_source_s;
+typedef vector_source<std::int32_t> vector_source_i;
+typedef vector_source<float> vector_source_f;
+typedef vector_source<gr_complex> vector_source_c;
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* VECTOR_SOURCE_H */
diff --git a/gr-blocks/include/gnuradio/blocks/vector_source_X.h.t b/gr-blocks/include/gnuradio/blocks/vector_source_X.h.t
deleted file mode 100644
index b0ca6b869f..0000000000
--- a/gr-blocks/include/gnuradio/blocks/vector_source_X.h.t
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2008,2012-2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/sync_block.h>
-
-namespace gr {
-  namespace blocks {
-
-    /*!
-     * \brief Source that streams @TYPE@ items based on the input \p data vector.
-     * \ingroup misc_blk
-     *
-     * \details
-     * This block produces a stream of samples based on an input
-     * vector. In C++, this is a std::vector<@TYPE@>, and in Python,
-     * this is either a list or tuple. The data can repeat infinitely
-     * until the flowgraph is terminated by some other event or, the
-     * default, run the data once and stop.
-     *
-     * The vector source can also produce stream tags with the
-     * data. Pass in a vector of gr::tag_t objects and they will be
-     * emitted based on the specified offset of the tag.
-     *
-     * GNU Radio provides a utility Python module in gr.tag_utils to
-     * convert between tags and Python objects:
-     * gr.tag_utils.python_to_tag.
-     *
-     * We can create tags as Python lists (or tuples) using the list
-     * structure [int offset, pmt key, pmt value, pmt srcid]. It is
-     * important to define the list/tuple with the values in the
-     * correct order and with the correct data type. A python
-     * dictionary can also be used using the keys: "offset", "key",
-     * "value", and "srcid" with the same data types as for the lists.
-     *
-     * When given a list of tags, the vector source will emit the tags
-     * repeatedly by updating the offset relative to the vector stream
-     * length. That is, if the vector has 500 items and a tag has an
-     * offset of 0, that tag will be placed on item 0, 500, 1000,
-     * 1500, etc.
-     */
-    class BLOCKS_API @NAME@ : virtual public sync_block
-    {
-    public:
-      // gr::blocks::@NAME@::sptr
-      typedef boost::shared_ptr<@NAME@> sptr;
-
-      static sptr make(const std::vector<@TYPE@> &data,
-                       bool repeat=false, int vlen=1,
-                       const std::vector<tag_t> &tags=std::vector<tag_t>());
-
-      virtual void rewind() = 0;
-      virtual void set_data(const std::vector<@TYPE@> &data,
-                            const std::vector<tag_t> &tags=std::vector<tag_t>()) = 0;
-      virtual void set_repeat(bool repeat) = 0;
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-blocks/include/gnuradio/blocks/xor_XX.h.t b/gr-blocks/include/gnuradio/blocks/xor_XX.h.t
deleted file mode 100644
index e58866f03e..0000000000
--- a/gr-blocks/include/gnuradio/blocks/xor_XX.h.t
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/sync_block.h>
-
-namespace gr {
-  namespace blocks {
-
-    /*!
-     * \brief output = input_0 ^ input_1 ^ , ... ^ input_N)
-     * \ingroup boolean_operators_blk
-     *
-     * Bitwise boolean xor across all input streams.
-     */
-    class BLOCKS_API @NAME@ : virtual public sync_block
-    {
-    public:
-
-      // gr::blocks::@NAME@::sptr
-      typedef boost::shared_ptr<@NAME@> sptr;
-
-      static sptr make(size_t vlen=1);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-blocks/include/gnuradio/blocks/xor_blk.h b/gr-blocks/include/gnuradio/blocks/xor_blk.h
new file mode 100644
index 0000000000..3113a0703c
--- /dev/null
+++ b/gr-blocks/include/gnuradio/blocks/xor_blk.h
@@ -0,0 +1,57 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef XOR_BLK_H
+#define XOR_BLK_H
+
+#include <gnuradio/blocks/api.h>
+#include <gnuradio/sync_block.h>
+#include <cstdint>
+
+namespace gr {
+  namespace blocks {
+
+    /*!
+     * \brief output = input_0 ^ input_1 ^ , ... ^ input_N)
+     * \ingroup boolean_operators_blk
+     *
+     * Bitwise boolean xor across all input streams.
+     */
+template<class T>
+    class BLOCKS_API xor_blk : virtual public sync_block
+    {
+    public:
+
+      // gr::blocks::xor::sptr
+      typedef boost::shared_ptr< xor_blk<T> > sptr;
+
+      static sptr make(size_t vlen=1);
+    };
+
+typedef xor_blk<std::uint8_t> xor_bb;
+typedef xor_blk<std::int16_t> xor_ss;
+typedef xor_blk<std::int32_t> xor_ii;
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* XOR_BLK_H */
diff --git a/gr-blocks/lib/CMakeLists.txt b/gr-blocks/lib/CMakeLists.txt
index 5cc2e1e1da..49e7307658 100644
--- a/gr-blocks/lib/CMakeLists.txt
+++ b/gr-blocks/lib/CMakeLists.txt
@@ -22,40 +22,6 @@
 ########################################################################
 include(${CMAKE_CURRENT_SOURCE_DIR}/ConfigChecks.cmake)
 
-########################################################################
-# Invoke macro to generate various sources
-########################################################################
-include(GrMiscUtils)
-GR_EXPAND_X_CC_H_IMPL(blocks abs_XX             ss ii ff)
-GR_EXPAND_X_CC_H_IMPL(blocks add_XX             ss ii cc)
-GR_EXPAND_X_CC_H_IMPL(blocks add_const_vXX      bb ss ii ff cc)
-GR_EXPAND_X_CC_H_IMPL(blocks and_XX             bb ss ii)
-GR_EXPAND_X_CC_H_IMPL(blocks and_const_XX       bb ss ii)
-GR_EXPAND_X_CC_H_IMPL(blocks argmax_XX          fs is ss)
-GR_EXPAND_X_CC_H_IMPL(blocks divide_XX          ss ii)
-GR_EXPAND_X_CC_H_IMPL(blocks integrate_XX       ss ii ff cc)
-GR_EXPAND_X_CC_H_IMPL(blocks max_XX             ss ii ff)
-GR_EXPAND_X_CC_H_IMPL(blocks min_XX             ss ii ff)
-GR_EXPAND_X_CC_H_IMPL(blocks moving_average_XX  ss ii ff cc)
-GR_EXPAND_X_CC_H_IMPL(blocks multiply_XX        ss ii)
-GR_EXPAND_X_CC_H_IMPL(blocks multiply_const_XX  ss ii)
-GR_EXPAND_X_CC_H_IMPL(blocks multiply_const_vXX ss ii)
-GR_EXPAND_X_CC_H_IMPL(blocks mute_XX            ss ii ff cc)
-GR_EXPAND_X_CC_H_IMPL(blocks not_XX             bb ss ii)
-GR_EXPAND_X_CC_H_IMPL(blocks or_XX              bb ss ii)
-GR_EXPAND_X_CC_H_IMPL(blocks peak_detector_XX   fb ib sb)
-GR_EXPAND_X_CC_H_IMPL(blocks probe_signal_X     b s i f c)
-GR_EXPAND_X_CC_H_IMPL(blocks probe_signal_vX    b s i f c)
-GR_EXPAND_X_CC_H_IMPL(blocks sample_and_hold_XX bb ss ii ff)
-GR_EXPAND_X_CC_H_IMPL(blocks sub_XX             ss ii cc)
-GR_EXPAND_X_CC_H_IMPL(blocks tsb_vector_sink_X  b s i f c)
-GR_EXPAND_X_CC_H_IMPL(blocks xor_XX             bb ss ii)
-GR_EXPAND_X_CC_H_IMPL(blocks packed_to_unpacked_XX bb ss ii)
-GR_EXPAND_X_CC_H_IMPL(blocks unpacked_to_packed_XX bb ss ii)
-GR_EXPAND_X_CC_H_IMPL(blocks vector_insert_X    b s i f c)
-GR_EXPAND_X_CC_H_IMPL(blocks vector_sink_X      b s i f c)
-GR_EXPAND_X_CC_H_IMPL(blocks vector_source_X    b s i f c)
-
 ########################################################################
 # Setup the include and linker paths
 ########################################################################
@@ -78,14 +44,40 @@ endif(ENABLE_GR_CTRLPORT)
 # Setup library
 ########################################################################
 list(APPEND gr_blocks_sources
-    ${generated_sources}
+    abs_blk_impl.cc
+    add_blk_impl.cc
+    add_const_v_impl.cc
+    and_blk_impl.cc
+    and_const_impl.cc
+    argmax_impl.cc
+    divide_impl.cc
+    integrate_impl.cc
+    max_blk_impl.cc
+    min_blk_impl.cc
+    moving_average_impl.cc
+    multiply_const_impl.cc
+    multiply_impl.cc
+    mute_impl.cc
+    not_blk_impl.cc
+    packed_to_unpacked_impl.cc
+    peak_detector_impl.cc
+    probe_signal_impl.cc
+    probe_signal_v_impl.cc
+    sample_and_hold_impl.cc
+    sub_impl.cc
+    tsb_vector_sink_impl.cc
+    unpacked_to_packed_impl.cc
+    vector_insert_impl.cc
+    vector_sink_impl.cc
+    vector_source_impl.cc
+    xor_blk_impl.cc
+    or_blk_impl.cc
     control_loop.cc
     count_bits.cc
     file_sink_base.cc
     pack_k_bits.cc
     unpack_k_bits.cc
     wavfile.cc
-    add_ff_impl.cc
     add_const_bb_impl.cc
     add_const_ss_impl.cc
     add_const_ii_impl.cc
@@ -111,8 +103,6 @@ list(APPEND gr_blocks_sources
     conjugate_cc_impl.cc
     copy_impl.cc
     deinterleave_impl.cc
-    divide_cc_impl.cc
-    divide_ff_impl.cc
     delay_impl.cc
     endian_swap_impl.cc
     exponentiate_const_cci_impl.cc
@@ -142,15 +132,9 @@ list(APPEND gr_blocks_sources
     message_debug_impl.cc
     message_strobe_impl.cc
     message_strobe_random_impl.cc
-    multiply_cc_impl.cc
-    multiply_ff_impl.cc
     multiply_conjugate_cc_impl.cc
-    multiply_const_cc_impl.cc
-    multiply_const_vcc_impl.cc
-    multiply_const_ff_impl.cc
-    multiply_const_vff_impl.cc
-    multiply_matrix_cc_impl.cc
-    multiply_matrix_ff_impl.cc
+    multiply_const_v_impl.cc
+    multiply_matrix_impl.cc
     multiply_by_tag_value_cc_impl.cc
     nlog10_ff_impl.cc
     nop_impl.cc
@@ -186,7 +170,6 @@ list(APPEND gr_blocks_sources
     streams_to_stream_impl.cc
     streams_to_vector_impl.cc
     stretch_ff_impl.cc
-    sub_ff_impl.cc
     tag_share_impl.cc
     tagged_file_sink_impl.cc
     tagged_stream_to_pdu_impl.cc
@@ -252,7 +235,6 @@ list(APPEND blocks_libs
 )
 
 add_library(gnuradio-blocks SHARED ${gr_blocks_sources})
-add_dependencies(gnuradio-blocks blocks_generated_includes)
 
 target_link_libraries(gnuradio-blocks ${blocks_libs})
 GR_LIBRARY_FOO(gnuradio-blocks)
@@ -278,7 +260,7 @@ if(ENABLE_STATIC_LIBS)
 
   add_library(gnuradio-blocks_static STATIC ${gr_blocks_sources})
 
-  add_dependencies(gnuradio-blocks_static blocks_generated_includes)
+  add_dependencies(gnuradio-blocks_static)
 
   if(NOT WIN32)
     set_target_properties(gnuradio-blocks_static
diff --git a/gr-blocks/lib/abs_XX_impl.cc.t b/gr-blocks/lib/abs_XX_impl.cc.t
deleted file mode 100644
index 195d8dff3d..0000000000
--- a/gr-blocks/lib/abs_XX_impl.cc.t
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <@NAME_IMPL@.h>
-#include <gnuradio/io_signature.h>
-
-namespace gr {
-  namespace blocks {
-
-    @NAME@::sptr @NAME@::make(size_t vlen)
-    {
-      return gnuradio::get_initial_sptr(new @NAME_IMPL@(vlen));
-    }
-
-    @NAME_IMPL@::@NAME_IMPL@(size_t vlen)
-      : sync_block ("@NAME@",
-                      io_signature::make (1, 1, sizeof (@I_TYPE@)*vlen),
-                      io_signature::make (1, 1, sizeof (@O_TYPE@)*vlen)),
-        d_vlen(vlen)
-    {
-    }
-
-    int
-    @NAME_IMPL@::work(int noutput_items,
-		      gr_vector_const_void_star &input_items,
-		      gr_vector_void_star &output_items)
-    {
-      @I_TYPE@ *iptr = (@I_TYPE@ *) input_items[0];
-      @O_TYPE@ *optr = (@O_TYPE@ *) output_items[0];
-
-      for(size_t i=0; i<noutput_items*d_vlen; i++) {
-        @I_TYPE@ val = iptr[i];
-        optr[i] = ((val < ((@I_TYPE@)0)) ? -val : val);
-      }
-
-      return noutput_items;
-    }
-
-  } /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/abs_XX_impl.h.t b/gr-blocks/lib/abs_XX_impl.h.t
deleted file mode 100644
index fa96c84073..0000000000
--- a/gr-blocks/lib/abs_XX_impl.h.t
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME_IMPL@
-#define @GUARD_NAME_IMPL@
-
-#include <gnuradio/blocks/@NAME@.h>
-
-namespace gr {
-  namespace blocks {
-
-    class BLOCKS_API @NAME_IMPL@ : public @NAME@
-    {
-    private:
-      size_t d_vlen;
-
-    public:
-      @NAME_IMPL@(size_t vlen);
-
-      int work(int noutput_items,
-	       gr_vector_const_void_star &input_items,
-	       gr_vector_void_star &output_items);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME_IMPL@ */
diff --git a/gr-blocks/lib/abs_blk_impl.cc b/gr-blocks/lib/abs_blk_impl.cc
new file mode 100644
index 0000000000..aab0c8552a
--- /dev/null
+++ b/gr-blocks/lib/abs_blk_impl.cc
@@ -0,0 +1,70 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "abs_blk_impl.h"
+#include <gnuradio/io_signature.h>
+
+namespace gr {
+  namespace blocks {
+
+    template <class T>
+    typename abs_blk<T>::sptr abs_blk<T>::make(size_t vlen)
+    {
+      return gnuradio::get_initial_sptr(new abs_blk_impl<T> (vlen));
+    }
+
+    template <class T>
+    abs_blk_impl<T> ::abs_blk_impl (size_t vlen)
+      : sync_block("abs_blk",
+                      io_signature::make (1, 1, sizeof (T)*vlen),
+                      io_signature::make (1, 1, sizeof (T)*vlen)),
+        d_vlen(vlen)
+    {
+    }
+
+    template <class T>
+    int
+    abs_blk_impl<T> ::work(int noutput_items,
+		      gr_vector_const_void_star &input_items,
+		      gr_vector_void_star &output_items)
+    {
+      T *iptr = (T *) input_items[0];
+      T *optr = (T *) output_items[0];
+
+      for(size_t i=0; i<noutput_items*d_vlen; i++) {
+        T val = iptr[i];
+        optr[i] = ((val < ((T)0)) ? -val : val);
+      }
+
+      return noutput_items;
+    }
+
+template class abs_blk<std::int16_t>;
+template class abs_blk<std::int32_t>;
+template class abs_blk<float>;
+  } /* namespace blocks */
+} /* namespace gr */
diff --git a/gr-blocks/lib/abs_blk_impl.h b/gr-blocks/lib/abs_blk_impl.h
new file mode 100644
index 0000000000..787a056767
--- /dev/null
+++ b/gr-blocks/lib/abs_blk_impl.h
@@ -0,0 +1,49 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef ABS_BLK_IMPL_H
+#define ABS_BLK_IMPL_H
+
+#include <gnuradio/blocks/abs_blk.h>
+
+namespace gr {
+  namespace blocks {
+
+template<class T>
+    class BLOCKS_API abs_blk_impl  : public  abs_blk<T>
+    {
+    private:
+      size_t d_vlen;
+
+    public:
+      abs_blk_impl(size_t vlen);
+
+      int work(int noutput_items,
+	       gr_vector_const_void_star &input_items,
+	       gr_vector_void_star &output_items);
+    };
+
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* ABS_BLK_IMPL_H */
diff --git a/gr-blocks/lib/add_XX_impl.cc.t b/gr-blocks/lib/add_XX_impl.cc.t
deleted file mode 100644
index a88398d89b..0000000000
--- a/gr-blocks/lib/add_XX_impl.cc.t
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2009,2010,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <@NAME_IMPL@.h>
-#include <gnuradio/io_signature.h>
-
-namespace gr {
-  namespace blocks {
-
-    @NAME@::sptr @NAME@::make(size_t vlen)
-    {
-      return gnuradio::get_initial_sptr(new @NAME_IMPL@(vlen));
-    }
-
-    @NAME_IMPL@::@NAME_IMPL@(size_t vlen)
-      : sync_block ("@NAME@",
-		       io_signature::make (1, -1, sizeof (@I_TYPE@)*vlen),
-		       io_signature::make (1,  1, sizeof (@O_TYPE@)*vlen)),
-      d_vlen(vlen)
-    {
-    }
-
-    int
-    @NAME_IMPL@::work(int noutput_items,
-		      gr_vector_const_void_star &input_items,
-		      gr_vector_void_star &output_items)
-    {
-      @O_TYPE@ *optr = (@O_TYPE@ *) output_items[0];
-
-      int ninputs = input_items.size ();
-
-      for (size_t i = 0; i < noutput_items*d_vlen; i++){
-	@I_TYPE@ acc = ((@I_TYPE@ *) input_items[0])[i];
-	for (int j = 1; j < ninputs; j++)
-	  acc += ((@I_TYPE@ *) input_items[j])[i];
-
-	*optr++ = (@O_TYPE@) acc;
-      }
-
-      return noutput_items;
-    }
-
-  } /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/add_XX_impl.h.t b/gr-blocks/lib/add_XX_impl.h.t
deleted file mode 100644
index 22292b9fa5..0000000000
--- a/gr-blocks/lib/add_XX_impl.h.t
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2009,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME_IMPL@
-#define @GUARD_NAME_IMPL@
-
-#include <gnuradio/blocks/@NAME@.h>
-
-namespace gr {
-  namespace blocks {
-
-    class BLOCKS_API @NAME_IMPL@ : public @NAME@
-    {
-    private:
-      size_t d_vlen;
-
-    public:
-      @NAME_IMPL@(size_t vlen);
-
-      int work(int noutput_items,
-	       gr_vector_const_void_star &input_items,
-	       gr_vector_void_star &output_items);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME_IMPL@ */
diff --git a/gr-blocks/lib/add_blk_impl.cc b/gr-blocks/lib/add_blk_impl.cc
new file mode 100644
index 0000000000..9cda4d080e
--- /dev/null
+++ b/gr-blocks/lib/add_blk_impl.cc
@@ -0,0 +1,106 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2009,2010,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "add_blk_impl.h"
+#include <gnuradio/io_signature.h>
+#include <volk/volk.h>
+
+namespace gr {
+  namespace blocks {
+
+    template <class T>
+    typename add_blk<T>::sptr add_blk<T>::make(size_t vlen)
+    {
+      return gnuradio::get_initial_sptr(new add_blk_impl<T> (vlen));
+    }
+
+
+    template <>
+    add_blk_impl<float>::add_blk_impl(size_t vlen)
+      : sync_block("add_ff",
+                   io_signature::make (1, -1, sizeof(float)*vlen),
+                   io_signature::make (1,  1, sizeof(float)*vlen)),
+        d_vlen(vlen)
+    {
+      const int alignment_multiple =
+        volk_get_alignment() / sizeof(float);
+      set_alignment(std::max(1, alignment_multiple));
+    }
+
+    template <>
+    int
+    add_blk_impl<float>::work(int noutput_items,
+                              gr_vector_const_void_star &input_items,
+                              gr_vector_void_star &output_items)
+    {
+      float *out = (float *) output_items[0];
+      int noi = d_vlen*noutput_items;
+
+      memcpy(out, input_items[0], noi*sizeof(float));
+      for(size_t i = 1; i < input_items.size(); i++)
+        volk_32f_x2_add_32f(out, out, (const float*)input_items[i], noi);
+      return noutput_items;
+    }
+
+
+
+    template <class T>
+    add_blk_impl<T> ::add_blk_impl (size_t vlen)
+      : sync_block ("add_blk",
+		       io_signature::make (1, -1, sizeof (T)*vlen),
+		       io_signature::make (1,  1, sizeof (T)*vlen)),
+      d_vlen(vlen)
+    {
+    }
+
+    template <class T>
+    int
+    add_blk_impl<T> ::work(int noutput_items,
+		      gr_vector_const_void_star &input_items,
+		      gr_vector_void_star &output_items)
+    {
+      T *optr = (T *) output_items[0];
+
+      int ninputs = input_items.size ();
+
+      for (size_t i = 0; i < noutput_items*d_vlen; i++){
+	T acc = ((T *) input_items[0])[i];
+	for (int j = 1; j < ninputs; j++)
+	  acc += ((T *) input_items[j])[i];
+
+	*optr++ = (T) acc;
+      }
+
+      return noutput_items;
+    }
+
+template class add_blk<std::int16_t>;
+template class add_blk<std::int32_t>;
+template class add_blk<gr_complex>;
+template class add_blk<float>;
+  } /* namespace blocks */
+} /* namespace gr */
diff --git a/gr-blocks/lib/add_blk_impl.h b/gr-blocks/lib/add_blk_impl.h
new file mode 100644
index 0000000000..74f3e1bac1
--- /dev/null
+++ b/gr-blocks/lib/add_blk_impl.h
@@ -0,0 +1,49 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2009,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef ADD_BLK_IMPL_H
+#define ADD_BLK_IMPL_H
+
+#include <gnuradio/blocks/add_blk.h>
+
+namespace gr {
+  namespace blocks {
+
+template<class T>
+class BLOCKS_API add_blk_impl  : public  add_blk<T>
+    {
+    private:
+      size_t d_vlen;
+
+    public:
+      add_blk_impl (size_t vlen);
+
+      int work(int noutput_items,
+	       gr_vector_const_void_star &input_items,
+	       gr_vector_void_star &output_items);
+    };
+
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* ADD_BLK_IMPL_H */
diff --git a/gr-blocks/lib/add_const_vXX_impl.cc.t b/gr-blocks/lib/add_const_vXX_impl.cc.t
deleted file mode 100644
index 28471ddeb1..0000000000
--- a/gr-blocks/lib/add_const_vXX_impl.cc.t
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2009,2010,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <@NAME_IMPL@.h>
-#include <gnuradio/io_signature.h>
-
-namespace gr {
-  namespace blocks {
-
-    @NAME@::sptr @NAME@::make(std::vector<@O_TYPE@> k)
-    {
-      return gnuradio::get_initial_sptr(new @NAME_IMPL@(k));
-    }
-
-    @NAME_IMPL@::@NAME_IMPL@(std::vector<@O_TYPE@> k)
-      : sync_block ("@NAME@",
-		       io_signature::make (1, 1, sizeof (@I_TYPE@)*k.size()),
-		       io_signature::make (1, 1, sizeof (@O_TYPE@)*k.size())),
-      d_k(k)
-    {
-    }
-
-    int
-    @NAME_IMPL@::work(int noutput_items,
-		      gr_vector_const_void_star &input_items,
-		      gr_vector_void_star &output_items)
-    {
-      @I_TYPE@ *iptr = (@I_TYPE@ *)input_items[0];
-      @O_TYPE@ *optr = (@O_TYPE@ *)output_items[0];
-
-      int nitems_per_block = output_signature()->sizeof_stream_item(0)/sizeof(@I_TYPE@);
-
-      for (int i = 0; i < noutput_items; i++)
-	for (int j = 0; j < nitems_per_block; j++)
-	  *optr++ = *iptr++ + d_k[j];
-
-      return noutput_items;
-    }
-
-  } /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/add_const_vXX_impl.h.t b/gr-blocks/lib/add_const_vXX_impl.h.t
deleted file mode 100644
index 6c087d9461..0000000000
--- a/gr-blocks/lib/add_const_vXX_impl.h.t
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2006,2010,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME_IMPL@
-#define @GUARD_NAME_IMPL@
-
-#include <gnuradio/blocks/@NAME@.h>
-
-namespace gr {
-  namespace blocks {
-
-    class BLOCKS_API @NAME_IMPL@ : public @NAME@
-    {
-      std::vector<@O_TYPE@> d_k;
-
-    public:
-      @NAME_IMPL@(std::vector<@O_TYPE@> k);
-
-      std::vector<@O_TYPE@> k() const { return d_k; }
-      void set_k(std::vector<@O_TYPE@> k) { d_k = k; }
-
-      int work(int noutput_items,
-	       gr_vector_const_void_star &input_items,
-	       gr_vector_void_star &output_items);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME_IMPL@ */
diff --git a/gr-blocks/lib/add_const_v_impl.cc b/gr-blocks/lib/add_const_v_impl.cc
new file mode 100644
index 0000000000..38a4883485
--- /dev/null
+++ b/gr-blocks/lib/add_const_v_impl.cc
@@ -0,0 +1,72 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2009,2010,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <add_const_v_impl.h>
+#include <gnuradio/io_signature.h>
+
+namespace gr {
+  namespace blocks {
+
+    template <class T>
+    typename add_const_v<T>::sptr add_const_v<T>::make(std::vector<T> k)
+    {
+      return gnuradio::get_initial_sptr(new add_const_v_impl<T>(k));
+    }
+
+    template <class T>
+    add_const_v_impl<T>::add_const_v_impl(std::vector<T> k)
+      : sync_block ("add_const_v",
+		       io_signature::make (1, 1, sizeof (T)*k.size()),
+		       io_signature::make (1, 1, sizeof (T)*k.size())),
+      d_k(k)
+    {
+    }
+
+    template <class T>
+    int
+    add_const_v_impl<T>::work(int noutput_items,
+		      gr_vector_const_void_star &input_items,
+		      gr_vector_void_star &output_items)
+    {
+      T *iptr = (T *)input_items[0];
+      T *optr = (T *)output_items[0];
+
+      int nitems_per_block = this->output_signature()->sizeof_stream_item(0)/sizeof(T);
+
+      for (int i = 0; i < noutput_items; i++)
+	for (int j = 0; j < nitems_per_block; j++)
+	  *optr++ = *iptr++ + d_k[j];
+
+      return noutput_items;
+    }
+
+    template class add_const_v<std::uint8_t>;
+    template class add_const_v<std::int16_t>;
+    template class add_const_v<std::int32_t>;
+    template class add_const_v<float>;
+    template class add_const_v<gr_complex>;
+  } /* namespace blocks */
+} /* namespace gr */
diff --git a/gr-blocks/lib/add_const_v_impl.h b/gr-blocks/lib/add_const_v_impl.h
new file mode 100644
index 0000000000..1257ec08a0
--- /dev/null
+++ b/gr-blocks/lib/add_const_v_impl.h
@@ -0,0 +1,50 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2006,2010,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef ADD_CONST_V_IMPL_H
+#define ADD_CONST_V_IMPL_H
+
+#include <gnuradio/blocks/add_const_v.h>
+
+namespace gr {
+  namespace blocks {
+
+    template <class T>
+    class BLOCKS_API add_const_v_impl: public add_const_v<T>
+    {
+      std::vector<T> d_k;
+
+    public:
+      add_const_v_impl(std::vector<T> k);
+
+      std::vector<T> k() const { return d_k; }
+      void set_k(std::vector<T> k) { d_k = k; }
+
+      int work(int noutput_items,
+	       gr_vector_const_void_star &input_items,
+	       gr_vector_void_star &output_items);
+    };
+
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* ADD_CONST_V_IMPL_H */
diff --git a/gr-blocks/lib/add_ff_impl.cc b/gr-blocks/lib/add_ff_impl.cc
deleted file mode 100644
index e99b121816..0000000000
--- a/gr-blocks/lib/add_ff_impl.cc
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "add_ff_impl.h"
-#include <gnuradio/io_signature.h>
-#include <volk/volk.h>
-
-namespace gr {
-  namespace blocks {
-
-    add_ff::sptr add_ff::make(size_t vlen)
-    {
-      return gnuradio::get_initial_sptr(new add_ff_impl(vlen));
-    }
-
-    add_ff_impl::add_ff_impl(size_t vlen)
-      : sync_block("add_ff",
-		      io_signature::make (1, -1, sizeof(float)*vlen),
-		      io_signature::make (1,  1, sizeof(float)*vlen)),
-	d_vlen(vlen)
-    {
-      const int alignment_multiple =
-	volk_get_alignment() / sizeof(float);
-      set_alignment(std::max(1, alignment_multiple));
-    }
-
-    int
-    add_ff_impl::work(int noutput_items,
-		      gr_vector_const_void_star &input_items,
-		      gr_vector_void_star &output_items)
-    {
-      float *out = (float *) output_items[0];
-      int noi = d_vlen*noutput_items;
-
-      memcpy(out, input_items[0], noi*sizeof(float));
-      for(size_t i = 1; i < input_items.size(); i++)
-        volk_32f_x2_add_32f(out, out, (const float*)input_items[i], noi);
-      return noutput_items;
-    }
-
-  } /* namespace blocks */
-}/* namespace gr */
diff --git a/gr-blocks/lib/add_ff_impl.h b/gr-blocks/lib/add_ff_impl.h
deleted file mode 100644
index 4683688399..0000000000
--- a/gr-blocks/lib/add_ff_impl.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_BLOCKS_ADD_FF_IMPL_H
-#define INCLUDED_BLOCKS_ADD_FF_IMPL_H
-
-#include <gnuradio/blocks/add_ff.h>
-
-namespace gr {
-  namespace blocks {
-
-    class BLOCKS_API add_ff_impl : public add_ff
-    {
-      size_t d_vlen;
-
-    public:
-      add_ff_impl(size_t vlen);
-
-      int work(int noutput_items,
-	       gr_vector_const_void_star &input_items,
-	       gr_vector_void_star &output_items);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-
-#endif /* INCLUDED_BLOCKS_ADD_FF_IMPL_H */
diff --git a/gr-blocks/lib/and_XX_impl.cc.t b/gr-blocks/lib/and_XX_impl.cc.t
deleted file mode 100644
index c2aa31c50c..0000000000
--- a/gr-blocks/lib/and_XX_impl.cc.t
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <@NAME_IMPL@.h>
-#include <gnuradio/io_signature.h>
-
-namespace gr {
-  namespace blocks {
-
-    @NAME@::sptr @NAME@::make(size_t vlen)
-    {
-      return gnuradio::get_initial_sptr(new @NAME_IMPL@(vlen));
-    }
-
-    @NAME_IMPL@::@NAME_IMPL@(size_t vlen)
-      : sync_block ("@NAME@",
-		       io_signature::make (1, -1, sizeof (@I_TYPE@)*vlen),
-		       io_signature::make (1,  1, sizeof (@O_TYPE@)*vlen)),
-      d_vlen(vlen)
-    {
-    }
-
-    int
-    @NAME_IMPL@::work(int noutput_items,
-		      gr_vector_const_void_star &input_items,
-		      gr_vector_void_star &output_items)
-    {
-      @O_TYPE@ *optr = (@O_TYPE@ *) output_items[0];
-
-      int ninputs = input_items.size ();
-
-      for (size_t i = 0; i < noutput_items*d_vlen; i++){
-	@I_TYPE@ acc = ((@I_TYPE@ *) input_items[0])[i];
-	for (int j = 1; j < ninputs; j++)
-	  acc &= ((@I_TYPE@ *) input_items[j])[i];
-
-	*optr++ = (@O_TYPE@) acc;
-      }
-
-      return noutput_items;
-    }
-
-  } /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/and_XX_impl.h.t b/gr-blocks/lib/and_XX_impl.h.t
deleted file mode 100644
index f7db3f2162..0000000000
--- a/gr-blocks/lib/and_XX_impl.h.t
+++ /dev/null
@@ -1,48 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME_IMPL@
-#define @GUARD_NAME_IMPL@
-
-#include <gnuradio/blocks/@NAME@.h>
-
-namespace gr {
-  namespace blocks {
-
-    class BLOCKS_API @NAME_IMPL@ : public @NAME@
-    {
-      size_t d_vlen;
-
-    public:
-      @NAME_IMPL@(size_t vlen);
-
-      int work(int noutput_items,
-	       gr_vector_const_void_star &input_items,
-	       gr_vector_void_star &output_items);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME_IMPL@ */
diff --git a/gr-blocks/lib/and_blk_impl.cc b/gr-blocks/lib/and_blk_impl.cc
new file mode 100644
index 0000000000..f0f329dae4
--- /dev/null
+++ b/gr-blocks/lib/and_blk_impl.cc
@@ -0,0 +1,74 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "and_blk_impl.h"
+#include <gnuradio/io_signature.h>
+
+namespace gr {
+  namespace blocks {
+
+    template <class T>
+    typename and_blk<T>::sptr and_blk<T>::make(size_t vlen)
+    {
+      return gnuradio::get_initial_sptr(new and_blk_impl<T> (vlen));
+    }
+
+    template <class T>
+    and_blk_impl<T> ::and_blk_impl (size_t vlen)
+      : sync_block ("and_blk",
+		       io_signature::make (1, -1, sizeof (T)*vlen),
+		       io_signature::make (1,  1, sizeof (T)*vlen)),
+      d_vlen(vlen)
+    {
+    }
+
+    template <class T>
+    int
+    and_blk_impl<T> ::work(int noutput_items,
+		      gr_vector_const_void_star &input_items,
+		      gr_vector_void_star &output_items)
+    {
+      T *optr = (T *) output_items[0];
+
+      int ninputs = input_items.size ();
+
+      for (size_t i = 0; i < noutput_items*d_vlen; i++){
+	T acc = ((T *) input_items[0])[i];
+	for (int j = 1; j < ninputs; j++)
+	  acc &= ((T *) input_items[j])[i];
+
+	*optr++ = (T) acc;
+      }
+
+      return noutput_items;
+    }
+
+template class and_blk<std::uint8_t>;
+template class and_blk<std::int16_t>;
+template class and_blk<std::int32_t>;
+  } /* namespace blocks */
+} /* namespace gr */
diff --git a/gr-blocks/lib/and_blk_impl.h b/gr-blocks/lib/and_blk_impl.h
new file mode 100644
index 0000000000..54d721111e
--- /dev/null
+++ b/gr-blocks/lib/and_blk_impl.h
@@ -0,0 +1,48 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef AND_BLK_IMPL_H
+#define AND_BLK_IMPL_H
+
+#include <gnuradio/blocks/and_blk.h>
+
+namespace gr {
+  namespace blocks {
+
+template<class T>
+    class BLOCKS_API and_blk_impl  : public  and_blk<T>
+    {
+      size_t d_vlen;
+
+    public:
+      and_blk_impl (size_t vlen);
+
+      int work(int noutput_items,
+	       gr_vector_const_void_star &input_items,
+	       gr_vector_void_star &output_items);
+    };
+
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* AND_BLK_IMPL_H */
diff --git a/gr-blocks/lib/and_const_XX_impl.cc.t b/gr-blocks/lib/and_const_XX_impl.cc.t
deleted file mode 100644
index 975dd9334a..0000000000
--- a/gr-blocks/lib/and_const_XX_impl.cc.t
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <@NAME_IMPL@.h>
-#include <gnuradio/io_signature.h>
-
-namespace gr {
-  namespace blocks {
-
-    @NAME@::sptr @NAME@::make(@O_TYPE@ k)
-    {
-      return gnuradio::get_initial_sptr(new @NAME_IMPL@(k));
-    }
-
-    @NAME_IMPL@::@NAME_IMPL@(@O_TYPE@ k)
-      : sync_block ("@NAME@",
-		       io_signature::make (1, 1, sizeof (@I_TYPE@)),
-		       io_signature::make (1, 1, sizeof (@O_TYPE@))),
-      d_k(k)
-    {
-    }
-
-    int
-    @NAME_IMPL@::work(int noutput_items,
-		      gr_vector_const_void_star &input_items,
-		      gr_vector_void_star &output_items)
-    {
-      @I_TYPE@ *iptr = (@I_TYPE@ *) input_items[0];
-      @O_TYPE@ *optr = (@O_TYPE@ *) output_items[0];
-
-      int size = noutput_items;
-
-      while (size >= 8){
-	*optr++ = *iptr++ & d_k;
-	*optr++ = *iptr++ & d_k;
-	*optr++ = *iptr++ & d_k;
-	*optr++ = *iptr++ & d_k;
-	*optr++ = *iptr++ & d_k;
-	*optr++ = *iptr++ & d_k;
-	*optr++ = *iptr++ & d_k;
-	*optr++ = *iptr++ & d_k;
-	size -= 8;
-      }
-
-      while (size-- > 0)
-	*optr++ = *iptr++ & d_k;
-
-      return noutput_items;
-    }
-
-  } /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/and_const_XX_impl.h.t b/gr-blocks/lib/and_const_XX_impl.h.t
deleted file mode 100644
index 186fda9508..0000000000
--- a/gr-blocks/lib/and_const_XX_impl.h.t
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME_IMPL@
-#define @GUARD_NAME_IMPL@
-
-#include <gnuradio/blocks/@NAME@.h>
-
-namespace gr {
-  namespace blocks {
-
-    class BLOCKS_API @NAME_IMPL@ : public @NAME@
-    {
-      @O_TYPE@ d_k;
-
-    public:
-      @NAME_IMPL@(@O_TYPE@ k);
-
-      @O_TYPE@ k() const { return d_k; }
-      void set_k(@O_TYPE@ k) { d_k = k; }
-
-      int work(int noutput_items,
-	       gr_vector_const_void_star &input_items,
-	       gr_vector_void_star &output_items);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME_IMPL@ */
diff --git a/gr-blocks/lib/and_const_impl.cc b/gr-blocks/lib/and_const_impl.cc
new file mode 100644
index 0000000000..d319f0c25e
--- /dev/null
+++ b/gr-blocks/lib/and_const_impl.cc
@@ -0,0 +1,82 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <and_const_impl.h>
+#include <gnuradio/io_signature.h>
+
+namespace gr {
+  namespace blocks {
+
+    template <class T>
+    typename and_const<T>::sptr and_const<T>::make(T k)
+    {
+      return gnuradio::get_initial_sptr(new and_const_impl<T> (k));
+    }
+
+    template <class T>
+    and_const_impl<T> ::and_const_impl (T k)
+      : sync_block ("and_const",
+		       io_signature::make (1, 1, sizeof (T)),
+		       io_signature::make (1, 1, sizeof (T))),
+      d_k(k)
+    {
+    }
+
+    template <class T>
+    int
+    and_const_impl<T> ::work(int noutput_items,
+		      gr_vector_const_void_star &input_items,
+		      gr_vector_void_star &output_items)
+    {
+      T *iptr = (T *) input_items[0];
+      T *optr = (T *) output_items[0];
+
+      int size = noutput_items;
+
+      while (size >= 8){
+	*optr++ = *iptr++ & d_k;
+	*optr++ = *iptr++ & d_k;
+	*optr++ = *iptr++ & d_k;
+	*optr++ = *iptr++ & d_k;
+	*optr++ = *iptr++ & d_k;
+	*optr++ = *iptr++ & d_k;
+	*optr++ = *iptr++ & d_k;
+	*optr++ = *iptr++ & d_k;
+	size -= 8;
+      }
+
+      while (size-- > 0)
+	*optr++ = *iptr++ & d_k;
+
+      return noutput_items;
+    }
+
+template class and_const<std::uint8_t>;
+template class and_const<std::int16_t>;
+template class and_const<std::int32_t>;
+  } /* namespace blocks */
+} /* namespace gr */
diff --git a/gr-blocks/lib/and_const_impl.h b/gr-blocks/lib/and_const_impl.h
new file mode 100644
index 0000000000..3af7651e22
--- /dev/null
+++ b/gr-blocks/lib/and_const_impl.h
@@ -0,0 +1,51 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef AND_CONST_IMPL_H
+#define AND_CONST_IMPL_H
+
+#include <gnuradio/blocks/and_const.h>
+
+namespace gr {
+  namespace blocks {
+
+template<class T>
+    class BLOCKS_API and_const_impl  : public  and_const<T>
+    {
+      T d_k;
+
+    public:
+      and_const_impl (T k);
+
+      T k() const { return d_k; }
+      void set_k(T k) { d_k = k; }
+
+      int work(int noutput_items,
+	       gr_vector_const_void_star &input_items,
+	       gr_vector_void_star &output_items);
+    };
+
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* AND_CONST_IMPL_H */
diff --git a/gr-blocks/lib/argmax_XX_impl.cc.t b/gr-blocks/lib/argmax_XX_impl.cc.t
deleted file mode 100644
index 87e025e2d7..0000000000
--- a/gr-blocks/lib/argmax_XX_impl.cc.t
+++ /dev/null
@@ -1,86 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007,2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <@NAME_IMPL@.h>
-#include <gnuradio/io_signature.h>
-
-namespace gr {
-  namespace blocks {
-
-    @NAME@::sptr
-    @NAME@::make(size_t vlen)
-    {
-      return gnuradio::get_initial_sptr
-        (new @NAME_IMPL@(vlen));
-    }
-
-    @NAME_IMPL@::@NAME_IMPL@(size_t vlen)
-    : sync_block("@BASE_NAME@",
-                    io_signature::make(1, -1, vlen*sizeof(@I_TYPE@)),
-                    io_signature::make(2, 2, sizeof(@O_TYPE@))),
-      d_vlen(vlen)
-    {
-    }
-
-    @NAME_IMPL@::~@NAME_IMPL@()
-    {
-    }
-
-    int
-    @NAME_IMPL@::work(int noutput_items,
-                      gr_vector_const_void_star &input_items,
-                      gr_vector_void_star &output_items)
-    {
-      int ninputs = input_items.size ();
-
-      @O_TYPE@ *x_optr = (@O_TYPE@ *)output_items[0];
-      @O_TYPE@ *y_optr = (@O_TYPE@ *)output_items[1];
-
-      for(int i = 0; i < noutput_items; i++) {
-        @I_TYPE@ max = ((@I_TYPE@ *)input_items[0])[i*d_vlen];
-        int x = 0;
-        int y = 0;
-
-        for(int j = 0; j < (int)d_vlen; j++ ) {
-          for(int k = 0; k < ninputs; k++) {
-            if(((@I_TYPE@ *)input_items[k])[i*d_vlen + j] > max) {
-              max = ((@I_TYPE@ *)input_items[k])[i*d_vlen + j];
-              x = j;
-              y = k;
-            }
-          }
-        }
-
-        *x_optr++ = (@O_TYPE@)x;
-        *y_optr++ = (@O_TYPE@)y;
-      }
-      return noutput_items;
-    }
-
-  } /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/argmax_XX_impl.h.t b/gr-blocks/lib/argmax_XX_impl.h.t
deleted file mode 100644
index 79da4e1d82..0000000000
--- a/gr-blocks/lib/argmax_XX_impl.h.t
+++ /dev/null
@@ -1,50 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007,2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME_IMPL@
-#define @GUARD_NAME_IMPL@
-
-#include <gnuradio/blocks/@NAME@.h>
-
-namespace gr {
-  namespace blocks {
-
-    class @NAME_IMPL@ : public @NAME@
-    {
-    private:
-      size_t d_vlen;
-
-    public:
-      @NAME_IMPL@(size_t vlen);
-      ~@NAME_IMPL@();
-
-      int work(int noutput_items,
-               gr_vector_const_void_star &input_items,
-               gr_vector_void_star &output_items);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME_IMPL@ */
diff --git a/gr-blocks/lib/argmax_impl.cc b/gr-blocks/lib/argmax_impl.cc
new file mode 100644
index 0000000000..b3fd548aee
--- /dev/null
+++ b/gr-blocks/lib/argmax_impl.cc
@@ -0,0 +1,91 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007,2013,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "argmax_impl.h"
+#include <gnuradio/io_signature.h>
+
+namespace gr {
+  namespace blocks {
+
+    template <class T>
+    typename argmax<T>::sptr
+    argmax<T>::make(size_t vlen)
+    {
+      return gnuradio::get_initial_sptr
+        (new argmax_impl<T>(vlen));
+    }
+
+    template <class T>
+    argmax_impl<T>::argmax_impl(size_t vlen)
+    : sync_block("argmax",
+                    io_signature::make(1, -1, vlen*sizeof(T)),
+                    io_signature::make(2, 2, sizeof(std::int16_t))),
+      d_vlen(vlen)
+    {
+    }
+
+    template <class T>
+    argmax_impl<T>::~argmax_impl()
+    {
+    }
+
+    template <class T>
+    int
+    argmax_impl<T>::work(int noutput_items,
+                      gr_vector_const_void_star &input_items,
+                      gr_vector_void_star &output_items)
+    {
+      int ninputs = input_items.size ();
+
+      std::int16_t *x_optr = (std::int16_t *)output_items[0];
+      std::int16_t *y_optr = (std::int16_t *)output_items[1];
+
+      for(int i = 0; i < noutput_items; i++) {
+        T max = ((T *)input_items[0])[i*d_vlen];
+        int x = 0;
+        int y = 0;
+
+        for(int j = 0; j < (int)d_vlen; j++ ) {
+          for(int k = 0; k < ninputs; k++) {
+            if(((T *)input_items[k])[i*d_vlen + j] > max) {
+              max = ((T *)input_items[k])[i*d_vlen + j];
+              x = j;
+              y = k;
+            }
+          }
+        }
+
+        *x_optr++ = (std::int16_t)x;
+        *y_optr++ = (std::int16_t)y;
+      }
+      return noutput_items;
+    }
+    template class argmax<float>;
+    template class argmax<std::int32_t>;
+    template class argmax<std::int16_t>;
+
+  } /* namespace blocks */
+} /* namespace gr */
diff --git a/gr-blocks/lib/argmax_impl.h b/gr-blocks/lib/argmax_impl.h
new file mode 100644
index 0000000000..e6609930dc
--- /dev/null
+++ b/gr-blocks/lib/argmax_impl.h
@@ -0,0 +1,49 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007,2013,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef ARGMAX_IMPL_H
+#define ARGMAX_IMPL_H
+
+#include <gnuradio/blocks/argmax.h>
+
+namespace gr {
+  namespace blocks {
+
+    template <class T>
+    class argmax_impl : public argmax<T>
+    {
+    private:
+      size_t d_vlen;
+
+    public:
+      argmax_impl(size_t vlen);
+      ~argmax_impl();
+
+      int work(int noutput_items,
+               gr_vector_const_void_star &input_items,
+               gr_vector_void_star &output_items);
+    };
+
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* ARGMAX_IMPL_H */
diff --git a/gr-blocks/lib/divide_XX_impl.cc.t b/gr-blocks/lib/divide_XX_impl.cc.t
deleted file mode 100644
index 052b09217a..0000000000
--- a/gr-blocks/lib/divide_XX_impl.cc.t
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2009,2010,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <@NAME_IMPL@.h>
-#include <gnuradio/io_signature.h>
-
-namespace gr {
-  namespace blocks {
-
-    @NAME@::sptr @NAME@::make(size_t vlen)
-    {
-      return gnuradio::get_initial_sptr(new @NAME_IMPL@(vlen));
-    }
-
-    @NAME_IMPL@::@NAME_IMPL@(size_t vlen)
-      : sync_block ("@NAME@",
-		       io_signature::make (1, -1, sizeof (@I_TYPE@)*vlen),
-		       io_signature::make (1,  1, sizeof (@O_TYPE@)*vlen)),
-      d_vlen(vlen)
-    {
-    }
-
-    int
-    @NAME_IMPL@::work(int noutput_items,
-		      gr_vector_const_void_star &input_items,
-		      gr_vector_void_star &output_items)
-    {
-      @O_TYPE@ *optr = (@O_TYPE@ *) output_items[0];
-
-      int ninputs = input_items.size ();
-
-      for (size_t i = 0; i < noutput_items*d_vlen; i++){
-	@I_TYPE@ acc = ((@I_TYPE@ *) input_items[0])[i];
-	for (int j = 1; j < ninputs; j++)
-	  acc /= ((@I_TYPE@ *) input_items[j])[i];
-
-	*optr++ = (@O_TYPE@) acc;
-      }
-
-      return noutput_items;
-    }
-
-  } /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/divide_XX_impl.h.t b/gr-blocks/lib/divide_XX_impl.h.t
deleted file mode 100644
index 2680ef7012..0000000000
--- a/gr-blocks/lib/divide_XX_impl.h.t
+++ /dev/null
@@ -1,48 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2009,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME_IMPL@
-#define @GUARD_NAME_IMPL@
-
-#include <gnuradio/blocks/@NAME@.h>
-
-namespace gr {
-  namespace blocks {
-
-    class BLOCKS_API @NAME_IMPL@ : public @NAME@
-    {
-      size_t d_vlen;
-
-    public:
-      @NAME_IMPL@(size_t vlen);
-
-      int work(int noutput_items,
-	       gr_vector_const_void_star &input_items,
-	       gr_vector_void_star &output_items);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME_IMPL@ */
diff --git a/gr-blocks/lib/divide_cc_impl.cc b/gr-blocks/lib/divide_cc_impl.cc
deleted file mode 100644
index 56ce09e04c..0000000000
--- a/gr-blocks/lib/divide_cc_impl.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004-2016 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <divide_cc_impl.h>
-#include <volk/volk.h>
-#include <gnuradio/io_signature.h>
-
-namespace gr {
-  namespace blocks {
-
-    divide_cc::sptr divide_cc::make(size_t vlen)
-    {
-      return gnuradio::get_initial_sptr(new divide_cc_impl(vlen));
-    }
-
-    divide_cc_impl::divide_cc_impl(size_t vlen)
-      : sync_block ("divide_cc",
-		       io_signature::make (2, -1, sizeof (gr_complex)*vlen),
-		       io_signature::make (1,  1, sizeof (gr_complex)*vlen)),
-      d_vlen(vlen)
-    {
-    }
-
-    int
-    divide_cc_impl::work(int noutput_items,
-		      gr_vector_const_void_star &input_items,
-		      gr_vector_void_star &output_items)
-    {
-      gr_complex *optr = (gr_complex *) output_items[0];
-      size_t ninputs = input_items.size ();
-      gr_complex *numerator = (gr_complex *) input_items[0];
-      for(size_t inp = 1; inp < ninputs; ++inp)
-      {
-        volk_32fc_x2_divide_32fc(optr, numerator, (gr_complex*) input_items[inp], noutput_items * d_vlen);
-        numerator = optr;
-      }
-
-      return noutput_items;
-    }
-
-  } /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/divide_cc_impl.h b/gr-blocks/lib/divide_cc_impl.h
deleted file mode 100644
index 2bcd698818..0000000000
--- a/gr-blocks/lib/divide_cc_impl.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004-2016 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-
-#ifndef __DIVIDE_CC_IMPL_H__
-#define __DIVIDE_CC_IMPL_H__
-
-#include <gnuradio/blocks/divide_cc.h>
-
-namespace gr {
-  namespace blocks {
-
-    class BLOCKS_API divide_cc_impl : public divide_cc
-    {
-      size_t d_vlen;
-
-    public:
-      divide_cc_impl(size_t vlen);
-
-      int work(int noutput_items,
-	       gr_vector_const_void_star &input_items,
-	       gr_vector_void_star &output_items);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* include guard */
diff --git a/gr-blocks/lib/divide_ff_impl.cc b/gr-blocks/lib/divide_ff_impl.cc
deleted file mode 100644
index 5bd5f88d84..0000000000
--- a/gr-blocks/lib/divide_ff_impl.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004-2016 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <divide_ff_impl.h>
-#include <volk/volk.h>
-#include <gnuradio/io_signature.h>
-
-namespace gr {
-  namespace blocks {
-
-    divide_ff::sptr divide_ff::make(size_t vlen)
-    {
-      return gnuradio::get_initial_sptr(new divide_ff_impl(vlen));
-    }
-
-    divide_ff_impl::divide_ff_impl(size_t vlen)
-      : sync_block ("divide_ff",
-		       io_signature::make (2, -1, sizeof (float)*vlen),
-		       io_signature::make (1,  1, sizeof (float)*vlen)),
-      d_vlen(vlen)
-    {
-    }
-
-    int
-    divide_ff_impl::work(int noutput_items,
-		      gr_vector_const_void_star &input_items,
-		      gr_vector_void_star &output_items)
-    {
-      float *optr = (float *) output_items[0];
-      size_t ninputs = input_items.size ();
-      float *numerator = (float *) input_items[0];
-      for(size_t inp = 1; inp < ninputs; ++inp)
-      {
-        volk_32f_x2_divide_32f(optr, numerator, (float*) input_items[inp], noutput_items * d_vlen);
-        numerator = optr;
-      }
-
-      return noutput_items;
-    }
-
-  } /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/divide_ff_impl.h b/gr-blocks/lib/divide_ff_impl.h
deleted file mode 100644
index efa099f93c..0000000000
--- a/gr-blocks/lib/divide_ff_impl.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004-2016 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-
-#ifndef __DIVIDE_FF_IMPL_H__
-#define __DIVIDE_FF_IMPL_H__
-
-#include <gnuradio/blocks/divide_ff.h>
-
-namespace gr {
-  namespace blocks {
-
-    class BLOCKS_API divide_ff_impl : public divide_ff
-    {
-      size_t d_vlen;
-
-    public:
-      divide_ff_impl(size_t vlen);
-
-      int work(int noutput_items,
-	       gr_vector_const_void_star &input_items,
-	       gr_vector_void_star &output_items);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* include guard */
diff --git a/gr-blocks/lib/divide_impl.cc b/gr-blocks/lib/divide_impl.cc
new file mode 100644
index 0000000000..5fe08f95d1
--- /dev/null
+++ b/gr-blocks/lib/divide_impl.cc
@@ -0,0 +1,130 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2009,2010,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "divide_impl.h"
+#include <gnuradio/io_signature.h>
+#include <volk/volk.h>
+
+namespace gr {
+  namespace blocks {
+
+    template <class T>
+    typename divide<T>::sptr divide<T>::make(size_t vlen)
+    {
+      return gnuradio::get_initial_sptr(new divide_impl<T> (vlen));
+    }
+
+    template <>
+    divide_impl<float>::divide_impl(size_t vlen)
+      : sync_block ("divide",
+                    io_signature::make (2, -1, sizeof (float)*vlen),
+                    io_signature::make (1,  1, sizeof (float)*vlen)),
+        d_vlen(vlen)
+    {
+    }
+
+    template <>
+    int
+    divide_impl<float>::work(int noutput_items,
+                         gr_vector_const_void_star &input_items,
+                         gr_vector_void_star &output_items)
+    {
+      float *optr = (float *) output_items[0];
+      size_t ninputs = input_items.size ();
+      float *numerator = (float *) input_items[0];
+      for(size_t inp = 1; inp < ninputs; ++inp)
+        {
+          volk_32f_x2_divide_32f(optr, numerator, (float*) input_items[inp], noutput_items * d_vlen);
+          numerator = optr;
+        }
+
+      return noutput_items;
+    }
+
+    template <>
+    divide_impl<gr_complex>::divide_impl(size_t vlen)
+      : sync_block ("divide_cc",
+                    io_signature::make (2, -1, sizeof (gr_complex)*vlen),
+                    io_signature::make (1,  1, sizeof (gr_complex)*vlen)),
+        d_vlen(vlen)
+    {
+    }
+
+    template <>
+    int
+    divide_impl<gr_complex>::work(int noutput_items,
+                         gr_vector_const_void_star &input_items,
+                         gr_vector_void_star &output_items)
+    {
+      gr_complex *optr = (gr_complex *) output_items[0];
+      size_t ninputs = input_items.size ();
+      gr_complex *numerator = (gr_complex *) input_items[0];
+      for(size_t inp = 1; inp < ninputs; ++inp)
+        {
+          volk_32fc_x2_divide_32fc(optr, numerator, (gr_complex*) input_items[inp], noutput_items * d_vlen);
+          numerator = optr;
+        }
+
+      return noutput_items;
+    }
+
+    template <class T>
+    divide_impl<T> ::divide_impl (size_t vlen)
+      : sync_block ("divide",
+		       io_signature::make (1, -1, sizeof (T)*vlen),
+		       io_signature::make (1,  1, sizeof (T)*vlen)),
+      d_vlen(vlen)
+    {
+    }
+
+    template <class T>
+    int
+    divide_impl<T> ::work(int noutput_items,
+		      gr_vector_const_void_star &input_items,
+		      gr_vector_void_star &output_items)
+    {
+      T *optr = (T *) output_items[0];
+
+      int ninputs = input_items.size ();
+
+      for (size_t i = 0; i < noutput_items*d_vlen; i++){
+	T acc = ((T *) input_items[0])[i];
+	for (int j = 1; j < ninputs; j++)
+	  acc /= ((T *) input_items[j])[i];
+
+	*optr++ = (T) acc;
+      }
+
+      return noutput_items;
+    }
+
+template class divide<std::int16_t>;
+template class divide<std::int32_t>;
+    template class divide<float>;
+    template class divide<gr_complex>;
+  } /* namespace blocks */
+} /* namespace gr */
diff --git a/gr-blocks/lib/divide_impl.h b/gr-blocks/lib/divide_impl.h
new file mode 100644
index 0000000000..cc9045c711
--- /dev/null
+++ b/gr-blocks/lib/divide_impl.h
@@ -0,0 +1,48 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2009,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef DIVIDE_IMPL_H
+#define DIVIDE_IMPL_H
+
+#include <gnuradio/blocks/divide.h>
+
+namespace gr {
+  namespace blocks {
+
+template<class T>
+    class BLOCKS_API divide_impl  : public  divide<T>
+    {
+      size_t d_vlen;
+
+    public:
+      divide_impl (size_t vlen);
+
+      int work(int noutput_items,
+	       gr_vector_const_void_star &input_items,
+	       gr_vector_void_star &output_items);
+    };
+
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* DIVIDE_IMPL_H */
diff --git a/gr-blocks/lib/integrate_XX_impl.cc.t b/gr-blocks/lib/integrate_XX_impl.cc.t
deleted file mode 100644
index cb7a448ced..0000000000
--- a/gr-blocks/lib/integrate_XX_impl.cc.t
+++ /dev/null
@@ -1,73 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2009,2010,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <@NAME_IMPL@.h>
-#include <gnuradio/io_signature.h>
-
-namespace gr {
-  namespace blocks {
-
-    @NAME@::sptr @NAME@::make(int decim, int vlen)
-    {
-      return gnuradio::get_initial_sptr(new @NAME_IMPL@(decim, vlen));
-    }
-
-    @NAME_IMPL@::@NAME_IMPL@(int decim, int vlen)
-      : sync_decimator("@NAME@",
-			  io_signature::make(1, 1, sizeof (@I_TYPE@) * vlen),
-			  io_signature::make(1, 1, sizeof (@O_TYPE@) * vlen),
-			  decim),
-      d_decim(decim),
-      d_vlen(vlen)
-    {
-    }
-
-    int
-    @NAME_IMPL@::work(int noutput_items,
-		      gr_vector_const_void_star &input_items,
-		      gr_vector_void_star &output_items)
-    {
-      const @I_TYPE@ *in = (const @I_TYPE@ *)input_items[0];
-      @O_TYPE@ *out = (@O_TYPE@ *)output_items[0];
-
-      for (int i = 0; i < noutput_items; i++) {
-        for (int j = 0; j < d_vlen; ++j) {
-          out[i*d_vlen + j] = (@O_TYPE@)0;
-        }
-        for (int j = 0; j < d_decim; j++) {
-          for (int k = 0; k < d_vlen; ++k) {
-            out[i*d_vlen + k] += in[i*d_decim*d_vlen + j*d_vlen + k];
-          }
-        }
-      }
-
-      return noutput_items;
-    }
-
-  } /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/integrate_XX_impl.h.t b/gr-blocks/lib/integrate_XX_impl.h.t
deleted file mode 100644
index 67e6fce43a..0000000000
--- a/gr-blocks/lib/integrate_XX_impl.h.t
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2009,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME_IMPL@
-#define @GUARD_NAME_IMPL@
-
-#include <gnuradio/blocks/@NAME@.h>
-
-namespace gr {
-  namespace blocks {
-
-    class BLOCKS_API @NAME_IMPL@ : public @NAME@
-    {
-      int d_decim;
-      int d_vlen;
-
-    public:
-      @NAME_IMPL@(int decim, int vlen);
-
-      int work(int noutput_items,
-	       gr_vector_const_void_star &input_items,
-	       gr_vector_void_star &output_items);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME_IMPL@ */
diff --git a/gr-blocks/lib/integrate_impl.cc b/gr-blocks/lib/integrate_impl.cc
new file mode 100644
index 0000000000..3c2cf022cb
--- /dev/null
+++ b/gr-blocks/lib/integrate_impl.cc
@@ -0,0 +1,79 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2009,2010,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <integrate_impl.h>
+#include <gnuradio/io_signature.h>
+
+namespace gr {
+  namespace blocks {
+
+    template <class T>
+    typename integrate<T>::sptr integrate<T>::make(int decim, int vlen)
+    {
+      return gnuradio::get_initial_sptr(new integrate_impl<T> (decim, vlen));
+    }
+
+    template <class T>
+    integrate_impl<T> ::integrate_impl(int decim, int vlen)
+      : sync_decimator("integrate",
+			  io_signature::make(1, 1, sizeof (T) * vlen),
+			  io_signature::make(1, 1, sizeof (T) * vlen),
+			  decim),
+      d_decim(decim),
+      d_vlen(vlen)
+    {
+    }
+
+    template <class T>
+    int
+    integrate_impl<T> ::work(int noutput_items,
+		      gr_vector_const_void_star &input_items,
+		      gr_vector_void_star &output_items)
+    {
+      const T *in = (const T *)input_items[0];
+      T *out = (T *)output_items[0];
+
+      for (int i = 0; i < noutput_items; i++) {
+        for (int j = 0; j < d_vlen; ++j) {
+          out[i*d_vlen + j] = (T)0;
+        }
+        for (int j = 0; j < d_decim; j++) {
+          for (int k = 0; k < d_vlen; ++k) {
+            out[i*d_vlen + k] += in[i*d_decim*d_vlen + j*d_vlen + k];
+          }
+        }
+      }
+
+      return noutput_items;
+    }
+
+template class integrate<std::int16_t>;
+template class integrate<std::int32_t>;
+template class integrate<float>;
+template class integrate<gr_complex>;
+  } /* namespace blocks */
+} /* namespace gr */
diff --git a/gr-blocks/lib/integrate_impl.h b/gr-blocks/lib/integrate_impl.h
new file mode 100644
index 0000000000..efe475e103
--- /dev/null
+++ b/gr-blocks/lib/integrate_impl.h
@@ -0,0 +1,49 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2009,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef INTEGRATE_IMPL_H
+#define INTEGRATE_IMPL_H
+
+#include <gnuradio/blocks/integrate.h>
+
+namespace gr {
+  namespace blocks {
+
+template<class T>
+class BLOCKS_API integrate_impl  : public  integrate<T>
+    {
+      int d_decim;
+      int d_vlen;
+
+    public:
+      integrate_impl (int decim, int vlen);
+
+      int work(int noutput_items,
+	       gr_vector_const_void_star &input_items,
+	       gr_vector_void_star &output_items);
+    };
+
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* INTEGRATE_IMPL_H */
diff --git a/gr-blocks/lib/max_XX_impl.cc.t b/gr-blocks/lib/max_XX_impl.cc.t
deleted file mode 100644
index 36c97260ae..0000000000
--- a/gr-blocks/lib/max_XX_impl.cc.t
+++ /dev/null
@@ -1,96 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2014,2015 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <@NAME_IMPL@.h>
-#include <gnuradio/io_signature.h>
-
-namespace gr {
-  namespace blocks {
-
-    @NAME@::sptr
-    @NAME@::make(size_t vlen, size_t vlen_out)
-    {
-      return gnuradio::get_initial_sptr
-        (new @NAME_IMPL@(vlen,vlen_out));
-    }
-
-    @NAME_IMPL@::@NAME_IMPL@(size_t vlen, size_t vlen_out)
-    : sync_block("@BASE_NAME@",
-                 io_signature::make(1, -1, vlen*sizeof(@I_TYPE@)),
-                 io_signature::make(1, 1, vlen_out*sizeof(@O_TYPE@))),
-      d_vlen(vlen), d_vlen_out(vlen_out)
-    {
-      assert((vlen_out == vlen) || (vlen_out == 1));
-    }
-
-    @NAME_IMPL@::~@NAME_IMPL@()
-    {
-    }
-
-    int
-    @NAME_IMPL@::work(int noutput_items,
-                      gr_vector_const_void_star &input_items,
-                      gr_vector_void_star &output_items)
-    {
-      @O_TYPE@ *optr = (@O_TYPE@ *)output_items[0];
-
-      int ninputs = input_items.size();
-
-      if(d_vlen_out == 1)
-	for(int i = 0; i < noutput_items; i++) {
-	  @I_TYPE@ max = ((@I_TYPE@ *)input_items[0])[i*d_vlen];
-
-	  for(int j = 0; j < (int)d_vlen; j++ ) {
-	    for(int k = 0; k < ninputs; k++) {
-	      if(((@I_TYPE@ *)input_items[k])[i*d_vlen + j] > max) {
-		max = ((@I_TYPE@*)input_items[k])[i*d_vlen + j];
-	      }
-	    }
-	  }
-
-	  *optr++ = (@O_TYPE@)max;
-	}
-
-      else // vector mode output
-	for(size_t i = 0; i < (size_t)noutput_items * d_vlen_out; i++) {
-	  @I_TYPE@ max = ((@I_TYPE@ *)input_items[0])[i];
-
-	  for(int k = 1; k < ninputs; k++) {
-	    if(((@I_TYPE@ *)input_items[k])[i] > max) {
-	      max = ((@I_TYPE@*)input_items[k])[i];
-	    }
-	  }
-
-	  *optr++ = (@O_TYPE@)max;
-	}
-
-      return noutput_items;
-    }
-
-  } /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/max_XX_impl.h.t b/gr-blocks/lib/max_XX_impl.h.t
deleted file mode 100644
index c829ab0514..0000000000
--- a/gr-blocks/lib/max_XX_impl.h.t
+++ /dev/null
@@ -1,50 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2014,2015 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME_IMPL@
-#define @GUARD_NAME_IMPL@
-
-#include <gnuradio/blocks/@NAME@.h>
-
-namespace gr {
-  namespace blocks {
-
-    class @NAME_IMPL@ : public @NAME@
-    {
-    private:
-      size_t d_vlen, d_vlen_out;
-
-    public:
-      @NAME_IMPL@(size_t vlen, size_t vlen_out);
-      ~@NAME_IMPL@();
-
-      int work(int noutput_items,
-               gr_vector_const_void_star &input_items,
-               gr_vector_void_star &output_items);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME_IMPL@ */
diff --git a/gr-blocks/lib/max_blk_impl.cc b/gr-blocks/lib/max_blk_impl.cc
new file mode 100644
index 0000000000..eef6366804
--- /dev/null
+++ b/gr-blocks/lib/max_blk_impl.cc
@@ -0,0 +1,102 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014,2015,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <max_blk_impl.h>
+#include <gnuradio/io_signature.h>
+
+namespace gr {
+  namespace blocks {
+
+    template <class T>
+    typename max_blk<T>::sptr
+    max_blk<T>::make(size_t vlen, size_t vlen_out)
+    {
+      return gnuradio::get_initial_sptr
+        (new max_blk_impl<T> (vlen,vlen_out));
+    }
+
+    template <class T>
+    max_blk_impl<T> ::max_blk_impl(size_t vlen, size_t vlen_out)
+    : sync_block("max_blk",
+                 io_signature::make(1, -1, vlen*sizeof(T)),
+                 io_signature::make(1, 1, vlen_out*sizeof(T))),
+      d_vlen(vlen), d_vlen_out(vlen_out)
+    {
+      assert((vlen_out == vlen) || (vlen_out == 1));
+    }
+
+    template <class T>
+    max_blk_impl<T> ::~max_blk_impl()
+    {
+    }
+
+    template <class T>
+    int
+    max_blk_impl<T> ::work(int noutput_items,
+                      gr_vector_const_void_star &input_items,
+                      gr_vector_void_star &output_items)
+    {
+      T *optr = (T *)output_items[0];
+
+      int ninputs = input_items.size();
+
+      if(d_vlen_out == 1)
+	for(int i = 0; i < noutput_items; i++) {
+	  T max = ((T *)input_items[0])[i*d_vlen];
+
+	  for(int j = 0; j < (int)d_vlen; j++ ) {
+	    for(int k = 0; k < ninputs; k++) {
+	      if(((T *)input_items[k])[i*d_vlen + j] > max) {
+		max = ((T*)input_items[k])[i*d_vlen + j];
+	      }
+	    }
+	  }
+
+	  *optr++ = (T)max;
+	}
+
+      else // vector mode output
+	for(size_t i = 0; i < (size_t)noutput_items * d_vlen_out; i++) {
+	  T max = ((T *)input_items[0])[i];
+
+	  for(int k = 1; k < ninputs; k++) {
+	    if(((T *)input_items[k])[i] > max) {
+	      max = ((T*)input_items[k])[i];
+	    }
+	  }
+
+	  *optr++ = (T)max;
+	}
+
+      return noutput_items;
+    }
+
+template class max_blk<std::int16_t>;
+template class max_blk<std::int32_t>;
+template class max_blk<float>;
+  } /* namespace blocks */
+} /* namespace gr */
diff --git a/gr-blocks/lib/max_blk_impl.h b/gr-blocks/lib/max_blk_impl.h
new file mode 100644
index 0000000000..af62d9f4a8
--- /dev/null
+++ b/gr-blocks/lib/max_blk_impl.h
@@ -0,0 +1,50 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014,2015,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef MAX_BLK_IMPL_H
+#define MAX_BLK_IMPL_H
+
+#include <gnuradio/blocks/max_blk.h>
+
+namespace gr {
+  namespace blocks {
+
+template<class T>
+    class max_blk_impl : public  max_blk<T>
+    {
+    private:
+      size_t d_vlen, d_vlen_out;
+
+    public:
+      max_blk_impl (size_t vlen, size_t vlen_out);
+      ~max_blk_impl ();
+
+      int work(int noutput_items,
+               gr_vector_const_void_star &input_items,
+               gr_vector_void_star &output_items);
+    };
+
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* MAX_BLK_IMPL_H */
diff --git a/gr-blocks/lib/min_XX_impl.cc.t b/gr-blocks/lib/min_XX_impl.cc.t
deleted file mode 100644
index 0f7059f7cd..0000000000
--- a/gr-blocks/lib/min_XX_impl.cc.t
+++ /dev/null
@@ -1,96 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2014,2015,2016 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <@NAME_IMPL@.h>
-#include <gnuradio/io_signature.h>
-
-namespace gr {
-  namespace blocks {
-
-    @NAME@::sptr
-    @NAME@::make(size_t vlen, size_t vlen_out)
-    {
-      return gnuradio::get_initial_sptr
-        (new @NAME_IMPL@(vlen,vlen_out));
-    }
-
-    @NAME_IMPL@::@NAME_IMPL@(size_t vlen, size_t vlen_out)
-    : sync_block("@BASE_NAME@",
-                 io_signature::make(1, -1, vlen*sizeof(@I_TYPE@)),
-                 io_signature::make(1, 1, vlen_out*sizeof(@O_TYPE@))),
-      d_vlen(vlen), d_vlen_out(vlen_out)
-    {
-      assert((vlen_out == vlen) || (vlen_out == 1));
-    }
-
-    @NAME_IMPL@::~@NAME_IMPL@()
-    {
-    }
-
-    int
-    @NAME_IMPL@::work(int noutput_items,
-                      gr_vector_const_void_star &input_items,
-                      gr_vector_void_star &output_items)
-    {
-      @O_TYPE@ *optr = (@O_TYPE@ *)output_items[0];
-
-      int ninputs = input_items.size();
-
-      if(d_vlen_out == 1)
-	for(int i = 0; i < noutput_items; i++) {
-	  @I_TYPE@ min = ((@I_TYPE@ *)input_items[0])[i*d_vlen];
-	  
-	  for(int j = 0; j < (int)d_vlen; j++ ) {
-	    for(int k = 0; k < ninputs; k++) {
-	      if(((@I_TYPE@ *)input_items[k])[i*d_vlen + j] < min) {
-		min = ((@I_TYPE@*)input_items[k])[i*d_vlen + j];
-	      }
-	    }
-	  }
-	  
-	  *optr++ = (@O_TYPE@)min;
-	}
-
-      else // vector mode output
-	for(size_t i = 0; i < noutput_items * d_vlen_out; i++) {
-	  @I_TYPE@ min = ((@I_TYPE@ *)input_items[0])[i];
-	  
-	  for(int k = 1; k < ninputs; k++) {
-	    if(((@I_TYPE@ *)input_items[k])[i] < min) {
-	      min = ((@I_TYPE@*)input_items[k])[i];
-	    }
-	  }
-	  
-	  *optr++ = (@O_TYPE@)min;
-	}
-      
-      return noutput_items;
-    }
-
-  } /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/min_XX_impl.h.t b/gr-blocks/lib/min_XX_impl.h.t
deleted file mode 100644
index c829ab0514..0000000000
--- a/gr-blocks/lib/min_XX_impl.h.t
+++ /dev/null
@@ -1,50 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2014,2015 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME_IMPL@
-#define @GUARD_NAME_IMPL@
-
-#include <gnuradio/blocks/@NAME@.h>
-
-namespace gr {
-  namespace blocks {
-
-    class @NAME_IMPL@ : public @NAME@
-    {
-    private:
-      size_t d_vlen, d_vlen_out;
-
-    public:
-      @NAME_IMPL@(size_t vlen, size_t vlen_out);
-      ~@NAME_IMPL@();
-
-      int work(int noutput_items,
-               gr_vector_const_void_star &input_items,
-               gr_vector_void_star &output_items);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME_IMPL@ */
diff --git a/gr-blocks/lib/min_blk_impl.cc b/gr-blocks/lib/min_blk_impl.cc
new file mode 100644
index 0000000000..df3b6b0896
--- /dev/null
+++ b/gr-blocks/lib/min_blk_impl.cc
@@ -0,0 +1,97 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014,2015,2016,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <min_blk_impl.h>
+#include <gnuradio/io_signature.h>
+
+namespace gr {
+  namespace blocks {
+
+    template <class T>
+    typename min_blk<T>::sptr
+    min_blk<T>::make(size_t vlen, size_t vlen_out)
+    {
+      return gnuradio::get_initial_sptr
+        (new min_blk_impl<T> (vlen,vlen_out));
+    }
+
+    template <class T>
+    min_blk_impl<T> ::min_blk_impl(size_t vlen, size_t vlen_out)
+    : sync_block("min",
+                 io_signature::make(1, -1, vlen*sizeof(T)),
+                 io_signature::make(1, 1, vlen_out*sizeof(T))),
+      d_vlen(vlen), d_vlen_out(vlen_out)
+    {
+      assert((vlen_out == vlen) || (vlen_out == 1));
+    }
+
+    template <class T>
+    min_blk_impl<T> ::~min_blk_impl()
+    {
+    }
+
+    template <class T>
+    int
+    min_blk_impl<T> ::work(int noutput_items,
+                      gr_vector_const_void_star &input_items,
+                      gr_vector_void_star &output_items)
+    {
+      T *optr = (T *)output_items[0];
+
+      int ninputs = input_items.size();
+
+      if(d_vlen_out == 1)
+	for(int i = 0; i < noutput_items; i++) {
+	  T min = ((T *)input_items[0])[i*d_vlen];
+	  for(int j = 0; j < (int)d_vlen; j++ ) {
+	    for(int k = 0; k < ninputs; k++) {
+	      if(((T *)input_items[k])[i*d_vlen + j] < min) {
+		min = ((T*)input_items[k])[i*d_vlen + j];
+	      }
+	    }
+	  }
+	  *optr++ = (T)min;
+	}
+
+      else // vector mode output
+	for(size_t i = 0; i < noutput_items * d_vlen_out; i++) {
+	  T min = ((T *)input_items[0])[i];
+	  for(int k = 1; k < ninputs; k++) {
+	    if(((T *)input_items[k])[i] < min) {
+	      min = ((T*)input_items[k])[i];
+	    }
+	  }
+	  *optr++ = (T)min;
+	}
+      return noutput_items;
+    }
+
+template class min_blk<std::int16_t>;
+template class min_blk<std::int32_t>;
+template class min_blk<float>;
+  } /* namespace blocks */
+} /* namespace gr */
diff --git a/gr-blocks/lib/min_blk_impl.h b/gr-blocks/lib/min_blk_impl.h
new file mode 100644
index 0000000000..151b97b391
--- /dev/null
+++ b/gr-blocks/lib/min_blk_impl.h
@@ -0,0 +1,50 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014,2015,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef MIN_BLK_IMPL_H
+#define MIN_BLK_IMPL_H
+
+#include <gnuradio/blocks/min_blk.h>
+
+namespace gr {
+  namespace blocks {
+
+template<class T>
+    class min_blk_impl : public  min_blk<T>
+    {
+    private:
+      size_t d_vlen, d_vlen_out;
+
+    public:
+      min_blk_impl (size_t vlen, size_t vlen_out);
+      ~min_blk_impl ();
+
+      int work(int noutput_items,
+               gr_vector_const_void_star &input_items,
+               gr_vector_void_star &output_items);
+    };
+
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* MIN_BLK_IMPL_H */
diff --git a/gr-blocks/lib/moving_average_XX_impl.cc.t b/gr-blocks/lib/moving_average_XX_impl.cc.t
deleted file mode 100644
index fe0a2bdebd..0000000000
--- a/gr-blocks/lib/moving_average_XX_impl.cc.t
+++ /dev/null
@@ -1,141 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2008,2010,2013,2017 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "@NAME_IMPL@.h"
-#include <gnuradio/io_signature.h>
-
-namespace gr {
-  namespace blocks {
-
-    @NAME@::sptr
-    @NAME@::make(int length, @O_TYPE@ scale, int max_iter, unsigned int vlen)
-    {
-      return gnuradio::get_initial_sptr
-        (new @NAME_IMPL@(length, scale, max_iter, vlen));
-    }
-
-    @NAME_IMPL@::@NAME_IMPL@(int length, @O_TYPE@ scale, int max_iter, unsigned int vlen)
-    : sync_block("@NAME@",
-                    io_signature::make(1, 1, sizeof(@I_TYPE@)*vlen),
-                    io_signature::make(1, 1, sizeof(@O_TYPE@)*vlen)),
-      d_length(length),
-      d_scale(scale),
-      d_max_iter(max_iter),
-      d_vlen(vlen),
-      d_new_length(length),
-      d_new_scale(scale),
-      d_updated(false)
-    {
-      set_history(length);
-      //we don't have C++11's <array>, so initialize the stored vector instead
-      //we store this vector so that work() doesn't spend its time allocating and freeing vector storage
-      if(d_vlen > 1) {
-        d_sum = std::vector<@I_TYPE@>(d_vlen);
-      }
-    }
-
-    @NAME_IMPL@::~@NAME_IMPL@()
-    {
-    }
-
-    void
-    @NAME_IMPL@::set_length_and_scale(int length, @O_TYPE@ scale)
-    {
-      d_new_length = length;
-      d_new_scale = scale;
-      d_updated = true;
-    }
-
-    void
-    @NAME_IMPL@::set_length(int length)
-    {
-      d_new_length = length;
-      d_updated = true;
-    }
-
-    void
-    @NAME_IMPL@::set_scale(@O_TYPE@ scale)
-    {
-      d_new_scale = scale;
-      d_updated = true;
-    }
-
-    int
-    @NAME_IMPL@::work(int noutput_items,
-                      gr_vector_const_void_star &input_items,
-                      gr_vector_void_star &output_items)
-    {
-      if(d_updated) {
-        d_length = d_new_length;
-        d_scale = d_new_scale;
-        set_history(d_length);
-        d_updated = false;
-        return 0; // history requirements might have changed
-      }
-
-      const @I_TYPE@ *in = (const @I_TYPE@ *)input_items[0];
-      @O_TYPE@ *out = (@O_TYPE@ *)output_items[0];
-
-      unsigned int num_iter = (unsigned int)((noutput_items>d_max_iter) ? d_max_iter : noutput_items);
-      if(d_vlen == 1) {
-        @I_TYPE@ sum = in[0];
-        for(int i = 1; i < d_length-1; i++) {
-          sum += in[i];
-        }
-
-        for(unsigned int i = 0; i < num_iter; i++) {
-          sum += in[i+d_length-1];
-          out[i] = sum * d_scale;
-          sum -= in[i];
-        }
-
-      } else { // d_vlen > 1
-        //gets automatically optimized well
-        for(unsigned int elem = 0; elem < d_vlen; elem++) {
-          d_sum[elem] = in[elem];
-        }
-
-        for(int i = 1; i < d_length - 1; i++) {
-          for(unsigned int elem = 0; elem < d_vlen; elem++) {
-            d_sum[elem] += in[i*d_vlen + elem];
-          }
-        }
-
-        for(unsigned int i = 0; i < num_iter; i++) {
-          for(unsigned int elem = 0; elem < d_vlen; elem++) {
-            d_sum[elem] += in[(i+d_length-1)*d_vlen + elem];
-            out[i*d_vlen + elem] = d_sum[elem] * d_scale;
-            d_sum[elem] -= in[i*d_vlen + elem];
-          }
-        }
-      }
-      return num_iter;
-    }
-
-  } /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/moving_average_XX_impl.h.t b/gr-blocks/lib/moving_average_XX_impl.h.t
deleted file mode 100644
index f90a666bbf..0000000000
--- a/gr-blocks/lib/moving_average_XX_impl.h.t
+++ /dev/null
@@ -1,72 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2008,2013,2017 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME_IMPL@
-#define @GUARD_NAME_IMPL@
-
-#include <gnuradio/blocks/@NAME@.h>
-#include <vector>
-#include <algorithm>
-
-namespace gr {
-  namespace blocks {
-
-    class @NAME_IMPL@ : public @NAME@
-    {
-    private:
-      int d_length;
-      @O_TYPE@ d_scale;
-      int d_max_iter;
-      unsigned int d_vlen;
-      std::vector<@I_TYPE@> d_sum;
-
-
-      int d_new_length;
-      @O_TYPE@ d_new_scale;
-      bool d_updated;
-
-    public:
-      @NAME_IMPL@(int length, @O_TYPE@ scale,
-                  int max_iter = 4096,
-                  unsigned int vlen = 1);
-      ~@NAME_IMPL@();
-
-      int length() const { return d_new_length; }
-      @O_TYPE@ scale() const { return d_new_scale; }
-      unsigned int vlen() const { return d_vlen; }
-
-      void set_length_and_scale(int length, @O_TYPE@ scale);
-      void set_length(int length);
-      void set_scale(@O_TYPE@ scale);
-
-      int work(int noutput_items,
-               gr_vector_const_void_star &input_items,
-               gr_vector_void_star &output_items);
-
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME_IMPL@ */
diff --git a/gr-blocks/lib/moving_average_impl.cc b/gr-blocks/lib/moving_average_impl.cc
new file mode 100644
index 0000000000..b77a70a440
--- /dev/null
+++ b/gr-blocks/lib/moving_average_impl.cc
@@ -0,0 +1,151 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008,2010,2013,2017,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "moving_average_impl.h"
+#include <gnuradio/io_signature.h>
+
+namespace gr {
+  namespace blocks {
+
+    template <class T>
+    typename moving_average<T>::sptr
+    moving_average<T>::make(int length, T scale, int max_iter, unsigned int vlen)
+    {
+      return gnuradio::get_initial_sptr
+        (new moving_average_impl<T> (length, scale, max_iter, vlen));
+    }
+
+    template <class T>
+    moving_average_impl<T>::moving_average_impl(int length, T scale, int max_iter, unsigned int vlen)
+    : sync_block("moving_average",
+                    io_signature::make(1, 1, sizeof(T)*vlen),
+                    io_signature::make(1, 1, sizeof(T)*vlen)),
+      d_length(length),
+      d_scale(scale),
+      d_max_iter(max_iter),
+      d_vlen(vlen),
+      d_new_length(length),
+      d_new_scale(scale),
+      d_updated(false)
+    {
+      this->set_history(length);
+      //we don't have C++11's <array>, so initialize the stored vector instead
+      //we store this vector so that work() doesn't spend its time allocating and freeing vector storage
+      if(d_vlen > 1) {
+        d_sum = std::vector<T>(d_vlen);
+      }
+    }
+
+    template <class T>
+    moving_average_impl<T> ::~moving_average_impl()
+    {
+    }
+
+    template <class T>
+    void
+    moving_average_impl<T> ::set_length_and_scale(int length, T scale)
+    {
+      d_new_length = length;
+      d_new_scale = scale;
+      d_updated = true;
+    }
+
+    template <class T>
+    void
+    moving_average_impl<T> ::set_length(int length)
+    {
+      d_new_length = length;
+      d_updated = true;
+    }
+
+    template <class T>
+    void
+    moving_average_impl<T> ::set_scale(T scale)
+    {
+      d_new_scale = scale;
+      d_updated = true;
+    }
+
+    template <class T>
+    int
+    moving_average_impl<T> ::work(int noutput_items,
+                      gr_vector_const_void_star &input_items,
+                      gr_vector_void_star &output_items)
+    {
+      if(d_updated) {
+        d_length = d_new_length;
+        d_scale = d_new_scale;
+        this->set_history(d_length);
+        d_updated = false;
+        return 0; // history requirements might have changed
+      }
+
+      const T *in = (const T *)input_items[0];
+      T *out = (T *)output_items[0];
+
+      unsigned int num_iter = (unsigned int)((noutput_items>d_max_iter) ? d_max_iter : noutput_items);
+      if(d_vlen == 1) {
+        T sum = in[0];
+        for(int i = 1; i < d_length-1; i++) {
+          sum += in[i];
+        }
+
+        for(unsigned int i = 0; i < num_iter; i++) {
+          sum += in[i+d_length-1];
+          out[i] = sum * d_scale;
+          sum -= in[i];
+        }
+
+      } else { // d_vlen > 1
+        //gets automatically optimized well
+        for(unsigned int elem = 0; elem < d_vlen; elem++) {
+          d_sum[elem] = in[elem];
+        }
+
+        for(int i = 1; i < d_length - 1; i++) {
+          for(unsigned int elem = 0; elem < d_vlen; elem++) {
+            d_sum[elem] += in[i*d_vlen + elem];
+          }
+        }
+
+        for(unsigned int i = 0; i < num_iter; i++) {
+          for(unsigned int elem = 0; elem < d_vlen; elem++) {
+            d_sum[elem] += in[(i+d_length-1)*d_vlen + elem];
+            out[i*d_vlen + elem] = d_sum[elem] * d_scale;
+            d_sum[elem] -= in[i*d_vlen + elem];
+          }
+        }
+      }
+      return num_iter;
+    }
+
+template class moving_average<std::int16_t>;
+template class moving_average<std::int32_t>;
+template class moving_average<float>;
+template class moving_average<gr_complex>;
+  } /* namespace blocks */
+} /* namespace gr */
diff --git a/gr-blocks/lib/moving_average_impl.h b/gr-blocks/lib/moving_average_impl.h
new file mode 100644
index 0000000000..a4e248d05d
--- /dev/null
+++ b/gr-blocks/lib/moving_average_impl.h
@@ -0,0 +1,72 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008,2013,2017-2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef MOVING_AVERAGE_IMPL_H
+#define MOVING_AVERAGE_IMPL_H
+
+#include <gnuradio/blocks/moving_average.h>
+#include <vector>
+#include <algorithm>
+
+namespace gr {
+  namespace blocks {
+
+template<class T>
+    class moving_average_impl : public  moving_average<T>
+    {
+    private:
+      int d_length;
+      T d_scale;
+      int d_max_iter;
+      unsigned int d_vlen;
+      std::vector<T> d_sum;
+
+
+      int d_new_length;
+      T d_new_scale;
+      bool d_updated;
+
+    public:
+      moving_average_impl (int length, T scale,
+                  int max_iter = 4096,
+                  unsigned int vlen = 1);
+      ~moving_average_impl ();
+
+      int length() const { return d_new_length; }
+      T scale() const { return d_new_scale; }
+      unsigned int vlen() const { return d_vlen; }
+
+      void set_length_and_scale(int length, T scale);
+      void set_length(int length);
+      void set_scale(T scale);
+
+      int work(int noutput_items,
+               gr_vector_const_void_star &input_items,
+               gr_vector_void_star &output_items);
+
+    };
+
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* MOVING_AVERAGE_IMPL_H */
diff --git a/gr-blocks/lib/multiply_XX_impl.cc.t b/gr-blocks/lib/multiply_XX_impl.cc.t
deleted file mode 100644
index d9b41b3d9f..0000000000
--- a/gr-blocks/lib/multiply_XX_impl.cc.t
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2009,2010,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <@NAME_IMPL@.h>
-#include <gnuradio/io_signature.h>
-
-namespace gr {
-  namespace blocks {
-
-    @NAME@::sptr @NAME@::make(size_t vlen)
-    {
-      return gnuradio::get_initial_sptr(new @NAME_IMPL@(vlen));
-    }
-
-    @NAME_IMPL@::@NAME_IMPL@(size_t vlen)
-      : sync_block ("@NAME@",
-		       io_signature::make (1, -1, sizeof (@I_TYPE@)*vlen),
-		       io_signature::make (1,  1, sizeof (@O_TYPE@)*vlen)),
-      d_vlen(vlen)
-    {
-    }
-
-    int
-    @NAME_IMPL@::work(int noutput_items,
-		      gr_vector_const_void_star &input_items,
-		      gr_vector_void_star &output_items)
-    {
-      @O_TYPE@ *optr = (@O_TYPE@ *) output_items[0];
-
-      int ninputs = input_items.size ();
-
-      for (size_t i = 0; i < noutput_items*d_vlen; i++){
-	@I_TYPE@ acc = ((@I_TYPE@ *) input_items[0])[i];
-	for (int j = 1; j < ninputs; j++)
-	  acc *= ((@I_TYPE@ *) input_items[j])[i];
-
-	*optr++ = (@O_TYPE@) acc;
-      }
-
-      return noutput_items;
-    }
-
-  } /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/multiply_XX_impl.h.t b/gr-blocks/lib/multiply_XX_impl.h.t
deleted file mode 100644
index 2b0ea25a1b..0000000000
--- a/gr-blocks/lib/multiply_XX_impl.h.t
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2009,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME_IMPL@
-#define @GUARD_NAME_IMPL@
-
-#include <gnuradio/blocks/@NAME@.h>
-
-namespace gr {
-  namespace blocks {
-
-    class BLOCKS_API @NAME_IMPL@ : public @NAME@
-    {
-      size_t d_vlen;
-
-    public:
-      @NAME_IMPL@(size_t vlen);
-
-      int work(int noutput_items,
-	       gr_vector_const_void_star &input_items,
-	       gr_vector_void_star &output_items);
-    };
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME_IMPL@ */
diff --git a/gr-blocks/lib/multiply_cc_impl.cc b/gr-blocks/lib/multiply_cc_impl.cc
deleted file mode 100644
index 1f58ffd386..0000000000
--- a/gr-blocks/lib/multiply_cc_impl.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <multiply_cc_impl.h>
-#include <gnuradio/io_signature.h>
-#include <volk/volk.h>
-
-namespace gr {
-  namespace blocks {
-
-    multiply_cc::sptr multiply_cc::make(size_t vlen)
-    {
-      return gnuradio::get_initial_sptr(new multiply_cc_impl(vlen));
-    }
-
-    multiply_cc_impl::multiply_cc_impl(size_t vlen)
-      : sync_block("multiply_cc",
-		      io_signature::make (1, -1, sizeof(gr_complex)*vlen),
-		      io_signature::make (1,  1, sizeof(gr_complex)*vlen)),
-	d_vlen(vlen)
-    {
-      const int alignment_multiple =
-	volk_get_alignment() / sizeof(gr_complex);
-      set_alignment(std::max(1, alignment_multiple));
-    }
-
-    int
-    multiply_cc_impl::work(int noutput_items,
-			   gr_vector_const_void_star &input_items,
-			   gr_vector_void_star &output_items)
-    {
-      gr_complex *out = (gr_complex *) output_items[0];
-      int noi = d_vlen*noutput_items;
-
-      memcpy(out, input_items[0], noi*sizeof(gr_complex));
-      for(size_t i = 1; i < input_items.size(); i++)
-        volk_32fc_x2_multiply_32fc(out, out, (gr_complex*)input_items[i], noi);
-
-      return noutput_items;
-    }
-
-  } /* namespace blocks */
-}/* namespace gr */
diff --git a/gr-blocks/lib/multiply_cc_impl.h b/gr-blocks/lib/multiply_cc_impl.h
deleted file mode 100644
index 86b4334bf8..0000000000
--- a/gr-blocks/lib/multiply_cc_impl.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_BLOCKS_MULTIPLY_CC_IMPL_H
-#define INCLUDED_BLOCKS_MULTIPLY_CC_IMPL_H
-
-#include <gnuradio/blocks/multiply_cc.h>
-
-namespace gr {
-  namespace blocks {
-
-    class BLOCKS_API multiply_cc_impl : public multiply_cc
-    {
-      size_t d_vlen;
-
-    public:
-      multiply_cc_impl(size_t vlen);
-
-      int work(int noutput_items,
-	       gr_vector_const_void_star &input_items,
-	       gr_vector_void_star &output_items);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-
-#endif /* INCLUDED_BLOCKS_MULTIPLY_CC_IMPL_H */
diff --git a/gr-blocks/lib/multiply_const_XX_impl.cc.t b/gr-blocks/lib/multiply_const_XX_impl.cc.t
deleted file mode 100644
index 941cb9622e..0000000000
--- a/gr-blocks/lib/multiply_const_XX_impl.cc.t
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2009,2010,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <@NAME_IMPL@.h>
-#include <gnuradio/io_signature.h>
-
-namespace gr {
-  namespace blocks {
-
-    @NAME@::sptr @NAME@::make(@O_TYPE@ k)
-    {
-      return gnuradio::get_initial_sptr(new @NAME_IMPL@(k));
-    }
-
-    @NAME_IMPL@::@NAME_IMPL@(@O_TYPE@ k)
-      : sync_block ("@NAME@",
-		       io_signature::make (1, 1, sizeof (@I_TYPE@)),
-		       io_signature::make (1, 1, sizeof (@O_TYPE@))),
-      d_k(k)
-    {
-    }
-
-    int
-    @NAME_IMPL@::work(int noutput_items,
-		      gr_vector_const_void_star &input_items,
-		      gr_vector_void_star &output_items)
-    {
-      @I_TYPE@ *iptr = (@I_TYPE@ *) input_items[0];
-      @O_TYPE@ *optr = (@O_TYPE@ *) output_items[0];
-
-      int size = noutput_items;
-
-      while (size >= 8){
-	*optr++ = *iptr++ * d_k;
-	*optr++ = *iptr++ * d_k;
-	*optr++ = *iptr++ * d_k;
-	*optr++ = *iptr++ * d_k;
-	*optr++ = *iptr++ * d_k;
-	*optr++ = *iptr++ * d_k;
-	*optr++ = *iptr++ * d_k;
-	*optr++ = *iptr++ * d_k;
-	size -= 8;
-      }
-
-      while (size-- > 0)
-	*optr++ = *iptr++ * d_k;
-
-      return noutput_items;
-    }
-
-  } /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/multiply_const_XX_impl.h.t b/gr-blocks/lib/multiply_const_XX_impl.h.t
deleted file mode 100644
index e0c2ae54bc..0000000000
--- a/gr-blocks/lib/multiply_const_XX_impl.h.t
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2009,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME_IMPL@
-#define @GUARD_NAME_IMPL@
-
-#include <gnuradio/blocks/@NAME@.h>
-
-namespace gr {
-  namespace blocks {
-
-    class BLOCKS_API @NAME_IMPL@ : public @NAME@
-    {
-      @O_TYPE@ d_k;
-
-    public:
-      @NAME_IMPL@(@O_TYPE@ k);
-
-      @O_TYPE@ k() const { return d_k; }
-      void set_k(@O_TYPE@ k) { d_k = k; }
-
-      int work(int noutput_items,
-	       gr_vector_const_void_star &input_items,
-	       gr_vector_void_star &output_items);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME_IMPL@ */
diff --git a/gr-blocks/lib/multiply_const_cc_impl.cc b/gr-blocks/lib/multiply_const_cc_impl.cc
deleted file mode 100644
index e7c5e3b08e..0000000000
--- a/gr-blocks/lib/multiply_const_cc_impl.cc
+++ /dev/null
@@ -1,91 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2009,2010,2012,2015 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <multiply_const_cc_impl.h>
-#include <gnuradio/io_signature.h>
-#include <volk/volk.h>
-
-namespace gr {
-  namespace blocks {
-
-    multiply_const_cc::sptr multiply_const_cc::make(gr_complex k, size_t vlen)
-    {
-      return gnuradio::get_initial_sptr(new multiply_const_cc_impl(k, vlen));
-    }
-
-    multiply_const_cc_impl::multiply_const_cc_impl(gr_complex k, size_t vlen)
-      : sync_block ("multiply_const_cc",
-		       io_signature::make (1, 1, sizeof (gr_complex)*vlen),
-		       io_signature::make (1, 1, sizeof (gr_complex)*vlen)),
-	d_k(k), d_vlen(vlen)
-    {
-      const int alignment_multiple =
-	volk_get_alignment() / sizeof(gr_complex);
-      set_alignment(std::max(1,alignment_multiple));
-    }
-
-    int
-    multiply_const_cc_impl::work(int noutput_items,
-				 gr_vector_const_void_star &input_items,
-				 gr_vector_void_star &output_items)
-    {
-      const gr_complex *in = (const gr_complex *) input_items[0];
-      gr_complex *out = (gr_complex *) output_items[0];
-      int noi = d_vlen*noutput_items;
-
-      volk_32fc_s32fc_multiply_32fc(out, in, d_k, noi);
-
-      return noutput_items;
-    }
-
-    void
-    multiply_const_cc_impl::setup_rpc()
-    {
-#ifdef GR_CTRLPORT
-      add_rpc_variable(
-        rpcbasic_sptr(new rpcbasic_register_get<multiply_const_cc, gr_complex>(
-	  alias(), "Constant",
-	  &multiply_const_cc::k,
-	  pmt::from_complex(-1024.0f, 0.0f),
-          pmt::from_complex(1024.0f, 0.0f),
-          pmt::from_complex(0.0f, 0.0f),
-	  "", "Constant to multiply", RPC_PRIVLVL_MIN,
-          DISPTIME | DISPOPTCPLX | DISPOPTSTRIP)));
-
-      add_rpc_variable(
-        rpcbasic_sptr(new rpcbasic_register_set<multiply_const_cc, gr_complex>(
-	  alias(), "Constant",
-	  &multiply_const_cc::set_k,
-	  pmt::from_complex(-1024.0f, 0.0f),
-          pmt::from_complex(1024.0f, 0.0f),
-          pmt::from_complex(0.0f, 0.0f),
-	  "", "Constant to multiply",
-	  RPC_PRIVLVL_MIN, DISPNULL)));
-#endif /* GR_CTRLPORT */
-    }
-
-  } /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/multiply_const_cc_impl.h b/gr-blocks/lib/multiply_const_cc_impl.h
deleted file mode 100644
index 06f60b13dc..0000000000
--- a/gr-blocks/lib/multiply_const_cc_impl.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2009,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_MULTIPLY_CONST_CC_IMPL_H
-#define INCLUDED_MULTIPLY_CONST_CC_IMPL_H
-
-#include <gnuradio/blocks/multiply_const_cc.h>
-
-namespace gr {
-  namespace blocks {
-
-    class BLOCKS_API multiply_const_cc_impl : public multiply_const_cc
-    {
-      gr_complex d_k;
-      size_t d_vlen;
-
-    public:
-      multiply_const_cc_impl(gr_complex k, size_t vlen);
-
-      void setup_rpc();
-
-      gr_complex k() const { return d_k; }
-      void set_k(gr_complex k) { d_k = k; }
-
-      int work(int noutput_items,
-	       gr_vector_const_void_star &input_items,
-	       gr_vector_void_star &output_items);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* INCLUDED_MULTIPLY_CONST_CC_IMPL_H */
diff --git a/gr-blocks/lib/multiply_const_ff_impl.cc b/gr-blocks/lib/multiply_const_ff_impl.cc
deleted file mode 100644
index c5d0ce1e9a..0000000000
--- a/gr-blocks/lib/multiply_const_ff_impl.cc
+++ /dev/null
@@ -1,89 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2009,2010,2012,2015 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <multiply_const_ff_impl.h>
-#include <gnuradio/io_signature.h>
-#include <volk/volk.h>
-
-namespace gr {
-  namespace blocks {
-
-    multiply_const_ff::sptr multiply_const_ff::make(float k, size_t vlen)
-    {
-      return gnuradio::get_initial_sptr(new multiply_const_ff_impl(k, vlen));
-    }
-
-    multiply_const_ff_impl::multiply_const_ff_impl(float k, size_t vlen)
-      : sync_block ("multiply_const_ff",
-		       io_signature::make (1, 1, sizeof (float)*vlen),
-		       io_signature::make (1, 1, sizeof (float)*vlen)),
-	d_k(k), d_vlen(vlen)
-    {
-      const int alignment_multiple =
-	volk_get_alignment() / sizeof(float);
-      set_alignment(std::max(1,alignment_multiple));
-    }
-
-    int
-    multiply_const_ff_impl::work(int noutput_items,
-				 gr_vector_const_void_star &input_items,
-				 gr_vector_void_star &output_items)
-    {
-      const float *in = (const float *) input_items[0];
-      float *out = (float *) output_items[0];
-      int noi = d_vlen*noutput_items;
-
-      volk_32f_s32f_multiply_32f(out, in, d_k, noi);
-
-      return noutput_items;
-    }
-
-    void
-    multiply_const_ff_impl::setup_rpc()
-    {
-#ifdef GR_CTRLPORT
-      add_rpc_variable(
-        rpcbasic_sptr(new rpcbasic_register_get<multiply_const_ff, float>(
-	  alias(), "coefficient",
-	  &multiply_const_ff::k,
-	  pmt::mp(-1024.0f), pmt::mp(1024.0f), pmt::mp(0.0f),
-	  "", "Coefficient", RPC_PRIVLVL_MIN,
-          DISPTIME | DISPOPTSTRIP)));
-
-      add_rpc_variable(
-        rpcbasic_sptr(new rpcbasic_register_set<multiply_const_ff, float>(
-	  alias(), "coefficient",
-	  &multiply_const_ff::set_k,
-	  pmt::mp(-1024.0f), pmt::mp(1024.0f), pmt::mp(0.0f),
-	  "", "Coefficient",
-	  RPC_PRIVLVL_MIN, DISPNULL)));
-#endif /* GR_CTRLPORT */
-    }
-
-  } /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/multiply_const_ff_impl.h b/gr-blocks/lib/multiply_const_ff_impl.h
deleted file mode 100644
index 4eb1c19f76..0000000000
--- a/gr-blocks/lib/multiply_const_ff_impl.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2009,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef INCLUDED_MULTIPLY_CONST_FF_IMPL_H
-#define INCLUDED_MULTIPLY_CONST_FF_IMPL_H
-
-#include <gnuradio/blocks/multiply_const_ff.h>
-
-namespace gr {
-  namespace blocks {
-
-    class BLOCKS_API multiply_const_ff_impl : public multiply_const_ff
-    {
-      float d_k;
-      size_t d_vlen;
-
-    public:
-      multiply_const_ff_impl(float k, size_t vlen);
-
-      void setup_rpc();
-
-      float k() const { return d_k; }
-      void set_k(float k) { d_k = k; }
-
-      int work(int noutput_items,
-	       gr_vector_const_void_star &input_items,
-	       gr_vector_void_star &output_items);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* INCLUDED_MULTIPLY_CONST_FF_IMPL_H */
diff --git a/gr-blocks/lib/multiply_const_impl.cc b/gr-blocks/lib/multiply_const_impl.cc
new file mode 100644
index 0000000000..bfdd88ed04
--- /dev/null
+++ b/gr-blocks/lib/multiply_const_impl.cc
@@ -0,0 +1,139 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2009,2010,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "multiply_const_impl.h"
+#include <gnuradio/io_signature.h>
+#include <volk/volk.h>
+
+namespace gr {
+  namespace blocks {
+
+    template <class T>
+    typename multiply_const<T>::sptr multiply_const<T>::make(T k)
+    {
+      return gnuradio::get_initial_sptr(new multiply_const_impl<T> (k));
+    }
+
+    template <>
+    multiply_const_impl<float>::multiply_const_impl(float k)
+      : sync_block ("multiply_const_ff",
+                    io_signature::make (1, 1, sizeof (float)),
+                    io_signature::make (1, 1, sizeof (float))),
+        d_k(k)
+    {
+      const int alignment_multiple =
+        volk_get_alignment() / sizeof(float);
+      set_alignment(std::max(1,alignment_multiple));
+    }
+
+    template<>
+    int
+    multiply_const_impl<float>::work(int noutput_items,
+                                     gr_vector_const_void_star &input_items,
+                                     gr_vector_void_star &output_items)
+    {
+      const float *in = (const float *) input_items[0];
+      float *out = (float *) output_items[0];
+      int noi = noutput_items;
+
+      volk_32f_s32f_multiply_32f(out, in, d_k, noi);
+
+      return noutput_items;
+    }
+
+    template <>
+    multiply_const_impl<gr_complex>::multiply_const_impl(gr_complex k)
+      : sync_block ("multiply_const_cc",
+                    io_signature::make (1, 1, sizeof (gr_complex)),
+                    io_signature::make (1, 1, sizeof (gr_complex))),
+        d_k(k)
+    {
+      const int alignment_multiple =
+        volk_get_alignment() / sizeof(gr_complex);
+      set_alignment(std::max(1,alignment_multiple));
+    }
+
+    template <>
+    int
+    multiply_const_impl<gr_complex>::work(int noutput_items,
+                                          gr_vector_const_void_star &input_items,
+                                          gr_vector_void_star &output_items)
+    {
+      const gr_complex *in = (const gr_complex *) input_items[0];
+      gr_complex *out = (gr_complex *) output_items[0];
+      int noi = noutput_items;
+
+      volk_32fc_s32fc_multiply_32fc(out, in, d_k, noi);
+
+      return noutput_items;
+    }
+
+
+    template <class T>
+    multiply_const_impl<T> ::multiply_const_impl(T k)
+      : sync_block ("multiply_const",
+		       io_signature::make (1, 1, sizeof (T)),
+		       io_signature::make (1, 1, sizeof (T))),
+      d_k(k)
+    {
+    }
+
+    template <class T>
+    int
+    multiply_const_impl<T> ::work(int noutput_items,
+		      gr_vector_const_void_star &input_items,
+		      gr_vector_void_star &output_items)
+    {
+      T *iptr = (T *) input_items[0];
+      T *optr = (T *) output_items[0];
+
+      int size = noutput_items;
+
+      while (size >= 8){
+	*optr++ = *iptr++ * d_k;
+	*optr++ = *iptr++ * d_k;
+	*optr++ = *iptr++ * d_k;
+	*optr++ = *iptr++ * d_k;
+	*optr++ = *iptr++ * d_k;
+	*optr++ = *iptr++ * d_k;
+	*optr++ = *iptr++ * d_k;
+	*optr++ = *iptr++ * d_k;
+	size -= 8;
+      }
+
+      while (size-- > 0)
+	*optr++ = *iptr++ * d_k;
+
+      return noutput_items;
+    }
+
+template class multiply_const<std::int16_t>;
+template class multiply_const<std::int32_t>;
+template class multiply_const<float>;
+template class multiply_const<gr_complex>;
+  } /* namespace blocks */
+} /* namespace gr */
diff --git a/gr-blocks/lib/multiply_const_impl.h b/gr-blocks/lib/multiply_const_impl.h
new file mode 100644
index 0000000000..c2cc388845
--- /dev/null
+++ b/gr-blocks/lib/multiply_const_impl.h
@@ -0,0 +1,51 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2009,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef MULTIPLY_CONST_IMPL_H
+#define MULTIPLY_CONST_IMPL_H
+
+#include <gnuradio/blocks/multiply_const.h>
+
+namespace gr {
+  namespace blocks {
+
+template<class T>
+    class BLOCKS_API multiply_const_impl : public  multiply_const<T>
+    {
+      T d_k;
+
+    public:
+      multiply_const_impl (T k);
+
+      T k() const { return d_k; }
+      void set_k(T k) { d_k = k; }
+
+      int work(int noutput_items,
+	       gr_vector_const_void_star &input_items,
+	       gr_vector_void_star &output_items);
+    };
+
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* MULTIPLY_CONST_IMPL_H */
diff --git a/gr-blocks/lib/multiply_const_vXX_impl.cc.t b/gr-blocks/lib/multiply_const_vXX_impl.cc.t
deleted file mode 100644
index 2de0684144..0000000000
--- a/gr-blocks/lib/multiply_const_vXX_impl.cc.t
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2009,2010,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <@NAME_IMPL@.h>
-#include <gnuradio/io_signature.h>
-
-namespace gr {
-  namespace blocks {
-
-    @NAME@::sptr @NAME@::make(std::vector<@O_TYPE@> k)
-    {
-      return gnuradio::get_initial_sptr(new @NAME_IMPL@(k));
-    }
-
-    @NAME_IMPL@::@NAME_IMPL@(std::vector<@O_TYPE@> k)
-      : sync_block ("@NAME@",
-		       io_signature::make (1, 1, sizeof (@I_TYPE@)*k.size()),
-		       io_signature::make (1, 1, sizeof (@O_TYPE@)*k.size())),
-      d_k(k)
-    {
-    }
-
-    int
-    @NAME_IMPL@::work(int noutput_items,
-		      gr_vector_const_void_star &input_items,
-		      gr_vector_void_star &output_items)
-    {
-      @I_TYPE@ *iptr = (@I_TYPE@ *)input_items[0];
-      @O_TYPE@ *optr = (@O_TYPE@ *)output_items[0];
-
-      int nitems_per_block = output_signature()->sizeof_stream_item(0)/sizeof(@I_TYPE@);
-
-      for (int i = 0; i < noutput_items; i++)
-	for (int j = 0; j < nitems_per_block; j++)
-	  *optr++ = *iptr++ * d_k[j];
-
-      return noutput_items;
-    }
-
-  } /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/multiply_const_vXX_impl.h.t b/gr-blocks/lib/multiply_const_vXX_impl.h.t
deleted file mode 100644
index 6c087d9461..0000000000
--- a/gr-blocks/lib/multiply_const_vXX_impl.h.t
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2006,2010,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME_IMPL@
-#define @GUARD_NAME_IMPL@
-
-#include <gnuradio/blocks/@NAME@.h>
-
-namespace gr {
-  namespace blocks {
-
-    class BLOCKS_API @NAME_IMPL@ : public @NAME@
-    {
-      std::vector<@O_TYPE@> d_k;
-
-    public:
-      @NAME_IMPL@(std::vector<@O_TYPE@> k);
-
-      std::vector<@O_TYPE@> k() const { return d_k; }
-      void set_k(std::vector<@O_TYPE@> k) { d_k = k; }
-
-      int work(int noutput_items,
-	       gr_vector_const_void_star &input_items,
-	       gr_vector_void_star &output_items);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME_IMPL@ */
diff --git a/gr-blocks/lib/multiply_const_v_impl.cc b/gr-blocks/lib/multiply_const_v_impl.cc
new file mode 100644
index 0000000000..24c4a99b78
--- /dev/null
+++ b/gr-blocks/lib/multiply_const_v_impl.cc
@@ -0,0 +1,138 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2009,2010,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <multiply_const_v_impl.h>
+#include <gnuradio/io_signature.h>
+#include <volk/volk.h>
+
+namespace gr {
+  namespace blocks {
+
+    template <class T>
+    typename multiply_const_v<T>::sptr multiply_const_v<T>::make(std::vector<T> k)
+    {
+      return gnuradio::get_initial_sptr(new multiply_const_v_impl<T>(k));
+    }
+
+    template <>
+    multiply_const_v_impl<float>::multiply_const_v_impl(std::vector<float> k)
+      : sync_block("multiply_const_vff",
+                   io_signature::make(1, 1, sizeof(float)*k.size()),
+                   io_signature::make(1, 1, sizeof(float)*k.size())),
+        d_k(k)
+    {
+      const int alignment_multiple =
+        volk_get_alignment() / sizeof(float);
+      set_alignment(std::max(1,alignment_multiple));
+    }
+
+    template <>
+    int
+    multiply_const_v_impl<float>::work(int noutput_items,
+                                  gr_vector_const_void_star &input_items,
+                                  gr_vector_void_star &output_items)
+    {
+      float *iptr = (float*)input_items[0];
+      float *optr = (float*)output_items[0];
+
+      int nitems_per_block = this->output_signature()->sizeof_stream_item(0)/sizeof(float);
+
+      for(int i = 0; i < noutput_items; i++) {
+        for(int j = 0; j < nitems_per_block; j++) {
+          *optr++ = *iptr++ * d_k[j];
+        }
+      }
+
+      return noutput_items;
+    }
+
+    template <>
+    multiply_const_v_impl<gr_complex>::multiply_const_v_impl(std::vector<gr_complex> k)
+      : sync_block("multiply_const_vcc",
+                   io_signature::make(1, 1, sizeof(gr_complex)*k.size()),
+                   io_signature::make(1, 1, sizeof(gr_complex)*k.size())),
+        d_k(k)
+    {
+      const int alignment_multiple =
+	volk_get_alignment() / sizeof(gr_complex);
+      set_alignment(std::max(1,alignment_multiple));
+    }
+
+    template <>
+    int
+    multiply_const_v_impl<gr_complex>::work(int noutput_items,
+                                  gr_vector_const_void_star &input_items,
+                                  gr_vector_void_star &output_items)
+    {
+      gr_complex *iptr = (gr_complex*)input_items[0];
+      gr_complex *optr = (gr_complex*)output_items[0];
+
+      int nitems_per_block = this->output_signature()->sizeof_stream_item(0)/sizeof(gr_complex);
+
+      for(int i = 0; i < noutput_items; i++) {
+	for(int j = 0; j < nitems_per_block; j++) {
+	  *optr++ = *iptr++ * d_k[j];
+        }
+      }
+
+      return noutput_items;
+    }
+
+
+
+    template <class T>
+    multiply_const_v_impl<T>::multiply_const_v_impl(std::vector<T> k)
+      : sync_block ("multiply_const_v<T>",
+		       io_signature::make (1, 1, sizeof (T)*k.size()),
+		       io_signature::make (1, 1, sizeof (T)*k.size())),
+      d_k(k)
+    {
+    }
+
+    template <class T>
+    int
+    multiply_const_v_impl<T>::work(int noutput_items,
+		      gr_vector_const_void_star &input_items,
+		      gr_vector_void_star &output_items)
+    {
+      T *iptr = (T *)input_items[0];
+      T *optr = (T *)output_items[0];
+
+      int nitems_per_block = this->output_signature()->sizeof_stream_item(0)/sizeof(T);
+
+      for (int i = 0; i < noutput_items; i++)
+	for (int j = 0; j < nitems_per_block; j++)
+	  *optr++ = *iptr++ * d_k[j];
+
+      return noutput_items;
+    }
+
+    template class multiply_const_v<std::int16_t>;
+    template class multiply_const_v<std::int32_t>;
+    template class multiply_const_v<float>;
+    template class multiply_const_v<gr_complex>;
+  } /* namespace blocks */
+} /* namespace gr */
diff --git a/gr-blocks/lib/multiply_const_v_impl.h b/gr-blocks/lib/multiply_const_v_impl.h
new file mode 100644
index 0000000000..a329c12dd3
--- /dev/null
+++ b/gr-blocks/lib/multiply_const_v_impl.h
@@ -0,0 +1,50 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2006,2010,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef MULTIPLY_CONST_V_IMPL_H
+#define MULTIPLY_CONST_V_IMPL_H
+
+#include <gnuradio/blocks/multiply_const_v.h>
+
+namespace gr {
+  namespace blocks {
+
+    template <class T>
+    class BLOCKS_API multiply_const_v_impl : public multiply_const_v<T>
+    {
+      std::vector<T> d_k;
+
+    public:
+      multiply_const_v_impl(std::vector<T> k);
+
+      std::vector<T> k() const { return d_k; }
+      void set_k(std::vector<T> k) { d_k = k; }
+
+      int work(int noutput_items,
+	       gr_vector_const_void_star &input_items,
+	       gr_vector_void_star &output_items);
+    };
+
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* MULTIPLY_CONST_V_IMPL_H */
diff --git a/gr-blocks/lib/multiply_const_vcc_impl.cc b/gr-blocks/lib/multiply_const_vcc_impl.cc
deleted file mode 100644
index b793ec7ddb..0000000000
--- a/gr-blocks/lib/multiply_const_vcc_impl.cc
+++ /dev/null
@@ -1,100 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2014-2015 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <multiply_const_vcc_impl.h>
-#include <gnuradio/io_signature.h>
-#include <volk/volk.h>
-
-namespace gr {
-  namespace blocks {
-
-    multiply_const_vcc::sptr
-    multiply_const_vcc::make(std::vector<gr_complex> k)
-    {
-      return gnuradio::get_initial_sptr
-        (new multiply_const_vcc_impl(k));
-    }
-
-    multiply_const_vcc_impl::multiply_const_vcc_impl(std::vector<gr_complex> k)
-      : sync_block("multiply_const_vcc",
-                   io_signature::make(1, 1, sizeof(gr_complex)*k.size()),
-                   io_signature::make(1, 1, sizeof(gr_complex)*k.size())),
-        d_k(k)
-    {
-      const int alignment_multiple =
-	volk_get_alignment() / sizeof(gr_complex);
-      set_alignment(std::max(1,alignment_multiple));
-    }
-
-    int
-    multiply_const_vcc_impl::work(int noutput_items,
-                                  gr_vector_const_void_star &input_items,
-                                  gr_vector_void_star &output_items)
-    {
-      gr_complex *iptr = (gr_complex*)input_items[0];
-      gr_complex *optr = (gr_complex*)output_items[0];
-
-      int nitems_per_block = output_signature()->sizeof_stream_item(0)/sizeof(gr_complex);
-
-      for(int i = 0; i < noutput_items; i++) {
-	for(int j = 0; j < nitems_per_block; j++) {
-	  *optr++ = *iptr++ * d_k[j];
-        }
-      }
-
-      return noutput_items;
-    }
-
-    void
-    multiply_const_vcc_impl::setup_rpc()
-    {
-#ifdef GR_CTRLPORT
-      add_rpc_variable(
-        rpcbasic_sptr(new rpcbasic_register_get<multiply_const_vcc,
-                      std::vector<gr_complex> >(
-	  alias(), "coefficient",
-	  &multiply_const_vcc::k,
-	  pmt::from_complex(-1024.0f),
-          pmt::from_complex(1024.0f),
-          pmt::from_complex(0.0f),
-	  "", "Coefficient", RPC_PRIVLVL_MIN,
-          DISPTIME | DISPOPTSTRIP)));
-
-      add_rpc_variable(
-        rpcbasic_sptr(new rpcbasic_register_set<multiply_const_vcc,
-                      std::vector<gr_complex> >(
-	  alias(), "coefficient",
-	  &multiply_const_vcc::set_k,
-	  pmt::from_complex(-1024.0f),
-          pmt::from_complex(1024.0f),
-          pmt::from_complex(0.0f),
-	  "", "Coefficient",
-	  RPC_PRIVLVL_MIN, DISPNULL)));
-#endif /* GR_CTRLPORT */
-    }
-
-  } /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/multiply_const_vcc_impl.h b/gr-blocks/lib/multiply_const_vcc_impl.h
deleted file mode 100644
index c3fc5885b0..0000000000
--- a/gr-blocks/lib/multiply_const_vcc_impl.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2014 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_BLOCKS_MULTIPLY_CONST_VCC_IMPL_H
-#define INCLUDED_BLOCKS_MULTIPLY_CONST_VCC_IMPL_H
-
-#include <gnuradio/blocks/multiply_const_vcc.h>
-
-namespace gr {
-  namespace blocks {
-
-    class BLOCKS_API multiply_const_vcc_impl : public multiply_const_vcc
-    {
-    private:
-      std::vector<gr_complex> d_k;
-
-    public:
-      multiply_const_vcc_impl(std::vector<gr_complex> k);
-
-      void setup_rpc();
-
-      std::vector<gr_complex> k() const { return d_k; }
-      void set_k(std::vector<gr_complex> k) { d_k = k; }
-
-      int work(int noutput_items,
-	       gr_vector_const_void_star &input_items,
-	       gr_vector_void_star &output_items);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* INCLUDED_BLOCKS_MULTIPLY_CONST_VCC_IMPL_H */
diff --git a/gr-blocks/lib/multiply_const_vff_impl.cc b/gr-blocks/lib/multiply_const_vff_impl.cc
deleted file mode 100644
index 6a4719e5d3..0000000000
--- a/gr-blocks/lib/multiply_const_vff_impl.cc
+++ /dev/null
@@ -1,96 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2014-2015 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <multiply_const_vff_impl.h>
-#include <gnuradio/io_signature.h>
-#include <volk/volk.h>
-
-namespace gr {
-  namespace blocks {
-
-    multiply_const_vff::sptr
-    multiply_const_vff::make(std::vector<float> k)
-    {
-      return gnuradio::get_initial_sptr
-        (new multiply_const_vff_impl(k));
-    }
-
-    multiply_const_vff_impl::multiply_const_vff_impl(std::vector<float> k)
-      : sync_block("multiply_const_vff",
-                   io_signature::make(1, 1, sizeof(float)*k.size()),
-                   io_signature::make(1, 1, sizeof(float)*k.size())),
-        d_k(k)
-    {
-      const int alignment_multiple =
-	volk_get_alignment() / sizeof(float);
-      set_alignment(std::max(1,alignment_multiple));
-    }
-
-    int
-    multiply_const_vff_impl::work(int noutput_items,
-                                  gr_vector_const_void_star &input_items,
-                                  gr_vector_void_star &output_items)
-    {
-      float *iptr = (float*)input_items[0];
-      float *optr = (float*)output_items[0];
-
-      int nitems_per_block = output_signature()->sizeof_stream_item(0)/sizeof(float);
-
-      for(int i = 0; i < noutput_items; i++) {
-	for(int j = 0; j < nitems_per_block; j++) {
-	  *optr++ = *iptr++ * d_k[j];
-        }
-      }
-
-      return noutput_items;
-    }
-
-    void
-    multiply_const_vff_impl::setup_rpc()
-    {
-#ifdef GR_CTRLPORT
-      add_rpc_variable(
-        rpcbasic_sptr(new rpcbasic_register_get<multiply_const_vff,
-                      std::vector<float> >(
-	  alias(), "coefficient",
-	  &multiply_const_vff::k,
-	  pmt::mp(-1024.0f), pmt::mp(1024.0f), pmt::mp(0.0f),
-	  "", "Coefficient", RPC_PRIVLVL_MIN,
-          DISPTIME | DISPOPTSTRIP)));
-
-      add_rpc_variable(
-        rpcbasic_sptr(new rpcbasic_register_set<multiply_const_vff,
-                      std::vector<float> >(
-	  alias(), "coefficient",
-	  &multiply_const_vff::set_k,
-	  pmt::mp(-1024.0f), pmt::mp(1024.0f), pmt::mp(0.0f),
-	  "", "Coefficient",
-	  RPC_PRIVLVL_MIN, DISPNULL)));
-#endif /* GR_CTRLPORT */
-    }
-
-  } /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/multiply_const_vff_impl.h b/gr-blocks/lib/multiply_const_vff_impl.h
deleted file mode 100644
index ca555669ed..0000000000
--- a/gr-blocks/lib/multiply_const_vff_impl.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2014 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_BLOCKS_MULTIPLY_CONST_VFF_IMPL_H
-#define INCLUDED_BLOCKS_MULTIPLY_CONST_VFF_IMPL_H
-
-#include <gnuradio/blocks/multiply_const_vff.h>
-
-namespace gr {
-  namespace blocks {
-
-    class BLOCKS_API multiply_const_vff_impl : public multiply_const_vff
-    {
-    private:
-      std::vector<float> d_k;
-
-    public:
-      multiply_const_vff_impl(std::vector<float> k);
-
-      void setup_rpc();
-
-      std::vector<float> k() const { return d_k; }
-      void set_k(std::vector<float> k) { d_k = k; }
-
-      int work(int noutput_items,
-	       gr_vector_const_void_star &input_items,
-	       gr_vector_void_star &output_items);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* INCLUDED_BLOCKS_MULTIPLY_CONST_VFF_IMPL_H */
diff --git a/gr-blocks/lib/multiply_ff_impl.cc b/gr-blocks/lib/multiply_ff_impl.cc
deleted file mode 100644
index edc0749f2c..0000000000
--- a/gr-blocks/lib/multiply_ff_impl.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <multiply_ff_impl.h>
-#include <gnuradio/io_signature.h>
-#include <volk/volk.h>
-
-namespace gr {
-  namespace blocks {
-
-    multiply_ff::sptr multiply_ff::make(size_t vlen)
-    {
-      return gnuradio::get_initial_sptr(new multiply_ff_impl(vlen));
-    }
-
-    multiply_ff_impl::multiply_ff_impl(size_t vlen)
-      : sync_block("multiply_ff",
-		      io_signature::make (1, -1, sizeof(float)*vlen),
-		      io_signature::make (1,  1, sizeof(float)*vlen)),
-	d_vlen(vlen)
-    {
-      const int alignment_multiple =
-	volk_get_alignment() / sizeof(float);
-      set_alignment(std::max(1, alignment_multiple));
-    }
-
-    int
-    multiply_ff_impl::work(int noutput_items,
-			   gr_vector_const_void_star &input_items,
-			   gr_vector_void_star &output_items)
-    {
-      float *out = (float *) output_items[0];
-      int noi = d_vlen*noutput_items;
-
-      memcpy(out, input_items[0], noi*sizeof(float));
-      for(size_t i = 1; i < input_items.size(); i++)
-        volk_32f_x2_multiply_32f(out, out, (float*)input_items[i], noi);
-
-      return noutput_items;
-    }
-
-  } /* namespace blocks */
-}/* namespace gr */
diff --git a/gr-blocks/lib/multiply_ff_impl.h b/gr-blocks/lib/multiply_ff_impl.h
deleted file mode 100644
index 1213eef842..0000000000
--- a/gr-blocks/lib/multiply_ff_impl.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_BLOCKS_MULTIPLY_FF_IMPL_H
-#define INCLUDED_BLOCKS_MULTIPLY_FF_IMPL_H
-
-#include <gnuradio/blocks/multiply_ff.h>
-
-namespace gr {
-  namespace blocks {
-
-    class BLOCKS_API multiply_ff_impl : public multiply_ff
-    {
-      size_t d_vlen;
-
-    public:
-      multiply_ff_impl(size_t vlen);
-
-      int work(int noutput_items,
-	       gr_vector_const_void_star &input_items,
-	       gr_vector_void_star &output_items);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-
-#endif /* INCLUDED_BLOCKS_MULTIPLY_FF_IMPL_H */
diff --git a/gr-blocks/lib/multiply_impl.cc b/gr-blocks/lib/multiply_impl.cc
new file mode 100644
index 0000000000..22845251fb
--- /dev/null
+++ b/gr-blocks/lib/multiply_impl.cc
@@ -0,0 +1,132 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2009,2010,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "multiply_impl.h"
+#include <gnuradio/io_signature.h>
+#include <volk/volk.h>
+
+namespace gr {
+  namespace blocks {
+
+    template <class T>
+    typename multiply<T>::sptr multiply<T>::make(size_t vlen)
+    {
+      return gnuradio::get_initial_sptr(new multiply_impl<T> (vlen));
+    }
+
+    template <>
+    multiply_impl<float>::multiply_impl(size_t vlen)
+      : sync_block("multiply_ff",
+                   io_signature::make (1, -1, sizeof(float)*vlen),
+                   io_signature::make (1,  1, sizeof(float)*vlen)),
+        d_vlen(vlen)
+    {
+      const int alignment_multiple =
+        volk_get_alignment() / sizeof(float);
+      set_alignment(std::max(1, alignment_multiple));
+    }
+
+    template<>
+    int
+    multiply_impl<float>::work(int noutput_items,
+                               gr_vector_const_void_star &input_items,
+                               gr_vector_void_star &output_items)
+    {
+      float *out = (float *) output_items[0];
+      int noi = d_vlen*noutput_items;
+
+      memcpy(out, input_items[0], noi*sizeof(float));
+      for(size_t i = 1; i < input_items.size(); i++)
+        volk_32f_x2_multiply_32f(out, out, (float*)input_items[i], noi);
+
+      return noutput_items;
+    }
+
+    template <>
+    multiply_impl<gr_complex>::multiply_impl(size_t vlen)
+      : sync_block("multiply_cc",
+                   io_signature::make (1, -1, sizeof(gr_complex)*vlen),
+                   io_signature::make (1,  1, sizeof(gr_complex)*vlen)),
+        d_vlen(vlen)
+    {
+      const int alignment_multiple =
+        volk_get_alignment() / sizeof(gr_complex);
+      set_alignment(std::max(1, alignment_multiple));
+    }
+
+    template <>
+    int
+    multiply_impl<gr_complex>::work(int noutput_items,
+                                    gr_vector_const_void_star &input_items,
+                                    gr_vector_void_star &output_items)
+    {
+      gr_complex *out = (gr_complex *) output_items[0];
+      int noi = d_vlen*noutput_items;
+
+      memcpy(out, input_items[0], noi*sizeof(gr_complex));
+      for(size_t i = 1; i < input_items.size(); i++)
+        volk_32fc_x2_multiply_32fc(out, out, (gr_complex*)input_items[i], noi);
+
+      return noutput_items;
+    }
+
+    template <class T>
+    multiply_impl<T> ::multiply_impl(size_t vlen)
+      : sync_block ("multiply",
+		       io_signature::make (1, -1, sizeof (T)*vlen),
+		       io_signature::make (1,  1, sizeof (T)*vlen)),
+      d_vlen(vlen)
+    {
+    }
+
+    template <class T>
+    int
+    multiply_impl<T> ::work(int noutput_items,
+		      gr_vector_const_void_star &input_items,
+		      gr_vector_void_star &output_items)
+    {
+      T *optr = (T *) output_items[0];
+
+      int ninputs = input_items.size ();
+
+      for (size_t i = 0; i < noutput_items*d_vlen; i++){
+	T acc = ((T *) input_items[0])[i];
+	for (int j = 1; j < ninputs; j++)
+	  acc *= ((T *) input_items[j])[i];
+
+	*optr++ = (T) acc;
+      }
+
+      return noutput_items;
+    }
+
+template class multiply<std::int16_t>;
+template class multiply<std::int32_t>;
+template class multiply<gr_complex>;
+template class multiply<float>;
+  } /* namespace blocks */
+} /* namespace gr */
diff --git a/gr-blocks/lib/multiply_impl.h b/gr-blocks/lib/multiply_impl.h
new file mode 100644
index 0000000000..7f75f85f9f
--- /dev/null
+++ b/gr-blocks/lib/multiply_impl.h
@@ -0,0 +1,47 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2009,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef MULTIPLY_IMPL_H
+#define MULTIPLY_IMPL_H
+
+#include <gnuradio/blocks/multiply.h>
+
+namespace gr {
+  namespace blocks {
+
+template<class T>
+    class BLOCKS_API multiply_impl : public  multiply<T>
+    {
+      size_t d_vlen;
+
+    public:
+      multiply_impl (size_t vlen);
+
+      int work(int noutput_items,
+	       gr_vector_const_void_star &input_items,
+	       gr_vector_void_star &output_items);
+    };
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* MULTIPLY_IMPL_H */
diff --git a/gr-blocks/lib/multiply_matrix_cc_impl.cc b/gr-blocks/lib/multiply_matrix_cc_impl.cc
deleted file mode 100644
index 15fc0fc814..0000000000
--- a/gr-blocks/lib/multiply_matrix_cc_impl.cc
+++ /dev/null
@@ -1,182 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2014,2017 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <gnuradio/io_signature.h>
-#include <volk/volk.h>
-#include "multiply_matrix_cc_impl.h"
-
-namespace gr {
-  namespace blocks {
-
-    const std::string multiply_matrix_cc::MSG_PORT_NAME_SET_A = "set_A";
-
-    multiply_matrix_cc::sptr
-    multiply_matrix_cc::make(std::vector<std::vector<gr_complex> > A, gr::block::tag_propagation_policy_t tag_propagation_policy)
-    {
-      if (A.empty() || A[0].size() == 0) {
-        throw std::invalid_argument("matrix A has invalid dimensions.");
-      }
-      return gnuradio::get_initial_sptr
-        (new multiply_matrix_cc_impl(A, tag_propagation_policy));
-    }
-
-    multiply_matrix_cc_impl::multiply_matrix_cc_impl(std::vector<std::vector<gr_complex> > A, gr::block::tag_propagation_policy_t tag_propagation_policy)
-      : gr::sync_block("multiply_matrix_cc",
-              gr::io_signature::make(A[0].size(), A[0].size(), sizeof(gr_complex)),
-              gr::io_signature::make(A.size(), A.size(), sizeof(gr_complex))),
-      d_A(A)
-    {
-      this->set_tag_propagation_policy(tag_propagation_policy);
-      const int alignment_multiple = volk_get_alignment() / sizeof(gr_complex);
-      set_alignment(std::max(1, alignment_multiple));
-
-      pmt::pmt_t port_name = pmt::string_to_symbol("set_A");
-      message_port_register_in(port_name);
-      set_msg_handler(
-          port_name,
-          boost::bind(&multiply_matrix_cc_impl::msg_handler_A, this, _1)
-      );
-    }
-
-    multiply_matrix_cc_impl::~multiply_matrix_cc_impl()
-    {
-    }
-
-    int
-    multiply_matrix_cc_impl::work(int noutput_items,
-                          gr_vector_const_void_star &input_items,
-                          gr_vector_void_star &output_items)
-    {
-      for (size_t out_idx = 0; out_idx < output_items.size(); out_idx++) {
-        gr_complex *out = reinterpret_cast<gr_complex *>(output_items[out_idx]);
-        // Do input 0 first, this saves a memset
-        const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]);
-        volk_32fc_s32fc_multiply_32fc(out, in, d_A[out_idx][0], noutput_items);
-        // Then do inputs 1 through N
-        for (size_t in_idx = 1; in_idx < input_items.size(); in_idx++) {
-          in = reinterpret_cast<const gr_complex *>(input_items[in_idx]);
-          // Yeah, this needs VOLK-ifying (TODO)
-          for (int i = 0; i < noutput_items; i++) {
-            out[i] += in[i] * d_A[out_idx][in_idx];
-          }
-        }
-      }
-      if (tag_propagation_policy() == TPP_CUSTOM) {
-        propagate_tags_by_A(noutput_items, input_items.size(), output_items.size());
-      }
-      return noutput_items;
-    }
-
-
-    // Copy tags from input k to output l if A[l][k] is not zero
-    void
-    multiply_matrix_cc_impl::propagate_tags_by_A(int noutput_items, size_t ninput_ports, size_t noutput_ports)
-    {
-      std::vector<gr::tag_t> tags;
-      for (size_t in_idx = 0; in_idx < ninput_ports; in_idx++) {
-        get_tags_in_window(
-            tags,
-            in_idx,
-            0,
-            noutput_items
-        );
-
-        for (size_t out_idx = 0; out_idx < noutput_ports; out_idx++) {
-          if (d_A[out_idx][in_idx] == std::complex<float>(0, 0)) {
-            continue;
-          }
-          for (size_t i = 0; i < tags.size(); i++) {
-            add_item_tag(out_idx, tags[i]);
-          }
-        }
-      }
-    }
-
-    // Check dimensions before copying
-    bool
-    multiply_matrix_cc_impl::set_A(const std::vector<std::vector<gr_complex> > &new_A)
-    {
-      if (d_A.size() != new_A.size()) {
-        GR_LOG_ALERT(d_logger, "Attempted to set matrix with invalid dimensions.");
-        return false;
-      }
-      for (size_t i = 0; i < d_A.size(); i++) {
-        if (d_A[i].size() != new_A[i].size()) {
-          GR_LOG_ALERT(d_logger, "Attempted to set matrix with invalid dimensions.");
-          return false;
-        }
-      }
-      d_A = new_A;
-      return true;
-    }
-
-    void
-    multiply_matrix_cc_impl::msg_handler_A(pmt::pmt_t A)
-    {
-      if (!pmt::is_vector(A) && !pmt::is_tuple(A)) {
-          GR_LOG_ALERT(d_logger, "Invalid message to set A (wrong type).");
-          return;
-      }
-      if (pmt::length(A) != d_A.size()) {
-          GR_LOG_ALERT(d_logger, "Invalid message to set A (wrong size).");
-          return;
-      }
-
-      std::vector<std::vector<gr_complex> > new_A(d_A);
-      for (size_t i = 0; i < pmt::length(A); i++) {
-        pmt::pmt_t row;
-        if (pmt::is_vector(A)) {
-          row = pmt::vector_ref(A, i);
-        } else if (pmt::is_tuple(A)) {
-          row = pmt::tuple_ref(A, i);
-        }
-        if (pmt::is_vector(row) || pmt::is_tuple(row)) {
-          if (pmt::length(row) != d_A[0].size()) {
-            GR_LOG_ALERT(d_logger, "Invalid message to set A (wrong number of columns).");
-            return;
-          }
-          for (size_t k = 0; k < pmt::length(row); k++) {
-            new_A[i][k] = pmt::to_double(pmt::is_vector(row) ? pmt::vector_ref(row, k) : pmt::tuple_ref(row, k));
-          }
-        } else if (pmt::is_c32vector(row)) {
-          size_t row_len = 0;
-          const gr_complex *elements = pmt::c32vector_elements(row, row_len);
-          if (row_len != d_A[0].size()) {
-            GR_LOG_ALERT(d_logger, "Invalid message to set A (wrong number of columns).");
-            return;
-          }
-          new_A[i].assign(elements, elements + row_len);
-        }
-      }
-
-      if (!set_A(new_A)) {
-          GR_LOG_ALERT(d_logger, "Invalid message to set A.");
-      }
-    }
-
-
-  } /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/multiply_matrix_cc_impl.h b/gr-blocks/lib/multiply_matrix_cc_impl.h
deleted file mode 100644
index f342817e26..0000000000
--- a/gr-blocks/lib/multiply_matrix_cc_impl.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- c++ -*- */
-/* 
- * Copyright 2014, 2017 Free Software Foundation, Inc.
- * 
- * This file is part of GNU Radio
- * 
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- * 
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_BLOCKS_MULTIPLY_matrix_cc_IMPL_H
-#define INCLUDED_BLOCKS_MULTIPLY_matrix_cc_IMPL_H
-
-#include <gnuradio/blocks/multiply_matrix_cc.h>
-
-namespace gr {
-  namespace blocks {
-
-    class multiply_matrix_cc_impl : public multiply_matrix_cc
-    {
-     private:
-      std::vector<std::vector<gr_complex> > d_A;
-
-      void propagate_tags_by_A(int noutput_items, size_t ninput_ports, size_t noutput_ports);
-
-      void msg_handler_A(pmt::pmt_t A);
-
-     public:
-      multiply_matrix_cc_impl(std::vector<std::vector<gr_complex> > A, gr::block::tag_propagation_policy_t tag_propagation_policy);
-      ~multiply_matrix_cc_impl();
-
-      const std::vector<std::vector<gr_complex> >& get_A() const { return d_A; };
-      bool set_A(const std::vector<std::vector<gr_complex> > &new_A);
-
-      int work(int noutput_items,
-               gr_vector_const_void_star &input_items,
-               gr_vector_void_star &output_items);
-    };
-
-  } // namespace blocks
-} // namespace gr
-
-#endif /* INCLUDED_BLOCKS_MULTIPLY_matrix_cc_IMPL_H */
-
diff --git a/gr-blocks/lib/multiply_matrix_ff_impl.cc b/gr-blocks/lib/multiply_matrix_ff_impl.cc
deleted file mode 100644
index a5eae4261e..0000000000
--- a/gr-blocks/lib/multiply_matrix_ff_impl.cc
+++ /dev/null
@@ -1,182 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2014 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <gnuradio/io_signature.h>
-#include <volk/volk.h>
-#include "multiply_matrix_ff_impl.h"
-
-namespace gr {
-  namespace blocks {
-
-    const std::string multiply_matrix_ff::MSG_PORT_NAME_SET_A = "set_A";
-
-    multiply_matrix_ff::sptr
-    multiply_matrix_ff::make(std::vector<std::vector<float> > A, gr::block::tag_propagation_policy_t tag_propagation_policy)
-    {
-      if (A.empty() || A[0].size() == 0) {
-        throw std::invalid_argument("matrix A has invalid dimensions.");
-      }
-      return gnuradio::get_initial_sptr
-        (new multiply_matrix_ff_impl(A, tag_propagation_policy));
-    }
-
-    multiply_matrix_ff_impl::multiply_matrix_ff_impl(std::vector<std::vector<float> > A, gr::block::tag_propagation_policy_t tag_propagation_policy)
-      : gr::sync_block("multiply_matrix_ff",
-              gr::io_signature::make(A[0].size(), A[0].size(), sizeof(float)),
-              gr::io_signature::make(A.size(), A.size(), sizeof(float))),
-      d_A(A)
-    {
-      this->set_tag_propagation_policy(tag_propagation_policy);
-      const int alignment_multiple = volk_get_alignment() / sizeof(float);
-      set_alignment(std::max(1, alignment_multiple));
-
-      pmt::pmt_t port_name = pmt::string_to_symbol("set_A");
-      message_port_register_in(port_name);
-      set_msg_handler(
-          port_name,
-          boost::bind(&multiply_matrix_ff_impl::msg_handler_A, this, _1)
-      );
-    }
-
-    multiply_matrix_ff_impl::~multiply_matrix_ff_impl()
-    {
-    }
-
-    int
-    multiply_matrix_ff_impl::work(int noutput_items,
-                          gr_vector_const_void_star &input_items,
-                          gr_vector_void_star &output_items)
-    {
-      for (size_t out_idx = 0; out_idx < output_items.size(); out_idx++) {
-        float *out = reinterpret_cast<float *>(output_items[out_idx]);
-        // Do input 0 first, this saves a memset
-        const float *in = reinterpret_cast<const float *>(input_items[0]);
-        volk_32f_s32f_multiply_32f(out, in, d_A[out_idx][0], noutput_items);
-        // Then do inputs 1 through N
-        for (size_t in_idx = 1; in_idx < input_items.size(); in_idx++) {
-          in = reinterpret_cast<const float *>(input_items[in_idx]);
-          // Yeah, this needs VOLK-ifying (TODO)
-          for (int i = 0; i < noutput_items; i++) {
-            out[i] += in[i] * d_A[out_idx][in_idx];
-          }
-        }
-      }
-      if (tag_propagation_policy() == TPP_CUSTOM) {
-        propagate_tags_by_A(noutput_items, input_items.size(), output_items.size());
-      }
-      return noutput_items;
-    }
-
-
-    // Copy tags from input k to output l if A[l][k] is not zero
-    void
-    multiply_matrix_ff_impl::propagate_tags_by_A(int noutput_items, size_t ninput_ports, size_t noutput_ports)
-    {
-      std::vector<gr::tag_t> tags;
-      for (size_t in_idx = 0; in_idx < ninput_ports; in_idx++) {
-        get_tags_in_window(
-            tags,
-            in_idx,
-            0,
-            noutput_items
-        );
-
-        for (size_t out_idx = 0; out_idx < noutput_ports; out_idx++) {
-          if (d_A[out_idx][in_idx] == 0) {
-            continue;
-          }
-          for (size_t i = 0; i < tags.size(); i++) {
-            add_item_tag(out_idx, tags[i]);
-          }
-        }
-      }
-    }
-
-    // Check dimensions before copying
-    bool
-    multiply_matrix_ff_impl::set_A(const std::vector<std::vector<float> > &new_A)
-    {
-      if (d_A.size() != new_A.size()) {
-        GR_LOG_ALERT(d_logger, "Attempted to set matrix with invalid dimensions.");
-        return false;
-      }
-      for (size_t i = 0; i < d_A.size(); i++) {
-        if (d_A[i].size() != new_A[i].size()) {
-          GR_LOG_ALERT(d_logger, "Attempted to set matrix with invalid dimensions.");
-          return false;
-        }
-      }
-      d_A = new_A;
-      return true;
-    }
-
-    void
-    multiply_matrix_ff_impl::msg_handler_A(pmt::pmt_t A)
-    {
-      if (!pmt::is_vector(A) && !pmt::is_tuple(A)) {
-          GR_LOG_ALERT(d_logger, "Invalid message to set A (wrong type).");
-          return;
-      }
-      if (pmt::length(A) != d_A.size()) {
-          GR_LOG_ALERT(d_logger, "Invalid message to set A (wrong size).");
-          return;
-      }
-
-      std::vector<std::vector<float> > new_A(d_A);
-      for (size_t i = 0; i < pmt::length(A); i++) {
-        pmt::pmt_t row;
-        if (pmt::is_vector(A)) {
-          row = pmt::vector_ref(A, i);
-        } else if (pmt::is_tuple(A)) {
-          row = pmt::tuple_ref(A, i);
-        }
-        if (pmt::is_vector(row) || pmt::is_tuple(row)) {
-          if (pmt::length(row) != d_A[0].size()) {
-            GR_LOG_ALERT(d_logger, "Invalid message to set A (wrong number of columns).");
-            return;
-          }
-          for (size_t k = 0; k < pmt::length(row); k++) {
-            new_A[i][k] = pmt::to_double(pmt::is_vector(row) ? pmt::vector_ref(row, k) : pmt::tuple_ref(row, k));
-          }
-        } else if (pmt::is_f32vector(row)) {
-          size_t row_len = 0;
-          const float *elements = pmt::f32vector_elements(row, row_len);
-          if (row_len != d_A[0].size()) {
-            GR_LOG_ALERT(d_logger, "Invalid message to set A (wrong number of columns).");
-            return;
-          }
-          new_A[i].assign(elements, elements + row_len);
-        }
-      }
-
-      if (!set_A(new_A)) {
-          GR_LOG_ALERT(d_logger, "Invalid message to set A.");
-      }
-    }
-
-
-  } /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/multiply_matrix_ff_impl.h b/gr-blocks/lib/multiply_matrix_ff_impl.h
deleted file mode 100644
index 93b2bebadd..0000000000
--- a/gr-blocks/lib/multiply_matrix_ff_impl.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- c++ -*- */
-/* 
- * Copyright 2014, 2017 Free Software Foundation, Inc.
- * 
- * This file is part of GNU Radio
- * 
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- * 
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_BLOCKS_MULTIPLY_MATRIX_FF_IMPL_H
-#define INCLUDED_BLOCKS_MULTIPLY_MATRIX_FF_IMPL_H
-
-#include <gnuradio/blocks/multiply_matrix_ff.h>
-
-namespace gr {
-  namespace blocks {
-
-    class multiply_matrix_ff_impl : public multiply_matrix_ff
-    {
-     private:
-      std::vector<std::vector<float> > d_A;
-
-      void propagate_tags_by_A(int noutput_items, size_t ninput_ports, size_t noutput_ports);
-
-      void msg_handler_A(pmt::pmt_t A);
-
-     public:
-      multiply_matrix_ff_impl(std::vector<std::vector<float> > A, gr::block::tag_propagation_policy_t tag_propagation_policy);
-      ~multiply_matrix_ff_impl();
-
-      const std::vector<std::vector<float> >& get_A() const { return d_A; };
-      bool set_A(const std::vector<std::vector<float> > &new_A);
-
-      int work(int noutput_items,
-               gr_vector_const_void_star &input_items,
-               gr_vector_void_star &output_items);
-    };
-
-  } // namespace blocks
-} // namespace gr
-
-#endif /* INCLUDED_BLOCKS_MULTIPLY_MATRIX_FF_IMPL_H */
-
diff --git a/gr-blocks/lib/multiply_matrix_impl.cc b/gr-blocks/lib/multiply_matrix_impl.cc
new file mode 100644
index 0000000000..4d7dbb3651
--- /dev/null
+++ b/gr-blocks/lib/multiply_matrix_impl.cc
@@ -0,0 +1,327 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014,2017,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gnuradio/io_signature.h>
+#include <volk/volk.h>
+#include "multiply_matrix_impl.h"
+
+namespace gr {
+  namespace blocks {
+
+    // Copy tags from input k to output l if A[l][k] is not zero
+    template <>
+    void
+    multiply_matrix_impl<gr_complex>::propagate_tags_by_A(int noutput_items, size_t ninput_ports, size_t noutput_ports)
+    {
+      std::vector<gr::tag_t> tags;
+      for (size_t in_idx = 0; in_idx < ninput_ports; in_idx++) {
+        this->get_tags_in_window(
+            tags,
+            in_idx,
+            0,
+            noutput_items
+        );
+
+        for (size_t out_idx = 0; out_idx < noutput_ports; out_idx++) {
+          if (d_A[out_idx][in_idx] == std::complex<float>(0, 0)) {
+            continue;
+          }
+          for (size_t i = 0; i < tags.size(); i++) {
+            this->add_item_tag(out_idx, tags[i]);
+          }
+        }
+      }
+    }
+
+    // Check dimensions before copying
+    template <>
+    bool
+    multiply_matrix_impl<gr_complex>::set_A(const std::vector<std::vector<gr_complex> > &new_A)
+    {
+      if (d_A.size() != new_A.size()) {
+        GR_LOG_ALERT(d_logger, "Attempted to set matrix with invalid dimensions.");
+        return false;
+      }
+      for (size_t i = 0; i < d_A.size(); i++) {
+        if (d_A[i].size() != new_A[i].size()) {
+          GR_LOG_ALERT(d_logger, "Attempted to set matrix with invalid dimensions.");
+          return false;
+        }
+      }
+      d_A = new_A;
+      return true;
+    }
+
+    template <>
+    void
+    multiply_matrix_impl<gr_complex>::msg_handler_A(pmt::pmt_t A)
+    {
+      if (!pmt::is_vector(A) && !pmt::is_tuple(A)) {
+          GR_LOG_ALERT(d_logger, "Invalid message to set A (wrong type).");
+          return;
+      }
+      if (pmt::length(A) != d_A.size()) {
+          GR_LOG_ALERT(d_logger, "Invalid message to set A (wrong size).");
+          return;
+      }
+
+      std::vector<std::vector<gr_complex> > new_A(d_A);
+      for (size_t i = 0; i < pmt::length(A); i++) {
+        pmt::pmt_t row;
+        if (pmt::is_vector(A)) {
+          row = pmt::vector_ref(A, i);
+        } else if (pmt::is_tuple(A)) {
+          row = pmt::tuple_ref(A, i);
+        }
+        if (pmt::is_vector(row) || pmt::is_tuple(row)) {
+          if (pmt::length(row) != d_A[0].size()) {
+            GR_LOG_ALERT(d_logger, "Invalid message to set A (wrong number of columns).");
+            return;
+          }
+          for (size_t k = 0; k < pmt::length(row); k++) {
+            new_A[i][k] = pmt::to_double(pmt::is_vector(row) ? pmt::vector_ref(row, k) : pmt::tuple_ref(row, k));
+          }
+        } else if (pmt::is_c32vector(row)) {
+          size_t row_len = 0;
+          const gr_complex *elements = pmt::c32vector_elements(row, row_len);
+          if (row_len != d_A[0].size()) {
+            GR_LOG_ALERT(d_logger, "Invalid message to set A (wrong number of columns).");
+            return;
+          }
+          new_A[i].assign(elements, elements + row_len);
+        }
+      }
+
+      if (!set_A(new_A)) {
+          GR_LOG_ALERT(d_logger, "Invalid message to set A.");
+      }
+    }
+
+    // Copy tags from input k to output l if A[l][k] is not zero
+    template <>
+    void
+    multiply_matrix_impl<float>::propagate_tags_by_A(int noutput_items, size_t ninput_ports, size_t noutput_ports)
+    {
+      std::vector<gr::tag_t> tags;
+      for (size_t in_idx = 0; in_idx < ninput_ports; in_idx++) {
+        get_tags_in_window(
+            tags,
+            in_idx,
+            0,
+            noutput_items
+        );
+
+        for (size_t out_idx = 0; out_idx < noutput_ports; out_idx++) {
+          if (d_A[out_idx][in_idx] == 0) {
+            continue;
+          }
+          for (size_t i = 0; i < tags.size(); i++) {
+            add_item_tag(out_idx, tags[i]);
+          }
+        }
+      }
+    }
+
+    // Check dimensions before copying
+    template <>
+    bool
+    multiply_matrix_impl<float>::set_A(const std::vector<std::vector<float> > &new_A)
+    {
+      if (d_A.size() != new_A.size()) {
+        GR_LOG_ALERT(d_logger, "Attempted to set matrix with invalid dimensions.");
+        return false;
+      }
+      for (size_t i = 0; i < d_A.size(); i++) {
+        if (d_A[i].size() != new_A[i].size()) {
+          GR_LOG_ALERT(d_logger, "Attempted to set matrix with invalid dimensions.");
+          return false;
+        }
+      }
+      d_A = new_A;
+      return true;
+    }
+
+    template <>
+    void
+    multiply_matrix_impl<float>::msg_handler_A(pmt::pmt_t A)
+    {
+      if (!pmt::is_vector(A) && !pmt::is_tuple(A)) {
+          GR_LOG_ALERT(d_logger, "Invalid message to set A (wrong type).");
+          return;
+      }
+      if (pmt::length(A) != d_A.size()) {
+          GR_LOG_ALERT(d_logger, "Invalid message to set A (wrong size).");
+          return;
+      }
+
+      std::vector<std::vector<float> > new_A(d_A);
+      for (size_t i = 0; i < pmt::length(A); i++) {
+        pmt::pmt_t row;
+        if (pmt::is_vector(A)) {
+          row = pmt::vector_ref(A, i);
+        } else if (pmt::is_tuple(A)) {
+          row = pmt::tuple_ref(A, i);
+        }
+        if (pmt::is_vector(row) || pmt::is_tuple(row)) {
+          if (pmt::length(row) != d_A[0].size()) {
+            GR_LOG_ALERT(d_logger, "Invalid message to set A (wrong number of columns).");
+            return;
+          }
+          for (size_t k = 0; k < pmt::length(row); k++) {
+            new_A[i][k] = pmt::to_double(pmt::is_vector(row) ? pmt::vector_ref(row, k) : pmt::tuple_ref(row, k));
+          }
+        } else if (pmt::is_f32vector(row)) {
+          size_t row_len = 0;
+          const float *elements = pmt::f32vector_elements(row, row_len);
+          if (row_len != d_A[0].size()) {
+            GR_LOG_ALERT(d_logger, "Invalid message to set A (wrong number of columns).");
+            return;
+          }
+          new_A[i].assign(elements, elements + row_len);
+        }
+      }
+
+      if (!set_A(new_A)) {
+          GR_LOG_ALERT(d_logger, "Invalid message to set A.");
+      }
+    }
+
+
+
+    template <class T>
+    typename multiply_matrix<T>::sptr
+    multiply_matrix<T>::make(std::vector<std::vector<T> > A, gr::block::tag_propagation_policy_t tag_propagation_policy)
+    {
+      if (A.empty() || A[0].size() == 0) {
+        throw std::invalid_argument("matrix A has invalid dimensions.");
+      }
+      return gnuradio::get_initial_sptr
+        (new multiply_matrix_impl<T>(A, tag_propagation_policy));
+    }
+
+    template <>
+    multiply_matrix_impl<gr_complex>::multiply_matrix_impl(std::vector<std::vector<gr_complex> > A, gr::block::tag_propagation_policy_t tag_propagation_policy)
+      : gr::sync_block("multiply_matrix_cc",
+              gr::io_signature::make(A[0].size(), A[0].size(), sizeof(gr_complex)),
+              gr::io_signature::make(A.size(), A.size(), sizeof(gr_complex))),
+        d_A(A)
+    { this->MSG_PORT_NAME_SET_A = "set_A";
+      this->set_tag_propagation_policy(tag_propagation_policy);
+      const int alignment_multiple = volk_get_alignment() / sizeof(gr_complex);
+      set_alignment(std::max(1, alignment_multiple));
+
+      pmt::pmt_t port_name = pmt::string_to_symbol("set_A");
+      message_port_register_in(port_name);
+      set_msg_handler(
+          port_name,
+          boost::bind(&multiply_matrix_impl<gr_complex>::msg_handler_A, this, _1)
+      );
+    }
+
+    template <>
+    multiply_matrix_impl<float>::multiply_matrix_impl(std::vector<std::vector<float> > A, gr::block::tag_propagation_policy_t tag_propagation_policy)
+      : gr::sync_block("multiply_matrix_ff",
+                       gr::io_signature::make(A[0].size(), A[0].size(), sizeof(float)),
+                       gr::io_signature::make(A.size(), A.size(), sizeof(float))),
+        d_A(A)
+      { this->MSG_PORT_NAME_SET_A = "set_A";
+      this->set_tag_propagation_policy(tag_propagation_policy);
+      const int alignment_multiple = volk_get_alignment() / sizeof(float);
+      set_alignment(std::max(1, alignment_multiple));
+
+      pmt::pmt_t port_name = pmt::string_to_symbol("set_A");
+      message_port_register_in(port_name);
+      set_msg_handler(
+                      port_name,
+                      boost::bind(&multiply_matrix_impl<float>::msg_handler_A, this, _1)
+                      );
+    }
+
+
+
+    template <class T>
+    multiply_matrix_impl<T>::~multiply_matrix_impl()
+    {
+    }
+
+    template <>
+    int
+    multiply_matrix_impl<gr_complex>::work(int noutput_items,
+                          gr_vector_const_void_star &input_items,
+                          gr_vector_void_star &output_items)
+    {
+      for (size_t out_idx = 0; out_idx < output_items.size(); out_idx++) {
+        gr_complex *out = reinterpret_cast<gr_complex *>(output_items[out_idx]);
+        // Do input 0 first, this saves a memset
+        const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]);
+        volk_32fc_s32fc_multiply_32fc(out, in, d_A[out_idx][0], noutput_items);
+        // Then do inputs 1 through N
+        for (size_t in_idx = 1; in_idx < input_items.size(); in_idx++) {
+          in = reinterpret_cast<const gr_complex *>(input_items[in_idx]);
+          // Yeah, this needs VOLK-ifying (TODO)
+          for (int i = 0; i < noutput_items; i++) {
+            out[i] += in[i] * d_A[out_idx][in_idx];
+          }
+        }
+      }
+      if (tag_propagation_policy() == TPP_CUSTOM) {
+        propagate_tags_by_A(noutput_items, input_items.size(), output_items.size());
+      }
+      return noutput_items;
+    }
+
+    template <>
+    int
+    multiply_matrix_impl<float>::work(int noutput_items,
+                          gr_vector_const_void_star &input_items,
+                          gr_vector_void_star &output_items)
+    {
+      for (size_t out_idx = 0; out_idx < output_items.size(); out_idx++) {
+        float *out = reinterpret_cast<float *>(output_items[out_idx]);
+        // Do input 0 first, this saves a memset
+        const float *in = reinterpret_cast<const float *>(input_items[0]);
+        volk_32f_s32f_multiply_32f(out, in, d_A[out_idx][0], noutput_items);
+        // Then do inputs 1 through N
+        for (size_t in_idx = 1; in_idx < input_items.size(); in_idx++) {
+          in = reinterpret_cast<const float *>(input_items[in_idx]);
+          // Yeah, this needs VOLK-ifying (TODO)
+          for (int i = 0; i < noutput_items; i++) {
+            out[i] += in[i] * d_A[out_idx][in_idx];
+          }
+        }
+      }
+      if (tag_propagation_policy() == TPP_CUSTOM) {
+        propagate_tags_by_A(noutput_items, input_items.size(), output_items.size());
+      }
+      return noutput_items;
+    }
+
+
+    template class multiply_matrix<float>;
+    template class multiply_matrix<gr_complex>;
+
+  } /* namespace blocks */
+} /* namespace gr */
diff --git a/gr-blocks/lib/multiply_matrix_impl.h b/gr-blocks/lib/multiply_matrix_impl.h
new file mode 100644
index 0000000000..bb5477e805
--- /dev/null
+++ b/gr-blocks/lib/multiply_matrix_impl.h
@@ -0,0 +1,56 @@
+/* -*- c++ -*- */
+/* 
+ * Copyright 2014,2017-2018 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_BLOCKS_MULTIPLY_MATRIX_IMPL_H
+#define INCLUDED_BLOCKS_MULTIPLY_MATRIX_IMPL_H
+
+#include <gnuradio/blocks/multiply_matrix.h>
+
+namespace gr {
+  namespace blocks {
+
+    template <class T>
+    class multiply_matrix_impl : public multiply_matrix<T>
+    {
+     private:
+      std::vector<std::vector<T> > d_A;
+
+      void propagate_tags_by_A(int noutput_items, size_t ninput_ports, size_t noutput_ports);
+
+      void msg_handler_A(pmt::pmt_t A);
+
+     public:
+      multiply_matrix_impl(std::vector<std::vector<T> > A, gr::block::tag_propagation_policy_t tag_propagation_policy);
+      ~multiply_matrix_impl();
+
+      const std::vector<std::vector<T> >& get_A() const { return d_A; };
+      bool set_A(const std::vector<std::vector<T> > &new_A);
+
+      int work(int noutput_items,
+               gr_vector_const_void_star &input_items,
+               gr_vector_void_star &output_items);
+    };
+
+  } // namespace blocks
+} // namespace gr
+
+#endif /* INCLUDED_BLOCKS_MULTIPLY_MATRIX_IMPL_H */
diff --git a/gr-blocks/lib/mute_XX_impl.cc.t b/gr-blocks/lib/mute_XX_impl.cc.t
deleted file mode 100644
index e7c2c4398b..0000000000
--- a/gr-blocks/lib/mute_XX_impl.cc.t
+++ /dev/null
@@ -1,92 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2010,2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <@NAME_IMPL@.h>
-#include <gnuradio/io_signature.h>
-#include <string.h>
-
-namespace gr {
-  namespace blocks {
-
-    @NAME@::sptr
-    @NAME@::make(bool mute)
-    {
-      return gnuradio::get_initial_sptr
-        (new @NAME_IMPL@(mute));
-    }
-
-    @NAME_IMPL@::@NAME_IMPL@(bool mute)
-    : sync_block("@BASE_NAME@",
-                    io_signature::make(1, 1, sizeof(@I_TYPE@)),
-                    io_signature::make(1, 1, sizeof(@O_TYPE@))),
-      d_mute(mute)
-    {
-      message_port_register_in(pmt::intern("set_mute"));
-      set_msg_handler(pmt::intern("set_mute"),
-        boost::bind(&@NAME_IMPL@::set_mute_pmt, this, _1));
-    }
-
-    @NAME_IMPL@::~@NAME_IMPL@()
-    {
-    }
-
-    int
-    @NAME_IMPL@::work(int noutput_items,
-                      gr_vector_const_void_star &input_items,
-                      gr_vector_void_star &output_items)
-    {
-      @I_TYPE@ *iptr = (@I_TYPE@ *)input_items[0];
-      @O_TYPE@ *optr = (@O_TYPE@ *)output_items[0];
-
-      int size = noutput_items;
-
-      if(d_mute) {
-        memset(optr, 0, noutput_items * sizeof(@O_TYPE@));
-      }
-      else {
-        while(size >= 8) {
-          *optr++ = *iptr++;
-          *optr++ = *iptr++;
-          *optr++ = *iptr++;
-          *optr++ = *iptr++;
-          *optr++ = *iptr++;
-          *optr++ = *iptr++;
-          *optr++ = *iptr++;
-          *optr++ = *iptr++;
-          size -= 8;
-        }
-
-        while(size-- > 0)
-          *optr++ = *iptr++;
-      }
-
-      return noutput_items;
-    }
-
-  } /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/mute_XX_impl.h.t b/gr-blocks/lib/mute_XX_impl.h.t
deleted file mode 100644
index 8234583bbf..0000000000
--- a/gr-blocks/lib/mute_XX_impl.h.t
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME_IMPL@
-#define @GUARD_NAME_IMPL@
-
-#include <gnuradio/blocks/@NAME@.h>
-
-namespace gr {
-  namespace blocks {
-
-    class @NAME_IMPL@ : public @NAME@
-    {
-    private:
-      bool d_mute;
-
-    public:
-      @NAME_IMPL@(bool mute);
-      ~@NAME_IMPL@();
-
-      bool mute() const { return d_mute; }
-      void set_mute(bool mute) { d_mute = mute; }
-      void set_mute_pmt(pmt::pmt_t msg) { set_mute(pmt::to_bool(msg)); }
-
-      int work(int noutput_items,
-               gr_vector_const_void_star &input_items,
-               gr_vector_void_star &output_items);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME_IMPL@ */
diff --git a/gr-blocks/lib/mute_impl.cc b/gr-blocks/lib/mute_impl.cc
new file mode 100644
index 0000000000..081dd81b35
--- /dev/null
+++ b/gr-blocks/lib/mute_impl.cc
@@ -0,0 +1,99 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2010,2013,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "mute_impl.h"
+#include <gnuradio/io_signature.h>
+#include <string.h>
+
+namespace gr {
+  namespace blocks {
+
+    template <class T>
+    typename mute_blk<T>::sptr
+    mute_blk<T>::make(bool mute)
+    {
+      return gnuradio::get_initial_sptr
+        (new mute_impl<T> (mute));
+    }
+
+    template <class T>
+    mute_impl<T> ::mute_impl(bool mute)
+    : sync_block("mute",
+                    io_signature::make(1, 1, sizeof(T)),
+                    io_signature::make(1, 1, sizeof(T))),
+      d_mute(mute)
+    {
+      this->message_port_register_in(pmt::intern("set_mute"));
+      this->set_msg_handler(pmt::intern("set_mute"),
+        boost::bind(&mute_impl<T> ::set_mute_pmt, this, _1));
+    }
+
+    template <class T>
+    mute_impl<T> ::~mute_impl()
+    {
+    }
+
+    template <class T>
+    int
+    mute_impl<T> ::work(int noutput_items,
+                      gr_vector_const_void_star &input_items,
+                      gr_vector_void_star &output_items)
+    {
+      T *iptr = (T *)input_items[0];
+      T *optr = (T *)output_items[0];
+
+      int size = noutput_items;
+
+      if(d_mute) {
+        memset(optr, 0, noutput_items * sizeof(T));
+      }
+      else {
+        while(size >= 8) {
+          *optr++ = *iptr++;
+          *optr++ = *iptr++;
+          *optr++ = *iptr++;
+          *optr++ = *iptr++;
+          *optr++ = *iptr++;
+          *optr++ = *iptr++;
+          *optr++ = *iptr++;
+          *optr++ = *iptr++;
+          size -= 8;
+        }
+
+        while(size-- > 0)
+          *optr++ = *iptr++;
+      }
+
+      return noutput_items;
+    }
+
+template class mute_blk<std::int16_t>;
+template class mute_blk<std::int32_t>;
+template class mute_blk<float>;
+template class mute_blk<gr_complex>;
+  } /* namespace blocks */
+} /* namespace gr */
diff --git a/gr-blocks/lib/mute_impl.h b/gr-blocks/lib/mute_impl.h
new file mode 100644
index 0000000000..6943e22739
--- /dev/null
+++ b/gr-blocks/lib/mute_impl.h
@@ -0,0 +1,54 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2013,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef MUTE_IMPL_H
+#define MUTE_IMPL_H
+
+#include <gnuradio/blocks/mute.h>
+
+namespace gr {
+  namespace blocks {
+
+template<class T>
+    class mute_impl : public  mute_blk<T>
+    {
+    private:
+      bool d_mute;
+
+    public:
+      mute_impl (bool mute);
+      ~mute_impl ();
+
+      bool mute() const { return d_mute; }
+      void set_mute(bool mute) { d_mute = mute; }
+      void set_mute_pmt(pmt::pmt_t msg) { set_mute(pmt::to_bool(msg)); }
+
+      int work(int noutput_items,
+               gr_vector_const_void_star &input_items,
+               gr_vector_void_star &output_items);
+    };
+
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* MUTE_IMPL_H */
diff --git a/gr-blocks/lib/not_XX_impl.cc.t b/gr-blocks/lib/not_XX_impl.cc.t
deleted file mode 100644
index cb9be5cdb8..0000000000
--- a/gr-blocks/lib/not_XX_impl.cc.t
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <@NAME_IMPL@.h>
-#include <gnuradio/io_signature.h>
-
-namespace gr {
-  namespace blocks {
-
-    @NAME@::sptr @NAME@::make(size_t vlen)
-    {
-      return gnuradio::get_initial_sptr(new @NAME_IMPL@(vlen));
-    }
-
-    @NAME_IMPL@::@NAME_IMPL@(size_t vlen)
-      : sync_block ("@NAME@",
-		       io_signature::make (1, 1, sizeof (@I_TYPE@)*vlen),
-		       io_signature::make (1, 1, sizeof (@O_TYPE@)*vlen)),
-      d_vlen(vlen)
-    {
-    }
-
-    int
-    @NAME_IMPL@::work(int noutput_items,
-		      gr_vector_const_void_star &input_items,
-		      gr_vector_void_star &output_items)
-    {
-      @O_TYPE@ *optr =  (@O_TYPE@ *) output_items[0];
-      const @I_TYPE@ *inptr = (const @I_TYPE@ *) input_items[0];
-
-      int noi = noutput_items*d_vlen;
-
-      for (int i = 0; i < noi; i++)
-	*optr++ = ~(inptr[i]);
-
-      return noutput_items;
-    }
-
-  } /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/not_XX_impl.h.t b/gr-blocks/lib/not_XX_impl.h.t
deleted file mode 100644
index f7db3f2162..0000000000
--- a/gr-blocks/lib/not_XX_impl.h.t
+++ /dev/null
@@ -1,48 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME_IMPL@
-#define @GUARD_NAME_IMPL@
-
-#include <gnuradio/blocks/@NAME@.h>
-
-namespace gr {
-  namespace blocks {
-
-    class BLOCKS_API @NAME_IMPL@ : public @NAME@
-    {
-      size_t d_vlen;
-
-    public:
-      @NAME_IMPL@(size_t vlen);
-
-      int work(int noutput_items,
-	       gr_vector_const_void_star &input_items,
-	       gr_vector_void_star &output_items);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME_IMPL@ */
diff --git a/gr-blocks/lib/not_blk_impl.cc b/gr-blocks/lib/not_blk_impl.cc
new file mode 100644
index 0000000000..3c3dea5a15
--- /dev/null
+++ b/gr-blocks/lib/not_blk_impl.cc
@@ -0,0 +1,70 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "not_blk_impl.h"
+#include <gnuradio/io_signature.h>
+
+namespace gr {
+  namespace blocks {
+
+    template <class T>
+    typename not_blk<T>::sptr not_blk<T>::make(size_t vlen)
+    {
+      return gnuradio::get_initial_sptr(new not_blk_impl<T> (vlen));
+    }
+
+    template <class T>
+    not_blk_impl<T> ::not_blk_impl(size_t vlen)
+      : sync_block ("not_blk",
+		       io_signature::make (1, 1, sizeof (T)*vlen),
+		       io_signature::make (1, 1, sizeof (T)*vlen)),
+      d_vlen(vlen)
+    {
+    }
+
+    template <class T>
+    int
+    not_blk_impl<T> ::work(int noutput_items,
+		      gr_vector_const_void_star &input_items,
+		      gr_vector_void_star &output_items)
+    {
+      T *optr =  (T *) output_items[0];
+      const T *inptr = (const T *) input_items[0];
+
+      int noi = noutput_items*d_vlen;
+
+      for (int i = 0; i < noi; i++)
+	*optr++ = ~(inptr[i]);
+
+      return noutput_items;
+    }
+
+template class not_blk<std::uint8_t>;
+template class not_blk<std::int16_t>;
+template class not_blk<std::int32_t>;
+  } /* namespace blocks */
+} /* namespace gr */
diff --git a/gr-blocks/lib/not_blk_impl.h b/gr-blocks/lib/not_blk_impl.h
new file mode 100644
index 0000000000..77050adee2
--- /dev/null
+++ b/gr-blocks/lib/not_blk_impl.h
@@ -0,0 +1,48 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef NOT_BLK_IMPL_H
+#define NOT_BLK_IMPL_H
+
+#include <gnuradio/blocks/not_blk.h>
+
+namespace gr {
+  namespace blocks {
+
+template<class T>
+    class BLOCKS_API not_blk_impl : public  not_blk<T>
+    {
+      size_t d_vlen;
+
+    public:
+      not_blk_impl (size_t vlen);
+
+      int work(int noutput_items,
+	       gr_vector_const_void_star &input_items,
+	       gr_vector_void_star &output_items);
+    };
+
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* NOT_BLK_IMPL_H */
diff --git a/gr-blocks/lib/or_XX_impl.cc.t b/gr-blocks/lib/or_XX_impl.cc.t
deleted file mode 100644
index 2782e1ee5f..0000000000
--- a/gr-blocks/lib/or_XX_impl.cc.t
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <@NAME_IMPL@.h>
-#include <gnuradio/io_signature.h>
-
-namespace gr {
-  namespace blocks {
-
-    @NAME@::sptr @NAME@::make(size_t vlen)
-    {
-      return gnuradio::get_initial_sptr(new @NAME_IMPL@(vlen));
-    }
-
-    @NAME_IMPL@::@NAME_IMPL@(size_t vlen)
-      : sync_block ("@NAME@",
-		       io_signature::make (1, -1, sizeof (@I_TYPE@)*vlen),
-		       io_signature::make (1,  1, sizeof (@O_TYPE@)*vlen)),
-      d_vlen(vlen)
-    {
-    }
-
-    int
-    @NAME_IMPL@::work(int noutput_items,
-		      gr_vector_const_void_star &input_items,
-		      gr_vector_void_star &output_items)
-    {
-      @O_TYPE@ *optr = (@O_TYPE@ *) output_items[0];
-
-      int ninputs = input_items.size ();
-
-      for (size_t i = 0; i < noutput_items*d_vlen; i++){
-	@I_TYPE@ acc = ((@I_TYPE@ *) input_items[0])[i];
-	for (int j = 1; j < ninputs; j++)
-	  acc |= ((@I_TYPE@ *) input_items[j])[i];
-
-	*optr++ = (@O_TYPE@) acc;
-      }
-
-      return noutput_items;
-    }
-
-  } /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/or_XX_impl.h.t b/gr-blocks/lib/or_XX_impl.h.t
deleted file mode 100644
index f7db3f2162..0000000000
--- a/gr-blocks/lib/or_XX_impl.h.t
+++ /dev/null
@@ -1,48 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME_IMPL@
-#define @GUARD_NAME_IMPL@
-
-#include <gnuradio/blocks/@NAME@.h>
-
-namespace gr {
-  namespace blocks {
-
-    class BLOCKS_API @NAME_IMPL@ : public @NAME@
-    {
-      size_t d_vlen;
-
-    public:
-      @NAME_IMPL@(size_t vlen);
-
-      int work(int noutput_items,
-	       gr_vector_const_void_star &input_items,
-	       gr_vector_void_star &output_items);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME_IMPL@ */
diff --git a/gr-blocks/lib/or_blk_impl.cc b/gr-blocks/lib/or_blk_impl.cc
new file mode 100644
index 0000000000..1e9dab5ea5
--- /dev/null
+++ b/gr-blocks/lib/or_blk_impl.cc
@@ -0,0 +1,67 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gnuradio/io_signature.h>
+#include <or_blk_impl.h>
+
+namespace gr {
+namespace blocks {
+
+template <class T> typename or_blk<T>::sptr or_blk<T>::make(size_t vlen) {
+    return gnuradio::get_initial_sptr(new or_blk_impl<T>(vlen));
+}
+
+template <class T>
+or_blk_impl<T>::or_blk_impl(size_t vlen)
+    : sync_block("or_blk", io_signature::make(1, -1, sizeof(T) * vlen),
+                 io_signature::make(1, 1, sizeof(T) * vlen)),
+      d_vlen(vlen) {}
+
+template <class T>
+int or_blk_impl<T>::work(int noutput_items,
+                         gr_vector_const_void_star &input_items,
+                         gr_vector_void_star &output_items) {
+    T *optr = (T *)output_items[0];
+
+    int ninputs = input_items.size();
+
+    for (size_t i = 0; i < noutput_items * d_vlen; i++) {
+        T acc = ((T *)input_items[0])[i];
+        for (int j = 1; j < ninputs; j++)
+            acc |= ((T *)input_items[j])[i];
+
+        *optr++ = (T)acc;
+    }
+
+    return noutput_items;
+}
+
+template class or_blk<short>;
+template class or_blk<int>;
+template class or_blk<char>;
+
+} /* namespace blocks */
+} /* namespace gr */
diff --git a/gr-blocks/lib/or_blk_impl.h b/gr-blocks/lib/or_blk_impl.h
new file mode 100644
index 0000000000..fbff19a24d
--- /dev/null
+++ b/gr-blocks/lib/or_blk_impl.h
@@ -0,0 +1,47 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef OR_BLK_IMPL_H
+#define OR_BLK_IMPL_H
+
+#include <gnuradio/blocks/or_blk.h>
+
+namespace gr {
+  namespace blocks {
+
+    template<class T>
+    class BLOCKS_API or_blk_impl : public or_blk<T>
+    {
+      size_t d_vlen;
+
+    public:
+      or_blk_impl(size_t vlen);
+
+      int work(int noutput_items,
+	       gr_vector_const_void_star &input_items,
+	       gr_vector_void_star &output_items);
+    };
+
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* OR_BLK_IMPL_H */
diff --git a/gr-blocks/lib/packed_to_unpacked_XX_impl.cc.t b/gr-blocks/lib/packed_to_unpacked_XX_impl.cc.t
deleted file mode 100644
index de96135ce8..0000000000
--- a/gr-blocks/lib/packed_to_unpacked_XX_impl.cc.t
+++ /dev/null
@@ -1,147 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "@NAME_IMPL@.h"
-#include <gnuradio/io_signature.h>
-#include <gnuradio/blocks/log2_const.h>
-#include <assert.h>
-
-namespace gr {
-  namespace blocks {
-
-    static const unsigned int BITS_PER_TYPE = sizeof(@I_TYPE@) * 8;
-    static const unsigned int LOG2_L_TYPE = log2_const<sizeof(@I_TYPE@) * 8>();
-
-    @NAME@::sptr
-    @NAME@::make(unsigned int bits_per_chunk,
-                 endianness_t endianness)
-    {
-      return gnuradio::get_initial_sptr
-        (new @NAME_IMPL@(bits_per_chunk, endianness));
-    }
-
-    @NAME_IMPL@::@NAME_IMPL@(unsigned int bits_per_chunk,
-                             endianness_t endianness)
-    : block("@NAME@",
-               io_signature::make(1, -1, sizeof(@I_TYPE@)),
-               io_signature::make(1, -1, sizeof(@O_TYPE@))),
-      d_bits_per_chunk(bits_per_chunk), d_endianness(endianness), d_index(0)
-    {
-      assert(bits_per_chunk <= BITS_PER_TYPE);
-      assert(bits_per_chunk > 0);
-
-      set_relative_rate((1.0 * BITS_PER_TYPE) / bits_per_chunk);
-    }
-
-    @NAME_IMPL@::~@NAME_IMPL@()
-    {
-    }
-
-    void
-    @NAME_IMPL@::forecast(int noutput_items,
-                          gr_vector_int &ninput_items_required)
-    {
-      int input_required = (int)ceil((d_index + noutput_items * d_bits_per_chunk)
-                                     / (1.0 * BITS_PER_TYPE));
-      unsigned ninputs = ninput_items_required.size();
-      for(unsigned int i = 0; i < ninputs; i++) {
-        ninput_items_required[i] = input_required;
-        //printf("Forecast wants %d needs %d\n",noutput_items,ninput_items_required[i]);
-      }
-    }
-
-    unsigned int
-    get_bit_le(const @I_TYPE@ *in_vector, unsigned int bit_addr)
-    {
-      @I_TYPE@ x = in_vector[bit_addr >> LOG2_L_TYPE];
-      return (x >> (bit_addr & (BITS_PER_TYPE-1))) & 1;
-    }
-
-    unsigned int
-    get_bit_be(const @I_TYPE@ *in_vector, unsigned int bit_addr)
-    {
-      @I_TYPE@ x = in_vector[bit_addr >> LOG2_L_TYPE];
-      return (x >> ((BITS_PER_TYPE-1) - (bit_addr & (BITS_PER_TYPE-1)))) & 1;
-    }
-
-    int
-    @NAME_IMPL@::general_work(int noutput_items,
-                              gr_vector_int &ninput_items,
-                              gr_vector_const_void_star &input_items,
-                              gr_vector_void_star &output_items)
-    {
-      unsigned int index_tmp = d_index;
-
-      assert(input_items.size() == output_items.size());
-      int nstreams = input_items.size();
-
-      for (int m=0; m < nstreams; m++){
-        const @I_TYPE@ *in = (@I_TYPE@ *)input_items[m];
-        @O_TYPE@ *out = (@O_TYPE@ *)output_items[m];
-        index_tmp = d_index;
-
-        // per stream processing
-
-        switch(d_endianness) {
-        case GR_MSB_FIRST:
-          for(int i = 0; i < noutput_items; i++) {
-            //printf("here msb %d\n",i);
-            @O_TYPE@ x = 0;
-            for(unsigned int j = 0; j < d_bits_per_chunk; j++, index_tmp++)
-              x = (x<<1) | get_bit_be(in, index_tmp);
-            out[i] = x;
-          }
-          break;
-
-        case GR_LSB_FIRST:
-          for(int i = 0; i < noutput_items; i++) {
-            //printf("here lsb %d\n",i);
-            @O_TYPE@ x = 0;
-            for(unsigned int j = 0; j < d_bits_per_chunk; j++, index_tmp++)
-              x = (x<<1) | get_bit_le(in, index_tmp);
-            out[i] = x;
-          }
-          break;
-
-        default:
-          assert(0);
-        }
-
-        //printf("almost got to end\n");
-        assert(ninput_items[m] >= (int)((d_index+(BITS_PER_TYPE-1)) >> LOG2_L_TYPE));
-      }
-
-      d_index = index_tmp;
-      consume_each(d_index >> LOG2_L_TYPE);
-      d_index = d_index & (BITS_PER_TYPE-1);
-      //printf("got to end\n");
-      return noutput_items;
-    }
-
-  } /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/packed_to_unpacked_XX_impl.h.t b/gr-blocks/lib/packed_to_unpacked_XX_impl.h.t
deleted file mode 100644
index 3f8b15c1a6..0000000000
--- a/gr-blocks/lib/packed_to_unpacked_XX_impl.h.t
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2006,2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME_IMPL@
-#define @GUARD_NAME_IMPL@
-
-#include <gnuradio/blocks/@NAME@.h>
-
-namespace gr {
-  namespace blocks {
-
-    class @NAME_IMPL@ : public @NAME@
-    {
-    private:
-      unsigned int    d_bits_per_chunk;
-      endianness_t d_endianness;
-      unsigned int    d_index;
-
-    public:
-      @NAME_IMPL@(unsigned int bits_per_chunk,
-                  endianness_t endianness);
-      ~@NAME_IMPL@();
-
-      void forecast(int noutput_items,
-                    gr_vector_int &ninput_items_required);
-      int general_work(int noutput_items,
-                       gr_vector_int &ninput_items,
-                       gr_vector_const_void_star &input_items,
-                       gr_vector_void_star &output_items);
-
-      bool check_topology(int ninputs, int noutputs)
-      { return ninputs == noutputs; }
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME_IMPL@ */
diff --git a/gr-blocks/lib/packed_to_unpacked_impl.cc b/gr-blocks/lib/packed_to_unpacked_impl.cc
new file mode 100644
index 0000000000..54b6031238
--- /dev/null
+++ b/gr-blocks/lib/packed_to_unpacked_impl.cc
@@ -0,0 +1,152 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2013,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "packed_to_unpacked_impl.h"
+#include <gnuradio/io_signature.h>
+#include <assert.h>
+
+namespace gr {
+  namespace blocks {
+
+    template <class T>
+    typename packed_to_unpacked<T>::sptr
+    packed_to_unpacked<T>::make(unsigned int bits_per_chunk,
+                 endianness_t endianness)
+    {
+      return gnuradio::get_initial_sptr
+        (new packed_to_unpacked_impl<T> (bits_per_chunk, endianness));
+    }
+
+    template <class T>
+    packed_to_unpacked_impl<T> ::packed_to_unpacked_impl(unsigned int bits_per_chunk,
+                             endianness_t endianness)
+    : block("packed_to_unpacked",
+               io_signature::make(1, -1, sizeof(T)),
+               io_signature::make(1, -1, sizeof(T))),
+      d_bits_per_chunk(bits_per_chunk), d_endianness(endianness), d_index(0)
+    {
+      assert(bits_per_chunk <= this->d_bits_per_type);
+      assert(bits_per_chunk > 0);
+
+      this->set_relative_rate((1.0 * this->d_bits_per_type) / bits_per_chunk);
+    }
+
+    template <class T>
+    packed_to_unpacked_impl<T> ::~packed_to_unpacked_impl()
+    {
+    }
+
+    template <class T>
+    void
+    packed_to_unpacked_impl<T> ::forecast(int noutput_items,
+                          gr_vector_int &ninput_items_required)
+    {
+      int input_required = (int)ceil((d_index + noutput_items * d_bits_per_chunk)
+                                     / (1.0 * this->d_bits_per_type));
+      unsigned ninputs = ninput_items_required.size();
+      for(unsigned int i = 0; i < ninputs; i++) {
+        ninput_items_required[i] = input_required;
+        //printf("Forecast wants %d needs %d\n",noutput_items,ninput_items_required[i]);
+      }
+    }
+
+    template <class T>
+    unsigned int
+    packed_to_unpacked_impl<T>::get_bit_le(const T *in_vector, unsigned int bit_addr)
+    {
+      T x = in_vector[bit_addr >> this->d_log2_l_type];
+      return (x >> (bit_addr & (this->d_bits_per_type-1))) & 1;
+    }
+
+    template <class T>
+    unsigned int
+    packed_to_unpacked_impl<T>::get_bit_be(const T *in_vector, unsigned int bit_addr)
+    {
+      T x = in_vector[bit_addr >> this->d_log2_l_type];
+      return (x >> ((this->d_bits_per_type-1) - (bit_addr & (this->d_bits_per_type-1)))) & 1;
+    }
+
+    template <class T>
+    int
+    packed_to_unpacked_impl<T> ::general_work(int noutput_items,
+                              gr_vector_int &ninput_items,
+                              gr_vector_const_void_star &input_items,
+                              gr_vector_void_star &output_items)
+    {
+      unsigned int index_tmp = d_index;
+
+      assert(input_items.size() == output_items.size());
+      int nstreams = input_items.size();
+
+      for (int m=0; m < nstreams; m++){
+        const T *in = (T *)input_items[m];
+        T *out = (T *)output_items[m];
+        index_tmp = d_index;
+
+        // per stream processing
+
+        switch(d_endianness) {
+        case GR_MSB_FIRST:
+          for(int i = 0; i < noutput_items; i++) {
+            //printf("here msb %d\n",i);
+            T x = 0;
+            for(unsigned int j = 0; j < d_bits_per_chunk; j++, index_tmp++)
+              x = (x<<1) | get_bit_be(in, index_tmp);
+            out[i] = x;
+          }
+          break;
+
+        case GR_LSB_FIRST:
+          for(int i = 0; i < noutput_items; i++) {
+            //printf("here lsb %d\n",i);
+            T x = 0;
+            for(unsigned int j = 0; j < d_bits_per_chunk; j++, index_tmp++)
+              x = (x<<1) | get_bit_le(in, index_tmp);
+            out[i] = x;
+          }
+          break;
+
+        default:
+          assert(0);
+        }
+
+        //printf("almost got to end\n");
+        assert(ninput_items[m] >= (int)((d_index+(this->d_bits_per_type-1)) >> this->d_log2_l_type));
+      }
+
+      d_index = index_tmp;
+      this->consume_each(d_index >> this->d_log2_l_type);
+      d_index = d_index & (this->d_bits_per_type-1);
+      //printf("got to end\n");
+      return noutput_items;
+    }
+
+template class packed_to_unpacked<std::uint8_t>;
+template class packed_to_unpacked<std::int16_t>;
+template class packed_to_unpacked<std::int32_t>;
+  } /* namespace blocks */
+} /* namespace gr */
diff --git a/gr-blocks/lib/packed_to_unpacked_impl.h b/gr-blocks/lib/packed_to_unpacked_impl.h
new file mode 100644
index 0000000000..fd65242478
--- /dev/null
+++ b/gr-blocks/lib/packed_to_unpacked_impl.h
@@ -0,0 +1,64 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006,2013,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef PACKED_TO_UNPACKED_IMPL_H
+#define PACKED_TO_UNPACKED_IMPL_H
+
+#include <gnuradio/blocks/packed_to_unpacked.h>
+#include <gnuradio/blocks/log2_const.h>
+
+namespace gr {
+  namespace blocks {
+
+template<class T>
+    class packed_to_unpacked_impl : public  packed_to_unpacked<T>
+    {
+    private:
+      unsigned int    d_bits_per_chunk;
+      endianness_t d_endianness;
+      unsigned int    d_index;
+      const unsigned int d_bits_per_type = sizeof(T) * 8;
+      const unsigned int d_log2_l_type = log2_const<sizeof(T) * 8>();
+      unsigned int get_bit_le(const T *in_vector, unsigned int bit_addr);
+      unsigned int get_bit_be(const T *in_vector, unsigned int bit_addr);
+
+    public:
+      packed_to_unpacked_impl (unsigned int bits_per_chunk,
+                  endianness_t endianness);
+      ~packed_to_unpacked_impl ();
+
+      void forecast(int noutput_items,
+                    gr_vector_int &ninput_items_required);
+      int general_work(int noutput_items,
+                       gr_vector_int &ninput_items,
+                       gr_vector_const_void_star &input_items,
+                       gr_vector_void_star &output_items);
+
+      bool check_topology(int ninputs, int noutputs)
+      { return ninputs == noutputs; }
+    };
+
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* PACKED_TO_UNPACKED_IMPL_H */
diff --git a/gr-blocks/lib/peak_detector_XX_impl.cc.t b/gr-blocks/lib/peak_detector_XX_impl.cc.t
deleted file mode 100644
index bc4136143d..0000000000
--- a/gr-blocks/lib/peak_detector_XX_impl.cc.t
+++ /dev/null
@@ -1,123 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007,2010,2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "@NAME_IMPL@.h"
-#include <gnuradio/io_signature.h>
-#include <string.h>
-#include <limits>
-
-namespace gr {
-  namespace blocks {
-
-    @NAME@::sptr
-    @NAME@::make(float threshold_factor_rise,
-                 float threshold_factor_fall,
-                 int look_ahead, float alpha)
-    {
-      return gnuradio::get_initial_sptr
-        (new @NAME_IMPL@(threshold_factor_rise,
-                         threshold_factor_fall,
-                         look_ahead, alpha));
-    }
-
-    @NAME_IMPL@::@NAME_IMPL@(float threshold_factor_rise,
-                             float threshold_factor_fall,
-                             int look_ahead, float alpha)
-    : sync_block("@BASE_NAME@",
-                    io_signature::make(1, 1, sizeof(@I_TYPE@)),
-                    io_signature::make(1, 1, sizeof(char))),
-      d_threshold_factor_rise(threshold_factor_rise),
-      d_threshold_factor_fall(threshold_factor_fall),
-      d_look_ahead(look_ahead), d_avg_alpha(alpha), d_avg(0)
-    {
-    }
-
-    @NAME_IMPL@::~@NAME_IMPL@()
-    {
-    }
-
-    int
-    @NAME_IMPL@::work(int noutput_items,
-                      gr_vector_const_void_star &input_items,
-                      gr_vector_void_star &output_items)
-    {
-      @I_TYPE@ *iptr = (@I_TYPE@*)input_items[0];
-      char *optr = (char*)output_items[0];
-
-      memset(optr, 0, noutput_items*sizeof(char));
-
-      @I_TYPE@ peak_val = std::numeric_limits<@I_TYPE@>::min();
-      int peak_ind = 0;
-      unsigned char state = 0;
-      int i = 0;
-
-      //printf("noutput_items %d\n",noutput_items);
-      while(i < noutput_items) {
-        if(state == 0) {  // below threshold
-          if(iptr[i] > d_avg*d_threshold_factor_rise) {
-            state = 1;
-          }
-          else {
-            d_avg = (d_avg_alpha)*iptr[i] + (1-d_avg_alpha)*d_avg;
-            i++;
-          }
-        }
-        else if(state == 1) {  // above threshold, have not found peak
-          //printf("Entered State 1: %f  i: %d  noutput_items: %d\n", iptr[i], i, noutput_items);
-          if(iptr[i] > peak_val) {
-            peak_val = iptr[i];
-            peak_ind = i;
-            d_avg = (d_avg_alpha)*iptr[i] + (1-d_avg_alpha)*d_avg;
-            i++;
-          }
-          else if(iptr[i] > d_avg*d_threshold_factor_fall) {
-            d_avg = (d_avg_alpha)*iptr[i] + (1-d_avg_alpha)*d_avg;
-            i++;
-          }
-          else {
-            optr[peak_ind] = 1;
-            state = 0;
-            peak_val = -(@I_TYPE@)INFINITY;
-            //printf("Leaving  State 1: Peak: %f  Peak Ind: %d   i: %d  noutput_items: %d\n",
-            //peak_val, peak_ind, i, noutput_items);
-          }
-        }
-      }
-
-      if(state == 0) {
-        //printf("Leave in State 0, produced %d\n",noutput_items);
-        return noutput_items;
-      }
-      else {   // only return up to passing the threshold
-        //printf("Leave in State 1, only produced %d of %d\n",peak_ind,noutput_items);
-        return peak_ind+1;
-      }
-    }
-
-  } /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/peak_detector_XX_impl.h.t b/gr-blocks/lib/peak_detector_XX_impl.h.t
deleted file mode 100644
index aa04794536..0000000000
--- a/gr-blocks/lib/peak_detector_XX_impl.h.t
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007,2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME_IMPL@
-#define @GUARD_NAME_IMPL@
-
-#include <gnuradio/blocks/@NAME@.h>
-
-namespace gr {
-  namespace blocks {
-
-    class @NAME_IMPL@ : public @NAME@
-    {
-    private:
-      float d_threshold_factor_rise;
-      float d_threshold_factor_fall;
-      int d_look_ahead;
-      float d_avg_alpha;
-      float d_avg;
-
-    public:
-      @NAME_IMPL@(float threshold_factor_rise,
-                  float threshold_factor_fall,
-                  int look_ahead, float alpha);
-      ~@NAME_IMPL@();
-
-      void set_threshold_factor_rise(float thr) { d_threshold_factor_rise = thr; }
-      void set_threshold_factor_fall(float thr) { d_threshold_factor_fall = thr; }
-      void set_look_ahead(int look) { d_look_ahead = look; }
-      void set_alpha(float alpha) { d_avg_alpha = alpha; }
-      float threshold_factor_rise() { return d_threshold_factor_rise; }
-      float threshold_factor_fall() { return d_threshold_factor_fall; }
-      int look_ahead() { return d_look_ahead; }
-      float alpha() { return d_avg_alpha; }
-
-      int work(int noutput_items,
-               gr_vector_const_void_star &input_items,
-               gr_vector_void_star &output_items);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME_IMPL@ */
diff --git a/gr-blocks/lib/peak_detector_impl.cc b/gr-blocks/lib/peak_detector_impl.cc
new file mode 100644
index 0000000000..cda1f6007b
--- /dev/null
+++ b/gr-blocks/lib/peak_detector_impl.cc
@@ -0,0 +1,128 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007,2010,2013,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "peak_detector_impl.h"
+#include <gnuradio/io_signature.h>
+#include <string.h>
+#include <limits>
+
+namespace gr {
+  namespace blocks {
+
+    template <class T>
+    typename peak_detector<T>::sptr
+    peak_detector<T>::make(float threshold_factor_rise,
+                 float threshold_factor_fall,
+                 int look_ahead, float alpha)
+    {
+      return gnuradio::get_initial_sptr
+        (new peak_detector_impl<T>(threshold_factor_rise,
+                         threshold_factor_fall,
+                         look_ahead, alpha));
+    }
+
+    template <class T>
+    peak_detector_impl<T>::peak_detector_impl(float threshold_factor_rise,
+                             float threshold_factor_fall,
+                             int look_ahead, float alpha)
+    : sync_block("peak_detector",
+                    io_signature::make(1, 1, sizeof(T)),
+                    io_signature::make(1, 1, sizeof(char))),
+      d_threshold_factor_rise(threshold_factor_rise),
+      d_threshold_factor_fall(threshold_factor_fall),
+      d_look_ahead(look_ahead), d_avg_alpha(alpha), d_avg(0)
+    {
+    }
+
+    template <class T>
+    peak_detector_impl<T>::~peak_detector_impl()
+    {
+    }
+
+    template <class T>
+    int
+    peak_detector_impl<T>::work(int noutput_items,
+                      gr_vector_const_void_star &input_items,
+                      gr_vector_void_star &output_items)
+    {
+      T *iptr = (T*)input_items[0];
+      char *optr = (char*)output_items[0];
+
+      memset(optr, 0, noutput_items*sizeof(char));
+
+      T peak_val = std::numeric_limits<T>::min();
+      int peak_ind = 0;
+      unsigned char state = 0;
+      int i = 0;
+
+      //printf("noutput_items %d\n",noutput_items);
+      while(i < noutput_items) {
+        if(state == 0) {  // below threshold
+          if(iptr[i] > d_avg*d_threshold_factor_rise) {
+            state = 1;
+          }
+          else {
+            d_avg = (d_avg_alpha)*iptr[i] + (1-d_avg_alpha)*d_avg;
+            i++;
+          }
+        }
+        else if(state == 1) {  // above threshold, have not found peak
+          //printf("Entered State 1: %f  i: %d  noutput_items: %d\n", iptr[i], i, noutput_items);
+          if(iptr[i] > peak_val) {
+            peak_val = iptr[i];
+            peak_ind = i;
+            d_avg = (d_avg_alpha)*iptr[i] + (1-d_avg_alpha)*d_avg;
+            i++;
+          }
+          else if(iptr[i] > d_avg*d_threshold_factor_fall) {
+            d_avg = (d_avg_alpha)*iptr[i] + (1-d_avg_alpha)*d_avg;
+            i++;
+          }
+          else {
+            optr[peak_ind] = 1;
+            state = 0;
+            peak_val = -(T)INFINITY;
+            //printf("Leaving  State 1: Peak: %f  Peak Ind: %d   i: %d  noutput_items: %d\n",
+            //peak_val, peak_ind, i, noutput_items);
+          }
+        }
+      }
+
+      if(state == 0) {
+        //printf("Leave in State 0, produced %d\n",noutput_items);
+        return noutput_items;
+      }
+      else {   // only return up to passing the threshold
+        //printf("Leave in State 1, only produced %d of %d\n",peak_ind,noutput_items);
+        return peak_ind+1;
+      }
+    }
+
+    template class peak_detector<float>;
+    template class peak_detector<std::int16_t>;
+    template class peak_detector<std::int32_t>;
+  } /* namespace blocks */
+} /* namespace gr */
diff --git a/gr-blocks/lib/peak_detector_impl.h b/gr-blocks/lib/peak_detector_impl.h
new file mode 100644
index 0000000000..5a70c1b060
--- /dev/null
+++ b/gr-blocks/lib/peak_detector_impl.h
@@ -0,0 +1,64 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007,2013,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef PEAK_DETECTOR_IMPL_H
+#define PEAK_DETECTOR_IMPL_H
+
+#include <gnuradio/blocks/peak_detector.h>
+
+namespace gr {
+  namespace blocks {
+
+    template <class T>
+    class peak_detector_impl : public peak_detector<T>
+    {
+    private:
+      float d_threshold_factor_rise;
+      float d_threshold_factor_fall;
+      int d_look_ahead;
+      float d_avg_alpha;
+      float d_avg;
+
+    public:
+      peak_detector_impl(float threshold_factor_rise,
+                  float threshold_factor_fall,
+                  int look_ahead, float alpha);
+      ~peak_detector_impl();
+
+      void set_threshold_factor_rise(float thr) { d_threshold_factor_rise = thr; }
+      void set_threshold_factor_fall(float thr) { d_threshold_factor_fall = thr; }
+      void set_look_ahead(int look) { d_look_ahead = look; }
+      void set_alpha(float alpha) { d_avg_alpha = alpha; }
+      float threshold_factor_rise() { return d_threshold_factor_rise; }
+      float threshold_factor_fall() { return d_threshold_factor_fall; }
+      int look_ahead() { return d_look_ahead; }
+      float alpha() { return d_avg_alpha; }
+
+      int work(int noutput_items,
+               gr_vector_const_void_star &input_items,
+               gr_vector_void_star &output_items);
+    };
+
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* PEAK_DETECTOR_IMPL_H */
diff --git a/gr-blocks/lib/probe_signal_X_impl.cc.t b/gr-blocks/lib/probe_signal_X_impl.cc.t
deleted file mode 100644
index 1bc2793af2..0000000000
--- a/gr-blocks/lib/probe_signal_X_impl.cc.t
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2005,2010,2012-2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <@NAME_IMPL@.h>
-#include <gnuradio/io_signature.h>
-
-namespace gr {
-  namespace blocks {
-
-    @NAME@::sptr
-    @BASE_NAME@::make()
-    {
-      return gnuradio::get_initial_sptr
-        (new @NAME_IMPL@());
-    }
-
-    @NAME_IMPL@::@NAME_IMPL@()
-    : sync_block("@BASE_NAME@",
-                    io_signature::make(1, 1, sizeof(@TYPE@)),
-                    io_signature::make(0, 0, 0)),
-      d_level(0)
-    {
-    }
-
-    @NAME_IMPL@::~@NAME_IMPL@()
-    {
-    }
-
-    int
-    @NAME_IMPL@::work(int noutput_items,
-                      gr_vector_const_void_star &input_items,
-                      gr_vector_void_star &output_items)
-    {
-      const @TYPE@ *in = (const @TYPE@ *)input_items[0];
-
-      if(noutput_items > 0)
-        d_level = in[noutput_items-1];
-
-      return noutput_items;
-    }
-
-  } /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/probe_signal_X_impl.h.t b/gr-blocks/lib/probe_signal_X_impl.h.t
deleted file mode 100644
index c20994877f..0000000000
--- a/gr-blocks/lib/probe_signal_X_impl.h.t
+++ /dev/null
@@ -1,52 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2005,2012-2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME_IMPL@
-#define @GUARD_NAME_IMPL@
-
-#include <gnuradio/blocks/@NAME@.h>
-
-namespace gr {
-  namespace blocks {
-
-    class @NAME_IMPL@ : public @NAME@
-    {
-    private:
-      @TYPE@ d_level;
-
-    public:
-      @NAME_IMPL@();
-      ~@NAME_IMPL@();
-
-      @TYPE@ level() const { return d_level; }
-
-      int work(int noutput_items,
-               gr_vector_const_void_star &input_items,
-               gr_vector_void_star &output_items);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME_IMPL@ */
diff --git a/gr-blocks/lib/probe_signal_impl.cc b/gr-blocks/lib/probe_signal_impl.cc
new file mode 100644
index 0000000000..1766464fc6
--- /dev/null
+++ b/gr-blocks/lib/probe_signal_impl.cc
@@ -0,0 +1,76 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2005,2010,2012-2013,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "probe_signal_impl.h"
+#include <gnuradio/io_signature.h>
+
+namespace gr {
+  namespace blocks {
+
+    template <class T>
+    typename probe_signal<T>::sptr
+    probe_signal<T>::make()
+    {
+      return gnuradio::get_initial_sptr
+        (new probe_signal_impl<T> ());
+    }
+
+    template <class T>
+    probe_signal_impl<T> ::probe_signal_impl()
+    : sync_block("probe_signal",
+                    io_signature::make(1, 1, sizeof(T)),
+                    io_signature::make(0, 0, 0)),
+      d_level(0)
+    {
+    }
+
+    template <class T>
+    probe_signal_impl<T> ::~probe_signal_impl()
+    {
+    }
+
+    template <class T>
+    int
+    probe_signal_impl<T> ::work(int noutput_items,
+                      gr_vector_const_void_star &input_items,
+                      gr_vector_void_star &output_items)
+    {
+      const T *in = (const T *)input_items[0];
+
+      if(noutput_items > 0)
+        d_level = in[noutput_items-1];
+
+      return noutput_items;
+    }
+
+template class probe_signal<std::uint8_t>;
+template class probe_signal<std::int16_t>;
+template class probe_signal<std::int32_t>;
+template class probe_signal<float>;
+template class probe_signal<gr_complex>;
+  } /* namespace blocks */
+} /* namespace gr */
diff --git a/gr-blocks/lib/probe_signal_impl.h b/gr-blocks/lib/probe_signal_impl.h
new file mode 100644
index 0000000000..d86f6e6d75
--- /dev/null
+++ b/gr-blocks/lib/probe_signal_impl.h
@@ -0,0 +1,52 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2005,2012-2013,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef PROBE_SIGNAL_IMPL_H
+#define PROBE_SIGNAL_IMPL_H
+
+#include <gnuradio/blocks/probe_signal.h>
+
+namespace gr {
+  namespace blocks {
+
+template<class T>
+    class probe_signal_impl : public  probe_signal<T>
+    {
+    private:
+      T d_level;
+
+    public:
+      probe_signal_impl ();
+      ~probe_signal_impl ();
+
+      T level() const { return d_level; }
+
+      int work(int noutput_items,
+               gr_vector_const_void_star &input_items,
+               gr_vector_void_star &output_items);
+    };
+
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* PROBE_SIGNAL_IMPL_H */
diff --git a/gr-blocks/lib/probe_signal_vX_impl.cc.t b/gr-blocks/lib/probe_signal_vX_impl.cc.t
deleted file mode 100644
index 5865bde41b..0000000000
--- a/gr-blocks/lib/probe_signal_vX_impl.cc.t
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2005,2010,2012-2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-
-#include <@NAME_IMPL@.h>
-#include <gnuradio/io_signature.h>
-
-namespace gr {
-  namespace blocks {
-
-    @NAME@::sptr
-    @BASE_NAME@::make(size_t size)
-    {
-      return gnuradio::get_initial_sptr
-        (new @NAME_IMPL@(size));
-    }
-
-    @NAME_IMPL@::@NAME_IMPL@(size_t size)
-    : sync_block("@BASE_NAME@",
-                    io_signature::make(1, 1, size*sizeof(@TYPE@)),
-                    io_signature::make(0, 0, 0)),
-      d_level(size, 0), d_size(size)
-    {
-    }
-
-    @NAME_IMPL@::~@NAME_IMPL@()
-    {
-    }
-
-    int
-    @NAME_IMPL@::work(int noutput_items,
-                      gr_vector_const_void_star &input_items,
-                      gr_vector_void_star &output_items)
-    {
-      const @TYPE@ *in = (const @TYPE@ *)input_items[0];
-
-      for(size_t i=0; i<d_size; i++)
-	d_level[i] = in[(noutput_items-1)*d_size+i];
-
-      return noutput_items;
-    }
-
-  } /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/probe_signal_vX_impl.h.t b/gr-blocks/lib/probe_signal_vX_impl.h.t
deleted file mode 100644
index 434eb44ac1..0000000000
--- a/gr-blocks/lib/probe_signal_vX_impl.h.t
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2005,2012-2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME_IMPL@
-#define @GUARD_NAME_IMPL@
-
-#include <vector>
-#include <gnuradio/blocks/@NAME@.h>
-
-namespace gr {
-  namespace blocks {
-
-    class @NAME_IMPL@ : public @NAME@
-    {
-    private:
-      std::vector<@TYPE@> d_level;
-      size_t d_size;
-
-    public:
-      @NAME_IMPL@(size_t size);
-      ~@NAME_IMPL@();
-
-      std::vector<@TYPE@> level() const { return d_level; }
-
-      int work(int noutput_items,
-               gr_vector_const_void_star &input_items,
-               gr_vector_void_star &output_items);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME_IMPL@ */
diff --git a/gr-blocks/lib/probe_signal_v_impl.cc b/gr-blocks/lib/probe_signal_v_impl.cc
new file mode 100644
index 0000000000..e355fd030a
--- /dev/null
+++ b/gr-blocks/lib/probe_signal_v_impl.cc
@@ -0,0 +1,76 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2005,2010,2012-2013,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+
+#include <probe_signal_v_impl.h>
+#include <gnuradio/io_signature.h>
+
+namespace gr {
+  namespace blocks {
+
+    template <class T>
+    typename probe_signal_v<T>::sptr
+    probe_signal_v<T>::make(size_t size)
+    {
+      return gnuradio::get_initial_sptr
+        (new probe_signal_v_impl<T>(size));
+    }
+
+    template <class T>
+    probe_signal_v_impl<T>::probe_signal_v_impl(size_t size)
+    : sync_block("probe_signal_v",
+                    io_signature::make(1, 1, size*sizeof(T)),
+                    io_signature::make(0, 0, 0)),
+      d_level(size, 0), d_size(size)
+    {
+    }
+
+    template <class T>
+    probe_signal_v_impl<T>::~probe_signal_v_impl()
+    {
+    }
+
+    template <class T>
+    int
+    probe_signal_v_impl<T>::work(int noutput_items,
+                      gr_vector_const_void_star &input_items,
+                      gr_vector_void_star &output_items)
+    {
+      const T *in = (const T *)input_items[0];
+
+      for(size_t i=0; i<d_size; i++)
+	d_level[i] = in[(noutput_items-1)*d_size+i];
+
+      return noutput_items;
+    }
+    template class probe_signal_v<std::uint8_t>;
+    template class probe_signal_v<std::int16_t>;
+    template class probe_signal_v<std::int32_t>;
+    template class probe_signal_v<float>;
+    template class probe_signal_v<gr_complex>;
+
+  } /* namespace blocks */
+} /* namespace gr */
diff --git a/gr-blocks/lib/probe_signal_v_impl.h b/gr-blocks/lib/probe_signal_v_impl.h
new file mode 100644
index 0000000000..dd36ebf741
--- /dev/null
+++ b/gr-blocks/lib/probe_signal_v_impl.h
@@ -0,0 +1,53 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2005,2012-2013,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef PROBE_SIGNAL_V_IMPL_H
+#define PROBE_SIGNAL_V_IMPL_H
+
+#include <vector>
+#include <gnuradio/blocks/probe_signal_v.h>
+
+namespace gr {
+  namespace blocks {
+
+    template <class T>
+    class probe_signal_v_impl : public probe_signal_v<T>
+    {
+    private:
+      std::vector<T> d_level;
+      size_t d_size;
+
+    public:
+      probe_signal_v_impl(size_t size);
+      ~probe_signal_v_impl();
+
+      std::vector<T> level() const { return d_level; }
+
+      int work(int noutput_items,
+               gr_vector_const_void_star &input_items,
+               gr_vector_void_star &output_items);
+    };
+
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* PROBE_SIGNAL_V_IMPL_H */
diff --git a/gr-blocks/lib/sample_and_hold_XX_impl.cc.t b/gr-blocks/lib/sample_and_hold_XX_impl.cc.t
deleted file mode 100644
index 27597b67dd..0000000000
--- a/gr-blocks/lib/sample_and_hold_XX_impl.cc.t
+++ /dev/null
@@ -1,73 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007,2010,2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <@NAME_IMPL@.h>
-#include <gnuradio/io_signature.h>
-
-namespace gr {
-  namespace blocks {
-
-    @NAME@::sptr
-    @NAME@::make()
-    {
-      return gnuradio::get_initial_sptr
-        (new @NAME_IMPL@());
-    }
-
-    @NAME_IMPL@::@NAME_IMPL@()
-    : sync_block("@BASE_NAME@",
-                    io_signature::make2(2, 2, sizeof(@I_TYPE@), sizeof(char)),
-                    io_signature::make(1, 1, sizeof(@O_TYPE@))),
-      d_data(0)
-    {
-    }
-
-    @NAME_IMPL@::~@NAME_IMPL@()
-    {
-    }
-
-    int
-    @NAME_IMPL@::work(int noutput_items,
-                      gr_vector_const_void_star &input_items,
-                      gr_vector_void_star &output_items)
-    {
-      @I_TYPE@ *iptr = (@I_TYPE@ *)input_items[0];
-      const char *ctrl = (const char *)input_items[1];
-      @O_TYPE@ *optr = (@O_TYPE@ *)output_items[0];
-
-      for(int i = 0; i < noutput_items; i++) {
-        if(ctrl[i]) {
-          d_data = iptr[i];
-        }
-        optr[i] = d_data;
-      }
-      return noutput_items;
-    }
-
-  } /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/sample_and_hold_XX_impl.h.t b/gr-blocks/lib/sample_and_hold_XX_impl.h.t
deleted file mode 100644
index ed7d6f4d40..0000000000
--- a/gr-blocks/lib/sample_and_hold_XX_impl.h.t
+++ /dev/null
@@ -1,50 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007,2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME_IMPL@
-#define @GUARD_NAME_IMPL@
-
-#include <gnuradio/blocks/@NAME@.h>
-
-namespace gr {
-  namespace blocks {
-
-    class @NAME_IMPL@ : public @NAME@
-    {
-    private:
-      @O_TYPE@ d_data;
-
-    public:
-      @NAME_IMPL@();
-      ~@NAME_IMPL@();
-
-      int work(int noutput_items,
-               gr_vector_const_void_star &input_items,
-               gr_vector_void_star &output_items);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME_IMPL@ */
diff --git a/gr-blocks/lib/sample_and_hold_impl.cc b/gr-blocks/lib/sample_and_hold_impl.cc
new file mode 100644
index 0000000000..c5e25bca6c
--- /dev/null
+++ b/gr-blocks/lib/sample_and_hold_impl.cc
@@ -0,0 +1,80 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007,2010,2013,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "sample_and_hold_impl.h"
+#include <gnuradio/io_signature.h>
+
+namespace gr {
+  namespace blocks {
+
+    template <class T>
+    typename sample_and_hold<T>::sptr
+    sample_and_hold<T>::make()
+    {
+      return gnuradio::get_initial_sptr
+        (new sample_and_hold_impl<T> ());
+    }
+
+    template <class T>
+    sample_and_hold_impl<T> ::sample_and_hold_impl()
+    : sync_block("sample_and_hold",
+                    io_signature::make2(2, 2, sizeof(T), sizeof(char)),
+                    io_signature::make(1, 1, sizeof(T))),
+      d_data(0)
+    {
+    }
+
+    template <class T>
+    sample_and_hold_impl<T> ::~sample_and_hold_impl()
+    {
+    }
+
+    template <class T>
+    int
+    sample_and_hold_impl<T> ::work(int noutput_items,
+                      gr_vector_const_void_star &input_items,
+                      gr_vector_void_star &output_items)
+    {
+      T *iptr = (T *)input_items[0];
+      const char *ctrl = (const char *)input_items[1];
+      T *optr = (T *)output_items[0];
+
+      for(int i = 0; i < noutput_items; i++) {
+        if(ctrl[i]) {
+          d_data = iptr[i];
+        }
+        optr[i] = d_data;
+      }
+      return noutput_items;
+    }
+
+template class sample_and_hold<std::uint8_t>;
+template class sample_and_hold<std::int16_t>;
+template class sample_and_hold<std::int32_t>;
+template class sample_and_hold<float>;
+  } /* namespace blocks */
+} /* namespace gr */
diff --git a/gr-blocks/lib/sample_and_hold_impl.h b/gr-blocks/lib/sample_and_hold_impl.h
new file mode 100644
index 0000000000..f2ba032073
--- /dev/null
+++ b/gr-blocks/lib/sample_and_hold_impl.h
@@ -0,0 +1,50 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007,2013,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef SAMPLE_AND_HOLD_IMPL_H
+#define SAMPLE_AND_HOLD_IMPL_H
+
+#include <gnuradio/blocks/sample_and_hold.h>
+
+namespace gr {
+  namespace blocks {
+
+template<class T>
+    class sample_and_hold_impl : public  sample_and_hold<T>
+    {
+    private:
+      T d_data;
+
+    public:
+      sample_and_hold_impl ();
+      ~sample_and_hold_impl ();
+
+      int work(int noutput_items,
+               gr_vector_const_void_star &input_items,
+               gr_vector_void_star &output_items);
+    };
+
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* SAMPLE_AND_HOLD_IMPL_H */
diff --git a/gr-blocks/lib/sub_XX_impl.cc.t b/gr-blocks/lib/sub_XX_impl.cc.t
deleted file mode 100644
index 6c7484a5d4..0000000000
--- a/gr-blocks/lib/sub_XX_impl.cc.t
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2009,2010,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <@NAME_IMPL@.h>
-#include <gnuradio/io_signature.h>
-
-namespace gr {
-  namespace blocks {
-
-    @NAME@::sptr @NAME@::make(size_t vlen)
-    {
-      return gnuradio::get_initial_sptr(new @NAME_IMPL@(vlen));
-    }
-
-    @NAME_IMPL@::@NAME_IMPL@(size_t vlen)
-      : sync_block ("@NAME@",
-		       io_signature::make (1, -1, sizeof (@I_TYPE@)*vlen),
-		       io_signature::make (1,  1, sizeof (@O_TYPE@)*vlen)),
-      d_vlen(vlen)
-    {
-    }
-
-    int
-    @NAME_IMPL@::work(int noutput_items,
-		      gr_vector_const_void_star &input_items,
-		      gr_vector_void_star &output_items)
-    {
-      @O_TYPE@ *optr = (@O_TYPE@ *) output_items[0];
-
-      int ninputs = input_items.size ();
-
-      for (size_t i = 0; i < noutput_items*d_vlen; i++){
-	@I_TYPE@ acc = ((@I_TYPE@ *) input_items[0])[i];
-	for (int j = 1; j < ninputs; j++)
-	  acc -= ((@I_TYPE@ *) input_items[j])[i];
-
-	*optr++ = (@O_TYPE@) acc;
-      }
-
-      return noutput_items;
-    }
-
-  } /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/sub_XX_impl.h.t b/gr-blocks/lib/sub_XX_impl.h.t
deleted file mode 100644
index 2680ef7012..0000000000
--- a/gr-blocks/lib/sub_XX_impl.h.t
+++ /dev/null
@@ -1,48 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2009,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME_IMPL@
-#define @GUARD_NAME_IMPL@
-
-#include <gnuradio/blocks/@NAME@.h>
-
-namespace gr {
-  namespace blocks {
-
-    class BLOCKS_API @NAME_IMPL@ : public @NAME@
-    {
-      size_t d_vlen;
-
-    public:
-      @NAME_IMPL@(size_t vlen);
-
-      int work(int noutput_items,
-	       gr_vector_const_void_star &input_items,
-	       gr_vector_void_star &output_items);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME_IMPL@ */
diff --git a/gr-blocks/lib/sub_ff_impl.cc b/gr-blocks/lib/sub_ff_impl.cc
deleted file mode 100644
index 8ea1a47c8b..0000000000
--- a/gr-blocks/lib/sub_ff_impl.cc
+++ /dev/null
@@ -1,81 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2014 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <sub_ff_impl.h>
-#include <gnuradio/io_signature.h>
-#include <volk/volk.h>
-
-namespace gr {
-  namespace blocks {
-
-    sub_ff::sptr
-    sub_ff::make(size_t vlen)
-    {
-      return gnuradio::get_initial_sptr
-        (new sub_ff_impl(vlen));
-    }
-
-    sub_ff_impl::sub_ff_impl(size_t vlen)
-      : sync_block("@sub_ff",
-                   io_signature::make(1, -1, sizeof(float)*vlen),
-                   io_signature::make(1,  1, sizeof(float)*vlen)),
-      d_vlen(vlen)
-    {
-      const int alignment_multiple =
-	volk_get_alignment() / sizeof(float);
-      set_alignment(std::max(1, alignment_multiple));
-    }
-
-    int
-    sub_ff_impl::work(int noutput_items,
-		      gr_vector_const_void_star &input_items,
-		      gr_vector_void_star &output_items)
-    {
-      float *out = (float*)output_items[0];
-
-      int ninputs = input_items.size();
-      int noi = noutput_items*d_vlen;
-
-      //for(size_t i = 0; i < noutput_items*d_vlen; i++){
-      //  @I_TYPE@ acc = ((@I_TYPE@ *) input_items[0])[i];
-      //  for (int j = 1; j < ninputs; j++)
-      //    acc -= ((@I_TYPE@ *) input_items[j])[i];
-      //
-      //  *optr++ = (@O_TYPE@) acc;
-      //}
-
-      const float *in = (const float*)input_items[0];
-      memcpy(out, in, noi*sizeof(float));
-      for(int i = 1; i < ninputs; i++) {
-        in = (const float*)input_items[i];
-        volk_32f_x2_subtract_32f(out, out, in, noi);
-      }
-
-      return noutput_items;
-    }
-
-  } /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/sub_ff_impl.h b/gr-blocks/lib/sub_ff_impl.h
deleted file mode 100644
index b4eff66ae6..0000000000
--- a/gr-blocks/lib/sub_ff_impl.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2014 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_BLOCKS_SUB_FF_IMPL_H
-#define INCLUDED_BLOCKS_SUB_FF_IMPL_H
-
-#include <gnuradio/blocks/sub_ff.h>
-
-namespace gr {
-  namespace blocks {
-
-    class BLOCKS_API sub_ff_impl : public sub_ff
-    {
-    private:
-      size_t d_vlen;
-
-    public:
-      sub_ff_impl(size_t vlen);
-
-      int work(int noutput_items,
-	       gr_vector_const_void_star &input_items,
-	       gr_vector_void_star &output_items);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* INCLUDED_BLOCKS_SUB_FF_IMPL_H */
diff --git a/gr-blocks/lib/sub_impl.cc b/gr-blocks/lib/sub_impl.cc
new file mode 100644
index 0000000000..ee4df1ed66
--- /dev/null
+++ b/gr-blocks/lib/sub_impl.cc
@@ -0,0 +1,109 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2009,2010,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "sub_impl.h"
+#include <gnuradio/io_signature.h>
+#include <volk/volk.h>
+
+namespace gr {
+  namespace blocks {
+
+    template <class T>
+    typename sub<T>::sptr sub<T>::make(size_t vlen)
+    {
+      return gnuradio::get_initial_sptr(new sub_impl<T> (vlen));
+    }
+
+    template <>
+    sub_impl<float>::sub_impl(size_t vlen)
+      : sync_block("@sub_ff",
+                   io_signature::make(1, -1, sizeof(float)*vlen),
+                   io_signature::make(1,  1, sizeof(float)*vlen)),
+      d_vlen(vlen)
+    {
+      const int alignment_multiple =
+	volk_get_alignment() / sizeof(float);
+      set_alignment(std::max(1, alignment_multiple));
+    }
+
+    template <>
+    int
+    sub_impl<float>::work(int noutput_items,
+		      gr_vector_const_void_star &input_items,
+		      gr_vector_void_star &output_items)
+    {
+      float *out = (float*)output_items[0];
+
+      int ninputs = input_items.size();
+      int noi = noutput_items*d_vlen;
+
+      const float *in = (const float*)input_items[0];
+      memcpy(out, in, noi*sizeof(float));
+      for(int i = 1; i < ninputs; i++) {
+        in = (const float*)input_items[i];
+        volk_32f_x2_subtract_32f(out, out, in, noi);
+      }
+
+      return noutput_items;
+    }
+
+    template <class T>
+    sub_impl<T> ::sub_impl(size_t vlen)
+      : sync_block ("sub",
+		       io_signature::make (1, -1, sizeof (T)*vlen),
+		       io_signature::make (1,  1, sizeof (T)*vlen)),
+      d_vlen(vlen)
+    {
+    }
+
+    template <class T>
+    int
+    sub_impl<T> ::work(int noutput_items,
+		      gr_vector_const_void_star &input_items,
+		      gr_vector_void_star &output_items)
+    {
+      T *optr = (T *) output_items[0];
+
+      int ninputs = input_items.size ();
+
+      for (size_t i = 0; i < noutput_items*d_vlen; i++){
+	T acc = ((T *) input_items[0])[i];
+	for (int j = 1; j < ninputs; j++)
+	  acc -= ((T *) input_items[j])[i];
+
+	*optr++ = (T) acc;
+      }
+
+      return noutput_items;
+    }
+
+template class sub<std::int16_t>;
+template class sub<std::int32_t>;
+template class sub<gr_complex>;
+template class sub<float>;
+  } /* namespace blocks */
+} /* namespace gr */
diff --git a/gr-blocks/lib/sub_impl.h b/gr-blocks/lib/sub_impl.h
new file mode 100644
index 0000000000..66e46995fd
--- /dev/null
+++ b/gr-blocks/lib/sub_impl.h
@@ -0,0 +1,48 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2009,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef SUB_IMPL_H
+#define SUB_IMPL_H
+
+#include <gnuradio/blocks/sub.h>
+
+namespace gr {
+  namespace blocks {
+
+template<class T>
+    class BLOCKS_API sub_impl : public  sub<T>
+    {
+      size_t d_vlen;
+
+    public:
+      sub_impl (size_t vlen);
+
+      int work(int noutput_items,
+	       gr_vector_const_void_star &input_items,
+	       gr_vector_void_star &output_items);
+    };
+
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* SUB_IMPL_H */
diff --git a/gr-blocks/lib/tsb_vector_sink_X_impl.cc.t b/gr-blocks/lib/tsb_vector_sink_X_impl.cc.t
deleted file mode 100644
index c5b79f94a4..0000000000
--- a/gr-blocks/lib/tsb_vector_sink_X_impl.cc.t
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2014 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <gnuradio/io_signature.h>
-#include "@NAME_IMPL@.h"
-
-namespace gr {
-  namespace blocks {
-
-    @NAME@::sptr
-    @NAME@::make(int vlen, const std::string &tsb_key)
-    {
-      return gnuradio::get_initial_sptr
-        (new @NAME_IMPL@(vlen, tsb_key));
-    }
-
-    @NAME_IMPL@::@NAME_IMPL@(int vlen, const std::string &tsb_key)
-      : gr::tagged_stream_block("@NAME@",
-              gr::io_signature::make(1, 1, vlen * sizeof(@TYPE@)),
-              gr::io_signature::make(0, 0, 0), tsb_key),
-      d_vlen(vlen)
-    {}
-
-    @NAME_IMPL@::~@NAME_IMPL@()
-    {
-    }
-
-    std::vector<std::vector<@TYPE@> >
-    @NAME_IMPL@::data() const
-    {
-      return d_data;
-    }
-
-    std::vector<tag_t>
-    @NAME_IMPL@::tags() const
-    {
-      return d_tags;
-    }
-
-    int
-    @NAME_IMPL@::work (int noutput_items,
-                       gr_vector_int &ninput_items,
-                       gr_vector_const_void_star &input_items,
-                       gr_vector_void_star &output_items)
-    {
-      const @TYPE@ *in = (const @TYPE@ *) input_items[0];
-
-      std::vector<@TYPE@> new_data(in, in + (ninput_items[0] * d_vlen));
-      d_data.push_back(new_data);
-
-      std::vector<tag_t> tags;
-      get_tags_in_window(tags, 0, 0, ninput_items[0]);
-      d_tags.insert(d_tags.end(), tags.begin(), tags.end());
-
-      return ninput_items[0];
-    }
-
-  } /* namespace blocks */
-} /* namespace gr */
-
diff --git a/gr-blocks/lib/tsb_vector_sink_X_impl.h.t b/gr-blocks/lib/tsb_vector_sink_X_impl.h.t
deleted file mode 100644
index 3bf5892cc2..0000000000
--- a/gr-blocks/lib/tsb_vector_sink_X_impl.h.t
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2014 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME_IMPL@
-#define @GUARD_NAME_IMPL@
-
-#include <gnuradio/blocks/@NAME@.h>
-
-namespace gr {
-  namespace blocks {
-
-    class @NAME_IMPL@ : public @NAME@
-    {
-     private:
-      std::vector<std::vector<@TYPE@> > d_data;
-      std::vector<tag_t> d_tags;
-      int d_vlen;
-
-     public:
-      @NAME_IMPL@(int vlen, const std::string &tsb_key);
-      ~@NAME_IMPL@();
-
-      void reset() { d_data.clear(); }
-      std::vector<std::vector<@TYPE@> > data() const;
-      std::vector<tag_t> tags() const;
-
-      int work(int noutput_items,
-		       gr_vector_int &ninput_items,
-		       gr_vector_const_void_star &input_items,
-		       gr_vector_void_star &output_items);
-    };
-
-  } // namespace blocks
-} // namespace gr
-
-#endif /* @GUARD_NAME_IMPL@ */
-
diff --git a/gr-blocks/lib/tsb_vector_sink_impl.cc b/gr-blocks/lib/tsb_vector_sink_impl.cc
new file mode 100644
index 0000000000..e4a3474e96
--- /dev/null
+++ b/gr-blocks/lib/tsb_vector_sink_impl.cc
@@ -0,0 +1,95 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tsb_vector_sink_impl.h"
+#include <gnuradio/io_signature.h>
+
+namespace gr {
+  namespace blocks {
+
+    template <class T>
+    typename tsb_vector_sink<T>::sptr
+    tsb_vector_sink<T>::make(int vlen, const std::string &tsb_key)
+    {
+      return gnuradio::get_initial_sptr
+        (new tsb_vector_sink_impl<T> (vlen, tsb_key));
+    }
+
+    template <class T>
+    tsb_vector_sink_impl<T> ::tsb_vector_sink_impl(int vlen, const std::string &tsb_key)
+      : gr::tagged_stream_block("tsb_vector_sink",
+              gr::io_signature::make(1, 1, vlen * sizeof(T)),
+              gr::io_signature::make(0, 0, 0), tsb_key),
+      d_vlen(vlen)
+    {}
+
+    template <class T>
+    tsb_vector_sink_impl<T> ::~tsb_vector_sink_impl()
+    {
+    }
+
+    template <class T>
+    std::vector<std::vector<T> >
+    tsb_vector_sink_impl<T> ::data() const
+    {
+      return d_data;
+    }
+
+    template <class T>
+    std::vector<tag_t>
+    tsb_vector_sink_impl<T> ::tags() const
+    {
+      return d_tags;
+    }
+
+    template <class T>
+    int
+    tsb_vector_sink_impl<T> ::work (int noutput_items,
+                       gr_vector_int &ninput_items,
+                       gr_vector_const_void_star &input_items,
+                       gr_vector_void_star &output_items)
+    {
+      const T *in = (const T *) input_items[0];
+
+      std::vector<T> new_data(in, in + (ninput_items[0] * d_vlen));
+      d_data.push_back(new_data);
+
+      std::vector<tag_t> tags;
+      this->get_tags_in_window(tags, 0, 0, ninput_items[0]);
+      d_tags.insert(d_tags.end(), tags.begin(), tags.end());
+
+      return ninput_items[0];
+    }
+
+template class tsb_vector_sink<std::uint8_t>;
+template class tsb_vector_sink<std::int16_t>;
+template class tsb_vector_sink<std::int32_t>;
+template class tsb_vector_sink<float>;
+template class tsb_vector_sink<gr_complex>;
+  } /* namespace blocks */
+} /* namespace gr */
+
diff --git a/gr-blocks/lib/tsb_vector_sink_impl.h b/gr-blocks/lib/tsb_vector_sink_impl.h
new file mode 100644
index 0000000000..555e80c7dd
--- /dev/null
+++ b/gr-blocks/lib/tsb_vector_sink_impl.h
@@ -0,0 +1,58 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2014,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef TSB_VECTOR_SINK_IMPL_H
+#define TSB_VECTOR_SINK_IMPL_H
+
+#include <gnuradio/blocks/tsb_vector_sink.h>
+
+namespace gr {
+  namespace blocks {
+
+template<class T>
+    class tsb_vector_sink_impl : public  tsb_vector_sink<T>
+    {
+     private:
+      std::vector<std::vector<T> > d_data;
+      std::vector<tag_t> d_tags;
+      int d_vlen;
+
+     public:
+      tsb_vector_sink_impl (int vlen, const std::string &tsb_key);
+      ~tsb_vector_sink_impl ();
+
+      void reset() { d_data.clear(); }
+      std::vector<std::vector<T> > data() const;
+      std::vector<tag_t> tags() const;
+
+      int work(int noutput_items,
+		       gr_vector_int &ninput_items,
+		       gr_vector_const_void_star &input_items,
+		       gr_vector_void_star &output_items);
+    };
+
+  } // namespace blocks
+} // namespace gr
+
+#endif /* TSB_VECTOR_SINK_IMPL_H */
+
diff --git a/gr-blocks/lib/unpacked_to_packed_XX_impl.cc.t b/gr-blocks/lib/unpacked_to_packed_XX_impl.cc.t
deleted file mode 100644
index 8e06570740..0000000000
--- a/gr-blocks/lib/unpacked_to_packed_XX_impl.cc.t
+++ /dev/null
@@ -1,143 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2006,2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "@NAME_IMPL@.h"
-#include <gnuradio/io_signature.h>
-#include <assert.h>
-
-namespace gr {
-  namespace blocks {
-
-    static const unsigned int BITS_PER_TYPE = sizeof(@O_TYPE@) * 8;
-
-    @NAME@::sptr
-    @NAME@::make(unsigned int bits_per_chunk,
-                 endianness_t endianness)
-    {
-      return gnuradio::get_initial_sptr
-        (new @NAME_IMPL@(bits_per_chunk, endianness));
-    }
-
-    @NAME_IMPL@::@NAME_IMPL@(unsigned int bits_per_chunk,
-                             endianness_t endianness)
-    : block("@NAME@",
-               io_signature::make(1, -1, sizeof(@I_TYPE@)),
-               io_signature::make(1, -1, sizeof(@O_TYPE@))),
-      d_bits_per_chunk(bits_per_chunk), d_endianness(endianness), d_index(0)
-    {
-      assert(bits_per_chunk <= BITS_PER_TYPE);
-      assert(bits_per_chunk > 0);
-
-      set_relative_rate(bits_per_chunk/(1.0 * BITS_PER_TYPE));
-    }
-
-    @NAME_IMPL@::~@NAME_IMPL@()
-    {
-    }
-
-    void
-    @NAME_IMPL@::forecast(int noutput_items,
-                          gr_vector_int &ninput_items_required)
-    {
-      int input_required = (int)ceil((d_index+noutput_items * 1.0 * BITS_PER_TYPE)
-                                     / d_bits_per_chunk);
-      unsigned ninputs = ninput_items_required.size();
-      for(unsigned int i = 0; i < ninputs; i++) {
-        ninput_items_required[i] = input_required;
-      }
-    }
-
-    unsigned int
-    get_bit_be1(const @I_TYPE@ *in_vector, unsigned int bit_addr,
-                unsigned int bits_per_chunk)
-    {
-      unsigned int byte_addr = (int)bit_addr/bits_per_chunk;
-      @I_TYPE@ x = in_vector[byte_addr];
-      unsigned int residue = bit_addr - byte_addr * bits_per_chunk;
-      //printf("Bit addr %d  byte addr %d  residue %d  val  %d\n",bit_addr,byte_addr,residue,(x>>(bits_per_chunk-1-residue))&1);
-      return (x >> (bits_per_chunk-1-residue)) & 1;
-    }
-
-    int
-    @NAME_IMPL@::general_work(int noutput_items,
-                              gr_vector_int &ninput_items,
-                              gr_vector_const_void_star &input_items,
-                              gr_vector_void_star &output_items)
-    {
-      unsigned int index_tmp = d_index;
-
-      assert(input_items.size() == output_items.size());
-      int nstreams = input_items.size();
-
-      for(int m=0; m< nstreams; m++) {
-        const @I_TYPE@ *in = (@I_TYPE@ *)input_items[m];
-        @O_TYPE@ *out = (@O_TYPE@ *)output_items[m];
-        index_tmp=d_index;
-
-        // per stream processing
-
-        //assert((ninput_items[m]-d_index)*d_bits_per_chunk >= noutput_items*BITS_PER_TYPE);
-
-        switch(d_endianness) {
-
-        case GR_MSB_FIRST:
-          for(int i = 0; i < noutput_items; i++) {
-            @O_TYPE@ tmp=0;
-            for(unsigned int j = 0; j < BITS_PER_TYPE; j++) {
-              tmp = (tmp<<1) | get_bit_be1(in, index_tmp, d_bits_per_chunk);
-              index_tmp++;
-            }
-            out[i] = tmp;
-          }
-          break;
-
-        case GR_LSB_FIRST:
-          for(int i = 0; i < noutput_items; i++) {
-            unsigned long tmp=0;
-            for(unsigned int j = 0; j < BITS_PER_TYPE; j++) {
-              tmp = (tmp>>1) | (get_bit_be1(in, index_tmp, d_bits_per_chunk) << (BITS_PER_TYPE-1));
-              index_tmp++;
-            }
-            out[i] = tmp;
-          }
-          break;
-
-        default:
-          assert(0);
-        }
-      }
-
-      d_index = index_tmp;
-      consume_each((int)(d_index/d_bits_per_chunk));
-      d_index = d_index%d_bits_per_chunk;
-
-      return noutput_items;
-    }
-
-  } /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/unpacked_to_packed_XX_impl.h.t b/gr-blocks/lib/unpacked_to_packed_XX_impl.h.t
deleted file mode 100644
index 2076c65e9b..0000000000
--- a/gr-blocks/lib/unpacked_to_packed_XX_impl.h.t
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2006.2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME_IMPL@
-#define @GUARD_NAME_IMPL@
-
-#include <gnuradio/blocks/@NAME@.h>
-
-namespace gr {
-  namespace blocks {
-
-    class @NAME_IMPL@ : public @NAME@
-    {
-    private:
-      unsigned int    d_bits_per_chunk;
-      endianness_t d_endianness;
-      unsigned int    d_index;
-
-    public:
-      @NAME_IMPL@(unsigned int bits_per_chunk,
-                  endianness_t endianness);
-      ~@NAME_IMPL@();
-
-      void forecast(int noutput_items,
-                    gr_vector_int &ninput_items_required);
-      int general_work(int noutput_items,
-                       gr_vector_int &ninput_items,
-                       gr_vector_const_void_star &input_items,
-                       gr_vector_void_star &output_items);
-
-      bool check_topology(int ninputs, int noutputs)
-      { return ninputs == noutputs; }
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME_IMPL@ */
diff --git a/gr-blocks/lib/unpacked_to_packed_impl.cc b/gr-blocks/lib/unpacked_to_packed_impl.cc
new file mode 100644
index 0000000000..92240c516a
--- /dev/null
+++ b/gr-blocks/lib/unpacked_to_packed_impl.cc
@@ -0,0 +1,150 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2006,2013,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "unpacked_to_packed_impl.h"
+#include <gnuradio/io_signature.h>
+#include <assert.h>
+
+namespace gr {
+  namespace blocks {
+
+
+    template <class T>
+    typename unpacked_to_packed<T>::sptr
+    unpacked_to_packed<T>::make(unsigned int bits_per_chunk,
+                 endianness_t endianness)
+    {
+      return gnuradio::get_initial_sptr
+        (new unpacked_to_packed_impl<T> (bits_per_chunk, endianness));
+    }
+
+    template <class T>
+    unpacked_to_packed_impl<T> ::unpacked_to_packed_impl(unsigned int bits_per_chunk,
+                             endianness_t endianness)
+    : block("unpacked_to_packed",
+               io_signature::make(1, -1, sizeof(T)),
+               io_signature::make(1, -1, sizeof(T))),
+      d_bits_per_chunk(bits_per_chunk), d_endianness(endianness), d_index(0)
+    {
+      assert(bits_per_chunk <= d_bits_per_type);
+      assert(bits_per_chunk > 0);
+
+      this->set_relative_rate(bits_per_chunk/(1.0 * d_bits_per_type));
+    }
+
+    template <class T>
+    unpacked_to_packed_impl<T> ::~unpacked_to_packed_impl()
+    {
+    }
+
+    template <class T>
+    void
+    unpacked_to_packed_impl<T> ::forecast(int noutput_items,
+                          gr_vector_int &ninput_items_required)
+    {
+      int input_required = (int)ceil((d_index+noutput_items * 1.0 * d_bits_per_type)
+                                     / d_bits_per_chunk);
+      unsigned ninputs = ninput_items_required.size();
+      for(unsigned int i = 0; i < ninputs; i++) {
+        ninput_items_required[i] = input_required;
+      }
+    }
+
+    template <class T>
+    unsigned int
+    unpacked_to_packed_impl<T>::get_bit_be1(const T *in_vector, unsigned int bit_addr,
+                unsigned int bits_per_chunk)
+    {
+      unsigned int byte_addr = (int)bit_addr/bits_per_chunk;
+      T x = in_vector[byte_addr];
+      unsigned int residue = bit_addr - byte_addr * bits_per_chunk;
+      //printf("Bit addr %d  byte addr %d  residue %d  val  %d\n",bit_addr,byte_addr,residue,(x>>(bits_per_chunk-1-residue))&1);
+      return (x >> (bits_per_chunk-1-residue)) & 1;
+    }
+
+    template <class T>
+    int
+    unpacked_to_packed_impl<T> ::general_work(int noutput_items,
+                              gr_vector_int &ninput_items,
+                              gr_vector_const_void_star &input_items,
+                              gr_vector_void_star &output_items)
+    {
+      unsigned int index_tmp = d_index;
+
+      assert(input_items.size() == output_items.size());
+      int nstreams = input_items.size();
+
+      for(int m=0; m< nstreams; m++) {
+        const T *in = (T *)input_items[m];
+        T *out = (T *)output_items[m];
+        index_tmp=d_index;
+
+        // per stream processing
+
+        //assert((ninput_items[m]-d_index)*d_bits_per_chunk >= noutput_items*d_bits_per_type);
+
+        switch(d_endianness) {
+
+        case GR_MSB_FIRST:
+          for(int i = 0; i < noutput_items; i++) {
+            T tmp=0;
+            for(unsigned int j = 0; j < d_bits_per_type; j++) {
+              tmp = (tmp<<1) | get_bit_be1(in, index_tmp, d_bits_per_chunk);
+              index_tmp++;
+            }
+            out[i] = tmp;
+          }
+          break;
+
+        case GR_LSB_FIRST:
+          for(int i = 0; i < noutput_items; i++) {
+            unsigned long tmp=0;
+            for(unsigned int j = 0; j < d_bits_per_type; j++) {
+              tmp = (tmp>>1) | (get_bit_be1(in, index_tmp, d_bits_per_chunk) << (d_bits_per_type-1));
+              index_tmp++;
+            }
+            out[i] = tmp;
+          }
+          break;
+
+        default:
+          assert(0);
+        }
+      }
+
+      d_index = index_tmp;
+      this->consume_each((int)(d_index/d_bits_per_chunk));
+      d_index = d_index%d_bits_per_chunk;
+
+      return noutput_items;
+    }
+
+template class unpacked_to_packed<std::uint8_t>;
+template class unpacked_to_packed<std::int16_t>;
+template class unpacked_to_packed<std::int32_t>;
+  } /* namespace blocks */
+} /* namespace gr */
diff --git a/gr-blocks/lib/unpacked_to_packed_impl.h b/gr-blocks/lib/unpacked_to_packed_impl.h
new file mode 100644
index 0000000000..78b39b0f2d
--- /dev/null
+++ b/gr-blocks/lib/unpacked_to_packed_impl.h
@@ -0,0 +1,61 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006.2013,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef UNPACKED_TO_PACKED_IMPL_H
+#define UNPACKED_TO_PACKED_IMPL_H
+
+#include <gnuradio/blocks/unpacked_to_packed.h>
+
+namespace gr {
+  namespace blocks {
+
+template<class T>
+    class unpacked_to_packed_impl : public  unpacked_to_packed<T>
+    {
+    private:
+      unsigned int    d_bits_per_chunk;
+      endianness_t d_endianness;
+      unsigned int    d_index;
+      const unsigned int d_bits_per_type = sizeof(T) * 8;
+      unsigned int  get_bit_be1(const T *in_vector, unsigned int bit_addr, unsigned int bits_per_chunk);
+
+    public:
+      unpacked_to_packed_impl (unsigned int bits_per_chunk,
+                  endianness_t endianness);
+      ~unpacked_to_packed_impl ();
+
+      void forecast(int noutput_items,
+                    gr_vector_int &ninput_items_required);
+      int general_work(int noutput_items,
+                       gr_vector_int &ninput_items,
+                       gr_vector_const_void_star &input_items,
+                       gr_vector_void_star &output_items);
+
+      bool check_topology(int ninputs, int noutputs)
+      { return ninputs == noutputs; }
+    };
+
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* UNPACKED_TO_PACKED_IMPL_H */
diff --git a/gr-blocks/lib/vector_insert_X_impl.cc.t b/gr-blocks/lib/vector_insert_X_impl.cc.t
deleted file mode 100644
index 6464a4aba3..0000000000
--- a/gr-blocks/lib/vector_insert_X_impl.cc.t
+++ /dev/null
@@ -1,117 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <@NAME_IMPL@.h>
-#include <algorithm>
-#include <gnuradio/io_signature.h>
-#include <stdexcept>
-#include <stdio.h>
-
-namespace gr {
-  namespace blocks {
-
-    @NAME@::sptr
-    @NAME@::make(const std::vector<@TYPE@> &data, int periodicity, int offset)
-    {
-      return gnuradio::get_initial_sptr
-        (new @NAME_IMPL@(data, periodicity, offset));
-    }
-
-    @NAME_IMPL@::@NAME_IMPL@(const std::vector<@TYPE@> &data,
-                             int periodicity, int offset)
-    : block("@BASE_NAME@",
-               io_signature::make(1, 1, sizeof(@TYPE@)),
-               io_signature::make(1, 1, sizeof(@TYPE@))),
-      d_data(data),
-      d_offset(offset),
-      d_periodicity(periodicity)
-    {
-      set_tag_propagation_policy(TPP_DONT); // handle tags manually
-      //printf("INITIAL: periodicity = %d, offset = %d\n", periodicity, offset);
-      // some sanity checks
-      assert(offset < periodicity);
-      assert(offset >= 0);
-      assert((size_t)periodicity > data.size());
-    }
-
-    @NAME_IMPL@::~@NAME_IMPL@()
-    {}
-
-    int
-    @NAME_IMPL@::general_work(int noutput_items,
-                              gr_vector_int &ninput_items,
-                              gr_vector_const_void_star &input_items,
-                              gr_vector_void_star &output_items)
-    {
-      @TYPE@ *out = (@TYPE@ *)output_items[0];
-      const @TYPE@ *in = (const @TYPE@ *)input_items[0];
-
-      int ii(0), oo(0);
-
-      while((oo < noutput_items) && (ii < ninput_items[0])) {
-        //printf("oo = %d, ii = %d, d_offset = %d, noutput_items = %d, ninput_items[0] = %d", oo, ii, d_offset, noutput_items, ninput_items[0]);
-        //printf(", d_periodicity = %d\n", d_periodicity);
-
-        if(d_offset >= ((int)d_data.size())) { // if we are in the copy region
-          int max_copy = std::min(std::min(noutput_items - oo, ninput_items[0] - ii),
-                                  d_periodicity - d_offset);
-          std::vector<tag_t> tags;
-          get_tags_in_range(tags, 0, nitems_read(0) + ii, nitems_read(0) + max_copy + ii);
-          for(unsigned i = 0; i < tags.size(); i++)
-          {
-            //printf("copy tag from in@%d to out@%d\n", int(tags[i].offset), int(nitems_written(0) + oo + (tags[i].offset-nitems_read(0)-ii)));
-            add_item_tag(0, nitems_written(0) + oo + (tags[i].offset-nitems_read(0)-ii), tags[i].key, tags[i].value, tags[i].srcid);
-          }
-          //printf("copy %d from input\n", max_copy);
-          memcpy( &out[oo], &in[ii], sizeof(@TYPE@)*max_copy );
-          //printf(" * memcpy returned.\n");
-          ii += max_copy;
-          oo += max_copy;
-          d_offset = (d_offset + max_copy)%d_periodicity;
-        }
-        else { // if we are in the insertion region
-          int max_copy = std::min(noutput_items - oo, ((int)d_data.size()) - d_offset);
-          //printf("copy %d from d_data[%d] to out[%d]\n", max_copy, d_offset, oo);
-          memcpy(&out[oo], &d_data[d_offset], sizeof(@TYPE@)*max_copy);
-          //printf(" * memcpy returned.\n");
-          oo += max_copy;
-          d_offset = (d_offset + max_copy)%d_periodicity;
-          //printf(" ## (inelse) oo = %d, d_offset = %d\n", oo, d_offset);
-        }
-
-        //printf(" # exit else, on to next loop.\n");
-      }
-      //printf(" # got out of loop\n");
-
-      //printf("consume = %d, produce = %d\n", ii, oo);
-      consume_each(ii);
-      return oo;
-    }
-
-  } /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/vector_insert_X_impl.h.t b/gr-blocks/lib/vector_insert_X_impl.h.t
deleted file mode 100644
index fa03f52693..0000000000
--- a/gr-blocks/lib/vector_insert_X_impl.h.t
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012,2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME_IMPL@
-#define @GUARD_NAME_IMPL@
-
-#include <gnuradio/blocks/@NAME@.h>
-
-namespace gr {
-  namespace blocks {
-
-    class @NAME_IMPL@ : public @NAME@
-    {
-    private:
-      std::vector<@TYPE@> d_data;
-      int d_offset;
-      int d_periodicity;
-
-    public:
-      @NAME_IMPL@(const std::vector<@TYPE@> &data,
-                  int periodicity, int offset);
-      ~@NAME_IMPL@();
-
-      void rewind() { d_offset=0; }
-      void set_data(const std::vector<@TYPE@> &data) {
-        d_data = data; rewind(); }
-
-      int general_work(int noutput_items,
-                       gr_vector_int &ninput_items,
-                       gr_vector_const_void_star &input_items,
-                       gr_vector_void_star &output_items);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME_IMPL@ */
diff --git a/gr-blocks/lib/vector_insert_impl.cc b/gr-blocks/lib/vector_insert_impl.cc
new file mode 100644
index 0000000000..a39b0779ac
--- /dev/null
+++ b/gr-blocks/lib/vector_insert_impl.cc
@@ -0,0 +1,125 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "vector_insert_impl.h"
+#include <algorithm>
+#include <gnuradio/io_signature.h>
+#include <gnuradio/block.h>
+#include <stdexcept>
+#include <stdio.h>
+
+namespace gr {
+  namespace blocks {
+
+    template <class T>
+    typename vector_insert<T>::sptr
+    vector_insert<T>::make(const std::vector<T> &data, int periodicity, int offset)
+    {
+      return gnuradio::get_initial_sptr
+        (new vector_insert_impl<T> (data, periodicity, offset));
+    }
+
+    template <class T>
+    vector_insert_impl<T>::vector_insert_impl(const std::vector<T> &data,
+                             int periodicity, int offset)
+    : block("vector_insert",
+               io_signature::make(1, 1, sizeof(T)),
+               io_signature::make(1, 1, sizeof(T))),
+      d_data(data),
+      d_offset(offset),
+      d_periodicity(periodicity)
+    {
+      this->set_tag_propagation_policy(gr::block::TPP_DONT); // handle tags manually
+      // some sanity checks
+      assert(offset < periodicity);
+      assert(offset >= 0);
+      assert((size_t)periodicity > data.size());
+    }
+
+    template <class T>
+    vector_insert_impl<T>::~vector_insert_impl()
+    {}
+
+    template <class T>
+    int
+    vector_insert_impl<T> ::general_work(int noutput_items,
+                              gr_vector_int &ninput_items,
+                              gr_vector_const_void_star &input_items,
+                              gr_vector_void_star &output_items)
+    {
+      T *out = (T *)output_items[0];
+      const T *in = (const T *)input_items[0];
+
+      int ii(0), oo(0);
+
+      while((oo < noutput_items) && (ii < ninput_items[0])) {
+        //printf("oo = %d, ii = %d, d_offset = %d, noutput_items = %d, ninput_items[0] = %d", oo, ii, d_offset, noutput_items, ninput_items[0]);
+        //printf(", d_periodicity = %d\n", d_periodicity);
+
+        if(d_offset >= ((int)d_data.size())) { // if we are in the copy region
+          int max_copy = std::min(std::min(noutput_items - oo, ninput_items[0] - ii),
+                                  d_periodicity - d_offset);
+          std::vector<tag_t> tags;
+          this->get_tags_in_range(tags, 0, this->nitems_read(0) + ii, this->nitems_read(0) + max_copy + ii);
+          for(unsigned i = 0; i < tags.size(); i++)
+          {
+            //printf("copy tag from in@%d to out@%d\n", int(tags[i].offset), int(nitems_written(0) + oo + (tags[i].offset-nitems_read(0)-ii)));
+            this->add_item_tag(0, this->nitems_written(0) + oo + (tags[i].offset-this->nitems_read(0)-ii), tags[i].key, tags[i].value, tags[i].srcid);
+          }
+          //printf("copy %d from input\n", max_copy);
+          memcpy( &out[oo], &in[ii], sizeof(T)*max_copy );
+          //printf(" * memcpy returned.\n");
+          ii += max_copy;
+          oo += max_copy;
+          d_offset = (d_offset + max_copy)%d_periodicity;
+        }
+        else { // if we are in the insertion region
+          int max_copy = std::min(noutput_items - oo, ((int)d_data.size()) - d_offset);
+          //printf("copy %d from d_data[%d] to out[%d]\n", max_copy, d_offset, oo);
+          memcpy(&out[oo], &d_data[d_offset], sizeof(T)*max_copy);
+          //printf(" * memcpy returned.\n");
+          oo += max_copy;
+          d_offset = (d_offset + max_copy)%d_periodicity;
+          //printf(" ## (inelse) oo = %d, d_offset = %d\n", oo, d_offset);
+        }
+
+        //printf(" # exit else, on to next loop.\n");
+      }
+      //printf(" # got out of loop\n");
+
+      //printf("consume = %d, produce = %d\n", ii, oo);
+      this->consume_each(ii);
+      return oo;
+    }
+
+template class vector_insert<std::uint8_t>;
+template class vector_insert<std::int16_t>;
+template class vector_insert<std::int32_t>;
+template class vector_insert<float>;
+template class vector_insert<gr_complex>;
+  } /* namespace blocks */
+} /* namespace gr */
diff --git a/gr-blocks/lib/vector_insert_impl.h b/gr-blocks/lib/vector_insert_impl.h
new file mode 100644
index 0000000000..a24fe4fc43
--- /dev/null
+++ b/gr-blocks/lib/vector_insert_impl.h
@@ -0,0 +1,58 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012,2013,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef VECTOR_INSERT_IMPL_H
+#define VECTOR_INSERT_IMPL_H
+
+#include <gnuradio/blocks/vector_insert.h>
+
+namespace gr {
+  namespace blocks {
+
+template<class T>
+    class vector_insert_impl : public  vector_insert<T>
+    {
+    private:
+      std::vector<T> d_data;
+      int d_offset;
+      int d_periodicity;
+
+    public:
+      vector_insert_impl (const std::vector<T> &data,
+                  int periodicity, int offset);
+      ~vector_insert_impl ();
+
+      void rewind() { d_offset=0; }
+      void set_data(const std::vector<T> &data) {
+        d_data = data; rewind(); }
+
+      int general_work(int noutput_items,
+                       gr_vector_int &ninput_items,
+                       gr_vector_const_void_star &input_items,
+                       gr_vector_void_star &output_items);
+    };
+
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* VECTOR_INSERT_IMPL_H */
diff --git a/gr-blocks/lib/vector_sink_X_impl.cc.t b/gr-blocks/lib/vector_sink_X_impl.cc.t
deleted file mode 100644
index 3155c0cb67..0000000000
--- a/gr-blocks/lib/vector_sink_X_impl.cc.t
+++ /dev/null
@@ -1,98 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2008,2010,2013,2017 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <@NAME_IMPL@.h>
-#include <gnuradio/io_signature.h>
-#include <gnuradio/thread/thread.h>
-#include <algorithm>
-#include <iostream>
-
-namespace gr {
-  namespace blocks {
-
-    @NAME@::sptr
-    @BASE_NAME@::make(int vlen)
-    {
-      return gnuradio::get_initial_sptr
-        (new @NAME_IMPL@(vlen));
-    }
-
-    @NAME_IMPL@::@NAME_IMPL@(int vlen)
-    : sync_block("@NAME@",
-                    io_signature::make(1, 1, sizeof(@TYPE@) * vlen),
-                    io_signature::make(0, 0, 0)),
-    d_vlen(vlen)
-    {
-    }
-
-    @NAME_IMPL@::~@NAME_IMPL@()
-    {}
-
-    std::vector<@TYPE@>
-    @NAME_IMPL@::data() const
-    {
-      gr::thread::scoped_lock guard(d_data_mutex);
-      return d_data;
-    }
-
-    std::vector<tag_t>
-    @NAME_IMPL@::tags() const
-    {
-      gr::thread::scoped_lock guard(d_data_mutex);
-      return d_tags;
-    }
-
-
-    void
-    @NAME_IMPL@::reset()
-    {
-      gr::thread::scoped_lock guard(d_data_mutex);
-      d_tags.clear();
-      d_data.clear();
-    }
-
-    int
-    @NAME_IMPL@::work(int noutput_items,
-                      gr_vector_const_void_star &input_items,
-                      gr_vector_void_star &output_items)
-    {
-      @TYPE@ *iptr = (@TYPE@*)input_items[0];
-
-      // can't touch this (as long as work() is working, the accessors shall not
-      // read the data
-      gr::thread::scoped_lock guard(d_data_mutex);
-      for(int i = 0; i < noutput_items * d_vlen; i++)
-        d_data.push_back (iptr[i]);
-      std::vector<tag_t> tags;
-      get_tags_in_range(tags, 0, nitems_read(0), nitems_read(0) + noutput_items);
-      d_tags.insert(d_tags.end(), tags.begin(), tags.end());
-      return noutput_items;
-    }
-
-  } /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/vector_sink_X_impl.h.t b/gr-blocks/lib/vector_sink_X_impl.h.t
deleted file mode 100644
index bf4811dfde..0000000000
--- a/gr-blocks/lib/vector_sink_X_impl.h.t
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2008,2009,2013,2017 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME_IMPL@
-#define @GUARD_NAME_IMPL@
-
-#include <gnuradio/blocks/@NAME@.h>
-#include <gnuradio/thread/thread.h>
-
-namespace gr {
-  namespace blocks {
-
-    class @NAME_IMPL@ : public @NAME@
-    {
-    private:
-      std::vector<@TYPE@> d_data;
-      std::vector<tag_t> d_tags;
-      mutable gr::thread::mutex d_data_mutex; // protects internal data access.
-      int d_vlen;
-
-    public:
-      @NAME_IMPL@(int vlen);
-      ~@NAME_IMPL@();
-
-      void reset();
-      std::vector<@TYPE@> data() const;
-      std::vector<tag_t> tags() const;
-
-      int work(int noutput_items,
-               gr_vector_const_void_star &input_items,
-               gr_vector_void_star &output_items);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME_IMPL@ */
diff --git a/gr-blocks/lib/vector_sink_impl.cc b/gr-blocks/lib/vector_sink_impl.cc
new file mode 100644
index 0000000000..8a99b32b6d
--- /dev/null
+++ b/gr-blocks/lib/vector_sink_impl.cc
@@ -0,0 +1,109 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2008,2010,2013,2017-2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "vector_sink_impl.h"
+#include <gnuradio/io_signature.h>
+#include <gnuradio/thread/thread.h>
+#include <algorithm>
+#include <iostream>
+
+namespace gr {
+  namespace blocks {
+
+    template <class T>
+    typename vector_sink<T>::sptr
+    vector_sink<T>::make(int vlen)
+    {
+      return gnuradio::get_initial_sptr
+        (new vector_sink_impl<T> (vlen));
+    }
+
+    template <class T>
+    vector_sink_impl<T> ::vector_sink_impl(int vlen)
+    : sync_block("vector_sink",
+                    io_signature::make(1, 1, sizeof(T) * vlen),
+                    io_signature::make(0, 0, 0)),
+    d_vlen(vlen)
+    {
+    }
+
+    template <class T>
+    vector_sink_impl<T> ::~vector_sink_impl()
+    {}
+
+    template <class T>
+    std::vector<T>
+    vector_sink_impl<T> ::data() const
+    {
+      gr::thread::scoped_lock guard(d_data_mutex);
+      return d_data;
+    }
+
+    template <class T>
+    std::vector<tag_t>
+    vector_sink_impl<T> ::tags() const
+    {
+      gr::thread::scoped_lock guard(d_data_mutex);
+      return d_tags;
+    }
+
+
+    template <class T>
+    void
+    vector_sink_impl<T> ::reset()
+    {
+      gr::thread::scoped_lock guard(d_data_mutex);
+      d_tags.clear();
+      d_data.clear();
+    }
+
+    template <class T>
+    int
+    vector_sink_impl<T> ::work(int noutput_items,
+                      gr_vector_const_void_star &input_items,
+                      gr_vector_void_star &output_items)
+    {
+      T *iptr = (T*)input_items[0];
+
+      // can't touch this (as long as work() is working, the accessors shall not
+      // read the data
+      gr::thread::scoped_lock guard(d_data_mutex);
+      for(int i = 0; i < noutput_items * d_vlen; i++)
+        d_data.push_back (iptr[i]);
+      std::vector<tag_t> tags;
+      this->get_tags_in_range(tags, 0, this->nitems_read(0), this->nitems_read(0) + noutput_items);
+      d_tags.insert(d_tags.end(), tags.begin(), tags.end());
+      return noutput_items;
+    }
+
+template class vector_sink<std::uint8_t>;
+template class vector_sink<std::int16_t>;
+template class vector_sink<std::int32_t>;
+template class vector_sink<float>;
+template class vector_sink<gr_complex>;
+  } /* namespace blocks */
+} /* namespace gr */
diff --git a/gr-blocks/lib/vector_sink_impl.h b/gr-blocks/lib/vector_sink_impl.h
new file mode 100644
index 0000000000..be083b2213
--- /dev/null
+++ b/gr-blocks/lib/vector_sink_impl.h
@@ -0,0 +1,58 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2008,2009,2013,2017-2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef VECTOR_SINK_IMPL_H
+#define VECTOR_SINK_IMPL_H
+
+#include <gnuradio/blocks/vector_sink.h>
+#include <gnuradio/thread/thread.h>
+
+namespace gr {
+  namespace blocks {
+
+template<class T>
+    class vector_sink_impl : public  vector_sink<T>
+    {
+    private:
+      std::vector<T> d_data;
+      std::vector<tag_t> d_tags;
+      mutable gr::thread::mutex d_data_mutex; // protects internal data access.
+      int d_vlen;
+
+    public:
+      vector_sink_impl (int vlen);
+      ~vector_sink_impl ();
+
+      void reset();
+      std::vector<T> data() const;
+      std::vector<tag_t> tags() const;
+
+      int work(int noutput_items,
+               gr_vector_const_void_star &input_items,
+               gr_vector_void_star &output_items);
+    };
+
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* VECTOR_SINK_IMPL_H */
diff --git a/gr-blocks/lib/vector_source_X_impl.cc.t b/gr-blocks/lib/vector_source_X_impl.cc.t
deleted file mode 100644
index 82e157268c..0000000000
--- a/gr-blocks/lib/vector_source_X_impl.cc.t
+++ /dev/null
@@ -1,144 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2008,2010,2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <@NAME_IMPL@.h>
-#include <algorithm>
-#include <gnuradio/io_signature.h>
-#include <stdexcept>
-
-namespace gr {
-  namespace blocks {
-
-    @NAME@::sptr
-    @NAME@::make(const std::vector<@TYPE@> &data,
-                 bool repeat, int vlen,
-                 const std::vector<tag_t> &tags)
-    {
-      return gnuradio::get_initial_sptr
-        (new @NAME_IMPL@(data, repeat, vlen, tags));
-    }
-
-    @NAME_IMPL@::@NAME_IMPL@(const std::vector<@TYPE@> &data,
-                             bool repeat, int vlen,
-                             const std::vector<tag_t> &tags)
-    : sync_block("@BASE_NAME@",
-                    io_signature::make(0, 0, 0),
-                    io_signature::make(1, 1, sizeof(@TYPE@) * vlen)),
-      d_data(data),
-      d_repeat(repeat),
-      d_offset(0),
-      d_vlen(vlen),
-      d_tags(tags)
-    {
-      if(tags.size() == 0) {
-        d_settags = 0;
-      }
-      else {
-        d_settags = 1;
-        set_output_multiple(data.size() / vlen);
-      }
-      if((data.size() % vlen) != 0)
-        throw std::invalid_argument("data length must be a multiple of vlen");
-    }
-
-    @NAME_IMPL@::~@NAME_IMPL@()
-    {}
-
-    void
-    @NAME_IMPL@::set_data (const std::vector<@TYPE@> &data,
-                           const std::vector<tag_t> &tags)
-    {
-      d_data = data;
-      d_tags = tags;
-      rewind();
-      if(tags.size() == 0) {
-        d_settags = false;
-      }
-      else {
-        d_settags = true;
-      }
-    }
-
-    int
-    @NAME_IMPL@::work(int noutput_items,
-                      gr_vector_const_void_star &input_items,
-                      gr_vector_void_star &output_items)
-    {
-      @TYPE@ *optr = (@TYPE@ *) output_items[0];
-
-      if(d_repeat) {
-        unsigned int size = d_data.size ();
-        unsigned int offset = d_offset;
-        if(size == 0)
-          return -1;
-
-        if(d_settags) {
-          int n_outputitems_per_vector = d_data.size() / d_vlen;
-          for(int i = 0; i < noutput_items; i += n_outputitems_per_vector) {
-            // FIXME do proper vector copy
-            memcpy((void *) optr, (const void*)&d_data[0], size*sizeof (@TYPE@));
-            optr += size;
-            for(unsigned t = 0; t < d_tags.size(); t++) {
-              add_item_tag(0, nitems_written(0)+i+d_tags[t].offset,
-                           d_tags[t].key, d_tags[t].value, d_tags[t].srcid);
-            }
-          }
-        }
-        else {
-          for(int i = 0; i < noutput_items*d_vlen; i++) {
-            optr[i] = d_data[offset++];
-            if(offset >= size) {
-              offset = 0;
-            }
-          }
-        }
-
-        d_offset = offset;
-        return noutput_items;
-      }
-      else {
-        if(d_offset >= d_data.size ())
-          return -1;  // Done!
-
-        unsigned n = std::min((unsigned)d_data.size() - d_offset,
-                              (unsigned)noutput_items*d_vlen);
-        for(unsigned i = 0; i < n; i++) {
-          optr[i] = d_data[d_offset + i];
-        }
-        for(unsigned t = 0; t < d_tags.size(); t++) {
-          if((d_tags[t].offset >= d_offset) && (d_tags[t].offset < d_offset+n))
-            add_item_tag(0, d_tags[t].offset, d_tags[t].key, d_tags[t].value,
-                         d_tags[t].srcid);
-        }
-        d_offset += n;
-        return n/d_vlen;
-      }
-    }
-
-  } /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/vector_source_X_impl.h.t b/gr-blocks/lib/vector_source_X_impl.h.t
deleted file mode 100644
index 07bfc53e63..0000000000
--- a/gr-blocks/lib/vector_source_X_impl.h.t
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2008,2012-2013 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME_IMPL@
-#define @GUARD_NAME_IMPL@
-
-#include <gnuradio/blocks/@NAME@.h>
-
-namespace gr {
-  namespace blocks {
-
-    class @NAME_IMPL@ : public @NAME@
-    {
-    private:
-      std::vector<@TYPE@> d_data;
-      bool d_repeat;
-      unsigned int d_offset;
-      int d_vlen;
-      bool d_settags;
-      std::vector<tag_t> d_tags;
-
-    public:
-      @NAME_IMPL@(const std::vector<@TYPE@> &data,
-                  bool repeat, int vlen,
-                  const std::vector<tag_t> &tags);
-      ~@NAME_IMPL@();
-
-      void rewind() { d_offset=0; }
-      void set_data(const std::vector<@TYPE@> &data,
-                    const std::vector<tag_t> &tags);
-      void set_repeat(bool repeat) { d_repeat=repeat; };
-
-      int work(int noutput_items,
-               gr_vector_const_void_star &input_items,
-               gr_vector_void_star &output_items);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME_IMPL@ */
diff --git a/gr-blocks/lib/vector_source_impl.cc b/gr-blocks/lib/vector_source_impl.cc
new file mode 100644
index 0000000000..fd1ad16981
--- /dev/null
+++ b/gr-blocks/lib/vector_source_impl.cc
@@ -0,0 +1,153 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2008,2010,2013,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "vector_source_impl.h"
+#include <algorithm>
+#include <gnuradio/io_signature.h>
+#include <stdexcept>
+
+namespace gr {
+  namespace blocks {
+
+    template <class T>
+    typename vector_source<T>::sptr
+    vector_source<T>::make(const std::vector<T> &data,
+                 bool repeat, int vlen,
+                 const std::vector<tag_t> &tags)
+    {
+      return gnuradio::get_initial_sptr
+        (new vector_source_impl<T> (data, repeat, vlen, tags));
+    }
+
+    template <class T>
+    vector_source_impl<T> ::vector_source_impl(const std::vector<T> &data,
+                             bool repeat, int vlen,
+                             const std::vector<tag_t> &tags)
+    : sync_block("vector_source",
+                    io_signature::make(0, 0, 0),
+                    io_signature::make(1, 1, sizeof(T) * vlen)),
+      d_data(data),
+      d_repeat(repeat),
+      d_offset(0),
+      d_vlen(vlen),
+      d_tags(tags)
+    {
+      if(tags.size() == 0) {
+        d_settags = 0;
+      }
+      else {
+        d_settags = 1;
+        this->set_output_multiple(data.size() / vlen);
+      }
+      if((data.size() % vlen) != 0)
+        throw std::invalid_argument("data length must be a multiple of vlen");
+    }
+
+    template <class T>
+    vector_source_impl<T> ::~vector_source_impl()
+    {}
+
+    template <class T>
+    void
+    vector_source_impl<T> ::set_data (const std::vector<T> &data,
+                           const std::vector<tag_t> &tags)
+    {
+      d_data = data;
+      d_tags = tags;
+      rewind();
+      if(tags.size() == 0) {
+        d_settags = false;
+      }
+      else {
+        d_settags = true;
+      }
+    }
+
+    template <class T>
+    int
+    vector_source_impl<T> ::work(int noutput_items,
+                      gr_vector_const_void_star &input_items,
+                      gr_vector_void_star &output_items)
+    {
+      T *optr = (T *) output_items[0];
+
+      if(d_repeat) {
+        unsigned int size = d_data.size ();
+        unsigned int offset = d_offset;
+        if(size == 0)
+          return -1;
+
+        if(d_settags) {
+          int n_outputitems_per_vector = d_data.size() / d_vlen;
+          for(int i = 0; i < noutput_items; i += n_outputitems_per_vector) {
+            // FIXME do proper vector copy
+            memcpy((void *) optr, (const void*)&d_data[0], size*sizeof (T));
+            optr += size;
+            for(unsigned t = 0; t < d_tags.size(); t++) {
+              this->add_item_tag(0, this->nitems_written(0)+i+d_tags[t].offset,
+                           d_tags[t].key, d_tags[t].value, d_tags[t].srcid);
+            }
+          }
+        }
+        else {
+          for(int i = 0; i < noutput_items*d_vlen; i++) {
+            optr[i] = d_data[offset++];
+            if(offset >= size) {
+              offset = 0;
+            }
+          }
+        }
+
+        d_offset = offset;
+        return noutput_items;
+      }
+      else {
+        if(d_offset >= d_data.size ())
+          return -1;  // Done!
+
+        unsigned n = std::min((unsigned)d_data.size() - d_offset,
+                              (unsigned)noutput_items*d_vlen);
+        for(unsigned i = 0; i < n; i++) {
+          optr[i] = d_data[d_offset + i];
+        }
+        for(unsigned t = 0; t < d_tags.size(); t++) {
+          if((d_tags[t].offset >= d_offset) && (d_tags[t].offset < d_offset+n))
+            this->add_item_tag(0, d_tags[t].offset, d_tags[t].key, d_tags[t].value,
+                         d_tags[t].srcid);
+        }
+        d_offset += n;
+        return n/d_vlen;
+      }
+    }
+
+template class vector_source<std::uint8_t>;
+template class vector_source<std::int16_t>;
+template class vector_source<std::int32_t>;
+template class vector_source<float>;
+template class vector_source<gr_complex>;
+  } /* namespace blocks */
+} /* namespace gr */
diff --git a/gr-blocks/lib/vector_source_impl.h b/gr-blocks/lib/vector_source_impl.h
new file mode 100644
index 0000000000..b4161d68fc
--- /dev/null
+++ b/gr-blocks/lib/vector_source_impl.h
@@ -0,0 +1,62 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2008,2012-2013,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef VECTOR_SOURCE_IMPL_H
+#define VECTOR_SOURCE_IMPL_H
+
+#include <gnuradio/blocks/vector_source.h>
+
+namespace gr {
+  namespace blocks {
+
+template<class T>
+    class vector_source_impl : public  vector_source<T>
+    {
+    private:
+      std::vector<T> d_data;
+      bool d_repeat;
+      unsigned int d_offset;
+      int d_vlen;
+      bool d_settags;
+      std::vector<tag_t> d_tags;
+
+    public:
+      vector_source_impl (const std::vector<T> &data,
+                  bool repeat, int vlen,
+                  const std::vector<tag_t> &tags);
+      ~vector_source_impl ();
+
+      void rewind() { d_offset=0; }
+      void set_data(const std::vector<T> &data,
+                    const std::vector<tag_t> &tags);
+      void set_repeat(bool repeat) { d_repeat=repeat; };
+
+      int work(int noutput_items,
+               gr_vector_const_void_star &input_items,
+               gr_vector_void_star &output_items);
+    };
+
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* VECTOR_SOURCE_IMPL_H */
diff --git a/gr-blocks/lib/xor_XX_impl.cc.t b/gr-blocks/lib/xor_XX_impl.cc.t
deleted file mode 100644
index aa7a542ed9..0000000000
--- a/gr-blocks/lib/xor_XX_impl.cc.t
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <@NAME_IMPL@.h>
-#include <gnuradio/io_signature.h>
-
-namespace gr {
-  namespace blocks {
-
-    @NAME@::sptr @NAME@::make(size_t vlen)
-    {
-      return gnuradio::get_initial_sptr(new @NAME_IMPL@(vlen));
-    }
-
-    @NAME_IMPL@::@NAME_IMPL@(size_t vlen)
-      : sync_block ("@NAME@",
-		       io_signature::make (1, -1, sizeof (@I_TYPE@)*vlen),
-		       io_signature::make (1,  1, sizeof (@O_TYPE@)*vlen)),
-      d_vlen(vlen)
-    {
-    }
-
-    int
-    @NAME_IMPL@::work(int noutput_items,
-		      gr_vector_const_void_star &input_items,
-		      gr_vector_void_star &output_items)
-    {
-      @O_TYPE@ *optr = (@O_TYPE@ *) output_items[0];
-
-      int ninputs = input_items.size ();
-
-      for (size_t i = 0; i < noutput_items*d_vlen; i++){
-	@I_TYPE@ acc = ((@I_TYPE@ *) input_items[0])[i];
-	for (int j = 1; j < ninputs; j++)
-	  acc ^= ((@I_TYPE@ *) input_items[j])[i];
-
-	*optr++ = (@O_TYPE@) acc;
-      }
-
-      return noutput_items;
-    }
-
-  } /* namespace blocks */
-} /* namespace gr */
diff --git a/gr-blocks/lib/xor_XX_impl.h.t b/gr-blocks/lib/xor_XX_impl.h.t
deleted file mode 100644
index f7db3f2162..0000000000
--- a/gr-blocks/lib/xor_XX_impl.h.t
+++ /dev/null
@@ -1,48 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME_IMPL@
-#define @GUARD_NAME_IMPL@
-
-#include <gnuradio/blocks/@NAME@.h>
-
-namespace gr {
-  namespace blocks {
-
-    class BLOCKS_API @NAME_IMPL@ : public @NAME@
-    {
-      size_t d_vlen;
-
-    public:
-      @NAME_IMPL@(size_t vlen);
-
-      int work(int noutput_items,
-	       gr_vector_const_void_star &input_items,
-	       gr_vector_void_star &output_items);
-    };
-
-  } /* namespace blocks */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME_IMPL@ */
diff --git a/gr-blocks/lib/xor_blk_impl.cc b/gr-blocks/lib/xor_blk_impl.cc
new file mode 100644
index 0000000000..5180e6a600
--- /dev/null
+++ b/gr-blocks/lib/xor_blk_impl.cc
@@ -0,0 +1,73 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "xor_blk_impl.h"
+#include <gnuradio/io_signature.h>
+
+namespace gr {
+  namespace blocks {
+    template <class T>
+    typename xor_blk<T>::sptr xor_blk<T>::make(size_t vlen)
+    {
+      return gnuradio::get_initial_sptr(new xor_blk_impl<T> (vlen));
+    }
+
+    template <class T>
+    xor_blk_impl<T> ::xor_blk_impl(size_t vlen)
+      : sync_block ("xor_blk",
+		       io_signature::make (1, -1, sizeof (T)*vlen),
+		       io_signature::make (1,  1, sizeof (T)*vlen)),
+      d_vlen(vlen)
+    {
+    }
+
+    template <class T>
+    int
+    xor_blk_impl<T> ::work(int noutput_items,
+		      gr_vector_const_void_star &input_items,
+		      gr_vector_void_star &output_items)
+    {
+      T *optr = (T *) output_items[0];
+
+      int ninputs = input_items.size ();
+
+      for (size_t i = 0; i < noutput_items*d_vlen; i++){
+	T acc = ((T *) input_items[0])[i];
+	for (int j = 1; j < ninputs; j++)
+	  acc ^= ((T *) input_items[j])[i];
+
+	*optr++ = (T) acc;
+      }
+
+      return noutput_items;
+    }
+
+template class xor_blk<std::uint8_t>;
+template class xor_blk<std::int16_t>;
+template class xor_blk<std::int32_t>;
+  } /* namespace blocks */
+} /* namespace gr */
diff --git a/gr-blocks/lib/xor_blk_impl.h b/gr-blocks/lib/xor_blk_impl.h
new file mode 100644
index 0000000000..72caa0a799
--- /dev/null
+++ b/gr-blocks/lib/xor_blk_impl.h
@@ -0,0 +1,48 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef XOR_BLK_IMPL_H
+#define XOR_BLK_IMPL_H
+
+#include <gnuradio/blocks/xor_blk.h>
+
+namespace gr {
+  namespace blocks {
+
+template<class T>
+    class BLOCKS_API xor_blk_impl : public  xor_blk<T>
+    {
+      size_t d_vlen;
+
+    public:
+      xor_blk_impl (size_t vlen);
+
+      int work(int noutput_items,
+	       gr_vector_const_void_star &input_items,
+	       gr_vector_void_star &output_items);
+    };
+
+  } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* XOR_BLK_IMPL_H */
diff --git a/gr-blocks/swig/CMakeLists.txt b/gr-blocks/swig/CMakeLists.txt
index d5e9a8a725..1dc4aca483 100644
--- a/gr-blocks/swig/CMakeLists.txt
+++ b/gr-blocks/swig/CMakeLists.txt
@@ -66,7 +66,6 @@ foreach(swigfile ${GR_SWIG_BLOCK_IFILES})
     ${CMAKE_CURRENT_BINARY_DIR}/../include/gnuradio/blocks
   )
   set(GR_SWIG_DOCS_TARGET_DEPS runtime_swig_swig_doc)
-  set(GR_SWIG_TARGET_DEPS blocks_generated_includes)
   set(GR_SWIG_LIBRARIES gnuradio-blocks)
   GR_SWIG_MAKE(${swigfile} ${swigfile}.i)
 
diff --git a/gr-blocks/swig/blocks_swig1.i b/gr-blocks/swig/blocks_swig1.i
index cbff920d02..f94f5e0253 100644
--- a/gr-blocks/swig/blocks_swig1.i
+++ b/gr-blocks/swig/blocks_swig1.i
@@ -31,21 +31,9 @@
 #include "gnuradio/blocks/vector_map.h"
 #include "gnuradio/blocks/vector_to_stream.h"
 #include "gnuradio/blocks/vector_to_streams.h"
-#include "gnuradio/blocks/vector_insert_b.h"
-#include "gnuradio/blocks/vector_insert_s.h"
-#include "gnuradio/blocks/vector_insert_i.h"
-#include "gnuradio/blocks/vector_insert_f.h"
-#include "gnuradio/blocks/vector_insert_c.h"
-#include "gnuradio/blocks/vector_sink_b.h"
-#include "gnuradio/blocks/vector_sink_s.h"
-#include "gnuradio/blocks/vector_sink_i.h"
-#include "gnuradio/blocks/vector_sink_f.h"
-#include "gnuradio/blocks/vector_sink_c.h"
-#include "gnuradio/blocks/vector_source_b.h"
-#include "gnuradio/blocks/vector_source_s.h"
-#include "gnuradio/blocks/vector_source_i.h"
-#include "gnuradio/blocks/vector_source_f.h"
-#include "gnuradio/blocks/vector_source_c.h"
+#include "gnuradio/blocks/vector_insert.h"
+#include "gnuradio/blocks/vector_sink.h"
+#include "gnuradio/blocks/vector_source.h"
 #include "gnuradio/blocks/wavfile_sink.h"
 #include "gnuradio/blocks/wavfile_source.h"
 %}
@@ -53,41 +41,29 @@
 %include "gnuradio/blocks/vector_map.h"
 %include "gnuradio/blocks/vector_to_stream.h"
 %include "gnuradio/blocks/vector_to_streams.h"
-%include "gnuradio/blocks/vector_insert_b.h"
-%include "gnuradio/blocks/vector_insert_s.h"
-%include "gnuradio/blocks/vector_insert_i.h"
-%include "gnuradio/blocks/vector_insert_f.h"
-%include "gnuradio/blocks/vector_insert_c.h"
-%include "gnuradio/blocks/vector_sink_b.h"
-%include "gnuradio/blocks/vector_sink_s.h"
-%include "gnuradio/blocks/vector_sink_i.h"
-%include "gnuradio/blocks/vector_sink_f.h"
-%include "gnuradio/blocks/vector_sink_c.h"
-%include "gnuradio/blocks/vector_source_b.h"
-%include "gnuradio/blocks/vector_source_s.h"
-%include "gnuradio/blocks/vector_source_i.h"
-%include "gnuradio/blocks/vector_source_f.h"
-%include "gnuradio/blocks/vector_source_c.h"
+%include "gnuradio/blocks/vector_insert.h"
+%include "gnuradio/blocks/vector_sink.h"
+%include "gnuradio/blocks/vector_source.h"
 %include "gnuradio/blocks/wavfile_sink.h"
 %include "gnuradio/blocks/wavfile_source.h"
 
 GR_SWIG_BLOCK_MAGIC2(blocks, vector_map);
 GR_SWIG_BLOCK_MAGIC2(blocks, vector_to_stream);
 GR_SWIG_BLOCK_MAGIC2(blocks, vector_to_streams);
-GR_SWIG_BLOCK_MAGIC2(blocks, vector_insert_b);
-GR_SWIG_BLOCK_MAGIC2(blocks, vector_insert_s);
-GR_SWIG_BLOCK_MAGIC2(blocks, vector_insert_i);
-GR_SWIG_BLOCK_MAGIC2(blocks, vector_insert_f);
-GR_SWIG_BLOCK_MAGIC2(blocks, vector_insert_c);
-GR_SWIG_BLOCK_MAGIC2(blocks, vector_sink_b);
-GR_SWIG_BLOCK_MAGIC2(blocks, vector_sink_s);
-GR_SWIG_BLOCK_MAGIC2(blocks, vector_sink_i);
-GR_SWIG_BLOCK_MAGIC2(blocks, vector_sink_f);
-GR_SWIG_BLOCK_MAGIC2(blocks, vector_sink_c);
-GR_SWIG_BLOCK_MAGIC2(blocks, vector_source_b);
-GR_SWIG_BLOCK_MAGIC2(blocks, vector_source_s);
-GR_SWIG_BLOCK_MAGIC2(blocks, vector_source_i);
-GR_SWIG_BLOCK_MAGIC2(blocks, vector_source_f);
-GR_SWIG_BLOCK_MAGIC2(blocks, vector_source_c);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, vector_insert_b, vector_insert<std::uint8_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, vector_insert_s, vector_insert<std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, vector_insert_i, vector_insert<std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, vector_insert_f, vector_insert<float>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, vector_insert_c, vector_insert<gr_complex>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, vector_sink_b, vector_sink<std::uint8_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, vector_sink_s, vector_sink<std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, vector_sink_i, vector_sink<std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, vector_sink_f, vector_sink<float>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, vector_sink_c, vector_sink<gr_complex>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, vector_source_b, vector_source<std::uint8_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, vector_source_s, vector_source<std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, vector_source_i, vector_source<std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, vector_source_f, vector_source<float>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, vector_source_c, vector_source<gr_complex>);
 GR_SWIG_BLOCK_MAGIC2(blocks, wavfile_sink);
 GR_SWIG_BLOCK_MAGIC2(blocks, wavfile_source);
diff --git a/gr-blocks/swig/blocks_swig10.i b/gr-blocks/swig/blocks_swig10.i
index 5872b17cf3..32ecbea9ef 100644
--- a/gr-blocks/swig/blocks_swig10.i
+++ b/gr-blocks/swig/blocks_swig10.i
@@ -28,63 +28,41 @@
 %include "blocks_swig10_doc.i"
 
 %{
-#include "gnuradio/blocks/min_ff.h"
-#include "gnuradio/blocks/min_ii.h"
-#include "gnuradio/blocks/min_ss.h"
-#include "gnuradio/blocks/moving_average_cc.h"
-#include "gnuradio/blocks/moving_average_ff.h"
-#include "gnuradio/blocks/moving_average_ii.h"
-#include "gnuradio/blocks/moving_average_ss.h"
+#include "gnuradio/blocks/min_blk.h"
+#include "gnuradio/blocks/moving_average.h"
 #include "gnuradio/blocks/nlog10_ff.h"
-#include "gnuradio/blocks/not_bb.h"
-#include "gnuradio/blocks/not_ss.h"
-#include "gnuradio/blocks/not_ii.h"
-#include "gnuradio/blocks/or_bb.h"
-#include "gnuradio/blocks/or_ss.h"
-#include "gnuradio/blocks/or_ii.h"
+#include "gnuradio/blocks/not_blk.h"
+#include "gnuradio/blocks/or_blk.h"
 #include "gnuradio/blocks/patterned_interleaver.h"
 #include "gnuradio/blocks/pack_k_bits_bb.h"
-#include "gnuradio/blocks/packed_to_unpacked_bb.h"
-#include "gnuradio/blocks/packed_to_unpacked_ss.h"
-#include "gnuradio/blocks/packed_to_unpacked_ii.h"
+#include "gnuradio/blocks/packed_to_unpacked.h"
 %}
 
-%include "gnuradio/blocks/min_ff.h"
-%include "gnuradio/blocks/min_ii.h"
-%include "gnuradio/blocks/min_ss.h"
-%include "gnuradio/blocks/moving_average_cc.h"
-%include "gnuradio/blocks/moving_average_ff.h"
-%include "gnuradio/blocks/moving_average_ii.h"
-%include "gnuradio/blocks/moving_average_ss.h"
+%include "gnuradio/blocks/min_blk.h"
+%include "gnuradio/blocks/moving_average.h"
 %include "gnuradio/blocks/nlog10_ff.h"
-%include "gnuradio/blocks/not_bb.h"
-%include "gnuradio/blocks/not_ss.h"
-%include "gnuradio/blocks/not_ii.h"
-%include "gnuradio/blocks/or_bb.h"
-%include "gnuradio/blocks/or_ss.h"
-%include "gnuradio/blocks/or_ii.h"
+%include "gnuradio/blocks/not_blk.h"
+%include "gnuradio/blocks/or_blk.h"
 %include "gnuradio/blocks/patterned_interleaver.h"
 %include "gnuradio/blocks/pack_k_bits_bb.h"
-%include "gnuradio/blocks/packed_to_unpacked_bb.h"
-%include "gnuradio/blocks/packed_to_unpacked_ss.h"
-%include "gnuradio/blocks/packed_to_unpacked_ii.h"
+%include "gnuradio/blocks/packed_to_unpacked.h"
 
-GR_SWIG_BLOCK_MAGIC2(blocks, min_ff);
-GR_SWIG_BLOCK_MAGIC2(blocks, min_ii);
-GR_SWIG_BLOCK_MAGIC2(blocks, min_ss);
-GR_SWIG_BLOCK_MAGIC2(blocks, moving_average_cc);
-GR_SWIG_BLOCK_MAGIC2(blocks, moving_average_ff);
-GR_SWIG_BLOCK_MAGIC2(blocks, moving_average_ii);
-GR_SWIG_BLOCK_MAGIC2(blocks, moving_average_ss);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, min_ff, min_blk<float>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, min_ii, min_blk<std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, min_ss, min_blk<std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, moving_average_cc, moving_average<gr_complex>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, moving_average_ff, moving_average<float>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, moving_average_ii, moving_average<std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, moving_average_ss, moving_average<std::int16_t>);
 GR_SWIG_BLOCK_MAGIC2(blocks, nlog10_ff);
-GR_SWIG_BLOCK_MAGIC2(blocks, not_bb);
-GR_SWIG_BLOCK_MAGIC2(blocks, not_ss);
-GR_SWIG_BLOCK_MAGIC2(blocks, not_ii);
-GR_SWIG_BLOCK_MAGIC2(blocks, or_bb);
-GR_SWIG_BLOCK_MAGIC2(blocks, or_ss);
-GR_SWIG_BLOCK_MAGIC2(blocks, or_ii);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, not_bb, not_blk<std::uint8_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, not_ss, not_blk<std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, not_ii, not_blk<std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, or_bb, or_blk<char>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, or_ss, or_blk<short>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, or_ii, or_blk<int>);
 GR_SWIG_BLOCK_MAGIC2(blocks, patterned_interleaver);
 GR_SWIG_BLOCK_MAGIC2(blocks, pack_k_bits_bb);
-GR_SWIG_BLOCK_MAGIC2(blocks, packed_to_unpacked_bb);
-GR_SWIG_BLOCK_MAGIC2(blocks, packed_to_unpacked_ss);
-GR_SWIG_BLOCK_MAGIC2(blocks, packed_to_unpacked_ii);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, packed_to_unpacked_bb, packed_to_unpacked<std::uint8_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, packed_to_unpacked_ss, packed_to_unpacked<std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, packed_to_unpacked_ii, packed_to_unpacked<std::int32_t>);
diff --git a/gr-blocks/swig/blocks_swig2.i b/gr-blocks/swig/blocks_swig2.i
index ea25a6bccc..60ffa06e79 100644
--- a/gr-blocks/swig/blocks_swig2.i
+++ b/gr-blocks/swig/blocks_swig2.i
@@ -31,12 +31,8 @@
 %include "feval.i"
 
 %{
-#include "gnuradio/blocks/and_const_bb.h"
-#include "gnuradio/blocks/and_const_ss.h"
-#include "gnuradio/blocks/and_const_ii.h"
-#include "gnuradio/blocks/argmax_fs.h"
-#include "gnuradio/blocks/argmax_is.h"
-#include "gnuradio/blocks/argmax_ss.h"
+#include "gnuradio/blocks/and_const.h"
+#include "gnuradio/blocks/argmax.h"
 #include "gnuradio/blocks/bin_statistics_f.h"
 #include "gnuradio/blocks/burst_tagger.h"
 #include "gnuradio/blocks/char_to_float.h"
@@ -54,12 +50,8 @@
 #include "gnuradio/blocks/conjugate_cc.h"
 %}
 
-%include "gnuradio/blocks/and_const_bb.h"
-%include "gnuradio/blocks/and_const_ss.h"
-%include "gnuradio/blocks/and_const_ii.h"
-%include "gnuradio/blocks/argmax_fs.h"
-%include "gnuradio/blocks/argmax_is.h"
-%include "gnuradio/blocks/argmax_ss.h"
+%include "gnuradio/blocks/and_const.h"
+%include "gnuradio/blocks/argmax.h"
 %include "gnuradio/blocks/char_to_float.h"
 %include "gnuradio/blocks/bin_statistics_f.h"
 %include "gnuradio/blocks/burst_tagger.h"
@@ -76,12 +68,12 @@
 %include "gnuradio/blocks/complex_to_arg.h"
 %include "gnuradio/blocks/conjugate_cc.h"
 
-GR_SWIG_BLOCK_MAGIC2(blocks, and_const_bb);
-GR_SWIG_BLOCK_MAGIC2(blocks, and_const_ss);
-GR_SWIG_BLOCK_MAGIC2(blocks, and_const_ii);
-GR_SWIG_BLOCK_MAGIC2(blocks, argmax_fs);
-GR_SWIG_BLOCK_MAGIC2(blocks, argmax_is);
-GR_SWIG_BLOCK_MAGIC2(blocks, argmax_ss);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, and_const_bb, and_const<std::uint8_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, and_const_ss, and_const<std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, and_const_ii, and_const<std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, argmax_fs, argmax<float>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, argmax_is, argmax<std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, argmax_ss, argmax<std::int16_t>);
 GR_SWIG_BLOCK_MAGIC2(blocks, bin_statistics_f);
 GR_SWIG_BLOCK_MAGIC2(blocks, burst_tagger);
 GR_SWIG_BLOCK_MAGIC2(blocks, char_to_float);
diff --git a/gr-blocks/swig/blocks_swig3.i b/gr-blocks/swig/blocks_swig3.i
index 6794b75d57..6be0b4a86c 100644
--- a/gr-blocks/swig/blocks_swig3.i
+++ b/gr-blocks/swig/blocks_swig3.i
@@ -28,66 +28,40 @@
 %include "blocks_swig3_doc.i"
 
 %{
-#include "gnuradio/blocks/multiply_ss.h"
-#include "gnuradio/blocks/multiply_ii.h"
-#include "gnuradio/blocks/multiply_ff.h"
-#include "gnuradio/blocks/multiply_cc.h"
+#include "gnuradio/blocks/multiply.h"
 #include "gnuradio/blocks/multiply_conjugate_cc.h"
-#include "gnuradio/blocks/multiply_const_ss.h"
-#include "gnuradio/blocks/multiply_const_ii.h"
-#include "gnuradio/blocks/multiply_const_ff.h"
-#include "gnuradio/blocks/multiply_const_cc.h"
-#include "gnuradio/blocks/multiply_const_vss.h"
-#include "gnuradio/blocks/multiply_const_vii.h"
-#include "gnuradio/blocks/multiply_const_vff.h"
-#include "gnuradio/blocks/multiply_const_vcc.h"
-#include "gnuradio/blocks/multiply_matrix_cc.h"
-#include "gnuradio/blocks/multiply_matrix_ff.h"
+#include "gnuradio/blocks/multiply_const.h"
+#include "gnuradio/blocks/multiply_const_v.h"
+#include "gnuradio/blocks/multiply_matrix.h"
 #include "gnuradio/blocks/multiply_by_tag_value_cc.h"
-#include "gnuradio/blocks/mute_ss.h"
-#include "gnuradio/blocks/mute_ii.h"
-#include "gnuradio/blocks/mute_ff.h"
-#include "gnuradio/blocks/mute_cc.h"
+#include "gnuradio/blocks/mute.h"
 %}
 
-%include "gnuradio/blocks/multiply_ss.h"
-%include "gnuradio/blocks/multiply_ii.h"
-%include "gnuradio/blocks/multiply_ff.h"
-%include "gnuradio/blocks/multiply_cc.h"
+%include "gnuradio/blocks/multiply.h"
 %include "gnuradio/blocks/multiply_conjugate_cc.h"
-%include "gnuradio/blocks/multiply_const_ss.h"
-%include "gnuradio/blocks/multiply_const_ii.h"
-%include "gnuradio/blocks/multiply_const_ff.h"
-%include "gnuradio/blocks/multiply_const_cc.h"
-%include "gnuradio/blocks/multiply_const_vss.h"
-%include "gnuradio/blocks/multiply_const_vii.h"
-%include "gnuradio/blocks/multiply_const_vff.h"
-%include "gnuradio/blocks/multiply_const_vcc.h"
-%include "gnuradio/blocks/multiply_matrix_cc.h"
-%include "gnuradio/blocks/multiply_matrix_ff.h"
+%include "gnuradio/blocks/multiply_const.h"
+%include "gnuradio/blocks/multiply_const_v.h"
+%include "gnuradio/blocks/multiply_matrix.h"
 %include "gnuradio/blocks/multiply_by_tag_value_cc.h"
-%include "gnuradio/blocks/mute_ss.h"
-%include "gnuradio/blocks/mute_ii.h"
-%include "gnuradio/blocks/mute_ff.h"
-%include "gnuradio/blocks/mute_cc.h"
+%include "gnuradio/blocks/mute.h"
 
-GR_SWIG_BLOCK_MAGIC2(blocks, multiply_ss);
-GR_SWIG_BLOCK_MAGIC2(blocks, multiply_ii);
-GR_SWIG_BLOCK_MAGIC2(blocks, multiply_ff);
-GR_SWIG_BLOCK_MAGIC2(blocks, multiply_cc);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, multiply_ss, multiply<std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, multiply_ii, multiply<std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, multiply_ff, multiply<float>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, multiply_cc, multiply<gr_complex>);
 GR_SWIG_BLOCK_MAGIC2(blocks, multiply_conjugate_cc);
-GR_SWIG_BLOCK_MAGIC2(blocks, multiply_const_ss);
-GR_SWIG_BLOCK_MAGIC2(blocks, multiply_const_ii);
-GR_SWIG_BLOCK_MAGIC2(blocks, multiply_const_ff);
-GR_SWIG_BLOCK_MAGIC2(blocks, multiply_const_cc);
-GR_SWIG_BLOCK_MAGIC2(blocks, multiply_const_vss);
-GR_SWIG_BLOCK_MAGIC2(blocks, multiply_const_vii);
-GR_SWIG_BLOCK_MAGIC2(blocks, multiply_const_vff);
-GR_SWIG_BLOCK_MAGIC2(blocks, multiply_const_vcc);
-GR_SWIG_BLOCK_MAGIC2(blocks, multiply_matrix_cc);
-GR_SWIG_BLOCK_MAGIC2(blocks, multiply_matrix_ff);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, multiply_const_ss, multiply_const<std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, multiply_const_ii, multiply_const<std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, multiply_const_ff, multiply_const<float>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, multiply_const_cc, multiply_const<gr_complex>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, multiply_const_vss, multiply_const_v<std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, multiply_const_vii, multiply_const_v<std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, multiply_const_vff, multiply_const_v<float>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, multiply_const_vcc, multiply_const_v<gr_complex>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, multiply_matrix_cc, multiply_matrix<gr_complex>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, multiply_matrix_ff, multiply_matrix<float>);
 GR_SWIG_BLOCK_MAGIC2(blocks, multiply_by_tag_value_cc);
-GR_SWIG_BLOCK_MAGIC2(blocks, mute_ss);
-GR_SWIG_BLOCK_MAGIC2(blocks, mute_ii);
-GR_SWIG_BLOCK_MAGIC2(blocks, mute_ff);
-GR_SWIG_BLOCK_MAGIC2(blocks, mute_cc);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, mute_ss, mute_blk<std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, mute_ii, mute_blk<std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, mute_ff, mute_blk<float>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, mute_cc, mute_blk<gr_complex>);
diff --git a/gr-blocks/swig/blocks_swig4.i b/gr-blocks/swig/blocks_swig4.i
index bb39740123..f6c0445d58 100644
--- a/gr-blocks/swig/blocks_swig4.i
+++ b/gr-blocks/swig/blocks_swig4.i
@@ -35,48 +35,28 @@
 #include "gnuradio/blocks/pdu_set.h"
 #include "gnuradio/blocks/pdu_remove.h"
 #include "gnuradio/blocks/pdu_to_tagged_stream.h"
-#include "gnuradio/blocks/peak_detector_fb.h"
-#include "gnuradio/blocks/peak_detector_ib.h"
-#include "gnuradio/blocks/peak_detector_sb.h"
+#include "gnuradio/blocks/peak_detector.h"
 #include "gnuradio/blocks/peak_detector2_fb.h"
 #include "gnuradio/blocks/plateau_detector_fb.h"
 #include "gnuradio/blocks/probe_rate.h"
-#include "gnuradio/blocks/probe_signal_b.h"
-#include "gnuradio/blocks/probe_signal_s.h"
-#include "gnuradio/blocks/probe_signal_i.h"
-#include "gnuradio/blocks/probe_signal_f.h"
-#include "gnuradio/blocks/probe_signal_c.h"
-#include "gnuradio/blocks/probe_signal_vb.h"
-#include "gnuradio/blocks/probe_signal_vs.h"
-#include "gnuradio/blocks/probe_signal_vi.h"
-#include "gnuradio/blocks/probe_signal_vf.h"
-#include "gnuradio/blocks/probe_signal_vc.h"
+#include "gnuradio/blocks/probe_signal.h"
+#include "gnuradio/blocks/probe_signal_v.h"
 %}
 
-%include "gnuradio/blocks/probe_signal_b.h"
-%include "gnuradio/blocks/probe_signal_s.h"
-%include "gnuradio/blocks/probe_signal_i.h"
-%include "gnuradio/blocks/probe_signal_f.h"
-%include "gnuradio/blocks/probe_signal_c.h"
-%include "gnuradio/blocks/probe_signal_vb.h"
-%include "gnuradio/blocks/probe_signal_vs.h"
-%include "gnuradio/blocks/probe_signal_vi.h"
-%include "gnuradio/blocks/probe_signal_vf.h"
-%include "gnuradio/blocks/probe_signal_vc.h"
+%include "gnuradio/blocks/probe_signal.h"
+%include "gnuradio/blocks/probe_signal_v.h"
 %include "gnuradio/blocks/pdu_filter.h"
 %include "gnuradio/blocks/pdu_set.h"
 %include "gnuradio/blocks/pdu_remove.h"
 %include "gnuradio/blocks/pdu_to_tagged_stream.h"
-%include "gnuradio/blocks/peak_detector_fb.h"
-%include "gnuradio/blocks/peak_detector_ib.h"
-%include "gnuradio/blocks/peak_detector_sb.h"
+%include "gnuradio/blocks/peak_detector.h"
 %include "gnuradio/blocks/peak_detector2_fb.h"
 %include "gnuradio/blocks/plateau_detector_fb.h"
 %include "gnuradio/blocks/probe_rate.h"
 
-GR_SWIG_BLOCK_MAGIC2(blocks, peak_detector_fb);
-GR_SWIG_BLOCK_MAGIC2(blocks, peak_detector_ib);
-GR_SWIG_BLOCK_MAGIC2(blocks, peak_detector_sb);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, peak_detector_fb, peak_detector<float>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, peak_detector_ib, peak_detector<std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, peak_detector_sb, peak_detector<std::int16_t>);
 GR_SWIG_BLOCK_MAGIC2(blocks, peak_detector2_fb);
 GR_SWIG_BLOCK_MAGIC2(blocks, plateau_detector_fb);
 GR_SWIG_BLOCK_MAGIC2(blocks, pdu_filter);
@@ -84,13 +64,13 @@ GR_SWIG_BLOCK_MAGIC2(blocks, pdu_set);
 GR_SWIG_BLOCK_MAGIC2(blocks, pdu_remove);
 GR_SWIG_BLOCK_MAGIC2(blocks, pdu_to_tagged_stream);
 GR_SWIG_BLOCK_MAGIC2(blocks, probe_rate);
-GR_SWIG_BLOCK_MAGIC2(blocks, probe_signal_b);
-GR_SWIG_BLOCK_MAGIC2(blocks, probe_signal_s);
-GR_SWIG_BLOCK_MAGIC2(blocks, probe_signal_i);
-GR_SWIG_BLOCK_MAGIC2(blocks, probe_signal_f);
-GR_SWIG_BLOCK_MAGIC2(blocks, probe_signal_c);
-GR_SWIG_BLOCK_MAGIC2(blocks, probe_signal_vb);
-GR_SWIG_BLOCK_MAGIC2(blocks, probe_signal_vs);
-GR_SWIG_BLOCK_MAGIC2(blocks, probe_signal_vi);
-GR_SWIG_BLOCK_MAGIC2(blocks, probe_signal_vf);
-GR_SWIG_BLOCK_MAGIC2(blocks, probe_signal_vc);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, probe_signal_b, probe_signal<std::uint8_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, probe_signal_s, probe_signal<std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, probe_signal_i, probe_signal<std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, probe_signal_f, probe_signal<float>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, probe_signal_c, probe_signal<gr_complex>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, probe_signal_vb, probe_signal_v<std::uint8_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, probe_signal_vs, probe_signal_v<std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, probe_signal_vi, probe_signal_v<std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, probe_signal_vf, probe_signal_v<float>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, probe_signal_vc, probe_signal_v<gr_complex>);
diff --git a/gr-blocks/swig/blocks_swig5.i b/gr-blocks/swig/blocks_swig5.i
index da8048370a..d7d2d7143a 100644
--- a/gr-blocks/swig/blocks_swig5.i
+++ b/gr-blocks/swig/blocks_swig5.i
@@ -39,18 +39,12 @@
 #include "gnuradio/blocks/rms_cf.h"
 #include "gnuradio/blocks/rms_ff.h"
 #include "gnuradio/blocks/rotator_cc.h"
-#include "gnuradio/blocks/sample_and_hold_bb.h"
-#include "gnuradio/blocks/sample_and_hold_ss.h"
-#include "gnuradio/blocks/sample_and_hold_ii.h"
-#include "gnuradio/blocks/sample_and_hold_ff.h"
+#include "gnuradio/blocks/sample_and_hold.h"
 #include "gnuradio/blocks/short_to_char.h"
 #include "gnuradio/blocks/short_to_float.h"
 #include "gnuradio/blocks/socket_pdu.h"
 #include "gnuradio/blocks/stretch_ff.h"
-#include "gnuradio/blocks/sub_ff.h"
-#include "gnuradio/blocks/sub_ss.h"
-#include "gnuradio/blocks/sub_ii.h"
-#include "gnuradio/blocks/sub_cc.h"
+#include "gnuradio/blocks/sub.h"
 %}
 
 %include "gnuradio/blocks/random_pdu.h"
@@ -60,18 +54,12 @@
 %include "gnuradio/blocks/rms_cf.h"
 %include "gnuradio/blocks/rms_ff.h"
 %include "gnuradio/blocks/rotator_cc.h"
-%include "gnuradio/blocks/sample_and_hold_bb.h"
-%include "gnuradio/blocks/sample_and_hold_ss.h"
-%include "gnuradio/blocks/sample_and_hold_ii.h"
-%include "gnuradio/blocks/sample_and_hold_ff.h"
+%include "gnuradio/blocks/sample_and_hold.h"
 %include "gnuradio/blocks/short_to_char.h"
 %include "gnuradio/blocks/short_to_float.h"
 %include "gnuradio/blocks/socket_pdu.h"
 %include "gnuradio/blocks/stretch_ff.h"
-%include "gnuradio/blocks/sub_ff.h"
-%include "gnuradio/blocks/sub_ss.h"
-%include "gnuradio/blocks/sub_ii.h"
-%include "gnuradio/blocks/sub_cc.h"
+%include "gnuradio/blocks/sub.h"
 
 GR_SWIG_BLOCK_MAGIC2(blocks, random_pdu);
 GR_SWIG_BLOCK_MAGIC2(blocks, regenerate_bb);
@@ -80,15 +68,15 @@ GR_SWIG_BLOCK_MAGIC2(blocks, repeat);
 GR_SWIG_BLOCK_MAGIC2(blocks, rms_cf);
 GR_SWIG_BLOCK_MAGIC2(blocks, rms_ff);
 GR_SWIG_BLOCK_MAGIC2(blocks, rotator_cc);
-GR_SWIG_BLOCK_MAGIC2(blocks, sample_and_hold_bb);
-GR_SWIG_BLOCK_MAGIC2(blocks, sample_and_hold_ss);
-GR_SWIG_BLOCK_MAGIC2(blocks, sample_and_hold_ii);
-GR_SWIG_BLOCK_MAGIC2(blocks, sample_and_hold_ff);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, sample_and_hold_bb, sample_and_hold<std::uint8_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, sample_and_hold_ss, sample_and_hold<std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, sample_and_hold_ii, sample_and_hold<std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, sample_and_hold_ff, sample_and_hold<float>);
 GR_SWIG_BLOCK_MAGIC2(blocks, short_to_char);
 GR_SWIG_BLOCK_MAGIC2(blocks, short_to_float);
 GR_SWIG_BLOCK_MAGIC2(blocks, socket_pdu);
 GR_SWIG_BLOCK_MAGIC2(blocks, stretch_ff);
-GR_SWIG_BLOCK_MAGIC2(blocks, sub_ff);
-GR_SWIG_BLOCK_MAGIC2(blocks, sub_ss);
-GR_SWIG_BLOCK_MAGIC2(blocks, sub_ii);
-GR_SWIG_BLOCK_MAGIC2(blocks, sub_cc);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, sub_ff, sub<float>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, sub_ss, sub<std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, sub_ii, sub<std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, sub_cc, sub<gr_complex>);
diff --git a/gr-blocks/swig/blocks_swig6.i b/gr-blocks/swig/blocks_swig6.i
index f4c266814b..38f5c9538e 100644
--- a/gr-blocks/swig/blocks_swig6.i
+++ b/gr-blocks/swig/blocks_swig6.i
@@ -48,14 +48,10 @@
 #include "gnuradio/blocks/udp_source.h"
 #include "gnuradio/blocks/unpack_k_bits.h"
 #include "gnuradio/blocks/unpack_k_bits_bb.h"
-#include "gnuradio/blocks/unpacked_to_packed_bb.h"
-#include "gnuradio/blocks/unpacked_to_packed_ss.h"
-#include "gnuradio/blocks/unpacked_to_packed_ii.h"
+#include "gnuradio/blocks/unpacked_to_packed.h"
 #include "gnuradio/blocks/vco_f.h"
 #include "gnuradio/blocks/vco_c.h"
-#include "gnuradio/blocks/xor_bb.h"
-#include "gnuradio/blocks/xor_ss.h"
-#include "gnuradio/blocks/xor_ii.h"
+#include "gnuradio/blocks/xor_blk.h"
 %}
 
 %include "gnuradio/blocks/tag_gate.h"
@@ -75,14 +71,10 @@
 %include "gnuradio/blocks/udp_source.h"
 %include "gnuradio/blocks/unpack_k_bits.h"
 %include "gnuradio/blocks/unpack_k_bits_bb.h"
-%include "gnuradio/blocks/unpacked_to_packed_bb.h"
-%include "gnuradio/blocks/unpacked_to_packed_ss.h"
-%include "gnuradio/blocks/unpacked_to_packed_ii.h"
+%include "gnuradio/blocks/unpacked_to_packed.h"
 %include "gnuradio/blocks/vco_f.h"
 %include "gnuradio/blocks/vco_c.h"
-%include "gnuradio/blocks/xor_bb.h"
-%include "gnuradio/blocks/xor_ss.h"
-%include "gnuradio/blocks/xor_ii.h"
+%include "gnuradio/blocks/xor_blk.h"
 
 GR_SWIG_BLOCK_MAGIC2(blocks, tag_gate);
 GR_SWIG_BLOCK_MAGIC2(blocks, tag_share);
@@ -100,11 +92,11 @@ GR_SWIG_BLOCK_MAGIC2(blocks, uchar_to_float);
 GR_SWIG_BLOCK_MAGIC2(blocks, udp_sink);
 GR_SWIG_BLOCK_MAGIC2(blocks, udp_source);
 GR_SWIG_BLOCK_MAGIC2(blocks, unpack_k_bits_bb);
-GR_SWIG_BLOCK_MAGIC2(blocks, unpacked_to_packed_bb);
-GR_SWIG_BLOCK_MAGIC2(blocks, unpacked_to_packed_ss);
-GR_SWIG_BLOCK_MAGIC2(blocks, unpacked_to_packed_ii);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, unpacked_to_packed_bb, unpacked_to_packed<std::uint8_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, unpacked_to_packed_ss, unpacked_to_packed<std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, unpacked_to_packed_ii, unpacked_to_packed<std::int32_t>);
 GR_SWIG_BLOCK_MAGIC2(blocks, vco_f);
 GR_SWIG_BLOCK_MAGIC2(blocks, vco_c);
-GR_SWIG_BLOCK_MAGIC2(blocks, xor_bb);
-GR_SWIG_BLOCK_MAGIC2(blocks, xor_ss);
-GR_SWIG_BLOCK_MAGIC2(blocks, xor_ii);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, xor_bb, xor_blk<std::uint8_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, xor_ss, xor_blk<std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, xor_ii, xor_blk<std::int32_t>);
diff --git a/gr-blocks/swig/blocks_swig7.i b/gr-blocks/swig/blocks_swig7.i
index 20ca46dee6..6314873b71 100644
--- a/gr-blocks/swig/blocks_swig7.i
+++ b/gr-blocks/swig/blocks_swig7.i
@@ -32,10 +32,7 @@
 
 %{
 #include "gnuradio/blocks/deinterleave.h"
-#include "gnuradio/blocks/divide_ff.h"
-#include "gnuradio/blocks/divide_ss.h"
-#include "gnuradio/blocks/divide_ii.h"
-#include "gnuradio/blocks/divide_cc.h"
+#include "gnuradio/blocks/divide.h"
 #include "gnuradio/blocks/exponentiate_const_cci.h"
 #include "gnuradio/blocks/skiphead.h"
 #include "gnuradio/blocks/stream_mux.h"
@@ -46,19 +43,12 @@
 #include "gnuradio/blocks/streams_to_vector.h"
 #include "gnuradio/blocks/tag_debug.h"
 #include "gnuradio/blocks/tagged_file_sink.h"
-#include "gnuradio/blocks/tsb_vector_sink_b.h"
-#include "gnuradio/blocks/tsb_vector_sink_c.h"
-#include "gnuradio/blocks/tsb_vector_sink_f.h"
-#include "gnuradio/blocks/tsb_vector_sink_i.h"
-#include "gnuradio/blocks/tsb_vector_sink_s.h"
+#include "gnuradio/blocks/tsb_vector_sink.h"
 #include "gnuradio/blocks/throttle.h"
 %}
 
 %include "gnuradio/blocks/deinterleave.h"
-%include "gnuradio/blocks/divide_ff.h"
-%include "gnuradio/blocks/divide_ss.h"
-%include "gnuradio/blocks/divide_ii.h"
-%include "gnuradio/blocks/divide_cc.h"
+%include "gnuradio/blocks/divide.h"
 %include "gnuradio/blocks/exponentiate_const_cci.h"
 %include "gnuradio/blocks/skiphead.h"
 %include "gnuradio/blocks/stream_mux.h"
@@ -69,18 +59,14 @@
 %include "gnuradio/blocks/streams_to_vector.h"
 %include "gnuradio/blocks/tag_debug.h"
 %include "gnuradio/blocks/tagged_file_sink.h"
-%include "gnuradio/blocks/tsb_vector_sink_b.h"
-%include "gnuradio/blocks/tsb_vector_sink_c.h"
-%include "gnuradio/blocks/tsb_vector_sink_f.h"
-%include "gnuradio/blocks/tsb_vector_sink_i.h"
-%include "gnuradio/blocks/tsb_vector_sink_s.h"
+%include "gnuradio/blocks/tsb_vector_sink.h"
 %include "gnuradio/blocks/throttle.h"
 
 GR_SWIG_BLOCK_MAGIC2(blocks, deinterleave);
-GR_SWIG_BLOCK_MAGIC2(blocks, divide_ff);
-GR_SWIG_BLOCK_MAGIC2(blocks, divide_ss);
-GR_SWIG_BLOCK_MAGIC2(blocks, divide_ii);
-GR_SWIG_BLOCK_MAGIC2(blocks, divide_cc);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, divide_ff, divide<float>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, divide_ss, divide<std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, divide_ii, divide<std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, divide_cc, divide<gr_complex>);
 GR_SWIG_BLOCK_MAGIC2(blocks, exponentiate_const_cci);
 GR_SWIG_BLOCK_MAGIC2(blocks, skiphead);
 GR_SWIG_BLOCK_MAGIC2(blocks, stream_mux);
@@ -91,9 +77,9 @@ GR_SWIG_BLOCK_MAGIC2(blocks, streams_to_stream);
 GR_SWIG_BLOCK_MAGIC2(blocks, streams_to_vector);
 GR_SWIG_BLOCK_MAGIC2(blocks, tag_debug);
 GR_SWIG_BLOCK_MAGIC2(blocks, tagged_file_sink);
-GR_SWIG_BLOCK_MAGIC2(blocks, tsb_vector_sink_b);
-GR_SWIG_BLOCK_MAGIC2(blocks, tsb_vector_sink_c);
-GR_SWIG_BLOCK_MAGIC2(blocks, tsb_vector_sink_f);
-GR_SWIG_BLOCK_MAGIC2(blocks, tsb_vector_sink_i);
-GR_SWIG_BLOCK_MAGIC2(blocks, tsb_vector_sink_s);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, tsb_vector_sink_b, tsb_vector_sink<std::uint8_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, tsb_vector_sink_c, tsb_vector_sink<gr_complex>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, tsb_vector_sink_f, tsb_vector_sink<float>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, tsb_vector_sink_i, tsb_vector_sink<std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, tsb_vector_sink_s, tsb_vector_sink<std::int16_t>);
 GR_SWIG_BLOCK_MAGIC2(blocks, throttle);
diff --git a/gr-blocks/swig/blocks_swig8.i b/gr-blocks/swig/blocks_swig8.i
index 2bf5070bb8..78f6c145df 100644
--- a/gr-blocks/swig/blocks_swig8.i
+++ b/gr-blocks/swig/blocks_swig8.i
@@ -28,66 +28,44 @@
 %include "blocks_swig8_doc.i"
 
 %{
-#include "gnuradio/blocks/abs_ff.h"
-#include "gnuradio/blocks/abs_ss.h"
-#include "gnuradio/blocks/abs_ii.h"
-#include "gnuradio/blocks/add_ff.h"
-#include "gnuradio/blocks/add_ss.h"
-#include "gnuradio/blocks/add_ii.h"
-#include "gnuradio/blocks/add_cc.h"
+#include "gnuradio/blocks/abs_blk.h"
+#include "gnuradio/blocks/add_blk.h"
 #include "gnuradio/blocks/add_const_bb.h"
 #include "gnuradio/blocks/add_const_ff.h"
 #include "gnuradio/blocks/add_const_ss.h"
 #include "gnuradio/blocks/add_const_ii.h"
 #include "gnuradio/blocks/add_const_cc.h"
-#include "gnuradio/blocks/add_const_vbb.h"
-#include "gnuradio/blocks/add_const_vff.h"
-#include "gnuradio/blocks/add_const_vss.h"
-#include "gnuradio/blocks/add_const_vii.h"
-#include "gnuradio/blocks/add_const_vcc.h"
-#include "gnuradio/blocks/and_bb.h"
-#include "gnuradio/blocks/and_ss.h"
-#include "gnuradio/blocks/and_ii.h"
+#include "gnuradio/blocks/add_const_v.h"
+#include "gnuradio/blocks/and_blk.h"
 %}
 
-%include "gnuradio/blocks/abs_ff.h"
-%include "gnuradio/blocks/abs_ss.h"
-%include "gnuradio/blocks/abs_ii.h"
-%include "gnuradio/blocks/add_ff.h"
-%include "gnuradio/blocks/add_ss.h"
-%include "gnuradio/blocks/add_ii.h"
-%include "gnuradio/blocks/add_cc.h"
+%include "gnuradio/blocks/abs_blk.h"
+%include "gnuradio/blocks/add_blk.h"
 %include "gnuradio/blocks/add_const_bb.h"
 %include "gnuradio/blocks/add_const_ff.h"
 %include "gnuradio/blocks/add_const_ss.h"
 %include "gnuradio/blocks/add_const_ii.h"
 %include "gnuradio/blocks/add_const_cc.h"
-%include "gnuradio/blocks/add_const_vbb.h"
-%include "gnuradio/blocks/add_const_vff.h"
-%include "gnuradio/blocks/add_const_vss.h"
-%include "gnuradio/blocks/add_const_vii.h"
-%include "gnuradio/blocks/add_const_vcc.h"
-%include "gnuradio/blocks/and_bb.h"
-%include "gnuradio/blocks/and_ss.h"
-%include "gnuradio/blocks/and_ii.h"
+%include "gnuradio/blocks/add_const_v.h"
+%include "gnuradio/blocks/and_blk.h"
 
-GR_SWIG_BLOCK_MAGIC2(blocks, abs_ff);
-GR_SWIG_BLOCK_MAGIC2(blocks, abs_ss);
-GR_SWIG_BLOCK_MAGIC2(blocks, abs_ii);
-GR_SWIG_BLOCK_MAGIC2(blocks, add_ff);
-GR_SWIG_BLOCK_MAGIC2(blocks, add_ss);
-GR_SWIG_BLOCK_MAGIC2(blocks, add_ii);
-GR_SWIG_BLOCK_MAGIC2(blocks, add_cc);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, abs_ff, abs_blk<float>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, abs_ss, abs_blk<std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, abs_ii, abs_blk<std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, add_ff, add_blk<float>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, add_ss, add_blk<std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, add_ii, add_blk<std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, add_cc, add_blk<gr_complex>);
 GR_SWIG_BLOCK_MAGIC2(blocks, add_const_bb);
 GR_SWIG_BLOCK_MAGIC2(blocks, add_const_ff);
 GR_SWIG_BLOCK_MAGIC2(blocks, add_const_ss);
 GR_SWIG_BLOCK_MAGIC2(blocks, add_const_ii);
 GR_SWIG_BLOCK_MAGIC2(blocks, add_const_cc);
-GR_SWIG_BLOCK_MAGIC2(blocks, add_const_vbb);
-GR_SWIG_BLOCK_MAGIC2(blocks, add_const_vff);
-GR_SWIG_BLOCK_MAGIC2(blocks, add_const_vss);
-GR_SWIG_BLOCK_MAGIC2(blocks, add_const_vii);
-GR_SWIG_BLOCK_MAGIC2(blocks, add_const_vcc);
-GR_SWIG_BLOCK_MAGIC2(blocks, and_bb);
-GR_SWIG_BLOCK_MAGIC2(blocks, and_ss);
-GR_SWIG_BLOCK_MAGIC2(blocks, and_ii);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, add_const_vbb, add_const_v<std::uint8_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, add_const_vff, add_const_v<float>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, add_const_vss, add_const_v<std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, add_const_vii, add_const_v<std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, add_const_vcc, add_const_v<gr_complex>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, and_bb, and_blk<std::uint8_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, and_ss, and_blk<std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, and_ii, and_blk<std::int32_t>);
diff --git a/gr-blocks/swig/blocks_swig9.i b/gr-blocks/swig/blocks_swig9.i
index 872abd9d46..8fecdf5c1b 100644
--- a/gr-blocks/swig/blocks_swig9.i
+++ b/gr-blocks/swig/blocks_swig9.i
@@ -35,19 +35,14 @@
 #include "gnuradio/blocks/float_to_short.h"
 #include "gnuradio/blocks/float_to_uchar.h"
 #include "gnuradio/blocks/int_to_float.h"
-#include "gnuradio/blocks/integrate_ss.h"
-#include "gnuradio/blocks/integrate_ii.h"
-#include "gnuradio/blocks/integrate_ff.h"
-#include "gnuradio/blocks/integrate_cc.h"
+#include "gnuradio/blocks/integrate.h"
 #include "gnuradio/blocks/interleave.h"
 #include "gnuradio/blocks/interleaved_short_to_complex.h"
 #include "gnuradio/blocks/interleaved_char_to_complex.h"
 #include "gnuradio/blocks/keep_m_in_n.h"
 #include "gnuradio/blocks/keep_one_in_n.h"
 #include "gnuradio/blocks/lfsr_32k_source_s.h"
-#include "gnuradio/blocks/max_ff.h"
-#include "gnuradio/blocks/max_ii.h"
-#include "gnuradio/blocks/max_ss.h"
+#include "gnuradio/blocks/max_blk.h"
 %}
 
 %include "gnuradio/blocks/float_to_char.h"
@@ -57,19 +52,14 @@
 %include "gnuradio/blocks/float_to_short.h"
 %include "gnuradio/blocks/float_to_uchar.h"
 %include "gnuradio/blocks/int_to_float.h"
-%include "gnuradio/blocks/integrate_ss.h"
-%include "gnuradio/blocks/integrate_ii.h"
-%include "gnuradio/blocks/integrate_ff.h"
-%include "gnuradio/blocks/integrate_cc.h"
+%include "gnuradio/blocks/integrate.h"
 %include "gnuradio/blocks/interleave.h"
 %include "gnuradio/blocks/interleaved_short_to_complex.h"
 %include "gnuradio/blocks/interleaved_char_to_complex.h"
 %include "gnuradio/blocks/keep_m_in_n.h"
 %include "gnuradio/blocks/keep_one_in_n.h"
 %include "gnuradio/blocks/lfsr_32k_source_s.h"
-%include "gnuradio/blocks/max_ff.h"
-%include "gnuradio/blocks/max_ii.h"
-%include "gnuradio/blocks/max_ss.h"
+%include "gnuradio/blocks/max_blk.h"
 
 GR_SWIG_BLOCK_MAGIC2(blocks, float_to_char);
 GR_SWIG_BLOCK_MAGIC2(blocks, float_to_complex);
@@ -78,16 +68,16 @@ GR_SWIG_BLOCK_MAGIC2(blocks, float_to_int);
 GR_SWIG_BLOCK_MAGIC2(blocks, float_to_short);
 GR_SWIG_BLOCK_MAGIC2(blocks, float_to_uchar);
 GR_SWIG_BLOCK_MAGIC2(blocks, int_to_float);
-GR_SWIG_BLOCK_MAGIC2(blocks, integrate_ss);
-GR_SWIG_BLOCK_MAGIC2(blocks, integrate_ii);
-GR_SWIG_BLOCK_MAGIC2(blocks, integrate_ff);
-GR_SWIG_BLOCK_MAGIC2(blocks, integrate_cc);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, integrate_ss, integrate<std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, integrate_ii, integrate<std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, integrate_ff, integrate<float>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, integrate_cc, integrate<gr_complex>);
 GR_SWIG_BLOCK_MAGIC2(blocks, interleave);
 GR_SWIG_BLOCK_MAGIC2(blocks, interleaved_short_to_complex);
 GR_SWIG_BLOCK_MAGIC2(blocks, interleaved_char_to_complex);
 GR_SWIG_BLOCK_MAGIC2(blocks, keep_m_in_n);
 GR_SWIG_BLOCK_MAGIC2(blocks, keep_one_in_n);
 GR_SWIG_BLOCK_MAGIC2(blocks, lfsr_32k_source_s);
-GR_SWIG_BLOCK_MAGIC2(blocks, max_ff);
-GR_SWIG_BLOCK_MAGIC2(blocks, max_ii);
-GR_SWIG_BLOCK_MAGIC2(blocks, max_ss);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, max_ff, max_blk<float>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, max_ii, max_blk<std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(blocks, max_ss, max_blk<std::int16_t>);
diff --git a/gr-channels/lib/channel_model2_impl.h b/gr-channels/lib/channel_model2_impl.h
index 50f489f05e..730880526e 100644
--- a/gr-channels/lib/channel_model2_impl.h
+++ b/gr-channels/lib/channel_model2_impl.h
@@ -30,7 +30,7 @@
 #include <gnuradio/analog/sig_source_c.h>
 #include <gnuradio/analog/fastnoise_source_c.h>
 #include <gnuradio/filter/mmse_resampler_cc.h>
-#include <gnuradio/filter/fir_filter_ccc.h>
+#include <gnuradio/filter/fir_filter_blk.h>
 #include <gnuradio/blocks/vco_c.h>
 
 namespace gr {
diff --git a/gr-channels/lib/channel_model_impl.h b/gr-channels/lib/channel_model_impl.h
index 7376bf372d..aae77457b2 100644
--- a/gr-channels/lib/channel_model_impl.h
+++ b/gr-channels/lib/channel_model_impl.h
@@ -30,7 +30,7 @@
 #include <gnuradio/analog/fastnoise_source_c.h>
 #include <gnuradio/channels/channel_model.h>
 #include <gnuradio/filter/mmse_resampler_cc.h>
-#include <gnuradio/filter/fir_filter_ccc.h>
+#include <gnuradio/filter/fir_filter_blk.h>
 
 namespace gr {
   namespace channels {
diff --git a/gr-channels/lib/dynamic_channel_model_impl.h b/gr-channels/lib/dynamic_channel_model_impl.h
index c0be94aac3..52696425b1 100644
--- a/gr-channels/lib/dynamic_channel_model_impl.h
+++ b/gr-channels/lib/dynamic_channel_model_impl.h
@@ -33,7 +33,7 @@
 #include <gnuradio/channels/sro_model.h>
 #include <gnuradio/channels/cfo_model.h>
 #include <gnuradio/filter/mmse_resampler_cc.h>
-#include <gnuradio/filter/fir_filter_ccc.h>
+#include <gnuradio/filter/fir_filter_blk.h>
 
 namespace gr {
   namespace channels {
diff --git a/gr-digital/lib/modulate_vector.cc b/gr-digital/lib/modulate_vector.cc
index c6ba0f61aa..4ef6e804ae 100644
--- a/gr-digital/lib/modulate_vector.cc
+++ b/gr-digital/lib/modulate_vector.cc
@@ -40,8 +40,8 @@
 #include "config.h"
 #endif
 
-#include <gnuradio/blocks/vector_source_b.h>
-#include <gnuradio/blocks/vector_sink_c.h>
+#include <gnuradio/blocks/vector_source.h>
+#include <gnuradio/blocks/vector_sink.h>
 #include <gnuradio/filter/fir_filter_ccf.h>
 #include <gnuradio/top_block.h>
 #include <gnuradio/digital/modulate_vector.h>
diff --git a/gr-digital/lib/ofdm_sync_sc_cfb_impl.cc b/gr-digital/lib/ofdm_sync_sc_cfb_impl.cc
index 9b3e9687bc..4c5bad14e1 100644
--- a/gr-digital/lib/ofdm_sync_sc_cfb_impl.cc
+++ b/gr-digital/lib/ofdm_sync_sc_cfb_impl.cc
@@ -1,19 +1,19 @@
 /* -*- c++ -*- */
-/* 
+/*
  * Copyright 2013 Free Software Foundation, Inc.
- * 
+ *
  * This file is part of GNU Radio
- * 
+ *
  * GNU Radio is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 3, or (at your option)
  * any later version.
- * 
+ *
  * GNU Radio is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with GNU Radio; see the file COPYING.  If not, write to
  * the Free Software Foundation, Inc., 51 Franklin Street,
@@ -32,10 +32,9 @@
 #include <gnuradio/blocks/complex_to_mag_squared.h>
 #include <gnuradio/blocks/conjugate_cc.h>
 #include <gnuradio/blocks/delay.h>
-#include <gnuradio/blocks/divide_ff.h>
-#include <gnuradio/blocks/multiply_cc.h>
-#include <gnuradio/blocks/multiply_ff.h>
-#include <gnuradio/blocks/sample_and_hold_ff.h>
+#include <gnuradio/blocks/divide.h>
+#include <gnuradio/blocks/multiply.h>
+#include <gnuradio/blocks/sample_and_hold.h>
 #include <gnuradio/filter/fir_filter_ccf.h>
 #include <gnuradio/filter/fir_filter_fff.h>
 
@@ -108,4 +107,3 @@ namespace gr {
 
   } /* namespace digital */
 } /* namespace gr */
-
-- 
cgit v1.2.3


From c70c0a4cb7f84e7047ffe717b99da6be3c0c72df Mon Sep 17 00:00:00 2001
From: Andrej Rode <mail@andrejro.de>
Date: Tue, 21 Aug 2018 14:34:46 +0200
Subject: digital: replace gengen with C++ templates

---
 docs/doxygen/CMakeLists.txt                        |   4 -
 gr-digital/include/gnuradio/digital/CMakeLists.txt |  14 +-
 gr-digital/include/gnuradio/digital/burst_shaper.h | 123 ++++++
 .../include/gnuradio/digital/burst_shaper_XX.h.t   | 123 ------
 .../include/gnuradio/digital/chunks_to_symbols.h   |  82 ++++
 .../gnuradio/digital/chunks_to_symbols_XX.h.t      |  77 ----
 gr-digital/lib/CMakeLists.txt                      |  12 +-
 gr-digital/lib/burst_shaper_XX_impl.cc.t           | 379 ------------------
 gr-digital/lib/burst_shaper_XX_impl.h.t            |  90 -----
 gr-digital/lib/burst_shaper_impl.cc                | 424 +++++++++++++++++++++
 gr-digital/lib/burst_shaper_impl.h                 |  89 +++++
 gr-digital/lib/chunks_to_symbols_XX_impl.cc.t      | 133 -------
 gr-digital/lib/chunks_to_symbols_XX_impl.h.t       |  63 ---
 gr-digital/lib/chunks_to_symbols_impl.cc           | 145 +++++++
 gr-digital/lib/chunks_to_symbols_impl.h            |  62 +++
 gr-digital/swig/CMakeLists.txt                     |   1 -
 gr-digital/swig/digital_swig1.i                    |  36 +-
 17 files changed, 941 insertions(+), 916 deletions(-)
 create mode 100644 gr-digital/include/gnuradio/digital/burst_shaper.h
 delete mode 100644 gr-digital/include/gnuradio/digital/burst_shaper_XX.h.t
 create mode 100644 gr-digital/include/gnuradio/digital/chunks_to_symbols.h
 delete mode 100644 gr-digital/include/gnuradio/digital/chunks_to_symbols_XX.h.t
 delete mode 100644 gr-digital/lib/burst_shaper_XX_impl.cc.t
 delete mode 100644 gr-digital/lib/burst_shaper_XX_impl.h.t
 create mode 100644 gr-digital/lib/burst_shaper_impl.cc
 create mode 100644 gr-digital/lib/burst_shaper_impl.h
 delete mode 100644 gr-digital/lib/chunks_to_symbols_XX_impl.cc.t
 delete mode 100644 gr-digital/lib/chunks_to_symbols_XX_impl.h.t
 create mode 100644 gr-digital/lib/chunks_to_symbols_impl.cc
 create mode 100644 gr-digital/lib/chunks_to_symbols_impl.h

(limited to 'docs/doxygen')

diff --git a/docs/doxygen/CMakeLists.txt b/docs/doxygen/CMakeLists.txt
index c6d9cf92d0..b0b3c0f460 100644
--- a/docs/doxygen/CMakeLists.txt
+++ b/docs/doxygen/CMakeLists.txt
@@ -45,10 +45,6 @@ if(ENABLE_GNURADIO_RUNTIME)
   list(APPEND GENERATED_DEPS pmt_generated)
 endif(ENABLE_GNURADIO_RUNTIME)
 
-if(ENABLE_GR_DIGITAL)
-  list(APPEND GENERATED_DEPS digital_generated_includes)
-endif(ENABLE_GR_DIGITAL)
-
 if(ENABLE_GR_FILTER)
   list(APPEND GENERATED_DEPS filter_generated_includes)
 endif(ENABLE_GR_FILTER)
diff --git a/gr-digital/include/gnuradio/digital/CMakeLists.txt b/gr-digital/include/gnuradio/digital/CMakeLists.txt
index cdaf48080b..af7a20eda5 100644
--- a/gr-digital/include/gnuradio/digital/CMakeLists.txt
+++ b/gr-digital/include/gnuradio/digital/CMakeLists.txt
@@ -17,25 +17,15 @@
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
 
-########################################################################
-# Invoke macro to generate various headers
-#######################################################################
-include(GrMiscUtils)
-GR_EXPAND_X_H(digital chunks_to_symbols_XX     bf bc sf sc if ic)
-GR_EXPAND_X_H(digital burst_shaper_XX     cc ff)
-
-add_custom_target(digital_generated_includes DEPENDS
-    ${generated_includes}
-)
-
 ########################################################################
 # Install header files
 ########################################################################
 install(FILES
-    ${generated_includes}
     additive_scrambler_bb.h
     api.h
     binary_slicer_fb.h
+    burst_shaper.h
+    chunks_to_symbols.h
     clock_recovery_mm_cc.h
     clock_recovery_mm_ff.h
     cma_equalizer_cc.h
diff --git a/gr-digital/include/gnuradio/digital/burst_shaper.h b/gr-digital/include/gnuradio/digital/burst_shaper.h
new file mode 100644
index 0000000000..25277595b3
--- /dev/null
+++ b/gr-digital/include/gnuradio/digital/burst_shaper.h
@@ -0,0 +1,123 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef BURST_SHAPER_H
+#define BURST_SHAPER_H
+
+#include <gnuradio/digital/api.h>
+#include <gnuradio/block.h>
+
+namespace gr {
+  namespace digital {
+
+    /*!
+     * \brief Burst shaper block for applying burst padding and ramping.
+     * \ingroup packet_operators_blk
+     *
+     * \details
+     *
+     * This block applies a configurable amount of zero padding before
+     * and/or after a burst indicated by tagged stream length tags.
+     *
+     * If phasing symbols are used, an alternating pattern of +1/-1
+     * symbols of length ceil(N/2) will be inserted before and after
+     * each burst, where N is the length of the taps vector. The ramp-
+     * up/ramp-down shape will be applied to these phasing symbols.
+     *
+     * If phasing symbols are not used, the taper will be applied
+     * directly to the head and tail of each burst.
+     *
+     * Length tags will be updated to include the length of any added
+     * zero padding or phasing symbols and will be placed at the
+     * beginning of the modified tagged stream. Any other tags found at
+     * the same offset as a length tag will also be placed at the
+     * beginning of the modified tagged stream, since these tags are
+     * assumed to be associated with the burst rather than a specific
+     * sample. For example, if "tx_time" tags are used to control
+     * bursts, their offsets should be consistent with their associated
+     * burst's length tags. Tags at other offsets will be placed with
+     * the samples on which they were found.
+     *
+     * \li input: stream of T
+     * \li output: stream of T
+     */
+    template <class T>
+    class DIGITAL_API burst_shaper : virtual public block
+    {
+    public:
+      typedef boost::shared_ptr< burst_shaper<T> > sptr;
+
+      /*!
+       * Make a burst shaper block.
+       *
+       * \param taps: vector of window taper taps; the first ceil(N/2)
+       *              items are the up flank and the last ceil(N/2)
+       *              items are the down flank. If taps.size() is odd,
+       *              the middle tap will be used as the last item of
+       *              the up flank and first item of the down flank.
+       * \param pre_padding: number of zero samples to insert before
+       *                     the burst.
+       * \param post_padding: number of zero samples to append after
+       *                      the burst.
+       * \param insert_phasing: if true, insert alternating +1/-1
+       *                        pattern of length ceil(N/2) before and
+       *                        after the burst and apply ramp up and
+       *                        ramp down taps, respectively, to the
+       *                        inserted patterns instead of the head
+       *                        and tail items of the burst.
+       * \param length_tag_name: the name of the tagged stream length
+       *                         tag key.
+       */
+      static sptr make(const std::vector<T> &taps,
+                       int pre_padding=0, int post_padding=0,
+                       bool insert_phasing=false,
+                       const std::string &length_tag_name="packet_len");
+
+      /*!
+       * Returns the amount of zero padding inserted before each burst.
+       */
+      virtual int pre_padding() const = 0;
+
+      /*!
+       * Returns the amount of zero padding inserted after each burst.
+       */
+      virtual int post_padding() const = 0;
+
+      /*!
+       * Returns the total amount of zero padding and phasing symbols
+       * inserted before each burst.
+       */
+      virtual int prefix_length() const = 0;
+
+      /*!
+       * Returns the total amount of zero padding and phasing symbols
+       * inserted after each burst.
+       */
+      virtual int suffix_length() const = 0;
+    };
+
+    typedef burst_shaper<float> burst_shaper_ff;
+    typedef burst_shaper<gr_complex> burst_shaper_cc;
+  } // namespace digital
+} // namespace gr
+
+#endif /* BURST_SHAPER_H */
diff --git a/gr-digital/include/gnuradio/digital/burst_shaper_XX.h.t b/gr-digital/include/gnuradio/digital/burst_shaper_XX.h.t
deleted file mode 100644
index fd7b69060e..0000000000
--- a/gr-digital/include/gnuradio/digital/burst_shaper_XX.h.t
+++ /dev/null
@@ -1,123 +0,0 @@
-/* -*- c++ -*- */
-/* 
- * Copyright 2015 Free Software Foundation, Inc.
- * 
- * This file is part of GNU Radio
- * 
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- * 
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-/* @WARNING@ */
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/digital/api.h>
-#include <gnuradio/block.h>
-
-namespace gr {
-  namespace digital {
-
-    /*!
-     * \brief Burst shaper block for applying burst padding and ramping.
-     * \ingroup packet_operators_blk
-     *
-     * \details
-     *
-     * This block applies a configurable amount of zero padding before
-     * and/or after a burst indicated by tagged stream length tags.
-     *
-     * If phasing symbols are used, an alternating pattern of +1/-1
-     * symbols of length ceil(N/2) will be inserted before and after
-     * each burst, where N is the length of the taps vector. The ramp-
-     * up/ramp-down shape will be applied to these phasing symbols.
-     *
-     * If phasing symbols are not used, the taper will be applied
-     * directly to the head and tail of each burst.
-     *
-     * Length tags will be updated to include the length of any added
-     * zero padding or phasing symbols and will be placed at the
-     * beginning of the modified tagged stream. Any other tags found at
-     * the same offset as a length tag will also be placed at the
-     * beginning of the modified tagged stream, since these tags are
-     * assumed to be associated with the burst rather than a specific
-     * sample. For example, if "tx_time" tags are used to control
-     * bursts, their offsets should be consistent with their associated
-     * burst's length tags. Tags at other offsets will be placed with
-     * the samples on which they were found.
-     *
-     * \li input: stream of @I_TYPE@
-     * \li output: stream of @O_TYPE@
-     */
-    class DIGITAL_API @NAME@ : virtual public block
-    {
-    public:
-      // gr::digital::@BASE_NAME@::sptr
-      typedef boost::shared_ptr<@BASE_NAME@> sptr;
-
-      /*!
-       * Make a burst shaper block.
-       *
-       * \param taps: vector of window taper taps; the first ceil(N/2)
-       *              items are the up flank and the last ceil(N/2)
-       *              items are the down flank. If taps.size() is odd,
-       *              the middle tap will be used as the last item of
-       *              the up flank and first item of the down flank.
-       * \param pre_padding: number of zero samples to insert before
-       *                     the burst.
-       * \param post_padding: number of zero samples to append after
-       *                      the burst.
-       * \param insert_phasing: if true, insert alternating +1/-1
-       *                        pattern of length ceil(N/2) before and
-       *                        after the burst and apply ramp up and
-       *                        ramp down taps, respectively, to the
-       *                        inserted patterns instead of the head
-       *                        and tail items of the burst.
-       * \param length_tag_name: the name of the tagged stream length
-       *                         tag key.
-       */
-      static sptr make(const std::vector<@O_TYPE@> &taps,
-                       int pre_padding=0, int post_padding=0,
-                       bool insert_phasing=false,
-                       const std::string &length_tag_name="packet_len");
-
-      /*!
-       * Returns the amount of zero padding inserted before each burst.
-       */
-      virtual int pre_padding() const = 0;
-
-      /*!
-       * Returns the amount of zero padding inserted after each burst.
-       */
-      virtual int post_padding() const = 0;
-
-      /*!
-       * Returns the total amount of zero padding and phasing symbols
-       * inserted before each burst.
-       */
-      virtual int prefix_length() const = 0;
-
-      /*!
-       * Returns the total amount of zero padding and phasing symbols
-       * inserted after each burst.
-       */
-      virtual int suffix_length() const = 0;
-    };
-
-  } // namespace digital
-} // namespace gr
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-digital/include/gnuradio/digital/chunks_to_symbols.h b/gr-digital/include/gnuradio/digital/chunks_to_symbols.h
new file mode 100644
index 0000000000..f7cdd45352
--- /dev/null
+++ b/gr-digital/include/gnuradio/digital/chunks_to_symbols.h
@@ -0,0 +1,82 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef CHUNKS_TO_SYMBOLS_H
+#define CHUNKS_TO_SYMBOLS_H
+
+#include <gnuradio/digital/api.h>
+#include <gnuradio/sync_interpolator.h>
+#include <cstdint>
+
+namespace gr {
+  namespace digital {
+
+    /*!
+     * \brief Map a stream of unpacked symbol indexes to stream of
+     * float or complex constellation points in D dimensions (D = 1 by
+     * default) \ingroup converter_blk
+     *
+     * \details
+     * \li input: stream of IN_T
+     * \li output: stream of OUT_T
+     *
+     * \li out[n D + k] = symbol_table[in[n] D + k], k=0,1,...,D-1
+     *
+     * The combination of gr::blocks::packed_to_unpacked_XX followed
+     * by gr::digital::chunks_to_symbols_XY handles the general case
+     * of mapping from a stream of bytes or shorts into arbitrary
+     * float or complex symbols.
+     *
+     * \sa gr::blocks::packed_to_unpacked_bb, gr::blocks::unpacked_to_packed_bb,
+     * \sa gr::blocks::packed_to_unpacked_ss, gr::blocks::unpacked_to_packed_ss,
+     * \sa gr::digital::chunks_to_symbols_bf, gr::digital::chunks_to_symbols_bc.
+     * \sa gr::digital::chunks_to_symbols_sf, gr::digital::chunks_to_symbols_sc.
+     */
+    template <class IN_T, class OUT_T>
+    class DIGITAL_API chunks_to_symbols : virtual public sync_interpolator
+    {
+    public:
+      typedef boost::shared_ptr< chunks_to_symbols<IN_T,OUT_T> > sptr;
+
+      /*!
+       * Make a chunks-to-symbols block.
+       *
+       * \param symbol_table: list that maps chunks to symbols.
+       * \param D: dimension of table.
+       */
+      static sptr make(const std::vector<OUT_T> &symbol_table, const int D = 1);
+
+      virtual int D() const = 0;
+      virtual std::vector<OUT_T> symbol_table() const = 0;
+      virtual void set_symbol_table(const std::vector<OUT_T> &symbol_table) =0;
+    };
+
+    typedef chunks_to_symbols<std::uint8_t, float> chunks_to_symbols_bf;
+    typedef chunks_to_symbols<std::uint8_t, gr_complex> chunks_to_symbols_bc;
+    typedef chunks_to_symbols<std::int16_t, float> chunks_to_symbols_sf;
+    typedef chunks_to_symbols<std::int16_t, gr_complex> chunks_to_symbols_sc;
+    typedef chunks_to_symbols<std::int32_t, float> chunks_to_symbols_if;
+    typedef chunks_to_symbols<std::int32_t, gr_complex> chunks_to_symbols_ic;
+  } /* namespace digital */
+} /* namespace gr */
+
+#endif /* CHUNKS_TO_SYMBOLS_H */
diff --git a/gr-digital/include/gnuradio/digital/chunks_to_symbols_XX.h.t b/gr-digital/include/gnuradio/digital/chunks_to_symbols_XX.h.t
deleted file mode 100644
index 6683ea94fc..0000000000
--- a/gr-digital/include/gnuradio/digital/chunks_to_symbols_XX.h.t
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-/* @WARNING@ */
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/digital/api.h>
-#include <gnuradio/sync_interpolator.h>
-
-namespace gr {
-  namespace digital {
-    
-    /*!
-     * \brief Map a stream of unpacked symbol indexes to stream of
-     * float or complex constellation points in D dimensions (D = 1 by
-     * default) \ingroup converter_blk
-     *
-     * \details
-     * \li input: stream of @I_TYPE@
-     * \li output: stream of @O_TYPE@
-     *
-     * \li out[n D + k] = symbol_table[in[n] D + k], k=0,1,...,D-1
-     *
-     * The combination of gr::blocks::packed_to_unpacked_XX followed
-     * by gr::digital::chunks_to_symbols_XY handles the general case
-     * of mapping from a stream of bytes or shorts into arbitrary
-     * float or complex symbols.
-     *
-     * \sa gr::blocks::packed_to_unpacked_bb, gr::blocks::unpacked_to_packed_bb,
-     * \sa gr::blocks::packed_to_unpacked_ss, gr::blocks::unpacked_to_packed_ss,
-     * \sa gr::digital::chunks_to_symbols_bf, gr::digital::chunks_to_symbols_bc.
-     * \sa gr::digital::chunks_to_symbols_sf, gr::digital::chunks_to_symbols_sc.
-     */
-    class DIGITAL_API @NAME@ : virtual public sync_interpolator
-    {
-    public:
-      // gr::digital::@BASE_NAME@::sptr
-      typedef boost::shared_ptr<@BASE_NAME@> sptr;
-
-      /*!
-       * Make a chunks-to-symbols block.
-       *
-       * \param symbol_table: list that maps chunks to symbols.
-       * \param D: dimension of table.
-       */
-      static sptr make(const std::vector<@O_TYPE@> &symbol_table, const int D = 1);
-
-      virtual int D() const = 0;
-      virtual std::vector<@O_TYPE@> symbol_table() const = 0;
-      virtual void set_symbol_table(const std::vector<@O_TYPE@> &symbol_table) =0;
-    };
-
-  } /* namespace digital */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-digital/lib/CMakeLists.txt b/gr-digital/lib/CMakeLists.txt
index f19d037171..cfcee3012c 100644
--- a/gr-digital/lib/CMakeLists.txt
+++ b/gr-digital/lib/CMakeLists.txt
@@ -38,20 +38,14 @@ if(ENABLE_GR_CTRLPORT)
   ADD_DEFINITIONS(-DGR_CTRLPORT)
 endif(ENABLE_GR_CTRLPORT)
 
-########################################################################
-# Invoke macro to generate various sources
-########################################################################
-include(GrMiscUtils)
-GR_EXPAND_X_CC_H(digital chunks_to_symbols_XX_impl     bf bc sf sc if ic)
-GR_EXPAND_X_CC_H(digital burst_shaper_XX_impl     cc ff)
-
 ########################################################################
 # Setup library
 ########################################################################
 list(APPEND digital_sources
-    ${generated_sources}
     additive_scrambler_bb_impl.cc
     binary_slicer_fb_impl.cc
+    burst_shaper_impl.cc
+    chunks_to_symbols_impl.cc
     clock_recovery_mm_cc_impl.cc
     clock_recovery_mm_ff_impl.cc
     clock_tracking_loop.cc
@@ -156,7 +150,6 @@ GR_LIBRARY_FOO(gnuradio-digital)
 
 add_dependencies(
     gnuradio-digital
-    digital_generated_includes
     digital_generated_swigs
     gnuradio-runtime
     gnuradio-filter
@@ -179,7 +172,6 @@ if(ENABLE_STATIC_LIBS)
   add_library(gnuradio-digital_static STATIC ${digital_sources})
 
   add_dependencies(gnuradio-digital_static
-    digital_generated_includes
     gnuradio-runtime_static
     gnuradio-filter_static
     gnuradio-analog_static
diff --git a/gr-digital/lib/burst_shaper_XX_impl.cc.t b/gr-digital/lib/burst_shaper_XX_impl.cc.t
deleted file mode 100644
index 0a60696b8e..0000000000
--- a/gr-digital/lib/burst_shaper_XX_impl.cc.t
+++ /dev/null
@@ -1,379 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2015 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-/* @WARNING@ */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <boost/format.hpp>
-#include <gnuradio/io_signature.h>
-#include <volk/volk.h>
-#include "@IMPL_NAME@.h"
-
-#ifndef VOLK_MULT_gr_complex
-#define VOLK_MULT_gr_complex volk_32fc_x2_multiply_32fc
-#endif
-#ifndef VOLK_MULT_float
-#define VOLK_MULT_float volk_32f_x2_multiply_32f
-#endif
-
-namespace gr {
-  namespace digital {
-
-    @BASE_NAME@::sptr
-    @BASE_NAME@::make(const std::vector<@I_TYPE@> &taps,
-                      int pre_padding, int post_padding,
-                      bool insert_phasing,
-                      const std::string &length_tag_name)
-    {
-      return gnuradio::get_initial_sptr
-        (new @IMPL_NAME@(taps, pre_padding, post_padding,
-                         insert_phasing, length_tag_name));
-    }
-
-    @IMPL_NAME@::@IMPL_NAME@(const std::vector<@I_TYPE@> &taps,
-                             int pre_padding, int post_padding,
-                             bool insert_phasing,
-                             const std::string &length_tag_name)
-      : gr::block("@BASE_NAME@",
-              gr::io_signature::make(1, 1, sizeof(@I_TYPE@)),
-              gr::io_signature::make(1, 1, sizeof(@O_TYPE@))),
-        d_up_ramp(taps.begin(), taps.begin() + taps.size()/2 + taps.size()%2),
-        d_down_ramp(taps.begin() + taps.size()/2, taps.end()),
-        d_nprepad(pre_padding),
-        d_npostpad(post_padding),
-        d_insert_phasing(insert_phasing),
-        d_length_tag_key(pmt::string_to_symbol(length_tag_name)),
-        d_ncopy(0),
-        d_limit(0),
-        d_index(0),
-        d_length_tag_offset(0),
-        d_finished(false),
-        d_state(STATE_WAIT)
-    {
-        assert(d_up_ramp.size() == d_down_ramp.size());
-
-        d_up_phasing.resize(d_up_ramp.size());
-        d_down_phasing.resize(d_down_ramp.size());
-
-        @I_TYPE@ symbol;
-        for(unsigned int i = 0; i < d_up_ramp.size(); i++) {
-            symbol = (i%2 == 0) ? @I_TYPE@(1.0f) : @I_TYPE@(-1.0f);
-            d_up_phasing[i] = symbol * d_up_ramp[i];
-            d_down_phasing[i] = symbol * d_down_ramp[i];
-        }
-
-        //set_relative_rate(1.0);
-        set_tag_propagation_policy(TPP_DONT);
-    }
-
-    @IMPL_NAME@::~@IMPL_NAME@()
-    {
-    }
-
-    void
-    @IMPL_NAME@::forecast(int noutput_items,
-                          gr_vector_int &ninput_items_required)
-    {
-      switch(d_state) {
-      case(STATE_RAMPDOWN):
-        // If inserting phasing; we don't need any input
-        if(d_insert_phasing) {
-          ninput_items_required[0] = 0;
-        }
-        else {
-          ninput_items_required[0] = noutput_items;
-        }
-        break;
-      case(STATE_POSTPAD):
-        // Padding 0's requires no input
-        ninput_items_required[0] = 0;
-        break;
-      default:
-        ninput_items_required[0] = noutput_items;
-      }
-    }
-
-    int
-    @IMPL_NAME@::general_work(int noutput_items,
-                      gr_vector_int &ninput_items,
-                      gr_vector_const_void_star &input_items,
-                      gr_vector_void_star &output_items)
-    {
-        const @I_TYPE@ *in = reinterpret_cast<const @I_TYPE@ *>(input_items[0]);
-        @O_TYPE@ *out = reinterpret_cast<@O_TYPE@ *>(output_items[0]);
-
-        int nwritten = 0;
-        int nread = 0;
-        int nspace = 0;
-        int nskip = 0;
-        int curr_tag_index = 0;
-
-        std::vector<tag_t> length_tags;
-        get_tags_in_window(length_tags, 0, 0, ninput_items[0], d_length_tag_key);
-        std::sort(length_tags.rbegin(), length_tags.rend(), tag_t::offset_compare);
-
-        while(nwritten < noutput_items) {
-            // Only check the nread condition if we are actually reading
-            // from the input stream.
-            if(((d_state != STATE_RAMPDOWN) && (d_state != STATE_POSTPAD)) ||
-               ((d_state == STATE_RAMPDOWN) && !d_insert_phasing))
-              {
-                if(nread >= ninput_items[0]) {
-                    break;
-                }
-            }
-
-            if(d_finished) {
-                d_finished = false;
-                break;
-            }
-            nspace = noutput_items - nwritten;
-            switch(d_state) {
-                case(STATE_WAIT):
-                    if(!length_tags.empty()) {
-                        d_length_tag_offset = length_tags.back().offset;
-                        curr_tag_index = (int)(d_length_tag_offset - nitems_read(0));
-                        d_ncopy = pmt::to_long(length_tags.back().value);
-                        length_tags.pop_back();
-                        nskip = curr_tag_index - nread;
-                        add_length_tag(nwritten);
-                        propagate_tags(curr_tag_index, nwritten, 1, false);
-                        enter_prepad();
-                    }
-                    else {
-                        nskip = ninput_items[0] - nread;
-                    }
-                    if(nskip > 0) {
-                        GR_LOG_WARN(d_logger,
-                                    boost::format("Dropping %1% samples") %
-                                    nskip);
-                        nread += nskip;
-                        in += nskip;
-                    }
-                    break;
-
-                case(STATE_PREPAD):
-                    write_padding(out, nwritten, nspace);
-                    if(d_index == d_limit)
-                        enter_rampup();
-                    break;
-
-                case(STATE_RAMPUP):
-                    apply_ramp(out, in, nwritten, nread, nspace);
-                    if(d_index == d_limit)
-                        enter_copy();
-                    break;
-
-                case(STATE_COPY):
-                    copy_items(out, in, nwritten, nread, nspace);
-                    if(d_index == d_limit)
-                        enter_rampdown();
-                    break;
-
-                case(STATE_RAMPDOWN):
-                    apply_ramp(out, in, nwritten, nread, nspace);
-                    if(d_index == d_limit)
-                        enter_postpad();
-                    break;
-
-                case(STATE_POSTPAD):
-                    write_padding(out, nwritten, nspace);
-                    if(d_index == d_limit)
-                        enter_wait();
-                    break;
-
-                default:
-                    throw std::runtime_error("@BASE_NAME@: invalid state");
-            }
-        }
-
-        consume_each(nread);
-
-        return nwritten;
-    }
-
-    int
-    @IMPL_NAME@::prefix_length() const
-    {
-        return (d_insert_phasing) ?
-               d_nprepad + d_up_ramp.size() : d_nprepad;
-    }
-
-    int
-    @IMPL_NAME@::suffix_length() const
-    {
-        return (d_insert_phasing) ?
-               d_npostpad + d_down_ramp.size() : d_npostpad;
-    }
-
-    void
-    @IMPL_NAME@::write_padding(@O_TYPE@ *&dst, int &nwritten, int nspace)
-    {
-        int nprocess = std::min(d_limit - d_index, nspace);
-        std::memset(dst, 0x00, nprocess * sizeof(@O_TYPE@));
-        dst += nprocess;
-        nwritten += nprocess;
-        d_index += nprocess;
-    }
-
-    void
-    @IMPL_NAME@::copy_items(@O_TYPE@ *&dst, const @I_TYPE@ *&src, int &nwritten,
-                            int &nread, int nspace)
-    {
-        int nprocess = std::min(d_limit - d_index, nspace);
-        propagate_tags(nread, nwritten, nprocess);
-        std::memcpy(dst, src, nprocess * sizeof(@O_TYPE@));
-        dst += nprocess;
-        nwritten += nprocess;
-        src += nprocess;
-        nread += nprocess;
-        d_index += nprocess;
-    }
-
-    void
-    @IMPL_NAME@::apply_ramp(@O_TYPE@ *&dst, const @I_TYPE@ *&src, int &nwritten,
-                            int &nread, int nspace)
-    {
-        int nprocess = std::min(d_limit - d_index, nspace);
-        @O_TYPE@ *phasing;
-        const @O_TYPE@ *ramp;
-
-        if(d_state == STATE_RAMPUP) {
-            phasing = &d_up_phasing[d_index];
-            ramp = &d_up_ramp[d_index];
-        }
-        else {
-            phasing = &d_down_phasing[d_index];
-            ramp = &d_down_ramp[d_index];
-        }
-
-        if(d_insert_phasing)
-            std::memcpy(dst, phasing, nprocess * sizeof(@O_TYPE@));
-        else {
-            propagate_tags(nread, nwritten, nprocess);
-            VOLK_MULT_@O_TYPE@(dst, src, ramp, nprocess);
-            src += nprocess;
-            nread += nprocess;
-        }
-
-        dst += nprocess;
-        nwritten += nprocess;
-        d_index += nprocess;
-    }
-
-    void
-    @IMPL_NAME@::add_length_tag(int offset)
-    {
-        add_item_tag(0, nitems_written(0) + offset, d_length_tag_key,
-                     pmt::from_long(d_ncopy + prefix_length() +
-                                    suffix_length()),
-                     pmt::string_to_symbol(name()));
-    }
-
-    void
-    @IMPL_NAME@::propagate_tags(int in_offset, int out_offset, int count, bool skip)
-    {
-        uint64_t abs_start = nitems_read(0) + in_offset;
-        uint64_t abs_end = abs_start + count;
-        uint64_t abs_offset = nitems_written(0) + out_offset;
-        tag_t temp_tag;
-
-        std::vector<tag_t> tags;
-        std::vector<tag_t>::iterator it;
-
-        get_tags_in_range(tags, 0, abs_start, abs_end);
-
-        for(it = tags.begin(); it != tags.end(); it++) {
-            if(!pmt::equal(it->key, d_length_tag_key)) {
-                if(skip && (it->offset == d_length_tag_offset))
-                    continue;
-                temp_tag = *it;
-                temp_tag.offset = abs_offset + it->offset - abs_start;
-                add_item_tag(0, temp_tag);
-            }
-        }
-    }
-
-    void
-    @IMPL_NAME@::enter_wait()
-    {
-        d_finished = true;
-        d_index = 0;
-        d_state = STATE_WAIT;
-    }
-
-    void
-    @IMPL_NAME@::enter_prepad()
-    {
-        d_limit = d_nprepad;
-        d_index = 0;
-        d_state = STATE_PREPAD;
-    }
-
-    void
-    @IMPL_NAME@::enter_rampup()
-    {
-        if(d_insert_phasing)
-            d_limit = d_up_ramp.size();
-        else
-            d_limit = std::min((size_t)(d_ncopy/2), d_up_ramp.size());
-        d_index = 0;
-        d_state = STATE_RAMPUP;
-    }
-
-    void
-    @IMPL_NAME@::enter_copy()
-    {
-        if(d_insert_phasing)
-            d_limit = d_ncopy;
-        else
-            d_limit = d_ncopy - std::min((size_t)((d_ncopy/2)*2),
-                                         d_up_ramp.size() +
-                                         d_down_ramp.size());
-        d_index = 0;
-        d_state = STATE_COPY;
-    }
-
-    void
-    @IMPL_NAME@::enter_rampdown()
-    {
-        if(d_insert_phasing)
-            d_limit = d_down_ramp.size();
-        else
-            d_limit = std::min((size_t)(d_ncopy/2), d_down_ramp.size());
-        d_index = 0;
-        d_state = STATE_RAMPDOWN;
-    }
-
-    void
-    @IMPL_NAME@::enter_postpad()
-    {
-        d_limit = d_npostpad;
-        d_index = 0;
-        d_state = STATE_POSTPAD;
-    }
-
-  } /* namespace digital */
-} /* namespace gr */
diff --git a/gr-digital/lib/burst_shaper_XX_impl.h.t b/gr-digital/lib/burst_shaper_XX_impl.h.t
deleted file mode 100644
index 99ad7fb08a..0000000000
--- a/gr-digital/lib/burst_shaper_XX_impl.h.t
+++ /dev/null
@@ -1,90 +0,0 @@
-/* -*- c++ -*- */
-/* 
- * Copyright 2015 Free Software Foundation, Inc.
- * 
- * This file is part of GNU Radio
- * 
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- * 
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-/* @WARNING@ */
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/digital/@BASE_NAME@.h>
-
-namespace gr {
-  namespace digital {
-
-    class @IMPL_NAME@ : public @BASE_NAME@
-    {
-    protected:
-      enum state_t {STATE_WAIT, STATE_PREPAD, STATE_RAMPUP,
-                    STATE_COPY, STATE_RAMPDOWN, STATE_POSTPAD};
-
-    private:
-      const std::vector<@O_TYPE@> d_up_ramp;
-      const std::vector<@O_TYPE@> d_down_ramp;
-      const int d_nprepad;
-      const int d_npostpad;
-      const bool d_insert_phasing;
-      const pmt::pmt_t d_length_tag_key;
-      std::vector<@O_TYPE@> d_up_phasing;
-      std::vector<@O_TYPE@> d_down_phasing;
-      int d_ncopy;
-      int d_limit;
-      int d_index;
-      uint64_t d_length_tag_offset;
-      bool d_finished;
-      state_t d_state;
-
-      void write_padding(@O_TYPE@ *&dst, int &nwritten, int nspace);
-      void copy_items(@O_TYPE@ *&dst, const @I_TYPE@ *&src, int &nwritten,
-                      int &nread, int nspace);
-      void apply_ramp(@O_TYPE@ *&dst, const @I_TYPE@ *&src, int &nwritten,
-                      int &nread, int nspace);
-      void add_length_tag(int offset);
-      void propagate_tags(int in_offset, int out_offset, int count, bool skip=true);
-      void enter_wait();
-      void enter_prepad();
-      void enter_rampup();
-      void enter_copy();
-      void enter_rampdown();
-      void enter_postpad();
-
-    public:
-      @IMPL_NAME@(const std::vector<@O_TYPE@> &taps, int pre_padding,
-                  int post_padding, bool insert_phasing,
-                  const std::string &length_tag_name);
-      ~@IMPL_NAME@();
-
-      void forecast(int noutput_items, gr_vector_int &ninput_items_required);
-
-      int general_work(int noutput_items,
-		       gr_vector_int &ninput_items,
-		       gr_vector_const_void_star &input_items,
-		       gr_vector_void_star &output_items);
-      int pre_padding() const { return d_nprepad; }
-      int post_padding() const { return d_npostpad; }
-      int prefix_length() const;
-      int suffix_length() const;
-    };
-
-  } // namespace digital
-} // namespace gr
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-digital/lib/burst_shaper_impl.cc b/gr-digital/lib/burst_shaper_impl.cc
new file mode 100644
index 0000000000..d732ec76aa
--- /dev/null
+++ b/gr-digital/lib/burst_shaper_impl.cc
@@ -0,0 +1,424 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "burst_shaper_impl.h"
+#include <boost/format.hpp>
+#include <gnuradio/io_signature.h>
+#include <volk/volk.h>
+
+namespace gr {
+  namespace digital {
+
+    template <class T>
+    typename burst_shaper<T>::sptr
+    burst_shaper<T>::make(const std::vector<T> &taps,
+                      int pre_padding, int post_padding,
+                      bool insert_phasing,
+                      const std::string &length_tag_name)
+    {
+      return gnuradio::get_initial_sptr
+        (new burst_shaper_impl<T>(taps, pre_padding, post_padding,
+                         insert_phasing, length_tag_name));
+    }
+
+    template <class T>
+    burst_shaper_impl<T>::burst_shaper_impl(const std::vector<T> &taps,
+                             int pre_padding, int post_padding,
+                             bool insert_phasing,
+                             const std::string &length_tag_name)
+      : gr::block("burst_shaper",
+              gr::io_signature::make(1, 1, sizeof(T)),
+              gr::io_signature::make(1, 1, sizeof(T))),
+        d_up_ramp(taps.begin(), taps.begin() + taps.size()/2 + taps.size()%2),
+        d_down_ramp(taps.begin() + taps.size()/2, taps.end()),
+        d_nprepad(pre_padding),
+        d_npostpad(post_padding),
+        d_insert_phasing(insert_phasing),
+        d_length_tag_key(pmt::string_to_symbol(length_tag_name)),
+        d_ncopy(0),
+        d_limit(0),
+        d_index(0),
+        d_length_tag_offset(0),
+        d_finished(false),
+        d_state(STATE_WAIT)
+    {
+        assert(d_up_ramp.size() == d_down_ramp.size());
+
+        d_up_phasing.resize(d_up_ramp.size());
+        d_down_phasing.resize(d_down_ramp.size());
+
+        T symbol;
+        for(unsigned int i = 0; i < d_up_ramp.size(); i++) {
+            symbol = (i%2 == 0) ? T(1.0f) : T(-1.0f);
+            d_up_phasing[i] = symbol * d_up_ramp[i];
+            d_down_phasing[i] = symbol * d_down_ramp[i];
+        }
+
+        //set_relative_rate(1.0);
+        this->set_tag_propagation_policy(gr::block::TPP_DONT);
+    }
+
+    template <class T>
+    burst_shaper_impl<T>::~burst_shaper_impl()
+    {
+    }
+
+    template <class T>
+    void
+    burst_shaper_impl<T>::forecast(int noutput_items,
+                          gr_vector_int &ninput_items_required)
+    {
+      switch(d_state) {
+      case(STATE_RAMPDOWN):
+        // If inserting phasing; we don't need any input
+        if(d_insert_phasing) {
+          ninput_items_required[0] = 0;
+        }
+        else {
+          ninput_items_required[0] = noutput_items;
+        }
+        break;
+      case(STATE_POSTPAD):
+        // Padding 0's requires no input
+        ninput_items_required[0] = 0;
+        break;
+      default:
+        ninput_items_required[0] = noutput_items;
+      }
+    }
+
+    template <class T>
+    int
+    burst_shaper_impl<T>::general_work(int noutput_items,
+                      gr_vector_int &ninput_items,
+                      gr_vector_const_void_star &input_items,
+                      gr_vector_void_star &output_items)
+    {
+        const T *in = reinterpret_cast<const T *>(input_items[0]);
+        T *out = reinterpret_cast<T *>(output_items[0]);
+
+        int nwritten = 0;
+        int nread = 0;
+        int nspace = 0;
+        int nskip = 0;
+        int curr_tag_index = 0;
+
+        std::vector<tag_t> length_tags;
+        this->get_tags_in_window(length_tags, 0, 0, ninput_items[0], d_length_tag_key);
+        std::sort(length_tags.rbegin(), length_tags.rend(), tag_t::offset_compare);
+
+        while(nwritten < noutput_items) {
+            // Only check the nread condition if we are actually reading
+            // from the input stream.
+            if(((d_state != STATE_RAMPDOWN) && (d_state != STATE_POSTPAD)) ||
+               ((d_state == STATE_RAMPDOWN) && !d_insert_phasing))
+              {
+                if(nread >= ninput_items[0]) {
+                    break;
+                }
+            }
+
+            if(d_finished) {
+                d_finished = false;
+                break;
+            }
+            nspace = noutput_items - nwritten;
+            switch(d_state) {
+                case(STATE_WAIT):
+                    if(!length_tags.empty()) {
+                        d_length_tag_offset = length_tags.back().offset;
+                        curr_tag_index = (int)(d_length_tag_offset - this->nitems_read(0));
+                        d_ncopy = pmt::to_long(length_tags.back().value);
+                        length_tags.pop_back();
+                        nskip = curr_tag_index - nread;
+                        add_length_tag(nwritten);
+                        propagate_tags(curr_tag_index, nwritten, 1, false);
+                        enter_prepad();
+                    }
+                    else {
+                        nskip = ninput_items[0] - nread;
+                    }
+                    if(nskip > 0) {
+                        GR_LOG_WARN(this->d_logger,
+                                    boost::format("Dropping %1% samples") %
+                                    nskip);
+                        nread += nskip;
+                        in += nskip;
+                    }
+                    break;
+
+                case(STATE_PREPAD):
+                    write_padding(out, nwritten, nspace);
+                    if(d_index == d_limit)
+                        enter_rampup();
+                    break;
+
+                case(STATE_RAMPUP):
+                    apply_ramp(out, in, nwritten, nread, nspace);
+                    if(d_index == d_limit)
+                        enter_copy();
+                    break;
+
+                case(STATE_COPY):
+                    copy_items(out, in, nwritten, nread, nspace);
+                    if(d_index == d_limit)
+                        enter_rampdown();
+                    break;
+
+                case(STATE_RAMPDOWN):
+                    apply_ramp(out, in, nwritten, nread, nspace);
+                    if(d_index == d_limit)
+                        enter_postpad();
+                    break;
+
+                case(STATE_POSTPAD):
+                    write_padding(out, nwritten, nspace);
+                    if(d_index == d_limit)
+                        enter_wait();
+                    break;
+
+                default:
+                    throw std::runtime_error("burst_shaper: invalid state");
+            }
+        }
+
+        this->consume_each(nread);
+
+        return nwritten;
+    }
+
+    template <class T>
+    int
+    burst_shaper_impl<T>::prefix_length() const
+    {
+        return (d_insert_phasing) ?
+               d_nprepad + d_up_ramp.size() : d_nprepad;
+    }
+
+      template <class T>
+    int
+    burst_shaper_impl<T>::suffix_length() const
+    {
+        return (d_insert_phasing) ?
+               d_npostpad + d_down_ramp.size() : d_npostpad;
+    }
+
+      template <class T>
+    void
+    burst_shaper_impl<T>::write_padding(T *&dst, int &nwritten, int nspace)
+    {
+        int nprocess = std::min(d_limit - d_index, nspace);
+        std::memset(dst, 0x00, nprocess * sizeof(T));
+        dst += nprocess;
+        nwritten += nprocess;
+        d_index += nprocess;
+    }
+
+      template <class T>
+    void
+    burst_shaper_impl<T>::copy_items(T *&dst, const T *&src, int &nwritten,
+                            int &nread, int nspace)
+    {
+        int nprocess = std::min(d_limit - d_index, nspace);
+        propagate_tags(nread, nwritten, nprocess);
+        std::memcpy(dst, src, nprocess * sizeof(T));
+        dst += nprocess;
+        nwritten += nprocess;
+        src += nprocess;
+        nread += nprocess;
+        d_index += nprocess;
+    }
+
+      template <>
+    void
+    burst_shaper_impl<gr_complex>::apply_ramp(gr_complex *&dst, const gr_complex *&src, int &nwritten,
+                            int &nread, int nspace)
+    {
+        int nprocess = std::min(d_limit - d_index, nspace);
+        gr_complex *phasing;
+        const gr_complex *ramp;
+
+        if(d_state == STATE_RAMPUP) {
+            phasing = &d_up_phasing[d_index];
+            ramp = &d_up_ramp[d_index];
+        }
+        else {
+            phasing = &d_down_phasing[d_index];
+            ramp = &d_down_ramp[d_index];
+        }
+
+        if(d_insert_phasing)
+            std::memcpy(dst, phasing, nprocess * sizeof(gr_complex));
+        else {
+            propagate_tags(nread, nwritten, nprocess);
+            volk_32fc_x2_multiply_32fc(dst, src, ramp, nprocess);
+            src += nprocess;
+            nread += nprocess;
+        }
+
+        dst += nprocess;
+        nwritten += nprocess;
+        d_index += nprocess;
+    }
+
+      template <>
+      void
+      burst_shaper_impl<float>::apply_ramp(float *&dst, const float *&src, int &nwritten,
+                                                int &nread, int nspace)
+      {
+          int nprocess = std::min(d_limit - d_index, nspace);
+          float *phasing;
+          const float *ramp;
+
+          if(d_state == STATE_RAMPUP) {
+              phasing = &d_up_phasing[d_index];
+              ramp = &d_up_ramp[d_index];
+          }
+          else {
+              phasing = &d_down_phasing[d_index];
+              ramp = &d_down_ramp[d_index];
+          }
+
+          if(d_insert_phasing)
+              std::memcpy(dst, phasing, nprocess * sizeof(float));
+          else {
+              propagate_tags(nread, nwritten, nprocess);
+              volk_32f_x2_multiply_32f(dst, src, ramp, nprocess);
+              src += nprocess;
+              nread += nprocess;
+          }
+
+          dst += nprocess;
+          nwritten += nprocess;
+          d_index += nprocess;
+      }
+
+
+
+      template <class T>
+    void
+    burst_shaper_impl<T>::add_length_tag(int offset)
+    {
+        this->add_item_tag(0, this->nitems_written(0) + offset, d_length_tag_key,
+                     pmt::from_long(d_ncopy + prefix_length() +
+                                    suffix_length()),
+                     pmt::string_to_symbol(this->name()));
+    }
+
+      template <class T>
+    void
+    burst_shaper_impl<T>::propagate_tags(int in_offset, int out_offset, int count, bool skip)
+    {
+        uint64_t abs_start = this->nitems_read(0) + in_offset;
+        uint64_t abs_end = abs_start + count;
+        uint64_t abs_offset = this->nitems_written(0) + out_offset;
+        tag_t temp_tag;
+
+        std::vector<tag_t> tags;
+        std::vector<tag_t>::iterator it;
+
+        this->get_tags_in_range(tags, 0, abs_start, abs_end);
+
+        for(it = tags.begin(); it != tags.end(); it++) {
+            if(!pmt::equal(it->key, d_length_tag_key)) {
+                if(skip && (it->offset == d_length_tag_offset))
+                    continue;
+                temp_tag = *it;
+                temp_tag.offset = abs_offset + it->offset - abs_start;
+                this->add_item_tag(0, temp_tag);
+            }
+        }
+    }
+
+      template <class T>
+    void
+    burst_shaper_impl<T>::enter_wait()
+    {
+        d_finished = true;
+        d_index = 0;
+        d_state = STATE_WAIT;
+    }
+
+      template <class T>
+    void
+    burst_shaper_impl<T>::enter_prepad()
+    {
+        d_limit = d_nprepad;
+        d_index = 0;
+        d_state = STATE_PREPAD;
+    }
+
+      template <class T>
+    void
+    burst_shaper_impl<T>::enter_rampup()
+    {
+        if(d_insert_phasing)
+            d_limit = d_up_ramp.size();
+        else
+            d_limit = std::min((size_t)(d_ncopy/2), d_up_ramp.size());
+        d_index = 0;
+        d_state = STATE_RAMPUP;
+    }
+
+      template <class T>
+    void
+    burst_shaper_impl<T>::enter_copy()
+    {
+        if(d_insert_phasing)
+            d_limit = d_ncopy;
+        else
+            d_limit = d_ncopy - std::min((size_t)((d_ncopy/2)*2),
+                                         d_up_ramp.size() +
+                                         d_down_ramp.size());
+        d_index = 0;
+        d_state = STATE_COPY;
+    }
+
+      template <class T>
+    void
+    burst_shaper_impl<T>::enter_rampdown()
+    {
+        if(d_insert_phasing)
+            d_limit = d_down_ramp.size();
+        else
+            d_limit = std::min((size_t)(d_ncopy/2), d_down_ramp.size());
+        d_index = 0;
+        d_state = STATE_RAMPDOWN;
+    }
+
+      template <class T>
+    void
+    burst_shaper_impl<T>::enter_postpad()
+    {
+        d_limit = d_npostpad;
+        d_index = 0;
+        d_state = STATE_POSTPAD;
+    }
+
+      template class burst_shaper<gr_complex>;
+      template class burst_shaper<float>;
+  } /* namespace digital */
+} /* namespace gr */
diff --git a/gr-digital/lib/burst_shaper_impl.h b/gr-digital/lib/burst_shaper_impl.h
new file mode 100644
index 0000000000..dbcbb5068a
--- /dev/null
+++ b/gr-digital/lib/burst_shaper_impl.h
@@ -0,0 +1,89 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2015,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef BURST_SHAPER_IMPL_H
+#define BURST_SHAPER_IMPL_H
+
+#include <gnuradio/digital/burst_shaper.h>
+
+namespace gr {
+  namespace digital {
+
+    template <class T>
+    class burst_shaper_impl : public burst_shaper<T>
+    {
+    protected:
+      enum state_t {STATE_WAIT, STATE_PREPAD, STATE_RAMPUP,
+                    STATE_COPY, STATE_RAMPDOWN, STATE_POSTPAD};
+
+    private:
+      const std::vector<T> d_up_ramp;
+      const std::vector<T> d_down_ramp;
+      const int d_nprepad;
+      const int d_npostpad;
+      const bool d_insert_phasing;
+      const pmt::pmt_t d_length_tag_key;
+      std::vector<T> d_up_phasing;
+      std::vector<T> d_down_phasing;
+      int d_ncopy;
+      int d_limit;
+      int d_index;
+      uint64_t d_length_tag_offset;
+      bool d_finished;
+      state_t d_state;
+
+      void write_padding(T *&dst, int &nwritten, int nspace);
+      void copy_items(T *&dst, const T *&src, int &nwritten,
+                      int &nread, int nspace);
+      void apply_ramp(T *&dst, const T *&src, int &nwritten,
+                      int &nread, int nspace);
+      void add_length_tag(int offset);
+      void propagate_tags(int in_offset, int out_offset, int count, bool skip=true);
+      void enter_wait();
+      void enter_prepad();
+      void enter_rampup();
+      void enter_copy();
+      void enter_rampdown();
+      void enter_postpad();
+
+    public:
+      burst_shaper_impl(const std::vector<T> &taps, int pre_padding,
+                  int post_padding, bool insert_phasing,
+                  const std::string &length_tag_name);
+      ~burst_shaper_impl();
+
+      void forecast(int noutput_items, gr_vector_int &ninput_items_required);
+
+      int general_work(int noutput_items,
+		       gr_vector_int &ninput_items,
+		       gr_vector_const_void_star &input_items,
+		       gr_vector_void_star &output_items);
+      int pre_padding() const { return d_nprepad; }
+      int post_padding() const { return d_npostpad; }
+      int prefix_length() const;
+      int suffix_length() const;
+    };
+
+  } // namespace digital
+} // namespace gr
+
+#endif /* BURST_SHAPER_IMPL_H */
diff --git a/gr-digital/lib/chunks_to_symbols_XX_impl.cc.t b/gr-digital/lib/chunks_to_symbols_XX_impl.cc.t
deleted file mode 100644
index b08bdde08f..0000000000
--- a/gr-digital/lib/chunks_to_symbols_XX_impl.cc.t
+++ /dev/null
@@ -1,133 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2010,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-/* @WARNING@ */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "@NAME@.h"
-#include <gnuradio/io_signature.h>
-#include <gnuradio/tag_checker.h>
-#include <assert.h>
-
-namespace gr {
-  namespace digital {
-
-    @BASE_NAME@::sptr
-    @BASE_NAME@::make(const std::vector<@O_TYPE@> &symbol_table, const int D)
-    {
-      return gnuradio::get_initial_sptr
-        (new @IMPL_NAME@(symbol_table, D));
-    }
-
-    @IMPL_NAME@::@IMPL_NAME@(const std::vector<@O_TYPE@> &symbol_table, const int D)
-    : sync_interpolator("@BASE_NAME@",
-			   io_signature::make(1, -1, sizeof(@I_TYPE@)),
-			   io_signature::make(1, -1, sizeof(@O_TYPE@)),
-			   D),
-      d_D(D), d_symbol_table(symbol_table)
-    {
-      message_port_register_in(pmt::mp("set_symbol_table"));
-      set_msg_handler(
-        pmt::mp("set_symbol_table"),
-        boost::bind(&@IMPL_NAME@::handle_set_symbol_table,
-                    this, _1));
-    }
-
-    @IMPL_NAME@::~@IMPL_NAME@()
-    {
-    }
-
-
-    void
-    @IMPL_NAME@::set_vector_from_pmt(std::vector<gr_complex> &symbol_table, pmt::pmt_t &symbol_table_pmt) {
-      symbol_table.resize(0);
-      for (unsigned int i=0; i<pmt::length(symbol_table_pmt); i++) {
-        symbol_table.push_back(pmt::c32vector_ref(symbol_table_pmt, i));
-      }      
-    }
-
-    void
-    @IMPL_NAME@::set_vector_from_pmt(std::vector<float> &symbol_table, pmt::pmt_t &symbol_table_pmt) {
-      symbol_table.resize(0);
-      for (unsigned int i=0; i<pmt::length(symbol_table_pmt); i++) {
-        float f = pmt::f32vector_ref(symbol_table_pmt, i);
-        symbol_table.push_back(f);
-      }
-    }
-    
-    void
-    @IMPL_NAME@::handle_set_symbol_table(pmt::pmt_t symbol_table_pmt)
-    {
-      std::vector<@O_TYPE@> symbol_table;
-      set_vector_from_pmt(symbol_table, symbol_table_pmt);
-      set_symbol_table(symbol_table);
-    }
-
-    
-    void
-    @IMPL_NAME@::set_symbol_table(const std::vector<@O_TYPE@> &symbol_table)
-    {
-      d_symbol_table.resize(0);
-      for (unsigned int i=0; i<symbol_table.size(); i++) {
-        d_symbol_table.push_back(symbol_table[i]);
-      }
-    }
-
-    int
-    @IMPL_NAME@::work(int noutput_items,
-		      gr_vector_const_void_star &input_items,
-		      gr_vector_void_star &output_items)
-    {
-      assert(noutput_items % d_D == 0);
-      assert(input_items.size() == output_items.size());
-      int nstreams = input_items.size();
-
-      for(int m = 0; m < nstreams; m++) {
-        const @I_TYPE@ *in = (@I_TYPE@*)input_items[m];
-        @O_TYPE@ *out = (@O_TYPE@*)output_items[m];
-
-        std::vector<tag_t> tags;
-        get_tags_in_range(tags, m, nitems_read(m), nitems_read(m)+noutput_items/d_D);
-        tag_checker tchecker(tags);
-
-        // per stream processing
-        for(int i = 0; i < noutput_items / d_D; i++) {
-          
-          std::vector<tag_t> tags_now;
-          tchecker.get_tags(tags_now, i+nitems_read(m));
-          for (unsigned int j=0; j<tags_now.size(); j++) {
-            tag_t tag = tags_now[j];
-            dispatch_msg(tag.key, tag.value);
-          }
-          assert(((unsigned int)in[i]*d_D+d_D) <= d_symbol_table.size());
-          memcpy(out, &d_symbol_table[(unsigned int)in[i]*d_D], d_D*sizeof(@O_TYPE@));
-          out+=d_D;
-        }
-      }
-      return noutput_items;
-    }
-
-  } /* namespace digital */
-} /* namespace gr */
diff --git a/gr-digital/lib/chunks_to_symbols_XX_impl.h.t b/gr-digital/lib/chunks_to_symbols_XX_impl.h.t
deleted file mode 100644
index e0857bfb3c..0000000000
--- a/gr-digital/lib/chunks_to_symbols_XX_impl.h.t
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-/* @WARNING@ */
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/digital/@BASE_NAME@.h>
-
-namespace gr {
-  namespace digital {
-
-    class @IMPL_NAME@ : public @BASE_NAME@
-    {
-    private:
-      int d_D;
-      std::vector<@O_TYPE@> d_symbol_table;
-
-    public:
-      @IMPL_NAME@(const std::vector<@O_TYPE@> &symbol_table, const int D = 1);
-
-      ~@IMPL_NAME@();
-
-      void set_vector_from_pmt(std::vector<float> &symbol_table, pmt::pmt_t &symbol_table_pmt);
-      void set_vector_from_pmt(std::vector<gr_complex> &symbol_table, pmt::pmt_t &symbol_table_pmt);
-
-      void handle_set_symbol_table(pmt::pmt_t symbol_table_pmt);
-      void set_symbol_table(const std::vector<@O_TYPE@> &symbol_table);
-      
-      int D() const { return d_D; }
-      std::vector<@O_TYPE@> symbol_table() const { return d_symbol_table; }
-
-      int work(int noutput_items,
-	       gr_vector_const_void_star &input_items,
-	       gr_vector_void_star &output_items);
-
-      bool check_topology(int ninputs, int noutputs) { return ninputs == noutputs; }
-    };
-
-  } /* namespace digital */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-digital/lib/chunks_to_symbols_impl.cc b/gr-digital/lib/chunks_to_symbols_impl.cc
new file mode 100644
index 0000000000..0d01c337d4
--- /dev/null
+++ b/gr-digital/lib/chunks_to_symbols_impl.cc
@@ -0,0 +1,145 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2010,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "chunks_to_symbols_impl.h"
+#include <gnuradio/io_signature.h>
+#include <gnuradio/tag_checker.h>
+#include <assert.h>
+
+namespace gr {
+  namespace digital {
+
+    template <class IN_T, class OUT_T>
+    typename chunks_to_symbols<IN_T,OUT_T>::sptr
+    chunks_to_symbols<IN_T,OUT_T>::make(const std::vector<OUT_T> &symbol_table, const int D)
+    {
+      return gnuradio::get_initial_sptr
+        (new chunks_to_symbols_impl<IN_T,OUT_T>(symbol_table, D));
+    }
+
+    template <class IN_T, class OUT_T>
+    chunks_to_symbols_impl<IN_T,OUT_T>::chunks_to_symbols_impl(const std::vector<OUT_T> &symbol_table, const int D)
+    : sync_interpolator("chunks_to_symbols",
+			   io_signature::make(1, -1, sizeof(IN_T)),
+			   io_signature::make(1, -1, sizeof(OUT_T)),
+			   D),
+      d_D(D), d_symbol_table(symbol_table)
+    {
+      this->message_port_register_in(pmt::mp("set_symbol_table"));
+      this->set_msg_handler(
+        pmt::mp("set_symbol_table"),
+        boost::bind(&chunks_to_symbols_impl<IN_T,OUT_T>::handle_set_symbol_table,
+                    this, _1));
+    }
+
+    template <class IN_T, class OUT_T>
+    chunks_to_symbols_impl<IN_T,OUT_T>::~chunks_to_symbols_impl()
+    {
+    }
+
+
+    template <class IN_T, class OUT_T>
+    void
+    chunks_to_symbols_impl<IN_T,OUT_T>::set_vector_from_pmt(std::vector<gr_complex> &symbol_table, pmt::pmt_t &symbol_table_pmt) {
+      symbol_table.resize(0);
+      for (unsigned int i=0; i<pmt::length(symbol_table_pmt); i++) {
+        symbol_table.push_back(pmt::c32vector_ref(symbol_table_pmt, i));
+      }
+    }
+
+    template <class IN_T, class OUT_T>
+    void
+    chunks_to_symbols_impl<IN_T,OUT_T>::set_vector_from_pmt(std::vector<float> &symbol_table, pmt::pmt_t &symbol_table_pmt) {
+      symbol_table.resize(0);
+      for (unsigned int i=0; i<pmt::length(symbol_table_pmt); i++) {
+        float f = pmt::f32vector_ref(symbol_table_pmt, i);
+        symbol_table.push_back(f);
+      }
+    }
+
+    template <class IN_T, class OUT_T>
+    void
+    chunks_to_symbols_impl<IN_T,OUT_T>::handle_set_symbol_table(pmt::pmt_t symbol_table_pmt)
+    {
+      std::vector<OUT_T> symbol_table;
+      set_vector_from_pmt(symbol_table, symbol_table_pmt);
+      set_symbol_table(symbol_table);
+    }
+
+
+    template <class IN_T, class OUT_T>
+    void
+    chunks_to_symbols_impl<IN_T,OUT_T>::set_symbol_table(const std::vector<OUT_T> &symbol_table)
+    {
+      d_symbol_table.resize(0);
+      for (unsigned int i=0; i<symbol_table.size(); i++) {
+        d_symbol_table.push_back(symbol_table[i]);
+      }
+    }
+
+    template <class IN_T, class OUT_T>
+    int
+    chunks_to_symbols_impl<IN_T,OUT_T>::work(int noutput_items,
+		      gr_vector_const_void_star &input_items,
+		      gr_vector_void_star &output_items)
+    {
+      assert(noutput_items % d_D == 0);
+      assert(input_items.size() == output_items.size());
+      int nstreams = input_items.size();
+
+      for(int m = 0; m < nstreams; m++) {
+        const IN_T *in = (IN_T*)input_items[m];
+        OUT_T *out = (OUT_T*)output_items[m];
+
+        std::vector<tag_t> tags;
+        this->get_tags_in_range(tags, m, this->nitems_read(m), this->nitems_read(m)+noutput_items/d_D);
+        tag_checker tchecker(tags);
+
+        // per stream processing
+        for(int i = 0; i < noutput_items / d_D; i++) {
+
+          std::vector<tag_t> tags_now;
+          tchecker.get_tags(tags_now, i+this->nitems_read(m));
+          for (unsigned int j=0; j<tags_now.size(); j++) {
+            tag_t tag = tags_now[j];
+            this->dispatch_msg(tag.key, tag.value);
+          }
+          assert(((unsigned int)in[i]*d_D+d_D) <= d_symbol_table.size());
+          memcpy(out, &d_symbol_table[(unsigned int)in[i]*d_D], d_D*sizeof(OUT_T));
+          out+=d_D;
+        }
+      }
+      return noutput_items;
+    }
+    template class chunks_to_symbols<std::uint8_t, float>;
+    template class chunks_to_symbols<std::uint8_t, gr_complex>;
+    template class chunks_to_symbols<std::int16_t, float>;
+    template class chunks_to_symbols<std::int16_t, gr_complex>;
+    template class chunks_to_symbols<std::int32_t, float>;
+    template class chunks_to_symbols<std::int32_t, gr_complex>;
+
+  } /* namespace digital */
+} /* namespace gr */
diff --git a/gr-digital/lib/chunks_to_symbols_impl.h b/gr-digital/lib/chunks_to_symbols_impl.h
new file mode 100644
index 0000000000..ae8c9a6c3a
--- /dev/null
+++ b/gr-digital/lib/chunks_to_symbols_impl.h
@@ -0,0 +1,62 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef CHUNKS_TO_SYMBOLS_IMPL_H
+#define CHUNKS_TO_SYMBOLS_IMPL_H
+
+#include <gnuradio/digital/chunks_to_symbols.h>
+
+namespace gr {
+  namespace digital {
+
+    template <class IN_T, class OUT_T>
+    class chunks_to_symbols_impl : public chunks_to_symbols<IN_T, OUT_T>
+    {
+    private:
+      int d_D;
+      std::vector<OUT_T> d_symbol_table;
+
+    public:
+      chunks_to_symbols_impl(const std::vector<OUT_T> &symbol_table, const int D = 1);
+
+      ~chunks_to_symbols_impl();
+
+      void set_vector_from_pmt(std::vector<float> &symbol_table, pmt::pmt_t &symbol_table_pmt);
+      void set_vector_from_pmt(std::vector<gr_complex> &symbol_table, pmt::pmt_t &symbol_table_pmt);
+
+      void handle_set_symbol_table(pmt::pmt_t symbol_table_pmt);
+      void set_symbol_table(const std::vector<OUT_T> &symbol_table);
+
+      int D() const { return d_D; }
+      std::vector<OUT_T> symbol_table() const { return d_symbol_table; }
+
+      int work(int noutput_items,
+	       gr_vector_const_void_star &input_items,
+	       gr_vector_void_star &output_items);
+
+      bool check_topology(int ninputs, int noutputs) { return ninputs == noutputs; }
+    };
+
+  } /* namespace digital */
+} /* namespace gr */
+
+#endif /* CHUNKS_TO_SYMBOLS_IMPL_H */
diff --git a/gr-digital/swig/CMakeLists.txt b/gr-digital/swig/CMakeLists.txt
index 658ac46ed6..fcfc14c33c 100644
--- a/gr-digital/swig/CMakeLists.txt
+++ b/gr-digital/swig/CMakeLists.txt
@@ -62,7 +62,6 @@ foreach(swigfile ${GR_SWIG_BLOCK_IFILES})
     ${CMAKE_CURRENT_BINARY_DIR}/../include/gnuradio/digital
   )
   set(GR_SWIG_DOCS_TARGET_DEPS runtime_swig_swig_doc)
-  set(GR_SWIG_TARGET_DEPS digital_generated_includes)
   set(GR_SWIG_LIBRARIES gnuradio-digital
     gnuradio-filter gnuradio-analog gnuradio-blocks)
   GR_SWIG_MAKE(${swigfile} ${swigfile}.i)
diff --git a/gr-digital/swig/digital_swig1.i b/gr-digital/swig/digital_swig1.i
index 6d19da0328..dd6cd97745 100644
--- a/gr-digital/swig/digital_swig1.i
+++ b/gr-digital/swig/digital_swig1.i
@@ -38,14 +38,8 @@
 
 %{
 #include "gnuradio/digital/additive_scrambler_bb.h"
-#include "gnuradio/digital/burst_shaper_cc.h"
-#include "gnuradio/digital/burst_shaper_ff.h"
-#include "gnuradio/digital/chunks_to_symbols_bc.h"
-#include "gnuradio/digital/chunks_to_symbols_bf.h"
-#include "gnuradio/digital/chunks_to_symbols_ic.h"
-#include "gnuradio/digital/chunks_to_symbols_if.h"
-#include "gnuradio/digital/chunks_to_symbols_sc.h"
-#include "gnuradio/digital/chunks_to_symbols_sf.h"
+#include "gnuradio/digital/burst_shaper.h"
+#include "gnuradio/digital/chunks_to_symbols.h"
 #include "gnuradio/digital/clock_recovery_mm_cc.h"
 #include "gnuradio/digital/clock_recovery_mm_ff.h"
 #include "gnuradio/digital/diff_decoder_bb.h"
@@ -68,14 +62,8 @@
 %}
 
 %include "gnuradio/digital/additive_scrambler_bb.h"
-%include "gnuradio/digital/burst_shaper_cc.h"
-%include "gnuradio/digital/burst_shaper_ff.h"
-%include "gnuradio/digital/chunks_to_symbols_bc.h"
-%include "gnuradio/digital/chunks_to_symbols_bf.h"
-%include "gnuradio/digital/chunks_to_symbols_ic.h"
-%include "gnuradio/digital/chunks_to_symbols_if.h"
-%include "gnuradio/digital/chunks_to_symbols_sc.h"
-%include "gnuradio/digital/chunks_to_symbols_sf.h"
+%include "gnuradio/digital/burst_shaper.h"
+%include "gnuradio/digital/chunks_to_symbols.h"
 %include "gnuradio/digital/clock_recovery_mm_cc.h"
 %include "gnuradio/digital/clock_recovery_mm_ff.h"
 %include "gnuradio/digital/diff_decoder_bb.h"
@@ -97,14 +85,14 @@
 %include "gnuradio/digital/msk_timing_recovery_cc.h"
 
 GR_SWIG_BLOCK_MAGIC2(digital, additive_scrambler_bb);
-GR_SWIG_BLOCK_MAGIC2(digital, burst_shaper_cc);
-GR_SWIG_BLOCK_MAGIC2(digital, burst_shaper_ff);
-GR_SWIG_BLOCK_MAGIC2(digital, chunks_to_symbols_bc);
-GR_SWIG_BLOCK_MAGIC2(digital, chunks_to_symbols_bf);
-GR_SWIG_BLOCK_MAGIC2(digital, chunks_to_symbols_ic);
-GR_SWIG_BLOCK_MAGIC2(digital, chunks_to_symbols_if);
-GR_SWIG_BLOCK_MAGIC2(digital, chunks_to_symbols_sc);
-GR_SWIG_BLOCK_MAGIC2(digital, chunks_to_symbols_sf);
+GR_SWIG_BLOCK_MAGIC2_TMPL(digital, burst_shaper_cc, burst_shaper<gr_complex>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(digital, burst_shaper_ff, burst_shaper<float>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(digital, chunks_to_symbols_bc, chunks_to_symbols<std::uint8_t,gr_complex>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(digital, chunks_to_symbols_bf, chunks_to_symbols<std::uint8_t,float>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(digital, chunks_to_symbols_ic, chunks_to_symbols<std::int32_t,gr_complex>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(digital, chunks_to_symbols_if, chunks_to_symbols<std::int32_t,float>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(digital, chunks_to_symbols_sc, chunks_to_symbols<std::int16_t,gr_complex>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(digital, chunks_to_symbols_sf, chunks_to_symbols<std::int16_t,float>);
 GR_SWIG_BLOCK_MAGIC2(digital, clock_recovery_mm_cc);
 GR_SWIG_BLOCK_MAGIC2(digital, clock_recovery_mm_ff);
 GR_SWIG_BLOCK_MAGIC2(digital, diff_decoder_bb);
-- 
cgit v1.2.3


From 7588f103b9e75eea56d241868d161d0f04f3fd79 Mon Sep 17 00:00:00 2001
From: Andrej Rode <mail@andrejro.de>
Date: Tue, 21 Aug 2018 15:32:45 +0200
Subject: filter: replace gengen with C++ templates

---
 docs/doxygen/CMakeLists.txt                        |   4 -
 gr-digital/lib/cpmmod_bc_impl.h                    |  13 +-
 gr-digital/lib/modulate_vector.cc                  |   2 +-
 gr-digital/lib/ofdm_sync_sc_cfb_impl.cc            |   3 +-
 gr-filter/include/gnuradio/filter/CMakeLists.txt   |  17 +-
 gr-filter/include/gnuradio/filter/fir_filter.h     | 234 +-----
 .../include/gnuradio/filter/fir_filter_XXX.h.t     |  81 --
 gr-filter/include/gnuradio/filter/fir_filter_blk.h |  87 +++
 .../gnuradio/filter/freq_xlating_fir_filter.h      | 100 +++
 .../filter/freq_xlating_fir_filter_XXX.h.t         |  98 ---
 .../include/gnuradio/filter/interp_fir_filter.h    |  87 +++
 .../gnuradio/filter/interp_fir_filter_XXX.h.t      |  81 --
 .../gnuradio/filter/rational_resampler_base.h      | 102 +++
 .../filter/rational_resampler_base_XXX.h.t         |  98 ---
 gr-filter/lib/CMakeLists.txt                       |  19 +-
 gr-filter/lib/fir_filter.cc                        | 858 ++++-----------------
 gr-filter/lib/fir_filter_XXX_impl.cc.t             | 107 ---
 gr-filter/lib/fir_filter_XXX_impl.h.t              |  56 --
 gr-filter/lib/fir_filter_blk_impl.cc               | 115 +++
 gr-filter/lib/fir_filter_blk_impl.h                |  55 ++
 .../lib/freq_xlating_fir_filter_XXX_impl.cc.t      | 178 -----
 gr-filter/lib/freq_xlating_fir_filter_XXX_impl.h.t |  74 --
 gr-filter/lib/freq_xlating_fir_filter_impl.cc      | 190 +++++
 gr-filter/lib/freq_xlating_fir_filter_impl.h       |  70 ++
 gr-filter/lib/interp_fir_filter_XXX_impl.cc.t      | 155 ----
 gr-filter/lib/interp_fir_filter_XXX_impl.h.t       |  62 --
 gr-filter/lib/interp_fir_filter_impl.cc            | 167 ++++
 gr-filter/lib/interp_fir_filter_impl.h             |  61 ++
 .../lib/rational_resampler_base_XXX_impl.cc.t      | 176 -----
 gr-filter/lib/rational_resampler_base_XXX_impl.h.t |  72 --
 gr-filter/lib/rational_resampler_base_impl.cc      | 188 +++++
 gr-filter/lib/rational_resampler_base_impl.h       |  71 ++
 gr-filter/swig/CMakeLists.txt                      |   1 -
 gr-filter/swig/filter_swig.i                       | 104 +--
 34 files changed, 1540 insertions(+), 2246 deletions(-)
 delete mode 100644 gr-filter/include/gnuradio/filter/fir_filter_XXX.h.t
 create mode 100644 gr-filter/include/gnuradio/filter/fir_filter_blk.h
 create mode 100644 gr-filter/include/gnuradio/filter/freq_xlating_fir_filter.h
 delete mode 100644 gr-filter/include/gnuradio/filter/freq_xlating_fir_filter_XXX.h.t
 create mode 100644 gr-filter/include/gnuradio/filter/interp_fir_filter.h
 delete mode 100644 gr-filter/include/gnuradio/filter/interp_fir_filter_XXX.h.t
 create mode 100644 gr-filter/include/gnuradio/filter/rational_resampler_base.h
 delete mode 100644 gr-filter/include/gnuradio/filter/rational_resampler_base_XXX.h.t
 delete mode 100644 gr-filter/lib/fir_filter_XXX_impl.cc.t
 delete mode 100644 gr-filter/lib/fir_filter_XXX_impl.h.t
 create mode 100644 gr-filter/lib/fir_filter_blk_impl.cc
 create mode 100644 gr-filter/lib/fir_filter_blk_impl.h
 delete mode 100644 gr-filter/lib/freq_xlating_fir_filter_XXX_impl.cc.t
 delete mode 100644 gr-filter/lib/freq_xlating_fir_filter_XXX_impl.h.t
 create mode 100644 gr-filter/lib/freq_xlating_fir_filter_impl.cc
 create mode 100644 gr-filter/lib/freq_xlating_fir_filter_impl.h
 delete mode 100644 gr-filter/lib/interp_fir_filter_XXX_impl.cc.t
 delete mode 100644 gr-filter/lib/interp_fir_filter_XXX_impl.h.t
 create mode 100644 gr-filter/lib/interp_fir_filter_impl.cc
 create mode 100644 gr-filter/lib/interp_fir_filter_impl.h
 delete mode 100644 gr-filter/lib/rational_resampler_base_XXX_impl.cc.t
 delete mode 100644 gr-filter/lib/rational_resampler_base_XXX_impl.h.t
 create mode 100644 gr-filter/lib/rational_resampler_base_impl.cc
 create mode 100644 gr-filter/lib/rational_resampler_base_impl.h

(limited to 'docs/doxygen')

diff --git a/docs/doxygen/CMakeLists.txt b/docs/doxygen/CMakeLists.txt
index b0b3c0f460..019b01c305 100644
--- a/docs/doxygen/CMakeLists.txt
+++ b/docs/doxygen/CMakeLists.txt
@@ -45,10 +45,6 @@ if(ENABLE_GNURADIO_RUNTIME)
   list(APPEND GENERATED_DEPS pmt_generated)
 endif(ENABLE_GNURADIO_RUNTIME)
 
-if(ENABLE_GR_FILTER)
-  list(APPEND GENERATED_DEPS filter_generated_includes)
-endif(ENABLE_GR_FILTER)
-
 if(ENABLE_GR_TRELLIS)
   list(APPEND GENERATED_DEPS trellis_generated_includes)
 endif(ENABLE_GR_TRELLIS)
diff --git a/gr-digital/lib/cpmmod_bc_impl.h b/gr-digital/lib/cpmmod_bc_impl.h
index 3402e6e2bb..f6385d0d30 100644
--- a/gr-digital/lib/cpmmod_bc_impl.h
+++ b/gr-digital/lib/cpmmod_bc_impl.h
@@ -1,19 +1,19 @@
 /* -*- c++ -*- */
 /*
  * Copyright 2010,2012 Free Software Foundation, Inc.
- * 
+ *
  * This file is part of GNU Radio
- * 
+ *
  * GNU Radio is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 3, or (at your option)
  * any later version.
- * 
+ *
  * GNU Radio is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with GNU Radio; see the file COPYING.  If not, write to
  * the Free Software Foundation, Inc., 51 Franklin Street,
@@ -26,7 +26,7 @@
 #include <gnuradio/digital/cpmmod_bc.h>
 #include <gnuradio/blocks/char_to_float.h>
 #include <gnuradio/analog/frequency_modulator_fc.h>
-#include <gnuradio/filter/interp_fir_filter_fff.h>
+#include <gnuradio/filter/interp_fir_filter.h>
 
 namespace gr {
   namespace digital {
@@ -45,7 +45,7 @@ namespace gr {
       gr::blocks::char_to_float::sptr d_char_to_float;
       gr::filter::interp_fir_filter_fff::sptr d_pulse_shaper;
       analog::frequency_modulator_fc::sptr d_fm;
-  
+
     public:
       cpmmod_bc_impl(const std::string &name,
 		     analog::cpm::cpm_type type, float h,
@@ -65,4 +65,3 @@ namespace gr {
 } /* namespace gr */
 
 #endif /* INCLUDED_DIGITAL_CPMMOD_BC_IMPL_H */
-
diff --git a/gr-digital/lib/modulate_vector.cc b/gr-digital/lib/modulate_vector.cc
index 4ef6e804ae..81964aa8e5 100644
--- a/gr-digital/lib/modulate_vector.cc
+++ b/gr-digital/lib/modulate_vector.cc
@@ -42,7 +42,7 @@
 
 #include <gnuradio/blocks/vector_source.h>
 #include <gnuradio/blocks/vector_sink.h>
-#include <gnuradio/filter/fir_filter_ccf.h>
+#include <gnuradio/filter/fir_filter_blk.h>
 #include <gnuradio/top_block.h>
 #include <gnuradio/digital/modulate_vector.h>
 
diff --git a/gr-digital/lib/ofdm_sync_sc_cfb_impl.cc b/gr-digital/lib/ofdm_sync_sc_cfb_impl.cc
index 4c5bad14e1..b928d94e99 100644
--- a/gr-digital/lib/ofdm_sync_sc_cfb_impl.cc
+++ b/gr-digital/lib/ofdm_sync_sc_cfb_impl.cc
@@ -35,8 +35,7 @@
 #include <gnuradio/blocks/divide.h>
 #include <gnuradio/blocks/multiply.h>
 #include <gnuradio/blocks/sample_and_hold.h>
-#include <gnuradio/filter/fir_filter_ccf.h>
-#include <gnuradio/filter/fir_filter_fff.h>
+#include <gnuradio/filter/fir_filter_blk.h>
 
 namespace gr {
   namespace digital {
diff --git a/gr-filter/include/gnuradio/filter/CMakeLists.txt b/gr-filter/include/gnuradio/filter/CMakeLists.txt
index 9338d96713..8f17b496b2 100644
--- a/gr-filter/include/gnuradio/filter/CMakeLists.txt
+++ b/gr-filter/include/gnuradio/filter/CMakeLists.txt
@@ -17,24 +17,10 @@
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
 
-########################################################################
-# Invoke macro to generate various headers
-#######################################################################
-include(GrMiscUtils)
-GR_EXPAND_X_H(filter fir_filter_XXX              ccc ccf fcc fff fsf scc)
-GR_EXPAND_X_H(filter freq_xlating_fir_filter_XXX ccc ccf fcc fcf scf scc)
-GR_EXPAND_X_H(filter interp_fir_filter_XXX       ccc ccf fcc fff fsf scc)
-GR_EXPAND_X_H(filter rational_resampler_base_XXX ccc ccf fcc fff fsf scc)
-
-add_custom_target(filter_generated_includes DEPENDS
-    ${generated_includes}
-)
-
 ########################################################################
 # Install header files
 ########################################################################
 install(FILES
-    ${generated_includes}
     api.h
     firdes.h
     fir_filter.h
@@ -57,6 +43,7 @@ install(FILES
     fft_filter_ccc.h
     fft_filter_ccf.h
     fft_filter_fff.h
+    freq_xlating_fir_filter.h
     mmse_interpolator_cc.h
     mmse_interpolator_ff.h
     mmse_resampler_cc.h
@@ -75,8 +62,8 @@ install(FILES
     pfb_decimator_ccf.h
     pfb_interpolator_ccf.h
     pfb_synthesizer_ccf.h
+    rational_resampler_base.h
     single_pole_iir_filter_cc.h
     single_pole_iir_filter_ff.h
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio/filter
 )
-
diff --git a/gr-filter/include/gnuradio/filter/fir_filter.h b/gr-filter/include/gnuradio/filter/fir_filter.h
index 99ca96c19a..48562d3680 100644
--- a/gr-filter/include/gnuradio/filter/fir_filter.h
+++ b/gr-filter/include/gnuradio/filter/fir_filter.h
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2004,2010,2012 Free Software Foundation, Inc.
+ * Copyright 2004,2010,2012,2018 Free Software Foundation, Inc.
  *
  * This file is part of GNU Radio
  *
@@ -23,206 +23,46 @@
 #ifndef INCLUDED_FILTER_FIR_FILTER_H
 #define INCLUDED_FILTER_FIR_FILTER_H
 
+#include <cstdint>
 #include <gnuradio/filter/api.h>
-#include <vector>
 #include <gnuradio/gr_complex.h>
+#include <vector>
 
 namespace gr {
-  namespace filter {
-    namespace kernel {
-
-      class FILTER_API fir_filter_fff
-      {
-      public:
-	fir_filter_fff(int decimation,
-		       const std::vector<float> &taps);
-	~fir_filter_fff();
-
-	void set_taps(const std::vector<float> &taps);
-	void update_tap(float t, unsigned int index);
-	std::vector<float> taps() const;
-	unsigned int ntaps() const;
-
-	float filter(const float input[]);
-	void  filterN(float output[],
-		      const float input[],
-		      unsigned long n);
-	void  filterNdec(float output[],
-			 const float input[],
-			 unsigned long n,
-			 unsigned int decimate);
-
-      protected:
-	std::vector<float> d_taps;
-	unsigned int  d_ntaps;
-	float       **d_aligned_taps;
-	float        *d_output;
-	int           d_align;
-	int           d_naligned;
-      };
-
-      /**************************************************************/
-
-      class FILTER_API fir_filter_ccf
-      {
-      public:
-	fir_filter_ccf(int decimation,
-		       const std::vector<float> &taps);
-	~fir_filter_ccf();
-
-	void set_taps(const std::vector<float> &taps);
-	void update_tap(float t, unsigned int index);
-	std::vector<float> taps() const;
-	unsigned int ntaps() const;
-
-	gr_complex filter(const gr_complex input[]);
-	void filterN(gr_complex output[],
-		     const gr_complex input[],
-		     unsigned long n);
-	void filterNdec(gr_complex output[],
-			const gr_complex input[],
-			unsigned long n,
-			unsigned int decimate);
-
-      protected:
-	std::vector<float> d_taps;
-	unsigned int d_ntaps;
-	float      **d_aligned_taps;
-	gr_complex  *d_output;
-	int          d_align;
-	int          d_naligned;
-      };
-
-      /**************************************************************/
-
-      class FILTER_API fir_filter_fcc
-      {
-      public:
-	fir_filter_fcc(int decimation,
-		       const std::vector<gr_complex> &taps);
-	~fir_filter_fcc();
-
-	void set_taps(const std::vector<gr_complex> &taps);
-	void update_tap(gr_complex t, unsigned int index);
-	std::vector<gr_complex> taps() const;
-	unsigned int ntaps() const;
-
-	gr_complex filter(const float input[]);
-	void filterN(gr_complex output[],
-		     const float input[],
-		     unsigned long n);
-	void filterNdec(gr_complex output[],
-			const float input[],
-			unsigned long n,
-			unsigned int decimate);
-
-      protected:
-	std::vector<gr_complex> d_taps;
-	unsigned int d_ntaps;
-	gr_complex **d_aligned_taps;
-	gr_complex  *d_output;
-	int          d_align;
-	int          d_naligned;
-      };
-
-      /**************************************************************/
-
-      class FILTER_API fir_filter_ccc
-      {
-      public:
-	fir_filter_ccc(int decimation,
-		       const std::vector<gr_complex> &taps);
-	~fir_filter_ccc();
-
-	void set_taps(const std::vector<gr_complex> &taps);
-	void update_tap(gr_complex t, unsigned int index);
-	std::vector<gr_complex> taps() const;
-	unsigned int ntaps() const;
-
-	gr_complex filter(const gr_complex input[]);
-	void filterN(gr_complex output[],
-		     const gr_complex input[],
-		     unsigned long n);
-	void filterNdec(gr_complex output[],
-			const gr_complex input[],
-			unsigned long n,
-			unsigned int decimate);
-
-      protected:
-	std::vector<gr_complex> d_taps;
-	unsigned int d_ntaps;
-	gr_complex **d_aligned_taps;
-	gr_complex  *d_output;
-	int          d_align;
-	int          d_naligned;
-      };
-
-      /**************************************************************/
-
-      class FILTER_API fir_filter_scc
-      {
-      public:
-	fir_filter_scc(int decimation,
-		       const std::vector<gr_complex> &taps);
-	~fir_filter_scc();
-
-	void set_taps(const std::vector<gr_complex> &taps);
-	void update_tap(gr_complex t, unsigned int index);
-	std::vector<gr_complex> taps() const;
-	unsigned int ntaps() const;
-
-	gr_complex filter(const short input[]);
-	void filterN(gr_complex output[],
-		     const short input[],
-		     unsigned long n);
-	void filterNdec(gr_complex output[],
-			const short input[],
-			unsigned long n,
-			unsigned int decimate);
-
-      protected:
-	std::vector<gr_complex> d_taps;
-	unsigned int d_ntaps;
-	gr_complex **d_aligned_taps;
-	gr_complex  *d_output;
-	int          d_align;
-	int          d_naligned;
-      };
-
-      /**************************************************************/
-
-      class FILTER_API fir_filter_fsf
-      {
-      public:
-	fir_filter_fsf(int decimation,
-		       const std::vector<float> &taps);
-	~fir_filter_fsf();
-
-	void set_taps(const std::vector<float> &taps);
-	void update_tap(float t, unsigned int index);
-	std::vector<float> taps() const;
-	unsigned int ntaps() const;
-
-	short filter(const float input[]);
-	void filterN(short output[],
-		     const float input[],
-		     unsigned long n);
-	void filterNdec(short output[],
-			const float input[],
-			unsigned long n,
-			unsigned int decimate);
-
-      protected:
-	std::vector<float> d_taps;
-	unsigned int d_ntaps;
-	float      **d_aligned_taps;
-	short       *d_output;
-	int          d_align;
-	int          d_naligned;
-      };
-
-    } /* namespace kernel */
-  } /* namespace filter */
+namespace filter {
+namespace kernel {
+
+template <class IN_T, class OUT_T, class TAP_T>
+class FILTER_API fir_filter {
+    public:
+    fir_filter(int decimation, const std::vector<TAP_T>& taps);
+    ~fir_filter();
+
+    void set_taps(const std::vector<TAP_T>& taps);
+    void update_tap(TAP_T t, unsigned int index);
+    std::vector<TAP_T> taps() const;
+    unsigned int ntaps() const;
+
+    OUT_T filter(const IN_T input[]);
+    void filterN(OUT_T output[], const IN_T input[], unsigned long n);
+    void filterNdec(OUT_T output[], const IN_T input[], unsigned long n, unsigned int decimate);
+
+    protected:
+    std::vector<TAP_T> d_taps;
+    unsigned int d_ntaps;
+    TAP_T** d_aligned_taps;
+    OUT_T* d_output;
+    int d_align;
+    int d_naligned;
+};
+typedef fir_filter<float, float, float> fir_filter_fff;
+typedef fir_filter<gr_complex, gr_complex, float> fir_filter_ccf;
+typedef fir_filter<float, gr_complex, gr_complex> fir_filter_fcc;
+typedef fir_filter<gr_complex, gr_complex, gr_complex> fir_filter_ccc;
+typedef fir_filter<std::int16_t, gr_complex, gr_complex> fir_filter_scc;
+typedef fir_filter<float, std::int16_t, float> fir_filter_fsf;
+} /* namespace kernel */
+} /* namespace filter */
 } /* namespace gr */
 
 #endif /* INCLUDED_FILTER_FIR_FILTER_H */
diff --git a/gr-filter/include/gnuradio/filter/fir_filter_XXX.h.t b/gr-filter/include/gnuradio/filter/fir_filter_XXX.h.t
deleted file mode 100644
index 5e38653c63..0000000000
--- a/gr-filter/include/gnuradio/filter/fir_filter_XXX.h.t
+++ /dev/null
@@ -1,81 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-/* @WARNING@ */
-
-#ifndef @GUARD_NAME@
-#define	@GUARD_NAME@
-
-#include <gnuradio/filter/api.h>
-#include <gnuradio/sync_decimator.h>
-
-namespace gr {
-  namespace filter {
-
-    /*!
-     * \brief FIR filter with @I_TYPE@ input, @O_TYPE@ output, and @TAP_TYPE@ taps
-     * \ingroup filter_blk
-     *
-     * \details
-     * The fir_filter_XXX blocks create finite impulse response
-     * (FIR) filters that perform the convolution in the time
-     * domain:
-     *
-     * \code
-     *   out = 0
-     *   for i in ntaps:
-     *      out += input[n-i] * taps[i]
-     * \endcode
-     *
-     * The taps are a C++ vector (or Python list) of values of the
-     * type specified by the third letter in the block's suffix. For
-     * this block, the value is of type @TAP_TYPE@. Taps can be
-     * created using the firdes or optfir tools.
-     *
-     * These versions of the filter can also act as down-samplers
-     * (or decimators) by specifying an integer value for \p
-     * decimation.
-     */
-    class FILTER_API @BASE_NAME@ : virtual public sync_decimator
-    {
-    public:
-
-      // gr::filter::@BASE_NAME@::sptr
-      typedef boost::shared_ptr<@BASE_NAME@> sptr;
-
-      /*!
-       * \brief FIR filter with @I_TYPE@ input, @O_TYPE@ output, and @TAP_TYPE@ taps
-       *
-       * \param decimation set the integer decimation rate
-       * \param taps a vector/list of taps of type @TAP_TYPE@
-       */
-      static sptr make(int decimation,
-                       const std::vector<@TAP_TYPE@> &taps);
-
-      virtual void set_taps(const std::vector<@TAP_TYPE@> &taps) = 0;
-      virtual std::vector<@TAP_TYPE@> taps() const = 0;
-    };
-
-  } /* namespace filter */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-filter/include/gnuradio/filter/fir_filter_blk.h b/gr-filter/include/gnuradio/filter/fir_filter_blk.h
new file mode 100644
index 0000000000..be0ca50bb6
--- /dev/null
+++ b/gr-filter/include/gnuradio/filter/fir_filter_blk.h
@@ -0,0 +1,87 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef FIR_FILTER_BLK_H
+#define	FIR_FILTER_BLK_H
+
+#include <gnuradio/filter/api.h>
+#include <gnuradio/sync_decimator.h>
+#include <cstdint>
+
+namespace gr {
+  namespace filter {
+
+    /*!
+     * \brief FIR filter with IN_T input, OUT_T output, and TAP_T taps
+     * \ingroup filter_blk
+     *
+     * \details
+     * The fir_filter_blk_XXX blocks create finite impulse response
+     * (FIR) filters that perform the convolution in the time
+     * domain:
+     *
+     * \code
+     *   out = 0
+     *   for i in ntaps:
+     *      out += input[n-i] * taps[i]
+     * \endcode
+     *
+     * The taps are a C++ vector (or Python list) of values of the
+     * type specified by the third letter in the block's suffix. For
+     * this block, the value is of type TAP_T. Taps can be
+     * created using the firdes or optfir tools.
+     *
+     * These versions of the filter can also act as down-samplers
+     * (or decimators) by specifying an integer value for \p
+     * decimation.
+     */
+    template <class IN_T, class OUT_T, class TAP_T>
+    class FILTER_API fir_filter_blk : virtual public sync_decimator
+    {
+    public:
+
+      typedef boost::shared_ptr< fir_filter_blk<IN_T,OUT_T,TAP_T> > sptr;
+
+      /*!
+       * \brief FIR filter with IN_T input, OUT_T output, and TAP_T taps
+       *
+       * \param decimation set the integer decimation rate
+       * \param taps a vector/list of taps of type TAP_T
+       */
+      static sptr make(int decimation,
+                       const std::vector<TAP_T> &taps);
+
+      virtual void set_taps(const std::vector<TAP_T> &taps) = 0;
+      virtual std::vector<TAP_T> taps() const = 0;
+    };
+
+    typedef fir_filter_blk<gr_complex, gr_complex, gr_complex> fir_filter_ccc;
+    typedef fir_filter_blk<gr_complex, gr_complex, float> fir_filter_ccf;
+    typedef fir_filter_blk<float, gr_complex, gr_complex> fir_filter_fcc;
+    typedef fir_filter_blk<float, float, float> fir_filter_fff;
+    typedef fir_filter_blk<float, std::int16_t, float> fir_filter_fsf;
+    typedef fir_filter_blk<std::int16_t, gr_complex, gr_complex> fir_filter_scc;
+
+  } /* namespace filter */
+} /* namespace gr */
+
+#endif /* FIR_FILTER_BLK_H */
diff --git a/gr-filter/include/gnuradio/filter/freq_xlating_fir_filter.h b/gr-filter/include/gnuradio/filter/freq_xlating_fir_filter.h
new file mode 100644
index 0000000000..d06f5ed042
--- /dev/null
+++ b/gr-filter/include/gnuradio/filter/freq_xlating_fir_filter.h
@@ -0,0 +1,100 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2002,2004,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef FREQ_XLATING_FIR_FILTER_H
+#define	FREQ_XLATING_FIR_FILTER_H
+
+#include <gnuradio/filter/api.h>
+#include <gnuradio/sync_decimator.h>
+
+namespace gr {
+  namespace filter {
+
+
+    /*!
+     * \brief FIR filter combined with frequency translation with
+     * IN_T input, OUT_T output and TAP_T taps
+     *
+     * \ingroup channelizers_blk
+     *
+     * This class efficiently combines a frequency translation
+     * (typically "down conversion") with a FIR filter (typically
+     * low-pass) and decimation.  It is ideally suited for a "channel
+     * selection filter" and can be efficiently used to select and
+     * decimate a narrow band signal out of wide bandwidth input.
+     *
+     * Uses a single input array to produce a single output array.
+     * Additional inputs and/or outputs are ignored.
+     *
+     * - freq (input):
+     *        Receives a PMT pair: (intern("freq"), double(frequency).
+     *        The block then sets its frequency translation value to
+     *        the new frequency provided by the message. A tag is then
+     *        produced when the new frequency is applied to let
+     *        downstream blocks know when this has taken affect.
+     *        Use the filter's group delay to determine when the
+     *        transients after the change have settled down.
+     */
+    template <class IN_T, class OUT_T, class TAP_T>
+    class FILTER_API freq_xlating_fir_filter : virtual public sync_decimator
+    {
+    public:
+      typedef boost::shared_ptr< freq_xlating_fir_filter<IN_T,OUT_T,TAP_T> > sptr;
+
+      /*!
+       * \brief FIR filter with IN_T input, OUT_T output, and
+       * TAP_T taps that also frequency translates a signal from
+       * \p center_freq.
+       *
+       * Construct a FIR filter with the given taps and a composite
+       * frequency translation that shifts center_freq down to zero
+       * Hz. The frequency translation logically comes before the
+       * filtering operation.
+       *
+       * \param decimation set the integer decimation rate
+       * \param taps a vector/list of taps of type TAP_T
+       * \param center_freq Center frequency of signal to down convert from (Hz)
+       * \param sampling_freq Sampling rate of signal (in Hz)
+       */
+      static sptr make(int decimation,
+				  const std::vector<TAP_T> &taps,
+				  double center_freq,
+				  double sampling_freq);
+
+      virtual void set_center_freq(double center_freq) = 0;
+      virtual double center_freq() const = 0;
+
+      virtual void set_taps(const std::vector<TAP_T> &taps) = 0;
+      virtual std::vector<TAP_T> taps() const = 0;
+    };
+    typedef freq_xlating_fir_filter<gr_complex, gr_complex, gr_complex> freq_xlating_fir_filter_ccc;
+    typedef freq_xlating_fir_filter<gr_complex, gr_complex, float> freq_xlating_fir_filter_ccf;
+    typedef freq_xlating_fir_filter<float, gr_complex, gr_complex> freq_xlating_fir_filter_fcc;
+    typedef freq_xlating_fir_filter<float, gr_complex, float> freq_xlating_fir_filter_fcf;
+    typedef freq_xlating_fir_filter<std::int16_t, gr_complex, float> freq_xlating_fir_filter_scf;
+    typedef freq_xlating_fir_filter<std::int16_t, gr_complex, gr_complex> freq_xlating_fir_filter_scc;
+
+
+  } /* namespace filter */
+} /* namespace gr */
+
+#endif /* FREQ_XLATING_FIR_FILTER_H */
diff --git a/gr-filter/include/gnuradio/filter/freq_xlating_fir_filter_XXX.h.t b/gr-filter/include/gnuradio/filter/freq_xlating_fir_filter_XXX.h.t
deleted file mode 100644
index d8cb8f962c..0000000000
--- a/gr-filter/include/gnuradio/filter/freq_xlating_fir_filter_XXX.h.t
+++ /dev/null
@@ -1,98 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2002,2004,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-/*
- * WARNING: This file is automatically generated by cmake.
- * Any changes made to this file will be overwritten.
- */
-
-#ifndef @GUARD_NAME@
-#define	@GUARD_NAME@
-
-#include <gnuradio/filter/api.h>
-#include <gnuradio/sync_decimator.h>
-
-namespace gr {
-  namespace filter {
-
-
-    /*!
-     * \brief FIR filter combined with frequency translation with
-     * @I_TYPE@ input, @O_TYPE@ output and @TAP_TYPE@ taps
-     *
-     * \ingroup channelizers_blk
-     *
-     * This class efficiently combines a frequency translation
-     * (typically "down conversion") with a FIR filter (typically
-     * low-pass) and decimation.  It is ideally suited for a "channel
-     * selection filter" and can be efficiently used to select and
-     * decimate a narrow band signal out of wide bandwidth input.
-     *
-     * Uses a single input array to produce a single output array.
-     * Additional inputs and/or outputs are ignored.
-     *
-     * - freq (input):
-     *        Receives a PMT pair: (intern("freq"), double(frequency).
-     *        The block then sets its frequency translation value to
-     *        the new frequency provided by the message. A tag is then
-     *        produced when the new frequency is applied to let
-     *        downstream blocks know when this has taken affect.
-     *        Use the filter's group delay to determine when the
-     *        transients after the change have settled down.
-     */
-    class FILTER_API @BASE_NAME@ : virtual public sync_decimator
-    {
-    public:
-      // gr::filter::@BASE_NAME@::sptr
-      typedef boost::shared_ptr<@BASE_NAME@> sptr;
-
-      /*!
-       * \brief FIR filter with @I_TYPE@ input, @O_TYPE@ output, and
-       * @TAP_TYPE@ taps that also frequency translates a signal from
-       * \p center_freq.
-       *
-       * Construct a FIR filter with the given taps and a composite
-       * frequency translation that shifts center_freq down to zero
-       * Hz. The frequency translation logically comes before the
-       * filtering operation.
-       *
-       * \param decimation set the integer decimation rate
-       * \param taps a vector/list of taps of type @TAP_TYPE@
-       * \param center_freq Center frequency of signal to down convert from (Hz)
-       * \param sampling_freq Sampling rate of signal (in Hz)
-       */
-      static sptr make(int decimation,
-				  const std::vector<@TAP_TYPE@> &taps,
-				  double center_freq,
-				  double sampling_freq);
-
-      virtual void set_center_freq(double center_freq) = 0;
-      virtual double center_freq() const = 0;
-
-      virtual void set_taps(const std::vector<@TAP_TYPE@> &taps) = 0;
-      virtual std::vector<@TAP_TYPE@> taps() const = 0;
-    };
-
-  } /* namespace filter */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-filter/include/gnuradio/filter/interp_fir_filter.h b/gr-filter/include/gnuradio/filter/interp_fir_filter.h
new file mode 100644
index 0000000000..abdc12ec20
--- /dev/null
+++ b/gr-filter/include/gnuradio/filter/interp_fir_filter.h
@@ -0,0 +1,87 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INTERP_FIR_FILTER_H
+#define	INTERP_FIR_FILTER_H
+
+#include <gnuradio/filter/api.h>
+#include <gnuradio/sync_interpolator.h>
+#include <cstdint>
+
+namespace gr {
+  namespace filter {
+
+    /*!
+     * \brief Interpolating FIR filter with IN_T input, OUT_T output and TAP_T taps
+     * \ingroup filter_blk
+     *
+     * \details
+     * The fir_filter_XXX blocks create finite impulse response
+     * (FIR) filters that perform the convolution in the time
+     * domain:
+     *
+     * \code
+     *   out = 0
+     *   for i in ntaps:
+     *      out += input[n-i] * taps[i]
+     * \endcode
+     *
+     * The taps are a C++ vector (or Python list) of values of the
+     * type specified by the third letter in the block's suffix. For
+     * this block, the value is of type TAP_T. Taps can be
+     * created using the firdes or optfir tools.
+     *
+     * These versions of the filter can also act as up-samplers
+     * (or interpolators) by specifying an integer value for \p
+     * interpolation.
+     *
+     */
+    template <class IN_T, class OUT_T, class TAP_T>
+    class FILTER_API interp_fir_filter : virtual public sync_interpolator
+    {
+    public:
+      // gr::filter::interp_fir_filter::sptr
+      typedef boost::shared_ptr<interp_fir_filter> sptr;
+
+      /*!
+       * \brief Interpolating FIR filter with IN_T input, OUT_T output, and TAP_T taps
+       *
+       * \param interpolation set the integer interpolation rate
+       * \param taps a vector/list of taps of type TAP_T
+       */
+      static sptr make(unsigned interpolation,
+				  const std::vector<TAP_T> &taps);
+
+      virtual void set_taps(const std::vector<TAP_T> &taps) = 0;
+      virtual std::vector<TAP_T> taps() const = 0;
+    };
+    typedef interp_fir_filter<gr_complex, gr_complex, gr_complex> interp_fir_filter_ccc;
+    typedef interp_fir_filter<gr_complex, gr_complex, float> interp_fir_filter_ccf;
+    typedef interp_fir_filter<float, gr_complex, gr_complex> interp_fir_filter_fcc;
+    typedef interp_fir_filter<float, float, float> interp_fir_filter_fff;
+    typedef interp_fir_filter<float, std::int16_t, float> interp_fir_filter_fsf;
+    typedef interp_fir_filter<std::int16_t, gr_complex, gr_complex> interp_fir_filter_scc;
+
+  } /* namespace filter */
+} /* namespace gr */
+
+#endif /* INTERP_FIR_FILTER_H */
diff --git a/gr-filter/include/gnuradio/filter/interp_fir_filter_XXX.h.t b/gr-filter/include/gnuradio/filter/interp_fir_filter_XXX.h.t
deleted file mode 100644
index 5b0f3511b4..0000000000
--- a/gr-filter/include/gnuradio/filter/interp_fir_filter_XXX.h.t
+++ /dev/null
@@ -1,81 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-/* @WARNING@ */
-
-#ifndef @GUARD_NAME@
-#define	@GUARD_NAME@
-
-#include <gnuradio/filter/api.h>
-#include <gnuradio/sync_interpolator.h>
-
-namespace gr {
-  namespace filter {
-
-    /*!
-     * \brief Interpolating FIR filter with @I_TYPE@ input, @O_TYPE@ output and @TAP_TYPE@ taps
-     * \ingroup filter_blk
-     *
-     * \details
-     * The fir_filter_XXX blocks create finite impulse response
-     * (FIR) filters that perform the convolution in the time
-     * domain:
-     *
-     * \code
-     *   out = 0
-     *   for i in ntaps:
-     *      out += input[n-i] * taps[i]
-     * \endcode
-     *
-     * The taps are a C++ vector (or Python list) of values of the
-     * type specified by the third letter in the block's suffix. For
-     * this block, the value is of type @TAP_TYPE@. Taps can be
-     * created using the firdes or optfir tools.
-     *
-     * These versions of the filter can also act as up-samplers
-     * (or interpolators) by specifying an integer value for \p
-     * interpolation.
-     *
-     */
-    class FILTER_API @BASE_NAME@ : virtual public sync_interpolator
-    {
-    public:
-      // gr::filter::@BASE_NAME@::sptr
-      typedef boost::shared_ptr<@BASE_NAME@> sptr;
-
-      /*!
-       * \brief Interpolating FIR filter with @I_TYPE@ input, @O_TYPE@ output, and @TAP_TYPE@ taps
-       *
-       * \param interpolation set the integer interpolation rate
-       * \param taps a vector/list of taps of type @TAP_TYPE@
-       */
-      static sptr make(unsigned interpolation,
-				  const std::vector<@TAP_TYPE@> &taps);
-
-      virtual void set_taps(const std::vector<@TAP_TYPE@> &taps) = 0;
-      virtual std::vector<@TAP_TYPE@> taps() const = 0;
-    };
-
-  } /* namespace filter */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-filter/include/gnuradio/filter/rational_resampler_base.h b/gr-filter/include/gnuradio/filter/rational_resampler_base.h
new file mode 100644
index 0000000000..97974c6c15
--- /dev/null
+++ b/gr-filter/include/gnuradio/filter/rational_resampler_base.h
@@ -0,0 +1,102 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2005,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef RATIONAL_RESAMPLER_BASE_H
+#define	RATIONAL_RESAMPLER_BASE_H
+
+#include <gnuradio/filter/api.h>
+#include <gnuradio/block.h>
+
+
+namespace gr {
+  namespace filter {
+
+    /*!
+     * \brief Rational Resampling Polyphase FIR filter with IN_T
+     * input, OUT_T output and TAP_T taps.
+     * \ingroup resamplers_blk
+     *
+     * Make a rational resampling FIR filter. If the input signal is
+     * at rate fs, then the output signal will be at a rate of \p
+     * interpolation * fs / \p decimation.
+     *
+     * The interpolation and decimation rates should be kept as
+     * small as possible, and generally should be relatively prime
+     * to help reduce complexity in memory and computation.
+     *
+     * The set of \p taps supplied to this filterbank should be
+     * designed around the resampling amount and must avoid aliasing
+     * (when interpolation/decimation < 1) and images (when
+     * interpolation/decimation > 1).
+     *
+     * As with any filter, the behavior of the filter taps (or
+     * coefficients) is determined by the highest sampling rate that
+     * the filter will ever see. In the case of a resampler that
+     * increases the sampling rate, the highest sampling rate observed
+     * is \p interpolation since in the filterbank, the number of
+     * filter arms is equal to \p interpolation. When the resampler
+     * decreases the sampling rate (decimation > interpolation), then
+     * the highest rate is the input sample rate of the original
+     * signal. We must create a filter based around this value to
+     * reduce any aliasing that may occur from out-of-band signals.
+     *
+     * Another way to think about how to create the filter taps is
+     * that the filter is effectively applied after interpolation and
+     * before decimation. And yet another way to think of it is that
+     * the taps should be a LPF that is at least as narrow as the
+     * narrower of the required anti-image postfilter or anti-alias
+     * prefilter.
+     */
+    template <class IN_T, class OUT_T, class TAP_T>
+    class FILTER_API rational_resampler_base : virtual public block
+    {
+    public:
+      typedef boost::shared_ptr< rational_resampler_base<IN_T,OUT_T,TAP_T> > sptr;
+
+      /*!
+       * Make a rational resampling FIR filter.
+       *
+       * \param interpolation The integer interpolation rate of the filter
+       * \param decimation The integer decimation rate of the filter
+       * \param taps The filter taps to control images and aliases
+       */
+      static sptr make(unsigned interpolation,
+                       unsigned decimation,
+                       const std::vector<TAP_T> &taps);
+
+      virtual unsigned interpolation() const = 0;
+      virtual unsigned decimation() const = 0;
+
+      virtual void set_taps(const std::vector<TAP_T> &taps) = 0;
+      virtual std::vector<TAP_T> taps() const = 0;
+    };
+    typedef rational_resampler_base<gr_complex, gr_complex, gr_complex> rational_resampler_base_ccc;
+    typedef rational_resampler_base<gr_complex, gr_complex, float> rational_resampler_base_ccf;
+    typedef rational_resampler_base<float, gr_complex, gr_complex> rational_resampler_base_fcc;
+    typedef rational_resampler_base<float, float, float> rational_resampler_base_fff;
+    typedef rational_resampler_base<float, std::int16_t, float> rational_resampler_base_fsf;
+    typedef rational_resampler_base<std::int16_t, gr_complex, gr_complex> rational_resampler_base_scc;
+
+  } /* namespace filter */
+} /* namespace gr */
+
+#endif /* RATIONAL_RESAMPLER_BASE_H */
diff --git a/gr-filter/include/gnuradio/filter/rational_resampler_base_XXX.h.t b/gr-filter/include/gnuradio/filter/rational_resampler_base_XXX.h.t
deleted file mode 100644
index d5f8379804..0000000000
--- a/gr-filter/include/gnuradio/filter/rational_resampler_base_XXX.h.t
+++ /dev/null
@@ -1,98 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2005,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-/* @WARNING@ */
-
-#ifndef @GUARD_NAME@
-#define	@GUARD_NAME@
-
-#include <gnuradio/filter/api.h>
-#include <gnuradio/block.h>
-
-
-namespace gr {
-  namespace filter {
-
-    /*!
-     * \brief Rational Resampling Polyphase FIR filter with @I_TYPE@
-     * input, @O_TYPE@ output and @TAP_TYPE@ taps.
-     * \ingroup resamplers_blk
-     *
-     * Make a rational resampling FIR filter. If the input signal is
-     * at rate fs, then the output signal will be at a rate of \p
-     * interpolation * fs / \p decimation.
-     *
-     * The interpolation and decimation rates should be kept as
-     * small as possible, and generally should be relatively prime
-     * to help reduce complexity in memory and computation.
-     *
-     * The set of \p taps supplied to this filterbank should be
-     * designed around the resampling amount and must avoid aliasing
-     * (when interpolation/decimation < 1) and images (when
-     * interpolation/decimation > 1).
-     *
-     * As with any filter, the behavior of the filter taps (or
-     * coefficients) is determined by the highest sampling rate that
-     * the filter will ever see. In the case of a resampler that
-     * increases the sampling rate, the highest sampling rate observed
-     * is \p interpolation since in the filterbank, the number of
-     * filter arms is equal to \p interpolation. When the resampler
-     * decreases the sampling rate (decimation > interpolation), then
-     * the highest rate is the input sample rate of the original
-     * signal. We must create a filter based around this value to
-     * reduce any aliasing that may occur from out-of-band signals.
-     *
-     * Another way to think about how to create the filter taps is
-     * that the filter is effectively applied after interpolation and
-     * before decimation. And yet another way to think of it is that
-     * the taps should be a LPF that is at least as narrow as the
-     * narrower of the required anti-image postfilter or anti-alias
-     * prefilter.
-     */
-    class FILTER_API @NAME@ : virtual public block
-    {
-    public:
-      // gr::filter::@BASE_NAME@::sptr
-      typedef boost::shared_ptr<@BASE_NAME@> sptr;
-
-      /*!
-       * Make a rational resampling FIR filter.
-       *
-       * \param interpolation The integer interpolation rate of the filter
-       * \param decimation The integer decimation rate of the filter
-       * \param taps The filter taps to control images and aliases
-       */
-      static sptr make(unsigned interpolation,
-                       unsigned decimation,
-                       const std::vector<@TAP_TYPE@> &taps);
-
-      virtual unsigned interpolation() const = 0;
-      virtual unsigned decimation() const = 0;
-
-      virtual void set_taps(const std::vector<@TAP_TYPE@> &taps) = 0;
-      virtual std::vector<@TAP_TYPE@> taps() const = 0;
-    };
-
-  } /* namespace filter */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-filter/lib/CMakeLists.txt b/gr-filter/lib/CMakeLists.txt
index 8bd7236865..5bb7b5d1fb 100644
--- a/gr-filter/lib/CMakeLists.txt
+++ b/gr-filter/lib/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2014,2017 Free Software Foundation, Inc.
+# Copyright (C) 2012-2014,2017-2018 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -17,15 +17,6 @@
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
 
-########################################################################
-# Invoke macro to generate various sources and headers
-########################################################################
-include(GrMiscUtils)
-GR_EXPAND_X_CC_H(filter fir_filter_XXX_impl              ccc ccf fcc fff fsf scc)
-GR_EXPAND_X_CC_H(filter freq_xlating_fir_filter_XXX_impl ccc ccf fcc fcf scf scc)
-GR_EXPAND_X_CC_H(filter interp_fir_filter_XXX_impl       ccc ccf fcc fff fsf scc)
-GR_EXPAND_X_CC_H(filter rational_resampler_base_XXX_impl ccc ccf fcc fff fsf scc)
-
 ########################################################################
 # Setup the include and linker paths
 ########################################################################
@@ -53,17 +44,19 @@ endif(ENABLE_GR_CTRLPORT)
 ########################################################################
 list(APPEND filter_sources
   fir_filter.cc
+  fir_filter_blk_impl.cc
   fir_filter_with_buffer.cc
   fft_filter.cc
   firdes.cc
+  freq_xlating_fir_filter_impl.cc
   iir_filter.cc
+  interp_fir_filter_impl.cc
   mmse_fir_interpolator_cc.cc
   mmse_fir_interpolator_ff.cc
   mmse_interp_differentiator_cc.cc
   mmse_interp_differentiator_ff.cc
   pm_remez.cc
   polyphase_filterbank.cc
-  ${generated_sources}
   dc_blocker_cc_impl.cc
   dc_blocker_ff_impl.cc
   filter_delay_fc_impl.cc
@@ -90,6 +83,7 @@ list(APPEND filter_sources
   pfb_decimator_ccf_impl.cc
   pfb_interpolator_ccf_impl.cc
   pfb_synthesizer_ccf_impl.cc
+  rational_resampler_base_impl.cc
   single_pole_iir_filter_cc_impl.cc
   single_pole_iir_filter_ff_impl.cc
 )
@@ -121,7 +115,7 @@ add_library(gnuradio-filter SHARED ${filter_sources})
 target_link_libraries(gnuradio-filter ${filter_libs})
 GR_LIBRARY_FOO(gnuradio-filter)
 add_dependencies(gnuradio-filter
-  filter_generated_includes filter_generated_swigs
+  filter_generated_swigs
   gnuradio-runtime gnuradio-fft)
 
 if(ENABLE_STATIC_LIBS)
@@ -139,7 +133,6 @@ if(ENABLE_STATIC_LIBS)
   add_library(gnuradio-filter_static STATIC ${filter_sources})
 
   add_dependencies(gnuradio-filter_static
-    filter_generated_includes
     gnuradio-runtime_static gnuradio-fft_static)
 
   if(NOT WIN32)
diff --git a/gr-filter/lib/fir_filter.cc b/gr-filter/lib/fir_filter.cc
index 895c778076..b85e972255 100644
--- a/gr-filter/lib/fir_filter.cc
+++ b/gr-filter/lib/fir_filter.cc
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2004,2010,2012 Free Software Foundation, Inc.
+ * Copyright 2004,2010,2012,2018 Free Software Foundation, Inc.
  *
  * This file is part of GNU Radio
  *
@@ -20,703 +20,169 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#include <gnuradio/filter/fir_filter.h>
-#include <gnuradio/fft/fft.h>
-#include <volk/volk.h>
 #include <cstdio>
 #include <cstring>
+#include <gnuradio/fft/fft.h>
+#include <gnuradio/filter/fir_filter.h>
+#include <volk/volk.h>
 
 namespace gr {
-  namespace filter {
-    namespace kernel {
-
-      fir_filter_fff::fir_filter_fff(int decimation,
-				     const std::vector<float> &taps)
-      {
-	d_align = volk_get_alignment();
-	d_naligned = std::max((size_t)1, d_align / sizeof(float));
-
-	d_aligned_taps = NULL;
-	set_taps(taps);
-
-	// Make sure the output sample is always aligned, too.
-	d_output = (float*)volk_malloc(1*sizeof(float), d_align);
-      }
-
-      fir_filter_fff::~fir_filter_fff()
-      {
-	// Free all aligned taps
-	if(d_aligned_taps != NULL) {
-	  for(int i = 0; i < d_naligned; i++) {
-	    volk_free(d_aligned_taps[i]);
-	  }
-	  ::free(d_aligned_taps);
-	  d_aligned_taps = NULL;
-	}
-
-	// Free output sample
-	volk_free(d_output);
-      }
-
-      void
-      fir_filter_fff::set_taps(const std::vector<float> &taps)
-      {
-	// Free the taps if already allocated
-	if(d_aligned_taps!= NULL) {
-	  for(int i = 0; i < d_naligned; i++) {
-	    volk_free(d_aligned_taps[i]);
-	  }
-	  ::free(d_aligned_taps);
-	  d_aligned_taps = NULL;
-	}
-
-	d_ntaps = (int)taps.size();
-	d_taps = taps;
-	std::reverse(d_taps.begin(), d_taps.end());
-
-	// Make a set of taps at all possible arch alignments
-	d_aligned_taps = (float**)malloc(d_naligned*sizeof(float*));
-	for(int i = 0; i < d_naligned; i++) {
-          d_aligned_taps[i] = (float*)volk_malloc((d_ntaps+d_naligned-1)*sizeof(float), d_align);
-	  memset(d_aligned_taps[i], 0, sizeof(float)*(d_ntaps+d_naligned-1));
-	  for(unsigned int j = 0; j < d_ntaps; j++)
-	    d_aligned_taps[i][i+j] = d_taps[j];
-	}
-      }
-
-      void
-      fir_filter_fff::update_tap(float t, unsigned int index)
-      {
-	d_taps[index] = t;
-	for(int i = 0; i < d_naligned; i++) {
-	  d_aligned_taps[i][i+index] = t;
-	}
-      }
-
-      std::vector<float>
-      fir_filter_fff::taps() const
-      {
-	std::vector<float> t = d_taps;
-	std::reverse(t.begin(), t.end());
-	return t;
-      }
-
-      unsigned int
-      fir_filter_fff::ntaps() const
-      {
-	return d_ntaps;
-      }
-
-      float
-      fir_filter_fff::filter(const float input[])
-      {
-	const float *ar = (float *)((size_t) input & ~(d_align-1));
-	unsigned al = input - ar;
-
-	volk_32f_x2_dot_prod_32f_a(d_output, ar,
-				   d_aligned_taps[al],
-				   d_ntaps+al);
-	return *d_output;
-      }
-
-      void
-      fir_filter_fff::filterN(float output[],
-			      const float input[],
-			      unsigned long n)
-      {
-	for(unsigned long i = 0; i < n; i++) {
-	  output[i] = filter(&input[i]);
-	}
-      }
-
-      void
-      fir_filter_fff::filterNdec(float output[],
-				 const float input[],
-				 unsigned long n,
-				 unsigned int decimate)
-      {
-	unsigned long j = 0;
-	for(unsigned long i = 0; i < n; i++) {
-	  output[i] = filter(&input[j]);
-	  j += decimate;
-	}
-      }
-
-      /**************************************************************/
-
-      fir_filter_ccf::fir_filter_ccf(int decimation,
-				     const std::vector<float> &taps)
-      {
-	d_align = volk_get_alignment();
-	d_naligned = std::max((size_t)1, d_align / sizeof(gr_complex));
-
-	d_aligned_taps = NULL;
-	set_taps(taps);
-
-	// Make sure the output sample is always aligned, too.
-	d_output = (gr_complex*)volk_malloc(1*sizeof(gr_complex), d_align);
-      }
-
-      fir_filter_ccf::~fir_filter_ccf()
-      {
-	// Free all aligned taps
-	if(d_aligned_taps != NULL) {
-	  for(int i = 0; i < d_naligned; i++) {
-	    volk_free(d_aligned_taps[i]);
-	  }
-	  ::free(d_aligned_taps);
-	  d_aligned_taps = NULL;
-	}
-
-	// Free output sample
-	volk_free(d_output);
-      }
-
-      void
-      fir_filter_ccf::set_taps(const std::vector<float> &taps)
-      {
-	// Free the taps if already allocated
-	if(d_aligned_taps != NULL) {
-	  for(int i = 0; i < d_naligned; i++) {
-	    volk_free(d_aligned_taps[i]);
-	  }
-	  ::free(d_aligned_taps);
-	  d_aligned_taps = NULL;
-	}
-
-	d_ntaps = (int)taps.size();
-	d_taps = taps;
-	std::reverse(d_taps.begin(), d_taps.end());
-
-	// Make a set of taps at all possible arch alignments
-	d_aligned_taps = (float**)malloc(d_naligned*sizeof(float*));
-	for(int i = 0; i < d_naligned; i++) {
-          d_aligned_taps[i] = (float*)volk_malloc((d_ntaps+d_naligned-1)*sizeof(float), d_align);
-	  memset(d_aligned_taps[i], 0, sizeof(float)*(d_ntaps+d_naligned-1));
-	  for(unsigned int j = 0; j < d_ntaps; j++)
-	    d_aligned_taps[i][i+j] = d_taps[j];
-	}
-      }
-
-      void
-      fir_filter_ccf::update_tap(float t, unsigned int index)
-      {
-	d_taps[index] = t;
-	for(int i = 0; i < d_naligned; i++) {
-	  d_aligned_taps[i][i+index] = t;
-	}
-      }
-
-      std::vector<float>
-      fir_filter_ccf::taps() const
-      {
-	std::vector<float> t = d_taps;
-	std::reverse(t.begin(), t.end());
-	return t;
-      }
-
-      unsigned int
-      fir_filter_ccf::ntaps() const
-      {
-	return d_ntaps;
-      }
-
-      gr_complex
-      fir_filter_ccf::filter(const gr_complex input[])
-      {
-	const gr_complex *ar = (gr_complex *)((size_t) input & ~(d_align-1));
-	unsigned al = input - ar;
-
-	volk_32fc_32f_dot_prod_32fc_a(d_output, ar,
-				      d_aligned_taps[al],
-				      (d_ntaps+al));
-	return *d_output;
-      }
-
-      void
-      fir_filter_ccf::filterN(gr_complex output[],
-			      const gr_complex input[],
-			      unsigned long n)
-      {
-	for(unsigned long i = 0; i < n; i++)
-	  output[i] = filter(&input[i]);
-      }
-
-
-      void
-      fir_filter_ccf::filterNdec(gr_complex output[],
-				 const gr_complex input[],
-				 unsigned long n,
-				 unsigned int decimate)
-      {
-	unsigned long j = 0;
-	for(unsigned long i = 0; i < n; i++){
-	  output[i] = filter(&input[j]);
-	  j += decimate;
-	}
-      }
-
-
-      /**************************************************************/
-
-
-      fir_filter_fcc::fir_filter_fcc(int decimation,
-				     const std::vector<gr_complex> &taps)
-      {
-	d_align = volk_get_alignment();
-	d_naligned = std::max((size_t)1, d_align / sizeof(float));
-
-	d_aligned_taps = NULL;
-	set_taps(taps);
-
-	// Make sure the output sample is always aligned, too.
-	d_output = (gr_complex*)volk_malloc(1*sizeof(gr_complex), d_align);
-      }
-
-      fir_filter_fcc::~fir_filter_fcc()
-      {
-	// Free all aligned taps
-	if(d_aligned_taps != NULL) {
-	  for(int i = 0; i < d_naligned; i++) {
-	    volk_free(d_aligned_taps[i]);
-	  }
-	  ::free(d_aligned_taps);
-	  d_aligned_taps = NULL;
-	}
-
-	// Free output sample
-	volk_free(d_output);
-      }
-
-      void
-      fir_filter_fcc::set_taps(const std::vector<gr_complex> &taps)
-      {
-	// Free the taps if already allocated
-	if(d_aligned_taps != NULL) {
-	  for(int i = 0; i < d_naligned; i++) {
-	    volk_free(d_aligned_taps[i]);
-	  }
-	  ::free(d_aligned_taps);
-	  d_aligned_taps = NULL;
-	}
-
-	d_ntaps = (int)taps.size();
-	d_taps = taps;
-	std::reverse(d_taps.begin(), d_taps.end());
-
-	// Make a set of taps at all possible arch alignments
-	d_aligned_taps = (gr_complex**)malloc(d_naligned*sizeof(gr_complex*));
-	for(int i = 0; i < d_naligned; i++) {
-          d_aligned_taps[i] = (gr_complex*)volk_malloc((d_ntaps+d_naligned-1)*sizeof(gr_complex), d_align);
-	  memset(d_aligned_taps[i], 0, sizeof(gr_complex)*(d_ntaps+d_naligned-1));
-	  for(unsigned int j = 0; j < d_ntaps; j++)
-	    d_aligned_taps[i][i+j] = d_taps[j];
-	}
-      }
-
-      void
-      fir_filter_fcc::update_tap(gr_complex t, unsigned int index)
-      {
-	d_taps[index] = t;
-	for(int i = 0; i < d_naligned; i++) {
-	  d_aligned_taps[i][i+index] = t;
-	}
-      }
-
-
-      std::vector<gr_complex>
-      fir_filter_fcc::taps() const
-      {
-	std::vector<gr_complex> t = d_taps;
-	std::reverse(t.begin(), t.end());
-	return t;
-      }
-
-      unsigned int
-      fir_filter_fcc::ntaps() const
-      {
-	return d_ntaps;
-      }
-
-      gr_complex
-      fir_filter_fcc::filter(const float input[])
-      {
-	const float *ar = (float *)((size_t) input & ~(d_align-1));
-	unsigned al = input - ar;
-
-	volk_32fc_32f_dot_prod_32fc_a(d_output,
-				      d_aligned_taps[al],
-				      ar,
-				      (d_ntaps+al));
-	return *d_output;
-      }
-
-      void
-      fir_filter_fcc::filterN(gr_complex output[],
-			      const float input[],
-			      unsigned long n)
-      {
-	for(unsigned long i = 0; i < n; i++)
-	  output[i] = filter(&input[i]);
-      }
-
-
-      void
-      fir_filter_fcc::filterNdec(gr_complex output[],
-				 const float input[],
-				 unsigned long n,
-				 unsigned int decimate)
-      {
-	unsigned long j = 0;
-	for(unsigned long i = 0; i < n; i++){
-	  output[i] = filter(&input[j]);
-	  j += decimate;
-	}
-      }
-
-      /**************************************************************/
-
-      fir_filter_ccc::fir_filter_ccc(int decimation,
-				     const std::vector<gr_complex> &taps)
-      {
-	d_align = volk_get_alignment();
-	d_naligned = std::max((size_t)1, d_align / sizeof(gr_complex));
-
-	d_aligned_taps = NULL;
-	set_taps(taps);
-
-	// Make sure the output sample is always aligned, too.
-	d_output = (gr_complex*)volk_malloc(1*sizeof(gr_complex), d_align);
-      }
-
-      fir_filter_ccc::~fir_filter_ccc()
-      {
-	// Free all aligned taps
-	if(d_aligned_taps != NULL) {
-	  for(int i = 0; i < d_naligned; i++) {
-	    volk_free(d_aligned_taps[i]);
-	  }
-	  ::free(d_aligned_taps);
-	  d_aligned_taps = NULL;
-	}
-
-	// Free output sample
-	volk_free(d_output);
-      }
-
-      void
-      fir_filter_ccc::set_taps(const std::vector<gr_complex> &taps)
-      {
-	// Free the taps if already allocated
-	if(d_aligned_taps != NULL) {
-	  for(int i = 0; i < d_naligned; i++) {
-	    volk_free(d_aligned_taps[i]);
-	  }
-	  ::free(d_aligned_taps);
-	  d_aligned_taps = NULL;
-	}
-
-	d_ntaps = (int)taps.size();
-	d_taps = taps;
-	std::reverse(d_taps.begin(), d_taps.end());
-
-	// Make a set of taps at all possible arch alignments
-	d_aligned_taps = (gr_complex**)malloc(d_naligned*sizeof(gr_complex*));
-	for(int i = 0; i < d_naligned; i++) {
-          d_aligned_taps[i] = (gr_complex*)volk_malloc((d_ntaps+d_naligned-1)*sizeof(gr_complex), d_align);
-	  memset(d_aligned_taps[i], 0, sizeof(gr_complex)*(d_ntaps+d_naligned-1));
-	  for(unsigned int j = 0; j < d_ntaps; j++)
-	    d_aligned_taps[i][i+j] = d_taps[j];
-	}
-      }
-
-      void
-      fir_filter_ccc::update_tap(gr_complex t, unsigned int index)
-      {
-	d_taps[index] = t;
-	for(int i = 0; i < d_naligned; i++) {
-	  d_aligned_taps[i][i+index] = t;
-	}
-      }
-
-      std::vector<gr_complex>
-      fir_filter_ccc::taps() const
-      {
-	std::vector<gr_complex> t = d_taps;
-	std::reverse(t.begin(), t.end());
-	return t;
-      }
-
-      unsigned int
-      fir_filter_ccc::ntaps() const
-      {
-	return d_ntaps;
-      }
-
-      gr_complex
-      fir_filter_ccc::filter(const gr_complex input[])
-      {
-	const gr_complex *ar = (gr_complex *)((size_t) input & ~(d_align-1));
-	unsigned al = input - ar;
-
-	volk_32fc_x2_dot_prod_32fc_a(d_output, ar,
-				     d_aligned_taps[al],
-				     (d_ntaps+al));
-	return *d_output;
-      }
-
-      void
-      fir_filter_ccc::filterN(gr_complex output[],
-			      const gr_complex input[],
-			      unsigned long n)
-      {
-	for(unsigned long i = 0; i < n; i++)
-	  output[i] = filter(&input[i]);
-      }
-
-
-      void
-      fir_filter_ccc::filterNdec(gr_complex output[],
-				 const gr_complex input[],
-				 unsigned long n,
-				 unsigned int decimate)
-      {
-	unsigned long j = 0;
-	for(unsigned long i = 0; i < n; i++){
-	  output[i] = filter(&input[j]);
-	  j += decimate;
-	}
-      }
-
-      /**************************************************************/
-
-      fir_filter_scc::fir_filter_scc(int decimation,
-				     const std::vector<gr_complex> &taps)
-      {
-	d_align = volk_get_alignment();
-	d_naligned = std::max((size_t)1, d_align / sizeof(short));
-
-	d_aligned_taps = NULL;
-	set_taps(taps);
-
-	// Make sure the output sample is always aligned, too.
-	d_output = (gr_complex*)volk_malloc(1*sizeof(gr_complex), d_align);
-      }
-
-      fir_filter_scc::~fir_filter_scc()
-      {
-	// Free all aligned taps
-	if(d_aligned_taps != NULL) {
-	  for(int i = 0; i < d_naligned; i++) {
-	    volk_free(d_aligned_taps[i]);
-	  }
-	  ::free(d_aligned_taps);
-	  d_aligned_taps = NULL;
-	}
-
-	// Free output sample
-	volk_free(d_output);
-      }
-
-      void
-      fir_filter_scc::set_taps(const std::vector<gr_complex> &taps)
-      {
-	// Free the taps if already allocated
-	if(d_aligned_taps != NULL) {
-	  for(int i = 0; i < d_naligned; i++) {
-	    volk_free(d_aligned_taps[i]);
-	  }
-	  ::free(d_aligned_taps);
-	  d_aligned_taps = NULL;
-	}
-
-	d_ntaps = (int)taps.size();
-	d_taps = taps;
-	std::reverse(d_taps.begin(), d_taps.end());
-
-	// Make a set of taps at all possible arch alignments
-	d_aligned_taps = (gr_complex**)malloc(d_naligned*sizeof(gr_complex*));
-	for(int i = 0; i < d_naligned; i++) {
-          d_aligned_taps[i] = (gr_complex*)volk_malloc((d_ntaps+d_naligned-1)*sizeof(gr_complex), d_align);
-	  memset(d_aligned_taps[i], 0, sizeof(gr_complex)*(d_ntaps+d_naligned-1));
-	  for(unsigned int j = 0; j < d_ntaps; j++)
-	    d_aligned_taps[i][i+j] = d_taps[j];
-	}
-      }
-
-      void
-      fir_filter_scc::update_tap(gr_complex t, unsigned int index)
-      {
-	d_taps[index] = t;
-	for(int i = 0; i < d_naligned; i++) {
-	  d_aligned_taps[i][i+index] = t;
-	}
-      }
-
-      std::vector<gr_complex>
-      fir_filter_scc::taps() const
-      {
-	std::vector<gr_complex> t = d_taps;
-	std::reverse(t.begin(), t.end());
-	return t;
-      }
-
-      unsigned int
-      fir_filter_scc::ntaps() const
-      {
-	return d_ntaps;
-      }
-
-      gr_complex
-      fir_filter_scc::filter(const short input[])
-      {
-	const short *ar = (short *)((size_t) input & ~(d_align-1));
-	unsigned al = input - ar;
-
-	volk_16i_32fc_dot_prod_32fc_a(d_output, ar,
-				      d_aligned_taps[al],
-				      (d_ntaps+al));
-
-	return *d_output;
-      }
-
-      void
-      fir_filter_scc::filterN(gr_complex output[],
-			      const short input[],
-			      unsigned long n)
-      {
-	for(unsigned long i = 0; i < n; i++)
-	  output[i] = filter(&input[i]);
-      }
-
-
-      void
-      fir_filter_scc::filterNdec(gr_complex output[],
-				 const short input[],
-				 unsigned long n,
-				 unsigned int decimate)
-      {
-	unsigned long j = 0;
-	for(unsigned long i = 0; i < n; i++){
-	  output[i] = filter(&input[j]);
-	  j += decimate;
-	}
-      }
-
-      /**************************************************************/
-
-      fir_filter_fsf::fir_filter_fsf(int decimation,
-				     const std::vector<float> &taps)
-      {
-	d_align = volk_get_alignment();
-	d_naligned = std::max((size_t)1, d_align / sizeof(float));
-
-	d_aligned_taps = NULL;
-	set_taps(taps);
-
-	// Make sure the output sample is always aligned, too.
-	d_output = (short*)volk_malloc(1*sizeof(short), d_align);
-      }
-
-      fir_filter_fsf::~fir_filter_fsf()
-      {
-      	// Free all aligned taps
-	if(d_aligned_taps != NULL) {
-	  for(int i = 0; i < d_naligned; i++) {
-	    volk_free(d_aligned_taps[i]);
-	  }
-	  ::free(d_aligned_taps);
-	  d_aligned_taps = NULL;
-	}
-
-	// Free output sample
-	volk_free(d_output);
-      }
-
-      void
-      fir_filter_fsf::set_taps(const std::vector<float> &taps)
-      {
-	// Free the taps if already allocated
-	if(d_aligned_taps != NULL) {
-	  for(int i = 0; i < d_naligned; i++) {
-	    volk_free(d_aligned_taps[i]);
-	  }
-	  ::free(d_aligned_taps);
-	  d_aligned_taps = NULL;
-	}
-
-	d_ntaps = (int)taps.size();
-	d_taps = taps;
-	std::reverse(d_taps.begin(), d_taps.end());
-
-	// Make a set of taps at all possible arch alignments
-	d_aligned_taps = (float**)malloc(d_naligned*sizeof(float*));
-	for(int i = 0; i < d_naligned; i++) {
-          d_aligned_taps[i] = (float*)volk_malloc((d_ntaps+d_naligned-1)*sizeof(float), d_align);
-	  memset(d_aligned_taps[i], 0, sizeof(float)*(d_ntaps+d_naligned-1));
-	  for(unsigned int j = 0; j < d_ntaps; j++)
-	    d_aligned_taps[i][i+j] = d_taps[j];
-	}
-      }
-
-      void
-      fir_filter_fsf::update_tap(float t, unsigned int index)
-      {
-	d_taps[index] = t;
-	for(int i = 0; i < d_naligned; i++) {
-	  d_aligned_taps[i][i+index] = t;
-	}
-      }
-
-      std::vector<float>
-      fir_filter_fsf::taps() const
-      {
-	std::vector<float> t = d_taps;
-	std::reverse(t.begin(), t.end());
-	return t;
-      }
-
-      unsigned int
-      fir_filter_fsf::ntaps() const
-      {
-	return d_ntaps;
-      }
-
-      short
-      fir_filter_fsf::filter(const float input[])
-      {
-	const float *ar = (float *)((size_t) input & ~(d_align-1));
-	unsigned al = input - ar;
-
-	volk_32f_x2_dot_prod_16i_a(d_output, ar,
-				   d_aligned_taps[al],
-				   (d_ntaps+al));
-
-	return *d_output;
-      }
-
-      void
-      fir_filter_fsf::filterN(short output[],
-			      const float input[],
-			      unsigned long n)
-      {
-	for(unsigned long i = 0; i < n; i++)
-	  output[i] = filter(&input[i]);
-      }
-
-      void
-      fir_filter_fsf::filterNdec(short output[],
-				 const float input[],
-				 unsigned long n,
-				 unsigned int decimate)
-      {
-	unsigned long j = 0;
-	for(unsigned long i = 0; i < n; i++){
-	  output[i] = filter(&input[j]);
-	  j += decimate;
-	}
-      }
-
-    } /* namespace kernel */
-  } /* namespace filter */
+namespace filter {
+namespace kernel {
+
+template <class IN_T, class OUT_T, class TAP_T>
+fir_filter<IN_T, OUT_T, TAP_T>::fir_filter(int decimation, const std::vector<TAP_T>& taps) {
+    d_align = volk_get_alignment();
+    d_naligned = std::max((size_t)1, d_align / sizeof(IN_T));
+
+    d_aligned_taps = NULL;
+    set_taps(taps);
+
+    // Make sure the output sample is always aligned, too.
+    d_output = (OUT_T*)volk_malloc(1 * sizeof(OUT_T), d_align);
+}
+
+template <class IN_T, class OUT_T, class TAP_T>
+fir_filter<IN_T, OUT_T, TAP_T>::~fir_filter() {
+    // Free all aligned taps
+    if (d_aligned_taps != NULL) {
+        for (int i = 0; i < d_naligned; i++) {
+            volk_free(d_aligned_taps[i]);
+        }
+        ::free(d_aligned_taps);
+        d_aligned_taps = NULL;
+    }
+
+    // Free output sample
+    volk_free(d_output);
+}
+
+template <class IN_T, class OUT_T, class TAP_T>
+void fir_filter<IN_T, OUT_T, TAP_T>::set_taps(const std::vector<TAP_T>& taps) {
+    // Free the taps if already allocated
+    if (d_aligned_taps != NULL) {
+        for (int i = 0; i < d_naligned; i++) {
+            volk_free(d_aligned_taps[i]);
+        }
+        ::free(d_aligned_taps);
+        d_aligned_taps = NULL;
+    }
+
+    d_ntaps = (int)taps.size();
+    d_taps = taps;
+    std::reverse(d_taps.begin(), d_taps.end());
+
+    // Make a set of taps at all possible arch alignments
+    d_aligned_taps = (TAP_T**)malloc(d_naligned * sizeof(TAP_T*));
+    for (int i = 0; i < d_naligned; i++) {
+        d_aligned_taps[i] =
+            (TAP_T*)volk_malloc((d_ntaps + d_naligned - 1) * sizeof(TAP_T), d_align);
+        memset(d_aligned_taps[i], 0, sizeof(TAP_T) * (d_ntaps + d_naligned - 1));
+        for (unsigned int j = 0; j < d_ntaps; j++)
+            d_aligned_taps[i][i + j] = d_taps[j];
+    }
+}
+
+template <class IN_T, class OUT_T, class TAP_T>
+void fir_filter<IN_T, OUT_T, TAP_T>::update_tap(TAP_T t, unsigned int index) {
+    d_taps[index] = t;
+    for (int i = 0; i < d_naligned; i++) {
+        d_aligned_taps[i][i + index] = t;
+    }
+}
+
+template <class IN_T, class OUT_T, class TAP_T>
+std::vector<TAP_T> fir_filter<IN_T, OUT_T, TAP_T>::taps() const {
+    std::vector<TAP_T> t = d_taps;
+    std::reverse(t.begin(), t.end());
+    return t;
+}
+
+template <class IN_T, class OUT_T, class TAP_T>
+unsigned int fir_filter<IN_T, OUT_T, TAP_T>::ntaps() const {
+    return d_ntaps;
+}
+
+template <class IN_T, class OUT_T, class TAP_T>
+void fir_filter<IN_T, OUT_T, TAP_T>::filterN(OUT_T output[], const IN_T input[], unsigned long n) {
+    for (unsigned long i = 0; i < n; i++) {
+        output[i] = filter(&input[i]);
+    }
+}
+
+template <class IN_T, class OUT_T, class TAP_T>
+void fir_filter<IN_T,OUT_T,TAP_T>::filterNdec(OUT_T output[],
+                                const IN_T input[],
+                                unsigned long n,
+                                unsigned int decimate) {
+    unsigned long j = 0;
+    for (unsigned long i = 0; i < n; i++) {
+        output[i] = filter(&input[j]);
+        j += decimate;
+    }
+}
+
+template <>
+float fir_filter<float, float, float>::filter(const float input[]) {
+    const float* ar = (float*)((size_t)input & ~(d_align - 1));
+    unsigned al = input - ar;
+
+    volk_32f_x2_dot_prod_32f_a(d_output, ar, d_aligned_taps[al], d_ntaps + al);
+    return *d_output;
+}
+
+template <>
+gr_complex fir_filter<gr_complex, gr_complex, float>::filter(const gr_complex input[]) {
+    const gr_complex* ar = (gr_complex*)((size_t)input & ~(d_align - 1));
+    unsigned al = input - ar;
+
+    volk_32fc_32f_dot_prod_32fc_a(d_output, ar, d_aligned_taps[al], (d_ntaps + al));
+    return *d_output;
+}
+
+template <>
+gr_complex fir_filter<float, gr_complex, gr_complex>::filter(const float input[]) {
+    const float* ar = (float*)((size_t)input & ~(d_align - 1));
+    unsigned al = input - ar;
+
+    volk_32fc_32f_dot_prod_32fc_a(d_output, d_aligned_taps[al], ar, (d_ntaps + al));
+    return *d_output;
+}
+
+template <>
+gr_complex fir_filter<gr_complex, gr_complex, gr_complex>::filter(const gr_complex input[]) {
+    const gr_complex* ar = (gr_complex*)((size_t)input & ~(d_align - 1));
+    unsigned al = input - ar;
+
+    volk_32fc_x2_dot_prod_32fc_a(d_output, ar, d_aligned_taps[al], (d_ntaps + al));
+    return *d_output;
+}
+
+template <>
+gr_complex fir_filter<std::int16_t, gr_complex, gr_complex>::filter(const std::int16_t input[]) {
+    const std::int16_t* ar = (std::int16_t*)((size_t)input & ~(d_align - 1));
+    unsigned al = input - ar;
+
+    volk_16i_32fc_dot_prod_32fc_a(d_output, ar, d_aligned_taps[al], (d_ntaps + al));
+
+    return *d_output;
+}
+
+template <>
+short fir_filter<float, std::int16_t, float>::filter(const float input[]) {
+    const float* ar = (float*)((size_t)input & ~(d_align - 1));
+    unsigned al = input - ar;
+
+    volk_32f_x2_dot_prod_16i_a(d_output, ar, d_aligned_taps[al], (d_ntaps + al));
+
+    return *d_output;
+}
+  template class fir_filter<float, float, float>;
+  template class fir_filter<gr_complex, gr_complex, float>;
+  template class fir_filter<float, gr_complex, gr_complex>;
+  template class fir_filter<gr_complex, gr_complex, gr_complex>;
+  template class fir_filter<std::int16_t, gr_complex, gr_complex>;
+  template class fir_filter<float, std::int16_t, float>;
+} /* namespace kernel */
+} /* namespace filter */
 } /* namespace gr */
diff --git a/gr-filter/lib/fir_filter_XXX_impl.cc.t b/gr-filter/lib/fir_filter_XXX_impl.cc.t
deleted file mode 100644
index 4a112a2180..0000000000
--- a/gr-filter/lib/fir_filter_XXX_impl.cc.t
+++ /dev/null
@@ -1,107 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2010,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-/* @WARNING@ */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "@IMPL_NAME@.h"
-#include <gnuradio/io_signature.h>
-#include <volk/volk.h>
-
-namespace gr {
-  namespace filter {
-
-    @BASE_NAME@::sptr
-    @BASE_NAME@::make(int decimation, const std::vector<@TAP_TYPE@> &taps)
-    {
-      return gnuradio::get_initial_sptr(new @IMPL_NAME@
-					(decimation, taps));
-    }
-
-
-    @IMPL_NAME@::@IMPL_NAME@(int decimation, const std::vector<@TAP_TYPE@> &taps)
-      : sync_decimator("@BASE_NAME@",
-			  io_signature::make(1, 1, sizeof(@I_TYPE@)),
-			  io_signature::make(1, 1, sizeof(@O_TYPE@)),
-			  decimation)
-    {
-      d_fir = new kernel::@BASE_NAME@(decimation, taps);
-      d_updated = false;
-      set_history(d_fir->ntaps());
-
-      const int alignment_multiple =
-	volk_get_alignment() / sizeof(float);
-      set_alignment(std::max(1, alignment_multiple));
-    }
-
-    @IMPL_NAME@::~@IMPL_NAME@()
-    {
-      delete d_fir;
-    }
-
-    void
-    @IMPL_NAME@::set_taps(const std::vector<@TAP_TYPE@> &taps)
-    {
-      gr::thread::scoped_lock l(d_setlock);
-      d_fir->set_taps(taps);
-      d_updated = true;
-    }
-
-    std::vector<@TAP_TYPE@>
-    @IMPL_NAME@::taps() const
-    {
-      return d_fir->taps();
-    }
-
-    int
-    @IMPL_NAME@::work(int noutput_items,
-		      gr_vector_const_void_star &input_items,
-		      gr_vector_void_star &output_items)
-    {
-      gr::thread::scoped_lock l(d_setlock);
-
-      const @I_TYPE@ *in = (const @I_TYPE@*)input_items[0];
-      @O_TYPE@ *out = (@O_TYPE@*)output_items[0];
-
-      if (d_updated) {
-	set_history(d_fir->ntaps());
-	d_updated = false;
-	return 0;	     // history requirements may have changed.
-      }
-
-      if (decimation() == 1) {
-	d_fir->filterN(out, in, noutput_items);
-      }
-      else {
-	d_fir->filterNdec(out, in, noutput_items,
-			  decimation());
-      }
-
-      return noutput_items;
-    }
-
-  } /* namespace filter */
-} /* namespace gr */
-
diff --git a/gr-filter/lib/fir_filter_XXX_impl.h.t b/gr-filter/lib/fir_filter_XXX_impl.h.t
deleted file mode 100644
index 3678d82acb..0000000000
--- a/gr-filter/lib/fir_filter_XXX_impl.h.t
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-/* @WARNING@ */
-
-#ifndef @GUARD_NAME@
-#define	@GUARD_NAME@
-
-#include <gnuradio/filter/fir_filter.h>
-#include <gnuradio/filter/@BASE_NAME@.h>
-
-namespace gr {
-  namespace filter {
-
-    class FILTER_API @IMPL_NAME@ : public @BASE_NAME@
-    {
-    private:
-      kernel::@BASE_NAME@ *d_fir;
-      bool d_updated;
-
-    public:
-      @IMPL_NAME@(int decimation, const std::vector<@TAP_TYPE@> &taps);
-
-      ~@IMPL_NAME@();
-
-      void set_taps(const std::vector<@TAP_TYPE@> &taps);
-      std::vector<@TAP_TYPE@> taps() const;
-
-      int work(int noutput_items,
-	       gr_vector_const_void_star &input_items,
-	       gr_vector_void_star &output_items);
-    };
-
-  } /* namespace filter */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-filter/lib/fir_filter_blk_impl.cc b/gr-filter/lib/fir_filter_blk_impl.cc
new file mode 100644
index 0000000000..2ffa62e596
--- /dev/null
+++ b/gr-filter/lib/fir_filter_blk_impl.cc
@@ -0,0 +1,115 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2010,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "fir_filter_blk_impl.h"
+#include <gnuradio/io_signature.h>
+#include <volk/volk.h>
+
+namespace gr {
+  namespace filter {
+
+    template <class IN_T, class OUT_T, class TAP_T>
+    typename fir_filter_blk<IN_T,OUT_T,TAP_T>::sptr
+    fir_filter_blk<IN_T,OUT_T,TAP_T>::make(int decimation, const std::vector<TAP_T> &taps)
+    {
+      return gnuradio::get_initial_sptr(new fir_filter_blk_impl<IN_T,OUT_T,TAP_T>
+					(decimation, taps));
+    }
+
+
+    template <class IN_T, class OUT_T, class TAP_T>
+    fir_filter_blk_impl<IN_T,OUT_T,TAP_T>::fir_filter_blk_impl(int decimation, const std::vector<TAP_T> &taps)
+      : sync_decimator("fir_filter_blk<IN_T,OUT_T,TAP_T>",
+			  io_signature::make(1, 1, sizeof(IN_T)),
+			  io_signature::make(1, 1, sizeof(OUT_T)),
+			  decimation)
+    {
+      d_fir = new kernel::fir_filter<IN_T,OUT_T,TAP_T>(decimation, taps);
+      d_updated = false;
+      this->set_history(d_fir->ntaps());
+
+      const int alignment_multiple =
+	volk_get_alignment() / sizeof(float);
+      this->set_alignment(std::max(1, alignment_multiple));
+    }
+
+    template <class IN_T, class OUT_T, class TAP_T>
+    fir_filter_blk_impl<IN_T,OUT_T,TAP_T>::~fir_filter_blk_impl()
+    {
+      delete d_fir;
+    }
+
+    template <class IN_T, class OUT_T, class TAP_T>
+    void
+    fir_filter_blk_impl<IN_T,OUT_T,TAP_T>::set_taps(const std::vector<TAP_T> &taps)
+    {
+      gr::thread::scoped_lock l(this->d_setlock);
+      d_fir->set_taps(taps);
+      d_updated = true;
+    }
+
+    template <class IN_T, class OUT_T, class TAP_T>
+    std::vector<TAP_T>
+    fir_filter_blk_impl<IN_T,OUT_T,TAP_T>::taps() const
+    {
+      return d_fir->taps();
+    }
+
+    template <class IN_T, class OUT_T, class TAP_T>
+    int
+    fir_filter_blk_impl<IN_T,OUT_T,TAP_T>::work(int noutput_items,
+		      gr_vector_const_void_star &input_items,
+		      gr_vector_void_star &output_items)
+    {
+      gr::thread::scoped_lock l(this->d_setlock);
+
+      const IN_T *in = (const IN_T*)input_items[0];
+      OUT_T *out = (OUT_T*)output_items[0];
+
+      if (d_updated) {
+	this->set_history(d_fir->ntaps());
+	d_updated = false;
+	return 0;	     // history requirements may have changed.
+      }
+
+      if (this->decimation() == 1) {
+	d_fir->filterN(out, in, noutput_items);
+      }
+      else {
+	d_fir->filterNdec(out, in, noutput_items,
+			  this->decimation());
+      }
+
+      return noutput_items;
+    }
+    template class fir_filter_blk<gr_complex, gr_complex, gr_complex>;
+    template class fir_filter_blk<gr_complex, gr_complex, float>;
+    template class fir_filter_blk<float, gr_complex, gr_complex>;
+    template class fir_filter_blk<float, float, float>;
+    template class fir_filter_blk<float, std::int16_t, float>;
+    template class fir_filter_blk<std::int16_t, gr_complex, gr_complex>;
+  } /* namespace filter */
+} /* namespace gr */
diff --git a/gr-filter/lib/fir_filter_blk_impl.h b/gr-filter/lib/fir_filter_blk_impl.h
new file mode 100644
index 0000000000..03faaebf26
--- /dev/null
+++ b/gr-filter/lib/fir_filter_blk_impl.h
@@ -0,0 +1,55 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef FIR_FILTER_BLK_IMPL_H
+#define	FIR_FILTER_BLK_IMPL_H
+
+#include <gnuradio/filter/fir_filter.h>
+#include <gnuradio/filter/fir_filter_blk.h>
+
+namespace gr {
+  namespace filter {
+
+    template <class IN_T, class OUT_T, class TAP_T>
+    class FILTER_API fir_filter_blk_impl : public fir_filter_blk<IN_T, OUT_T, TAP_T>
+    {
+    private:
+      kernel::fir_filter<IN_T, OUT_T, TAP_T> *d_fir;
+      bool d_updated;
+
+    public:
+      fir_filter_blk_impl(int decimation, const std::vector<TAP_T> &taps);
+
+      ~fir_filter_blk_impl();
+
+      void set_taps(const std::vector<TAP_T> &taps);
+      std::vector<TAP_T> taps() const;
+
+      int work(int noutput_items,
+	       gr_vector_const_void_star &input_items,
+	       gr_vector_void_star &output_items);
+    };
+
+  } /* namespace filter */
+} /* namespace gr */
+
+#endif /* FIR_FILTER_BLK_IMPL_H */
diff --git a/gr-filter/lib/freq_xlating_fir_filter_XXX_impl.cc.t b/gr-filter/lib/freq_xlating_fir_filter_XXX_impl.cc.t
deleted file mode 100644
index fc6ede2bb5..0000000000
--- a/gr-filter/lib/freq_xlating_fir_filter_XXX_impl.cc.t
+++ /dev/null
@@ -1,178 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2003,2010,2012,2018 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-/*
- * WARNING: This file is automatically generated by cmake.
- * Any changes made to this file will be overwritten.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "@IMPL_NAME@.h"
-#include <gnuradio/io_signature.h>
-#include <gnuradio/math.h>
-#include <volk/volk.h>
-
-namespace gr {
-  namespace filter {
-
-    @BASE_NAME@::sptr
-    @BASE_NAME@::make(int decimation,
-		      const std::vector<@TAP_TYPE@> &taps,
-		      double center_freq,
-		      double sampling_freq)
-    {
-      return gnuradio::get_initial_sptr(new @IMPL_NAME@
-					(decimation, taps,
-					 center_freq,
-					 sampling_freq));
-    }
-
-    @IMPL_NAME@::@IMPL_NAME@(int decimation,
-			     const std::vector<@TAP_TYPE@> &taps,
-			     double center_freq,
-			     double sampling_freq)
-    : sync_decimator("@BASE_NAME@",
-			io_signature::make(1, 1, sizeof(@I_TYPE@)),
-			io_signature::make(1, 1, sizeof(@O_TYPE@)),
-			decimation),
-      d_proto_taps(taps), d_center_freq(center_freq),
-      d_sampling_freq(sampling_freq),
-      d_updated(false)
-    {
-      std::vector<gr_complex> dummy_taps;
-      d_composite_fir = new kernel::@CFIR_TYPE@(decimation, dummy_taps);
-
-      set_history(d_proto_taps.size());
-      build_composite_fir();
-
-      message_port_register_in(pmt::mp("freq"));
-      set_msg_handler(pmt::mp("freq"),
-                      boost::bind(&@IMPL_NAME@::handle_set_center_freq,
-                                  this, _1));
-    }
-
-    @IMPL_NAME@::~@IMPL_NAME@()
-    {
-      delete d_composite_fir;
-    }
-
-    void
-    @IMPL_NAME@::build_composite_fir()
-    {
-      std::vector<gr_complex> ctaps(d_proto_taps.size());
-
-      // The basic principle of this block is to perform:
-      //    x(t) -> (mult by -fwT0) -> LPF -> decim -> y(t)
-      // We switch things up here to:
-      //    x(t) -> BPF -> decim -> (mult by fwT0*decim) -> y(t)
-      // The BPF is the baseband filter (LPF) moved up to the
-      // center frequency fwT0. We then apply a derotator
-      // with -fwT0 to downshift the signal to baseband.
-
-      float fwT0 = 2 * GR_M_PI * d_center_freq / d_sampling_freq;
-      for(unsigned int i = 0; i < d_proto_taps.size(); i++) {
-	ctaps[i] = d_proto_taps[i] * exp(gr_complex(0, i * fwT0));
-      }
-
-      d_composite_fir->set_taps(ctaps);
-      d_r.set_phase_incr(exp(gr_complex(0, -fwT0 * decimation())));
-    }
-
-    void
-    @IMPL_NAME@::set_center_freq(double center_freq)
-    {
-      d_center_freq = center_freq;
-      d_updated = true;
-    }
-
-    double
-    @IMPL_NAME@::center_freq() const
-    {
-      return d_center_freq;
-    }
-
-    void
-    @IMPL_NAME@::set_taps(const std::vector<@TAP_TYPE@> &taps)
-    {
-      d_proto_taps = taps;
-      d_updated = true;
-    }
-
-    std::vector<@TAP_TYPE@>
-    @IMPL_NAME@::taps() const
-    {
-      return d_proto_taps;
-    }
-
-    void
-    @IMPL_NAME@::handle_set_center_freq(pmt::pmt_t msg)
-    {
-      if(pmt::is_dict(msg) && pmt::dict_has_key(msg, pmt::intern("freq")) ) {
-        pmt::pmt_t x = pmt::dict_ref(msg, pmt::intern("freq"), pmt::PMT_NIL );
-        if(pmt::is_real(x)) {
-          double freq = pmt::to_double(x);
-          set_center_freq(freq);
-        }
-      } else if(pmt::is_pair(msg)) {
-        pmt::pmt_t x = pmt::cdr(msg);
-        if(pmt::is_real(x)) {
-          double freq = pmt::to_double(x);
-          set_center_freq(freq);
-        }
-      }
-    }
-
-    int
-    @IMPL_NAME@::work(int noutput_items,
-		      gr_vector_const_void_star &input_items,
-		      gr_vector_void_star &output_items)
-    {
-      @I_TYPE@ *in  = (@I_TYPE@ *)input_items[0];
-      @O_TYPE@ *out = (@O_TYPE@ *)output_items[0];
-
-      // rebuild composite FIR if the center freq has changed
-      if(d_updated) {
-	set_history(d_proto_taps.size());
-	build_composite_fir();
-	d_updated = false;
-
-        // Tell downstream items where the frequency change was applied
-        add_item_tag(0, nitems_written(0),
-                     pmt::intern("freq"), pmt::from_double(d_center_freq),
-                     alias_pmt());
-	return 0;		     // history requirements may have changed.
-      }
-
-      unsigned j = 0;
-      for (int i = 0; i < noutput_items; i++){
-        out[i] = d_r.rotate(d_composite_fir->filter(&in[j]));
-        j += decimation();
-      }
-
-      return noutput_items;
-    }
-
-  } /* namespace filter */
-} /* namespace gr */
diff --git a/gr-filter/lib/freq_xlating_fir_filter_XXX_impl.h.t b/gr-filter/lib/freq_xlating_fir_filter_XXX_impl.h.t
deleted file mode 100644
index bd7aced6f8..0000000000
--- a/gr-filter/lib/freq_xlating_fir_filter_XXX_impl.h.t
+++ /dev/null
@@ -1,74 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2002,2004,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-/*
- * WARNING: This file is automatically generated by cmake.
- * Any changes made to this file will be overwritten.
- */
-
-#ifndef @GUARD_NAME@
-#define	@GUARD_NAME@
-
-#include <gnuradio/filter/api.h>
-#include <gnuradio/filter/fir_filter.h>
-#include <gnuradio/filter/@BASE_NAME@.h>
-#include <gnuradio/blocks/rotator.h>
-
-namespace gr {
-  namespace filter {
-
-    class FILTER_API @IMPL_NAME@ : public @BASE_NAME@
-    {
-    protected:
-      std::vector<@TAP_TYPE@>	d_proto_taps;
-      kernel::@CFIR_TYPE@      *d_composite_fir;
-      blocks::rotator		d_r;
-      double			d_center_freq;
-      double			d_sampling_freq;
-      bool			d_updated;
-
-      virtual void build_composite_fir();
-    public:
-
-      @IMPL_NAME@(int decimation,
-		  const std::vector<@TAP_TYPE@> &taps,
-		  double center_freq,
-		  double sampling_freq);
-      virtual ~@IMPL_NAME@();
-
-      void set_center_freq(double center_freq);
-      double center_freq() const;
-
-      void set_taps(const std::vector<@TAP_TYPE@> &taps);
-      std::vector<@TAP_TYPE@> taps() const;
-
-      void handle_set_center_freq(pmt::pmt_t msg);
-
-      int work(int noutput_items,
-	       gr_vector_const_void_star &input_items,
-	       gr_vector_void_star &output_items);
-    };
-
-  } /* namespace filter */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-filter/lib/freq_xlating_fir_filter_impl.cc b/gr-filter/lib/freq_xlating_fir_filter_impl.cc
new file mode 100644
index 0000000000..5a858c3d10
--- /dev/null
+++ b/gr-filter/lib/freq_xlating_fir_filter_impl.cc
@@ -0,0 +1,190 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2003,2010,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "freq_xlating_fir_filter_impl.h"
+#include <gnuradio/io_signature.h>
+#include <gnuradio/math.h>
+#include <volk/volk.h>
+
+namespace gr {
+  namespace filter {
+
+    template <class IN_T, class OUT_T, class TAP_T>
+    typename freq_xlating_fir_filter<IN_T,OUT_T,TAP_T>::sptr
+    freq_xlating_fir_filter<IN_T,OUT_T,TAP_T>::make(int decimation,
+		      const std::vector<TAP_T> &taps,
+		      double center_freq,
+		      double sampling_freq)
+    {
+      return gnuradio::get_initial_sptr(new freq_xlating_fir_filter_impl<IN_T,OUT_T,TAP_T>
+					(decimation, taps,
+					 center_freq,
+					 sampling_freq));
+    }
+
+    template <class IN_T, class OUT_T, class TAP_T>
+    freq_xlating_fir_filter_impl<IN_T,OUT_T,TAP_T>::freq_xlating_fir_filter_impl(int decimation,
+			     const std::vector<TAP_T> &taps,
+			     double center_freq,
+			     double sampling_freq)
+    : sync_decimator("freq_xlating_fir_filter<IN_T,OUT_T,TAP_T>",
+			io_signature::make(1, 1, sizeof(IN_T)),
+			io_signature::make(1, 1, sizeof(OUT_T)),
+			decimation),
+      d_proto_taps(taps), d_center_freq(center_freq),
+      d_sampling_freq(sampling_freq),
+      d_updated(false)
+    {
+      std::vector<gr_complex> dummy_taps;
+      d_composite_fir = new kernel::fir_filter<IN_T,OUT_T,gr_complex>(decimation, dummy_taps);
+
+      this->set_history(this->d_proto_taps.size());
+      this->build_composite_fir();
+
+      this->message_port_register_in(pmt::mp("freq"));
+      this->set_msg_handler(pmt::mp("freq"),
+                      boost::bind(&freq_xlating_fir_filter_impl<IN_T,OUT_T,TAP_T>::handle_set_center_freq,
+                                  this, _1));
+    }
+
+    template <class IN_T, class OUT_T, class TAP_T>
+    freq_xlating_fir_filter_impl<IN_T,OUT_T,TAP_T>::~freq_xlating_fir_filter_impl()
+    {
+      delete d_composite_fir;
+    }
+
+    template <class IN_T, class OUT_T, class TAP_T>
+    void
+    freq_xlating_fir_filter_impl<IN_T,OUT_T,TAP_T>::build_composite_fir()
+    {
+      std::vector<gr_complex> ctaps(d_proto_taps.size());
+
+      // The basic principle of this block is to perform:
+      //    x(t) -> (mult by -fwT0) -> LPF -> decim -> y(t)
+      // We switch things up here to:
+      //    x(t) -> BPF -> decim -> (mult by fwT0*decim) -> y(t)
+      // The BPF is the baseband filter (LPF) moved up to the
+      // center frequency fwT0. We then apply a derotator
+      // with -fwT0 to downshift the signal to baseband.
+
+      float fwT0 = 2 * GR_M_PI * d_center_freq / d_sampling_freq;
+      for(unsigned int i = 0; i < d_proto_taps.size(); i++) {
+	ctaps[i] = d_proto_taps[i] * exp(gr_complex(0, i * fwT0));
+      }
+
+      d_composite_fir->set_taps(ctaps);
+      d_r.set_phase_incr(exp(gr_complex(0, -fwT0 * this->decimation())));
+    }
+
+    template <class IN_T, class OUT_T, class TAP_T>
+    void
+    freq_xlating_fir_filter_impl<IN_T,OUT_T,TAP_T>::set_center_freq(double center_freq)
+    {
+      d_center_freq = center_freq;
+      d_updated = true;
+    }
+
+    template <class IN_T, class OUT_T, class TAP_T>
+    double
+    freq_xlating_fir_filter_impl<IN_T,OUT_T,TAP_T>::center_freq() const
+    {
+      return d_center_freq;
+    }
+
+    template <class IN_T, class OUT_T, class TAP_T>
+    void
+    freq_xlating_fir_filter_impl<IN_T,OUT_T,TAP_T>::set_taps(const std::vector<TAP_T> &taps)
+    {
+      d_proto_taps = taps;
+      d_updated = true;
+    }
+
+    template <class IN_T, class OUT_T, class TAP_T>
+    std::vector<TAP_T>
+    freq_xlating_fir_filter_impl<IN_T,OUT_T,TAP_T>::taps() const
+    {
+      return d_proto_taps;
+    }
+
+    template <class IN_T, class OUT_T, class TAP_T>
+    void
+    freq_xlating_fir_filter_impl<IN_T,OUT_T,TAP_T>::handle_set_center_freq(pmt::pmt_t msg)
+    {
+      if(pmt::is_dict(msg) && pmt::dict_has_key(msg, pmt::intern("freq")) ) {
+        pmt::pmt_t x = pmt::dict_ref(msg, pmt::intern("freq"), pmt::PMT_NIL );
+        if(pmt::is_real(x)) {
+          double freq = pmt::to_double(x);
+          set_center_freq(freq);
+        }
+      } else if(pmt::is_pair(msg)) {
+        pmt::pmt_t x = pmt::cdr(msg);
+        if(pmt::is_real(x)) {
+          double freq = pmt::to_double(x);
+          set_center_freq(freq);
+        }
+      }
+    }
+
+    template <class IN_T, class OUT_T, class TAP_T>
+    int
+    freq_xlating_fir_filter_impl<IN_T,OUT_T,TAP_T>::work(int noutput_items,
+		      gr_vector_const_void_star &input_items,
+		      gr_vector_void_star &output_items)
+    {
+      IN_T *in  = (IN_T *)input_items[0];
+      OUT_T *out = (OUT_T *)output_items[0];
+
+      // rebuild composite FIR if the center freq has changed
+      if(d_updated) {
+	this->set_history(d_proto_taps.size());
+	build_composite_fir();
+	d_updated = false;
+
+        // Tell downstream items where the frequency change was applied
+        this->add_item_tag(0, this->nitems_written(0),
+                     pmt::intern("freq"), pmt::from_double(d_center_freq),
+                     this->alias_pmt());
+	return 0;		     // history requirements may have changed.
+      }
+
+      unsigned j = 0;
+      for (int i = 0; i < noutput_items; i++){
+        out[i] = d_r.rotate(d_composite_fir->filter(&in[j]));
+        j += this->decimation();
+      }
+
+      return noutput_items;
+    }
+
+    template class freq_xlating_fir_filter<gr_complex, gr_complex, gr_complex>;
+    template class freq_xlating_fir_filter<gr_complex, gr_complex, float>;
+    template class freq_xlating_fir_filter<float, gr_complex, gr_complex>;
+    template class freq_xlating_fir_filter<float, gr_complex, float>;
+    template class freq_xlating_fir_filter<std::int16_t, gr_complex, float>;
+    template class freq_xlating_fir_filter<std::int16_t, gr_complex, gr_complex>;
+
+  } /* namespace filter */
+} /* namespace gr */
diff --git a/gr-filter/lib/freq_xlating_fir_filter_impl.h b/gr-filter/lib/freq_xlating_fir_filter_impl.h
new file mode 100644
index 0000000000..176b57f93b
--- /dev/null
+++ b/gr-filter/lib/freq_xlating_fir_filter_impl.h
@@ -0,0 +1,70 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2002,2004,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef FREQ_XLATING_FIR_FILTER_IMPL_H
+#define	FREQ_XLATING_FIR_FILTER_IMPL_H
+
+#include <gnuradio/filter/api.h>
+#include <gnuradio/filter/fir_filter.h>
+#include <gnuradio/filter/freq_xlating_fir_filter.h>
+#include <gnuradio/blocks/rotator.h>
+
+namespace gr {
+  namespace filter {
+
+    template <class IN_T, class OUT_T, class TAP_T>
+    class FILTER_API freq_xlating_fir_filter_impl : public freq_xlating_fir_filter<IN_T,OUT_T,TAP_T>
+    {
+    protected:
+      std::vector<TAP_T>	d_proto_taps;
+      kernel::fir_filter<IN_T, OUT_T, gr_complex>      *d_composite_fir;
+      blocks::rotator		d_r;
+      double			d_center_freq;
+      double			d_sampling_freq;
+      bool			d_updated;
+
+      virtual void build_composite_fir();
+    public:
+
+      freq_xlating_fir_filter_impl(int decimation,
+		  const std::vector<TAP_T> &taps,
+		  double center_freq,
+		  double sampling_freq);
+      virtual ~freq_xlating_fir_filter_impl();
+
+      void set_center_freq(double center_freq);
+      double center_freq() const;
+
+      void set_taps(const std::vector<TAP_T> &taps);
+      std::vector<TAP_T> taps() const;
+
+      void handle_set_center_freq(pmt::pmt_t msg);
+
+      int work(int noutput_items,
+	       gr_vector_const_void_star &input_items,
+	       gr_vector_void_star &output_items);
+    };
+
+  } /* namespace filter */
+} /* namespace gr */
+
+#endif /* FREQ_XLATING_FIR_FILTER_IMPL_H */
diff --git a/gr-filter/lib/interp_fir_filter_XXX_impl.cc.t b/gr-filter/lib/interp_fir_filter_XXX_impl.cc.t
deleted file mode 100644
index 507322b21d..0000000000
--- a/gr-filter/lib/interp_fir_filter_XXX_impl.cc.t
+++ /dev/null
@@ -1,155 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2010,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-/* @WARNING@ */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "@IMPL_NAME@.h"
-#include <gnuradio/io_signature.h>
-#include <volk/volk.h>
-#include <stdexcept>
-
-namespace gr {
-  namespace filter {
-
-    @BASE_NAME@::sptr
-    @BASE_NAME@::make(unsigned interpolation,
-		      const std::vector<@TAP_TYPE@> &taps)
-    {
-      return gnuradio::get_initial_sptr(new @IMPL_NAME@
-					(interpolation, taps));
-    }
-
-    @IMPL_NAME@::@IMPL_NAME@(unsigned interpolation,
-			     const std::vector<@TAP_TYPE@> &taps)
-    : sync_interpolator("@BASE_NAME@",
-			   io_signature::make(1, 1, sizeof(@I_TYPE@)),
-			   io_signature::make(1, 1, sizeof(@O_TYPE@)),
-			   interpolation),
-      d_updated(false), d_firs(interpolation)
-    {
-      if(interpolation == 0) {
-	throw std::out_of_range("@IMPL_NAME@: interpolation must be > 0\n");
-      }
-
-      if(taps.size() == 0) {
-	throw std::runtime_error("@IMPL_NAME@: no filter taps provided.\n");
-      }
-
-      std::vector<@TAP_TYPE@> dummy_taps;
-
-      for(unsigned i = 0; i < interpolation; i++) {
-	d_firs[i] = new kernel::@FIR_TYPE@(1, dummy_taps);
-      }
-
-      set_taps(taps);
-      install_taps(d_new_taps);
-    }
-
-    @IMPL_NAME@::~@IMPL_NAME@()
-    {
-      for(unsigned i = 0; i < interpolation(); i++) {
-	delete d_firs[i];
-      }
-    }
-
-    void
-    @IMPL_NAME@::set_taps(const std::vector<@TAP_TYPE@> &taps)
-    {
-      d_new_taps = taps;
-      d_updated = true;
-
-      // round up length to a multiple of the interpolation factor
-      int n = taps.size() % interpolation();
-      if(n > 0) {
-	n = interpolation() - n;
-	while(n-- > 0) {
-	  d_new_taps.insert(d_new_taps.end(), 0);
-	}
-      }
-
-      if(d_new_taps.size() % interpolation() != 0) {
-	throw std::runtime_error("@IMPL_NAME@: error setting interpolator taps.\n");
-      }
-    }
-
-    void
-    @IMPL_NAME@::install_taps(const std::vector<@TAP_TYPE@> &taps)
-    {
-      unsigned nfilters = interpolation();
-      int nt = taps.size() / nfilters;
-
-      std::vector< std::vector <@TAP_TYPE@> > xtaps(nfilters);
-
-      for(unsigned n = 0; n < nfilters; n++) {
-	xtaps[n].resize (nt);
-      }
-
-      for(size_t i = 0; i < taps.size(); i++) {
-	xtaps[i % nfilters][i / nfilters] = taps[i];
-      }
-
-      for(unsigned n = 0; n < nfilters; n++) {
-	d_firs[n]->set_taps (xtaps[n]);
-      }
-
-      set_history(nt);
-      d_updated = false;
-    }
-
-    std::vector<@TAP_TYPE@>
-    @IMPL_NAME@::taps() const
-    {
-      return d_new_taps;
-    }
-
-    int
-    @NAME@::work(int noutput_items,
-		 gr_vector_const_void_star &input_items,
-		 gr_vector_void_star &output_items)
-    {
-      const @I_TYPE@ *in = (const @I_TYPE@ *)input_items[0];
-      @O_TYPE@ *out = (@O_TYPE@ *)output_items[0];
-
-      if(d_updated) {
-	install_taps(d_new_taps);
-	return 0;	     // history requirements may have changed.
-      }
-
-      int nfilters = interpolation();
-      int ni = noutput_items / interpolation();
-
-      for(int i = 0; i < ni; i++) {
-	for(int nf = 0; nf < nfilters; nf++) {
-	  out[nf] = d_firs[nf]->filter(&in[i]);
-	}
-	out += nfilters;
-      }
-
-      return noutput_items;
-    }
-
-  } /* namespace filter */
-} /* namespace gr */
diff --git a/gr-filter/lib/interp_fir_filter_XXX_impl.h.t b/gr-filter/lib/interp_fir_filter_XXX_impl.h.t
deleted file mode 100644
index 0e39de613c..0000000000
--- a/gr-filter/lib/interp_fir_filter_XXX_impl.h.t
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-/* @WARNING@ */
-
-#ifndef @GUARD_NAME@
-#define	@GUARD_NAME@
-
-#include <gnuradio/filter/api.h>
-#include <gnuradio/filter/fir_filter.h>
-#include <gnuradio/filter/@BASE_NAME@.h>
-#include <vector>
-
-namespace gr {
-  namespace filter {
-
-    class FILTER_API @IMPL_NAME@ : public @BASE_NAME@
-    {
-    private:
-      bool d_updated;
-      std::vector<kernel::@FIR_TYPE@ *> d_firs;
-      std::vector<@TAP_TYPE@> d_new_taps;
-
-      void install_taps(const std::vector<@TAP_TYPE@> &taps);
-
-    public:
-      @IMPL_NAME@(unsigned interpolation,
-		  const std::vector<@TAP_TYPE@> &taps);
-
-      ~@IMPL_NAME@();
-
-      void set_taps(const std::vector<@TAP_TYPE@> &taps);
-      std::vector<@TAP_TYPE@> taps() const;
-
-      int work(int noutput_items,
-	       gr_vector_const_void_star &input_items,
-	       gr_vector_void_star &output_items);
-    };
-
-  } /* namespace filter */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-filter/lib/interp_fir_filter_impl.cc b/gr-filter/lib/interp_fir_filter_impl.cc
new file mode 100644
index 0000000000..a7020ce653
--- /dev/null
+++ b/gr-filter/lib/interp_fir_filter_impl.cc
@@ -0,0 +1,167 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2010,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "interp_fir_filter_impl.h"
+#include <gnuradio/io_signature.h>
+#include <volk/volk.h>
+#include <stdexcept>
+
+namespace gr {
+  namespace filter {
+
+    template <class IN_T, class OUT_T, class TAP_T>
+    typename interp_fir_filter<IN_T,OUT_T,TAP_T>::sptr
+    interp_fir_filter<IN_T,OUT_T,TAP_T>::make(unsigned interpolation,
+		      const std::vector<TAP_T> &taps)
+    {
+      return gnuradio::get_initial_sptr(new interp_fir_filter_impl<IN_T,OUT_T,TAP_T>
+					(interpolation, taps));
+    }
+
+    template <class IN_T, class OUT_T, class TAP_T>
+    interp_fir_filter_impl<IN_T,OUT_T,TAP_T>::interp_fir_filter_impl(unsigned interpolation,
+			     const std::vector<TAP_T> &taps)
+    : sync_interpolator("interp_fir_filter<IN_T,OUT_T,TAP_T>",
+			   io_signature::make(1, 1, sizeof(IN_T)),
+			   io_signature::make(1, 1, sizeof(OUT_T)),
+			   interpolation),
+      d_updated(false), d_firs(interpolation)
+    {
+      if(interpolation == 0) {
+	throw std::out_of_range("interp_fir_filter_impl: interpolation must be > 0\n");
+      }
+
+      if(taps.size() == 0) {
+	throw std::runtime_error("interp_fir_filter_impl: no filter taps provided.\n");
+      }
+
+      std::vector<TAP_T> dummy_taps;
+
+      for(unsigned i = 0; i < interpolation; i++) {
+        d_firs[i] = new kernel::fir_filter<IN_T,OUT_T,TAP_T>(1, dummy_taps);
+      }
+
+      set_taps(taps);
+      install_taps(d_new_taps);
+    }
+
+    template <class IN_T, class OUT_T, class TAP_T>
+    interp_fir_filter_impl<IN_T,OUT_T,TAP_T>::~interp_fir_filter_impl()
+    {
+      for(unsigned i = 0; i < this->interpolation(); i++) {
+	delete d_firs[i];
+      }
+    }
+
+    template <class IN_T, class OUT_T, class TAP_T>
+    void
+    interp_fir_filter_impl<IN_T,OUT_T,TAP_T>::set_taps(const std::vector<TAP_T> &taps)
+    {
+      d_new_taps = taps;
+      d_updated = true;
+
+      // round up length to a multiple of the interpolation factor
+      int n = taps.size() % this->interpolation();
+      if(n > 0) {
+	n = this->interpolation() - n;
+	while(n-- > 0) {
+	  d_new_taps.insert(d_new_taps.end(), 0);
+	}
+      }
+
+      if(d_new_taps.size() % this->interpolation() != 0) {
+	throw std::runtime_error("interp_fir_filter_impl: error setting interpolator taps.\n");
+      }
+    }
+
+    template <class IN_T, class OUT_T, class TAP_T>
+    void
+    interp_fir_filter_impl<IN_T,OUT_T,TAP_T>::install_taps(const std::vector<TAP_T> &taps)
+    {
+      unsigned nfilters = this->interpolation();
+      int nt = taps.size() / nfilters;
+
+      std::vector< std::vector <TAP_T> > xtaps(nfilters);
+
+      for(unsigned n = 0; n < nfilters; n++) {
+	xtaps[n].resize (nt);
+      }
+
+      for(size_t i = 0; i < taps.size(); i++) {
+	xtaps[i % nfilters][i / nfilters] = taps[i];
+      }
+
+      for(unsigned n = 0; n < nfilters; n++) {
+	d_firs[n]->set_taps (xtaps[n]);
+      }
+
+      this->set_history(nt);
+      d_updated = false;
+    }
+
+    template <class IN_T, class OUT_T, class TAP_T>
+    std::vector<TAP_T>
+    interp_fir_filter_impl<IN_T,OUT_T,TAP_T>::taps() const
+    {
+      return d_new_taps;
+    }
+
+    template <class IN_T, class OUT_T, class TAP_T>
+    int
+    interp_fir_filter_impl<IN_T,OUT_T,TAP_T>::work(int noutput_items,
+		 gr_vector_const_void_star &input_items,
+		 gr_vector_void_star &output_items)
+    {
+      const IN_T *in = (const IN_T *)input_items[0];
+      OUT_T *out = (OUT_T *)output_items[0];
+
+      if(d_updated) {
+	install_taps(d_new_taps);
+	return 0;	     // history requirements may have changed.
+      }
+
+      int nfilters = this->interpolation();
+      int ni = noutput_items / this->interpolation();
+
+      for(int i = 0; i < ni; i++) {
+	for(int nf = 0; nf < nfilters; nf++) {
+	  out[nf] = d_firs[nf]->filter(&in[i]);
+	}
+	out += nfilters;
+      }
+
+      return noutput_items;
+    }
+    template class interp_fir_filter<gr_complex, gr_complex, gr_complex>;
+    template class interp_fir_filter<gr_complex, gr_complex, float>;
+    template class interp_fir_filter<float, gr_complex, gr_complex>;
+    template class interp_fir_filter<float, float, float>;
+    template class interp_fir_filter<float, std::int16_t, float>;
+    template class interp_fir_filter<std::int16_t, gr_complex, gr_complex>;
+
+
+  } /* namespace filter */
+} /* namespace gr */
diff --git a/gr-filter/lib/interp_fir_filter_impl.h b/gr-filter/lib/interp_fir_filter_impl.h
new file mode 100644
index 0000000000..0ebcc19edf
--- /dev/null
+++ b/gr-filter/lib/interp_fir_filter_impl.h
@@ -0,0 +1,61 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INTERP_FIR_FILTER_IMPL_H
+#define	INTERP_FIR_FILTER_IMPL_H
+
+#include <gnuradio/filter/api.h>
+#include <gnuradio/filter/fir_filter.h>
+#include <gnuradio/filter/interp_fir_filter.h>
+#include <vector>
+
+namespace gr {
+  namespace filter {
+
+    template <class IN_T, class OUT_T, class TAP_T>
+    class FILTER_API interp_fir_filter_impl : public interp_fir_filter<IN_T,OUT_T,TAP_T>
+    {
+    private:
+      bool d_updated;
+      std::vector< kernel::fir_filter<IN_T,OUT_T,TAP_T> *> d_firs;
+      std::vector<TAP_T> d_new_taps;
+
+      void install_taps(const std::vector<TAP_T> &taps);
+
+    public:
+      interp_fir_filter_impl(unsigned interpolation,
+		  const std::vector<TAP_T> &taps);
+
+      ~interp_fir_filter_impl();
+
+      void set_taps(const std::vector<TAP_T> &taps);
+      std::vector<TAP_T> taps() const;
+
+      int work(int noutput_items,
+	       gr_vector_const_void_star &input_items,
+	       gr_vector_void_star &output_items);
+    };
+
+  } /* namespace filter */
+} /* namespace gr */
+
+#endif /* INTERP_FIR_FILTER_IMPL_H */
diff --git a/gr-filter/lib/rational_resampler_base_XXX_impl.cc.t b/gr-filter/lib/rational_resampler_base_XXX_impl.cc.t
deleted file mode 100644
index 0b74e60969..0000000000
--- a/gr-filter/lib/rational_resampler_base_XXX_impl.cc.t
+++ /dev/null
@@ -1,176 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2010,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-/* @WARNING@ */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "@IMPL_NAME@.h"
-#include <gnuradio/io_signature.h>
-#include <volk/volk.h>
-#include <stdexcept>
-
-namespace gr {
-  namespace filter {
-
-    @BASE_NAME@::sptr
-    @BASE_NAME@::make(unsigned interpolation,
-		      unsigned decimation,
-		      const std::vector<@TAP_TYPE@> &taps)
-    {
-      return gnuradio::get_initial_sptr
-	(new @IMPL_NAME@(interpolation, decimation, taps));
-    }
-
-    @IMPL_NAME@::@IMPL_NAME@(unsigned interpolation,
-			     unsigned decimation,
-			     const std::vector<@TAP_TYPE@> &taps)
-    : block("@BASE_NAME@",
-	       io_signature::make(1, 1, sizeof(@I_TYPE@)),
-	       io_signature::make(1, 1, sizeof(@O_TYPE@))),
-      d_history(1),
-      d_interpolation(interpolation),
-      d_decimation(decimation),
-      d_ctr(0),
-      d_firs(interpolation),
-      d_updated(false)
-    {
-      if(interpolation == 0)
-	throw std::out_of_range("@IMPL_NAME@: interpolation must be > 0");
-      if(decimation == 0)
-	throw std::out_of_range("@IMPL_NAME@: decimation must be > 0");
-
-      set_relative_rate(1.0 * interpolation / decimation);
-      set_output_multiple(1);
-
-      std::vector<@TAP_TYPE@> dummy_taps;
-
-      for(unsigned i = 0; i < interpolation; i++) {
-	d_firs[i] = new kernel::@FIR_TYPE@(1, dummy_taps);
-      }
-
-      set_taps(taps);
-      install_taps(d_new_taps);
-    }
-
-    @IMPL_NAME@::~@IMPL_NAME@()
-    {
-      int interp = interpolation();
-      for(int i = 0; i < interp; i++) {
-	delete d_firs[i];
-      }
-    }
-
-    void
-    @IMPL_NAME@::set_taps(const std::vector<@TAP_TYPE@> &taps)
-    {
-      d_new_taps = taps;
-      d_updated = true;
-
-      // round up length to a multiple of the interpolation factor
-      int n = taps.size() % interpolation();
-      if(n > 0) {
-	n = interpolation() - n;
-	while(n-- > 0) {
-	  d_new_taps.insert(d_new_taps.end(), 0);
-	}
-      }
-
-      assert(d_new_taps.size() % interpolation() == 0);
-    }
-
-    void
-    @IMPL_NAME@::install_taps(const std::vector<@TAP_TYPE@> &taps)
-    {
-      int nfilters = interpolation();
-      int nt = taps.size() / nfilters;
-
-      assert(nt * nfilters == (int) taps.size());
-
-      std::vector< std::vector <@TAP_TYPE@> > xtaps(nfilters);
-
-      for(int n = 0; n < nfilters; n++)
-	xtaps[n].resize (nt);
-
-      for(int i = 0; i < (int)taps.size(); i++)
-	xtaps[i % nfilters][i / nfilters] = taps[i];
-
-      for(int n = 0; n < nfilters; n++)
-	d_firs[n]->set_taps(xtaps[n]);
-
-      set_history(nt);
-      d_updated = false;
-    }
-
-    std::vector<@TAP_TYPE@>
-    @IMPL_NAME@::taps() const
-    {
-      return d_new_taps;
-    }
-
-    void
-    @IMPL_NAME@::forecast(int noutput_items, gr_vector_int &ninput_items_required)
-    {
-      int nreqd = std::max((unsigned)1, (int)((double) (noutput_items+1) * \
-				        decimation() / interpolation()) + history() - 1);
-      unsigned ninputs = ninput_items_required.size();
-      for(unsigned i = 0; i < ninputs; i++)
-	ninput_items_required[i] = nreqd;
-    }
-
-    int
-    @IMPL_NAME@::general_work(int noutput_items,
-			      gr_vector_int &ninput_items,
-			      gr_vector_const_void_star &input_items,
-			      gr_vector_void_star &output_items)
-    {
-      const @I_TYPE@ *in = (const @I_TYPE@ *)input_items[0];
-      @O_TYPE@ *out = (@O_TYPE@ *)output_items[0];
-
-      if(d_updated) {
-	install_taps(d_new_taps);
-	return 0;		// history requirement may have increased.
-      }
-
-      unsigned int ctr = d_ctr;
-      int count = 0;
-
-      int i = 0;
-      while((i < noutput_items) && (count < ninput_items[0])) {
-	out[i++] = d_firs[ctr]->filter(in);
-	ctr += decimation();
-	while(ctr >= interpolation()) {
-	  ctr -= interpolation();
-	  in++;
-          count++;
-	}
-      }
-
-      d_ctr = ctr;
-      consume_each(count);
-      return i;
-    }
-
-  } /* namespace filter */
-} /* namespace gr */
diff --git a/gr-filter/lib/rational_resampler_base_XXX_impl.h.t b/gr-filter/lib/rational_resampler_base_XXX_impl.h.t
deleted file mode 100644
index debd059092..0000000000
--- a/gr-filter/lib/rational_resampler_base_XXX_impl.h.t
+++ /dev/null
@@ -1,72 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2005,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-/* @WARNING@ */
-
-#ifndef @GUARD_NAME@
-#define	@GUARD_NAME@
-
-#include <gnuradio/filter/fir_filter.h>
-#include <gnuradio/filter/@BASE_NAME@.h>
-
-namespace gr {
-  namespace filter {
-
-    class FILTER_API @IMPL_NAME@ : public @BASE_NAME@
-    {
-    private:
-      unsigned d_history;
-      unsigned d_interpolation;
-      unsigned d_decimation;
-      unsigned d_ctr;
-      std::vector<@TAP_TYPE@> d_new_taps;
-      std::vector<kernel::@FIR_TYPE@ *> d_firs;
-      bool d_updated;
-
-      void install_taps(const std::vector<@TAP_TYPE@> &taps);
-
-    public:
-      @IMPL_NAME@(unsigned interpolation, unsigned decimation,
-		  const std::vector<@TAP_TYPE@> &taps);
-
-      ~@IMPL_NAME@();
-
-      unsigned history() const { return d_history; }
-      void set_history(unsigned history) { d_history = history; }
-
-      unsigned interpolation() const { return d_interpolation; }
-      unsigned decimation() const { return d_decimation; }
-
-      void set_taps(const std::vector<@TAP_TYPE@> &taps);
-      std::vector<@TAP_TYPE@> taps() const;
-
-      void forecast(int noutput_items, gr_vector_int &ninput_items_required);
-      int  general_work(int noutput_items,
-			gr_vector_int &ninput_items,
-			gr_vector_const_void_star &input_items,
-			gr_vector_void_star &output_items);
-    };
-
-  } /* namespace filter */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-filter/lib/rational_resampler_base_impl.cc b/gr-filter/lib/rational_resampler_base_impl.cc
new file mode 100644
index 0000000000..133f62e3f8
--- /dev/null
+++ b/gr-filter/lib/rational_resampler_base_impl.cc
@@ -0,0 +1,188 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2010,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "rational_resampler_base_impl.h"
+#include <gnuradio/io_signature.h>
+#include <volk/volk.h>
+#include <stdexcept>
+
+namespace gr {
+  namespace filter {
+
+    template <class IN_T, class OUT_T, class TAP_T>
+    typename rational_resampler_base<IN_T,OUT_T,TAP_T>::sptr
+    rational_resampler_base<IN_T,OUT_T,TAP_T>::make(unsigned interpolation,
+		      unsigned decimation,
+		      const std::vector<TAP_T> &taps)
+    {
+      return gnuradio::get_initial_sptr
+	(new rational_resampler_base_impl<IN_T,OUT_T,TAP_T>(interpolation, decimation, taps));
+    }
+
+    template <class IN_T, class OUT_T, class TAP_T>
+    rational_resampler_base_impl<IN_T,OUT_T,TAP_T>::rational_resampler_base_impl(unsigned interpolation,
+			     unsigned decimation,
+			     const std::vector<TAP_T> &taps)
+    : block("rational_resampler_base<IN_T,OUT_T,TAP_T>",
+	       io_signature::make(1, 1, sizeof(IN_T)),
+	       io_signature::make(1, 1, sizeof(OUT_T))),
+      d_history(1),
+      d_interpolation(interpolation),
+      d_decimation(decimation),
+      d_ctr(0),
+      d_firs(interpolation),
+      d_updated(false)
+    {
+      if(interpolation == 0)
+	throw std::out_of_range("rational_resampler_base_impl<IN_T,OUT_T,TAP_T>: interpolation must be > 0");
+      if(decimation == 0)
+	throw std::out_of_range("rational_resampler_base_impl<IN_T,OUT_T,TAP_T>: decimation must be > 0");
+
+      this->set_relative_rate(1.0 * interpolation / decimation);
+      this->set_output_multiple(1);
+
+      std::vector<TAP_T> dummy_taps;
+
+      for(unsigned i = 0; i < interpolation; i++) {
+        d_firs[i] = new kernel::fir_filter<IN_T,OUT_T,TAP_T>(1, dummy_taps);
+      }
+
+      set_taps(taps);
+      install_taps(d_new_taps);
+    }
+
+    template <class IN_T, class OUT_T, class TAP_T>
+    rational_resampler_base_impl<IN_T,OUT_T,TAP_T>::~rational_resampler_base_impl()
+    {
+      int interp = this->interpolation();
+      for(int i = 0; i < interp; i++) {
+	delete d_firs[i];
+      }
+    }
+
+    template <class IN_T, class OUT_T, class TAP_T>
+    void
+    rational_resampler_base_impl<IN_T,OUT_T,TAP_T>::set_taps(const std::vector<TAP_T> &taps)
+    {
+      d_new_taps = taps;
+      d_updated = true;
+
+      // round up length to a multiple of the interpolation factor
+      int n = taps.size() % this->interpolation();
+      if(n > 0) {
+	n = this->interpolation() - n;
+	while(n-- > 0) {
+	  d_new_taps.insert(d_new_taps.end(), 0);
+	}
+      }
+
+      assert(d_new_taps.size() % this->interpolation() == 0);
+    }
+
+    template <class IN_T, class OUT_T, class TAP_T>
+    void
+    rational_resampler_base_impl<IN_T,OUT_T,TAP_T>::install_taps(const std::vector<TAP_T> &taps)
+    {
+      int nfilters = this->interpolation();
+      int nt = taps.size() / nfilters;
+
+      assert(nt * nfilters == (int) taps.size());
+
+      std::vector< std::vector <TAP_T> > xtaps(nfilters);
+
+      for(int n = 0; n < nfilters; n++)
+	xtaps[n].resize (nt);
+
+      for(int i = 0; i < (int)taps.size(); i++)
+	xtaps[i % nfilters][i / nfilters] = taps[i];
+
+      for(int n = 0; n < nfilters; n++)
+	d_firs[n]->set_taps(xtaps[n]);
+
+      set_history(nt);
+      d_updated = false;
+    }
+
+    template <class IN_T, class OUT_T, class TAP_T>
+    std::vector<TAP_T>
+    rational_resampler_base_impl<IN_T,OUT_T,TAP_T>::taps() const
+    {
+      return d_new_taps;
+    }
+
+    template <class IN_T, class OUT_T, class TAP_T>
+    void
+    rational_resampler_base_impl<IN_T,OUT_T,TAP_T>::forecast(int noutput_items, gr_vector_int &ninput_items_required)
+    {
+      int nreqd = std::max((unsigned)1, (int)((double) (noutput_items+1) * \
+				        this->decimation() / this->interpolation()) + history() - 1);
+      unsigned ninputs = ninput_items_required.size();
+      for(unsigned i = 0; i < ninputs; i++)
+	ninput_items_required[i] = nreqd;
+    }
+
+    template <class IN_T, class OUT_T, class TAP_T>
+    int
+    rational_resampler_base_impl<IN_T,OUT_T,TAP_T>::general_work(int noutput_items,
+			      gr_vector_int &ninput_items,
+			      gr_vector_const_void_star &input_items,
+			      gr_vector_void_star &output_items)
+    {
+      const IN_T *in = (const IN_T *)input_items[0];
+      OUT_T *out = (OUT_T *)output_items[0];
+
+      if(d_updated) {
+	install_taps(d_new_taps);
+	return 0;		// history requirement may have increased.
+      }
+
+      unsigned int ctr = d_ctr;
+      int count = 0;
+
+      int i = 0;
+      while((i < noutput_items) && (count < ninput_items[0])) {
+	out[i++] = d_firs[ctr]->filter(in);
+	ctr += this->decimation();
+	while(ctr >= this->interpolation()) {
+	  ctr -= this->interpolation();
+	  in++;
+          count++;
+	}
+      }
+
+      d_ctr = ctr;
+      this->consume_each(count);
+      return i;
+    }
+    template class rational_resampler_base<gr_complex, gr_complex, gr_complex>;
+    template class rational_resampler_base<gr_complex, gr_complex, float>;
+    template class rational_resampler_base<float, gr_complex, gr_complex>;
+    template class rational_resampler_base<float, float, float>;
+    template class rational_resampler_base<float, std::int16_t, float>;
+    template class rational_resampler_base<std::int16_t, gr_complex, gr_complex>;
+
+  } /* namespace filter */
+} /* namespace gr */
diff --git a/gr-filter/lib/rational_resampler_base_impl.h b/gr-filter/lib/rational_resampler_base_impl.h
new file mode 100644
index 0000000000..a42d1b0fda
--- /dev/null
+++ b/gr-filter/lib/rational_resampler_base_impl.h
@@ -0,0 +1,71 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2005,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef RATIONAL_RESAMPLER_IMPL_BASE_H
+#define	RATIONAL_RESAMPLER_IMPL_BASE_H
+
+#include <gnuradio/filter/fir_filter.h>
+#include <gnuradio/filter/rational_resampler_base.h>
+
+namespace gr {
+  namespace filter {
+
+    template <class IN_T, class OUT_T, class TAP_T>
+    class FILTER_API rational_resampler_base_impl : public rational_resampler_base<IN_T,OUT_T,TAP_T>
+    {
+    private:
+      unsigned d_history;
+      unsigned d_interpolation;
+      unsigned d_decimation;
+      unsigned d_ctr;
+      std::vector<TAP_T> d_new_taps;
+      std::vector<kernel::fir_filter<IN_T,OUT_T,TAP_T> *> d_firs;
+      bool d_updated;
+
+      void install_taps(const std::vector<TAP_T> &taps);
+
+    public:
+      rational_resampler_base_impl(unsigned interpolation, unsigned decimation,
+		  const std::vector<TAP_T> &taps);
+
+      ~rational_resampler_base_impl();
+
+      unsigned history() const { return d_history; }
+      void set_history(unsigned history) { d_history = history; }
+
+      unsigned interpolation() const { return d_interpolation; }
+      unsigned decimation() const { return d_decimation; }
+
+      void set_taps(const std::vector<TAP_T> &taps);
+      std::vector<TAP_T> taps() const;
+
+      void forecast(int noutput_items, gr_vector_int &ninput_items_required);
+      int  general_work(int noutput_items,
+			gr_vector_int &ninput_items,
+			gr_vector_const_void_star &input_items,
+			gr_vector_void_star &output_items);
+    };
+
+  } /* namespace filter */
+} /* namespace gr */
+
+#endif /* RATIONAL_RESAMPLER_IMPL_BASE_H */
diff --git a/gr-filter/swig/CMakeLists.txt b/gr-filter/swig/CMakeLists.txt
index ee8389dddb..2308739062 100644
--- a/gr-filter/swig/CMakeLists.txt
+++ b/gr-filter/swig/CMakeLists.txt
@@ -42,7 +42,6 @@ set(GR_SWIG_DOC_DIRS
     ${CMAKE_CURRENT_BINARY_DIR}/../include/gnuradio/filter
 )
 set(GR_SWIG_DOCS_TARGET_DEPS runtime_swig_swig_doc)
-set(GR_SWIG_TARGET_DEPS filter_generated_includes)
 set(GR_SWIG_LIBRARIES gnuradio-filter gnuradio-fft)
 
 GR_SWIG_MAKE(filter_swig filter_swig.i)
diff --git a/gr-filter/swig/filter_swig.i b/gr-filter/swig/filter_swig.i
index db0ad0fd95..939f038208 100644
--- a/gr-filter/swig/filter_swig.i
+++ b/gr-filter/swig/filter_swig.i
@@ -34,12 +34,7 @@
 #include "gnuradio/filter/dc_blocker_ff.h"
 #include "gnuradio/filter/filter_delay_fc.h"
 #include "gnuradio/filter/filterbank_vcvcf.h"
-#include "gnuradio/filter/fir_filter_ccc.h"
-#include "gnuradio/filter/fir_filter_ccf.h"
-#include "gnuradio/filter/fir_filter_fcc.h"
-#include "gnuradio/filter/fir_filter_fff.h"
-#include "gnuradio/filter/fir_filter_fsf.h"
-#include "gnuradio/filter/fir_filter_scc.h"
+#include "gnuradio/filter/fir_filter_blk.h"
 #include "gnuradio/filter/fft_filter_ccc.h"
 #include "gnuradio/filter/fft_filter_ccf.h"
 #include "gnuradio/filter/fft_filter_fff.h"
@@ -47,24 +42,14 @@
 #include "gnuradio/filter/mmse_interpolator_ff.h"
 #include "gnuradio/filter/mmse_resampler_cc.h"
 #include "gnuradio/filter/mmse_resampler_ff.h"
-#include "gnuradio/filter/freq_xlating_fir_filter_ccc.h"
-#include "gnuradio/filter/freq_xlating_fir_filter_ccf.h"
-#include "gnuradio/filter/freq_xlating_fir_filter_fcc.h"
-#include "gnuradio/filter/freq_xlating_fir_filter_fcf.h"
-#include "gnuradio/filter/freq_xlating_fir_filter_scf.h"
-#include "gnuradio/filter/freq_xlating_fir_filter_scc.h"
+#include "gnuradio/filter/freq_xlating_fir_filter.h"
 #include "gnuradio/filter/hilbert_fc.h"
 #include "gnuradio/filter/iir_filter_ffd.h"
 #include "gnuradio/filter/iir_filter_ccc.h"
 #include "gnuradio/filter/iir_filter_ccf.h"
 #include "gnuradio/filter/iir_filter_ccd.h"
 #include "gnuradio/filter/iir_filter_ccz.h"
-#include "gnuradio/filter/interp_fir_filter_ccc.h"
-#include "gnuradio/filter/interp_fir_filter_ccf.h"
-#include "gnuradio/filter/interp_fir_filter_fcc.h"
-#include "gnuradio/filter/interp_fir_filter_fff.h"
-#include "gnuradio/filter/interp_fir_filter_fsf.h"
-#include "gnuradio/filter/interp_fir_filter_scc.h"
+#include "gnuradio/filter/interp_fir_filter.h"
 #include "gnuradio/filter/pfb_arb_resampler_ccf.h"
 #include "gnuradio/filter/pfb_arb_resampler_ccc.h"
 #include "gnuradio/filter/pfb_arb_resampler_fff.h"
@@ -72,12 +57,7 @@
 #include "gnuradio/filter/pfb_decimator_ccf.h"
 #include "gnuradio/filter/pfb_interpolator_ccf.h"
 #include "gnuradio/filter/pfb_synthesizer_ccf.h"
-#include "gnuradio/filter/rational_resampler_base_ccc.h"
-#include "gnuradio/filter/rational_resampler_base_ccf.h"
-#include "gnuradio/filter/rational_resampler_base_fcc.h"
-#include "gnuradio/filter/rational_resampler_base_fff.h"
-#include "gnuradio/filter/rational_resampler_base_fsf.h"
-#include "gnuradio/filter/rational_resampler_base_scc.h"
+#include "gnuradio/filter/rational_resampler_base.h"
 #include "gnuradio/filter/single_pole_iir_filter_cc.h"
 #include "gnuradio/filter/single_pole_iir_filter_ff.h"
 %}
@@ -88,12 +68,7 @@
 %include "gnuradio/filter/dc_blocker_ff.h"
 %include "gnuradio/filter/filter_delay_fc.h"
 %include "gnuradio/filter/filterbank_vcvcf.h"
-%include "gnuradio/filter/fir_filter_ccc.h"
-%include "gnuradio/filter/fir_filter_ccf.h"
-%include "gnuradio/filter/fir_filter_fcc.h"
-%include "gnuradio/filter/fir_filter_fff.h"
-%include "gnuradio/filter/fir_filter_fsf.h"
-%include "gnuradio/filter/fir_filter_scc.h"
+%include "gnuradio/filter/fir_filter_blk.h"
 %include "gnuradio/filter/fft_filter_ccc.h"
 %include "gnuradio/filter/fft_filter_ccf.h"
 %include "gnuradio/filter/fft_filter_fff.h"
@@ -101,24 +76,14 @@
 %include "gnuradio/filter/mmse_interpolator_ff.h"
 %include "gnuradio/filter/mmse_resampler_cc.h"
 %include "gnuradio/filter/mmse_resampler_ff.h"
-%include "gnuradio/filter/freq_xlating_fir_filter_ccc.h"
-%include "gnuradio/filter/freq_xlating_fir_filter_ccf.h"
-%include "gnuradio/filter/freq_xlating_fir_filter_fcc.h"
-%include "gnuradio/filter/freq_xlating_fir_filter_fcf.h"
-%include "gnuradio/filter/freq_xlating_fir_filter_scf.h"
-%include "gnuradio/filter/freq_xlating_fir_filter_scc.h"
+%include "gnuradio/filter/freq_xlating_fir_filter.h"
 %include "gnuradio/filter/hilbert_fc.h"
 %include "gnuradio/filter/iir_filter_ffd.h"
 %include "gnuradio/filter/iir_filter_ccc.h"
 %include "gnuradio/filter/iir_filter_ccf.h"
 %include "gnuradio/filter/iir_filter_ccd.h"
 %include "gnuradio/filter/iir_filter_ccz.h"
-%include "gnuradio/filter/interp_fir_filter_ccc.h"
-%include "gnuradio/filter/interp_fir_filter_ccf.h"
-%include "gnuradio/filter/interp_fir_filter_fcc.h"
-%include "gnuradio/filter/interp_fir_filter_fff.h"
-%include "gnuradio/filter/interp_fir_filter_fsf.h"
-%include "gnuradio/filter/interp_fir_filter_scc.h"
+%include "gnuradio/filter/interp_fir_filter.h"
 %include "gnuradio/filter/pfb_arb_resampler_ccf.h"
 %include "gnuradio/filter/pfb_arb_resampler_ccc.h"
 %include "gnuradio/filter/pfb_arb_resampler_fff.h"
@@ -126,12 +91,7 @@
 %include "gnuradio/filter/pfb_decimator_ccf.h"
 %include "gnuradio/filter/pfb_interpolator_ccf.h"
 %include "gnuradio/filter/pfb_synthesizer_ccf.h"
-%include "gnuradio/filter/rational_resampler_base_ccc.h"
-%include "gnuradio/filter/rational_resampler_base_ccf.h"
-%include "gnuradio/filter/rational_resampler_base_fcc.h"
-%include "gnuradio/filter/rational_resampler_base_fff.h"
-%include "gnuradio/filter/rational_resampler_base_fsf.h"
-%include "gnuradio/filter/rational_resampler_base_scc.h"
+%include "gnuradio/filter/rational_resampler_base.h"
 %include "gnuradio/filter/single_pole_iir_filter_cc.h"
 %include "gnuradio/filter/single_pole_iir_filter_ff.h"
 
@@ -139,12 +99,12 @@ GR_SWIG_BLOCK_MAGIC2(filter, dc_blocker_cc);
 GR_SWIG_BLOCK_MAGIC2(filter, dc_blocker_ff);
 GR_SWIG_BLOCK_MAGIC2(filter, filter_delay_fc);
 GR_SWIG_BLOCK_MAGIC2(filter, filterbank_vcvcf);
-GR_SWIG_BLOCK_MAGIC2(filter, fir_filter_ccc);
-GR_SWIG_BLOCK_MAGIC2(filter, fir_filter_ccf);
-GR_SWIG_BLOCK_MAGIC2(filter, fir_filter_fcc);
-GR_SWIG_BLOCK_MAGIC2(filter, fir_filter_fff);
-GR_SWIG_BLOCK_MAGIC2(filter, fir_filter_fsf);
-GR_SWIG_BLOCK_MAGIC2(filter, fir_filter_scc);
+GR_SWIG_BLOCK_MAGIC2_TMPL(filter, fir_filter_ccc, fir_filter_blk<gr_complex, gr_complex, gr_complex>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(filter, fir_filter_ccf, fir_filter_blk<gr_complex, gr_complex, float>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(filter, fir_filter_fcc, fir_filter_blk<float, gr_complex, gr_complex>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(filter, fir_filter_fff, fir_filter_blk<float, float, float>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(filter, fir_filter_fsf, fir_filter_blk<float, std::int16_t, float>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(filter, fir_filter_scc, fir_filter_blk<std::int16_t, gr_complex, gr_complex>);
 GR_SWIG_BLOCK_MAGIC2(filter, fft_filter_ccc);
 GR_SWIG_BLOCK_MAGIC2(filter, fft_filter_ccf);
 GR_SWIG_BLOCK_MAGIC2(filter, fft_filter_fff);
@@ -152,24 +112,24 @@ GR_SWIG_BLOCK_MAGIC2(filter, mmse_interpolator_cc);
 GR_SWIG_BLOCK_MAGIC2(filter, mmse_interpolator_ff);
 GR_SWIG_BLOCK_MAGIC2(filter, mmse_resampler_cc);
 GR_SWIG_BLOCK_MAGIC2(filter, mmse_resampler_ff);
-GR_SWIG_BLOCK_MAGIC2(filter, freq_xlating_fir_filter_ccc);
-GR_SWIG_BLOCK_MAGIC2(filter, freq_xlating_fir_filter_ccf);
-GR_SWIG_BLOCK_MAGIC2(filter, freq_xlating_fir_filter_fcc);
-GR_SWIG_BLOCK_MAGIC2(filter, freq_xlating_fir_filter_fcf);
-GR_SWIG_BLOCK_MAGIC2(filter, freq_xlating_fir_filter_scf);
-GR_SWIG_BLOCK_MAGIC2(filter, freq_xlating_fir_filter_scc);
+GR_SWIG_BLOCK_MAGIC2_TMPL(filter, freq_xlating_fir_filter_ccc, freq_xlating_fir_filter<gr_complex, gr_complex, gr_complex>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(filter, freq_xlating_fir_filter_ccf, freq_xlating_fir_filter<gr_complex, gr_complex, float>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(filter, freq_xlating_fir_filter_fcc, freq_xlating_fir_filter<float, gr_complex, gr_complex>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(filter, freq_xlating_fir_filter_fcf, freq_xlating_fir_filter<float, gr_complex, float>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(filter, freq_xlating_fir_filter_scf, freq_xlating_fir_filter<std::int16_t, gr_complex, float>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(filter, freq_xlating_fir_filter_scc, freq_xlating_fir_filter<std::int16_t, gr_complex, gr_complex>);
 GR_SWIG_BLOCK_MAGIC2(filter, hilbert_fc);
 GR_SWIG_BLOCK_MAGIC2(filter, iir_filter_ffd);
 GR_SWIG_BLOCK_MAGIC2(filter, iir_filter_ccc);
 GR_SWIG_BLOCK_MAGIC2(filter, iir_filter_ccf);
 GR_SWIG_BLOCK_MAGIC2(filter, iir_filter_ccd);
 GR_SWIG_BLOCK_MAGIC2(filter, iir_filter_ccz);
-GR_SWIG_BLOCK_MAGIC2(filter, interp_fir_filter_ccc);
-GR_SWIG_BLOCK_MAGIC2(filter, interp_fir_filter_ccf);
-GR_SWIG_BLOCK_MAGIC2(filter, interp_fir_filter_fcc);
-GR_SWIG_BLOCK_MAGIC2(filter, interp_fir_filter_fff);
-GR_SWIG_BLOCK_MAGIC2(filter, interp_fir_filter_fsf);
-GR_SWIG_BLOCK_MAGIC2(filter, interp_fir_filter_scc);
+GR_SWIG_BLOCK_MAGIC2_TMPL(filter, interp_fir_filter_ccc, interp_fir_filter<gr_complex, gr_complex, gr_complex>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(filter, interp_fir_filter_ccf, interp_fir_filter<gr_complex, gr_complex, float>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(filter, interp_fir_filter_fcc, interp_fir_filter<float, gr_complex, gr_complex>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(filter, interp_fir_filter_fff, interp_fir_filter<float, float, float>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(filter, interp_fir_filter_fsf, interp_fir_filter<float, std::int16_t, float>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(filter, interp_fir_filter_scc, interp_fir_filter<std::int16_t, gr_complex, gr_complex>);
 GR_SWIG_BLOCK_MAGIC2(filter, pfb_arb_resampler_ccf);
 GR_SWIG_BLOCK_MAGIC2(filter, pfb_arb_resampler_ccc);
 GR_SWIG_BLOCK_MAGIC2(filter, pfb_arb_resampler_fff);
@@ -177,11 +137,11 @@ GR_SWIG_BLOCK_MAGIC2(filter, pfb_channelizer_ccf);
 GR_SWIG_BLOCK_MAGIC2(filter, pfb_decimator_ccf);
 GR_SWIG_BLOCK_MAGIC2(filter, pfb_interpolator_ccf);
 GR_SWIG_BLOCK_MAGIC2(filter, pfb_synthesizer_ccf);
-GR_SWIG_BLOCK_MAGIC2(filter, rational_resampler_base_ccc);
-GR_SWIG_BLOCK_MAGIC2(filter, rational_resampler_base_ccf);
-GR_SWIG_BLOCK_MAGIC2(filter, rational_resampler_base_fcc);
-GR_SWIG_BLOCK_MAGIC2(filter, rational_resampler_base_fff);
-GR_SWIG_BLOCK_MAGIC2(filter, rational_resampler_base_fsf);
-GR_SWIG_BLOCK_MAGIC2(filter, rational_resampler_base_scc);
+GR_SWIG_BLOCK_MAGIC2_TMPL(filter, rational_resampler_base_ccc, rational_resampler_base<gr_complex,gr_complex,gr_complex>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(filter, rational_resampler_base_ccf, rational_resampler_base<gr_complex,gr_complex,float>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(filter, rational_resampler_base_fcc, rational_resampler_base<float,gr_complex,gr_complex>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(filter, rational_resampler_base_fff, rational_resampler_base<float,float,float>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(filter, rational_resampler_base_fsf, rational_resampler_base<float,std::int16_t,float>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(filter, rational_resampler_base_scc, rational_resampler_base<std::int16_t,gr_complex,gr_complex>);
 GR_SWIG_BLOCK_MAGIC2(filter, single_pole_iir_filter_cc);
 GR_SWIG_BLOCK_MAGIC2(filter, single_pole_iir_filter_ff);
-- 
cgit v1.2.3


From 97ba0b074f4ecc1cc78b5d1902c5e2458b4b5c5a Mon Sep 17 00:00:00 2001
From: Andrej Rode <mail@andrejro.de>
Date: Mon, 20 Aug 2018 13:58:33 +0200
Subject: trellis: replace gengen with C++ templates

---
 docs/doxygen/CMakeLists.txt                        |   4 -
 gr-trellis/include/gnuradio/trellis/CMakeLists.txt |  33 ++--
 gr-trellis/include/gnuradio/trellis/encoder.h      |  65 ++++++++
 gr-trellis/include/gnuradio/trellis/encoder_XX.h.t |  60 -------
 gr-trellis/include/gnuradio/trellis/metrics.h      |  68 ++++++++
 gr-trellis/include/gnuradio/trellis/metrics_X.h.t  |  63 --------
 .../include/gnuradio/trellis/pccc_decoder_X.h.t    |  69 --------
 .../include/gnuradio/trellis/pccc_decoder_blk.h    |  73 +++++++++
 .../gnuradio/trellis/pccc_decoder_combined_XX.h.t  |  79 ---------
 .../gnuradio/trellis/pccc_decoder_combined_blk.h   |  85 ++++++++++
 gr-trellis/include/gnuradio/trellis/pccc_encoder.h |  69 ++++++++
 .../include/gnuradio/trellis/pccc_encoder_XX.h.t   |  63 --------
 .../include/gnuradio/trellis/sccc_decoder_X.h.t    |  69 --------
 .../include/gnuradio/trellis/sccc_decoder_blk.h    |  73 +++++++++
 .../gnuradio/trellis/sccc_decoder_combined_XX.h.t  |  80 ----------
 .../gnuradio/trellis/sccc_decoder_combined_blk.h   |  86 ++++++++++
 gr-trellis/include/gnuradio/trellis/sccc_encoder.h |  67 ++++++++
 .../include/gnuradio/trellis/sccc_encoder_XX.h.t   |  63 --------
 gr-trellis/include/gnuradio/trellis/viterbi.h      |  66 ++++++++
 gr-trellis/include/gnuradio/trellis/viterbi_X.h.t  |  62 --------
 .../include/gnuradio/trellis/viterbi_combined.h    |  83 ++++++++++
 .../gnuradio/trellis/viterbi_combined_XX.h.t       |  71 ---------
 gr-trellis/lib/CMakeLists.txt                      |  32 ++--
 gr-trellis/lib/encoder_XX_impl.cc.t                | 118 --------------
 gr-trellis/lib/encoder_XX_impl.h.t                 |  60 -------
 gr-trellis/lib/encoder_impl.cc                     | 131 +++++++++++++++
 gr-trellis/lib/encoder_impl.h                      |  59 +++++++
 gr-trellis/lib/metrics_X_impl.cc.t                 | 123 --------------
 gr-trellis/lib/metrics_X_impl.h.t                  |  68 --------
 gr-trellis/lib/metrics_impl.cc                     | 135 ++++++++++++++++
 gr-trellis/lib/metrics_impl.h                      |  68 ++++++++
 gr-trellis/lib/pccc_decoder_X_impl.cc.t            | 118 --------------
 gr-trellis/lib/pccc_decoder_X_impl.h.t             |  80 ----------
 gr-trellis/lib/pccc_decoder_blk_impl.cc            | 125 +++++++++++++++
 gr-trellis/lib/pccc_decoder_blk_impl.h             |  80 ++++++++++
 gr-trellis/lib/pccc_decoder_combined_XX_impl.cc.t  | 139 ----------------
 gr-trellis/lib/pccc_decoder_combined_XX_impl.h.t   |  93 -----------
 gr-trellis/lib/pccc_decoder_combined_blk_impl.cc   | 150 ++++++++++++++++++
 gr-trellis/lib/pccc_decoder_combined_blk_impl.h    |  92 +++++++++++
 gr-trellis/lib/pccc_encoder_XX_impl.cc.t           |  91 -----------
 gr-trellis/lib/pccc_encoder_XX_impl.h.t            |  66 --------
 gr-trellis/lib/pccc_encoder_impl.cc                |  99 ++++++++++++
 gr-trellis/lib/pccc_encoder_impl.h                 |  65 ++++++++
 gr-trellis/lib/sccc_decoder_X_impl.cc.t            | 116 --------------
 gr-trellis/lib/sccc_decoder_X_impl.h.t             |  80 ----------
 gr-trellis/lib/sccc_decoder_blk_impl.cc            | 123 ++++++++++++++
 gr-trellis/lib/sccc_decoder_blk_impl.h             |  80 ++++++++++
 gr-trellis/lib/sccc_decoder_combined_XX_impl.cc.t  | 139 ----------------
 gr-trellis/lib/sccc_decoder_combined_XX_impl.h.t   |  93 -----------
 gr-trellis/lib/sccc_decoder_combined_blk_impl.cc   | 151 ++++++++++++++++++
 gr-trellis/lib/sccc_decoder_combined_blk_impl.h    |  92 +++++++++++
 gr-trellis/lib/sccc_encoder_XX_impl.cc.t           |  93 -----------
 gr-trellis/lib/sccc_encoder_XX_impl.h.t            |  66 --------
 gr-trellis/lib/sccc_encoder_impl.cc                | 101 ++++++++++++
 gr-trellis/lib/sccc_encoder_impl.h                 |  65 ++++++++
 gr-trellis/lib/viterbi_X_impl.cc.t                 | 124 ---------------
 gr-trellis/lib/viterbi_X_impl.h.t                  |  69 --------
 gr-trellis/lib/viterbi_combined_XX_impl.cc.t       | 153 ------------------
 gr-trellis/lib/viterbi_combined_XX_impl.h.t        |  81 ----------
 gr-trellis/lib/viterbi_combined_impl.cc            | 176 +++++++++++++++++++++
 gr-trellis/lib/viterbi_combined_impl.h             |  80 ++++++++++
 gr-trellis/lib/viterbi_impl.cc                     | 135 ++++++++++++++++
 gr-trellis/lib/viterbi_impl.h                      |  69 ++++++++
 gr-trellis/swig/CMakeLists.txt                     |   1 -
 gr-trellis/swig/trellis_swig0.i                    |  96 ++++-------
 gr-trellis/swig/trellis_swig1.i                    | 145 ++++++-----------
 66 files changed, 2911 insertions(+), 2860 deletions(-)
 create mode 100644 gr-trellis/include/gnuradio/trellis/encoder.h
 delete mode 100644 gr-trellis/include/gnuradio/trellis/encoder_XX.h.t
 create mode 100644 gr-trellis/include/gnuradio/trellis/metrics.h
 delete mode 100644 gr-trellis/include/gnuradio/trellis/metrics_X.h.t
 delete mode 100644 gr-trellis/include/gnuradio/trellis/pccc_decoder_X.h.t
 create mode 100644 gr-trellis/include/gnuradio/trellis/pccc_decoder_blk.h
 delete mode 100644 gr-trellis/include/gnuradio/trellis/pccc_decoder_combined_XX.h.t
 create mode 100644 gr-trellis/include/gnuradio/trellis/pccc_decoder_combined_blk.h
 create mode 100644 gr-trellis/include/gnuradio/trellis/pccc_encoder.h
 delete mode 100644 gr-trellis/include/gnuradio/trellis/pccc_encoder_XX.h.t
 delete mode 100644 gr-trellis/include/gnuradio/trellis/sccc_decoder_X.h.t
 create mode 100644 gr-trellis/include/gnuradio/trellis/sccc_decoder_blk.h
 delete mode 100644 gr-trellis/include/gnuradio/trellis/sccc_decoder_combined_XX.h.t
 create mode 100644 gr-trellis/include/gnuradio/trellis/sccc_decoder_combined_blk.h
 create mode 100644 gr-trellis/include/gnuradio/trellis/sccc_encoder.h
 delete mode 100644 gr-trellis/include/gnuradio/trellis/sccc_encoder_XX.h.t
 create mode 100644 gr-trellis/include/gnuradio/trellis/viterbi.h
 delete mode 100644 gr-trellis/include/gnuradio/trellis/viterbi_X.h.t
 create mode 100644 gr-trellis/include/gnuradio/trellis/viterbi_combined.h
 delete mode 100644 gr-trellis/include/gnuradio/trellis/viterbi_combined_XX.h.t
 delete mode 100644 gr-trellis/lib/encoder_XX_impl.cc.t
 delete mode 100644 gr-trellis/lib/encoder_XX_impl.h.t
 create mode 100644 gr-trellis/lib/encoder_impl.cc
 create mode 100644 gr-trellis/lib/encoder_impl.h
 delete mode 100644 gr-trellis/lib/metrics_X_impl.cc.t
 delete mode 100644 gr-trellis/lib/metrics_X_impl.h.t
 create mode 100644 gr-trellis/lib/metrics_impl.cc
 create mode 100644 gr-trellis/lib/metrics_impl.h
 delete mode 100644 gr-trellis/lib/pccc_decoder_X_impl.cc.t
 delete mode 100644 gr-trellis/lib/pccc_decoder_X_impl.h.t
 create mode 100644 gr-trellis/lib/pccc_decoder_blk_impl.cc
 create mode 100644 gr-trellis/lib/pccc_decoder_blk_impl.h
 delete mode 100644 gr-trellis/lib/pccc_decoder_combined_XX_impl.cc.t
 delete mode 100644 gr-trellis/lib/pccc_decoder_combined_XX_impl.h.t
 create mode 100644 gr-trellis/lib/pccc_decoder_combined_blk_impl.cc
 create mode 100644 gr-trellis/lib/pccc_decoder_combined_blk_impl.h
 delete mode 100644 gr-trellis/lib/pccc_encoder_XX_impl.cc.t
 delete mode 100644 gr-trellis/lib/pccc_encoder_XX_impl.h.t
 create mode 100644 gr-trellis/lib/pccc_encoder_impl.cc
 create mode 100644 gr-trellis/lib/pccc_encoder_impl.h
 delete mode 100644 gr-trellis/lib/sccc_decoder_X_impl.cc.t
 delete mode 100644 gr-trellis/lib/sccc_decoder_X_impl.h.t
 create mode 100644 gr-trellis/lib/sccc_decoder_blk_impl.cc
 create mode 100644 gr-trellis/lib/sccc_decoder_blk_impl.h
 delete mode 100644 gr-trellis/lib/sccc_decoder_combined_XX_impl.cc.t
 delete mode 100644 gr-trellis/lib/sccc_decoder_combined_XX_impl.h.t
 create mode 100644 gr-trellis/lib/sccc_decoder_combined_blk_impl.cc
 create mode 100644 gr-trellis/lib/sccc_decoder_combined_blk_impl.h
 delete mode 100644 gr-trellis/lib/sccc_encoder_XX_impl.cc.t
 delete mode 100644 gr-trellis/lib/sccc_encoder_XX_impl.h.t
 create mode 100644 gr-trellis/lib/sccc_encoder_impl.cc
 create mode 100644 gr-trellis/lib/sccc_encoder_impl.h
 delete mode 100644 gr-trellis/lib/viterbi_X_impl.cc.t
 delete mode 100644 gr-trellis/lib/viterbi_X_impl.h.t
 delete mode 100644 gr-trellis/lib/viterbi_combined_XX_impl.cc.t
 delete mode 100644 gr-trellis/lib/viterbi_combined_XX_impl.h.t
 create mode 100644 gr-trellis/lib/viterbi_combined_impl.cc
 create mode 100644 gr-trellis/lib/viterbi_combined_impl.h
 create mode 100644 gr-trellis/lib/viterbi_impl.cc
 create mode 100644 gr-trellis/lib/viterbi_impl.h

(limited to 'docs/doxygen')

diff --git a/docs/doxygen/CMakeLists.txt b/docs/doxygen/CMakeLists.txt
index 019b01c305..8c8bd4b248 100644
--- a/docs/doxygen/CMakeLists.txt
+++ b/docs/doxygen/CMakeLists.txt
@@ -45,10 +45,6 @@ if(ENABLE_GNURADIO_RUNTIME)
   list(APPEND GENERATED_DEPS pmt_generated)
 endif(ENABLE_GNURADIO_RUNTIME)
 
-if(ENABLE_GR_TRELLIS)
-  list(APPEND GENERATED_DEPS trellis_generated_includes)
-endif(ENABLE_GR_TRELLIS)
-
 ########################################################################
 # Make and install doxygen docs
 ########################################################################
diff --git a/gr-trellis/include/gnuradio/trellis/CMakeLists.txt b/gr-trellis/include/gnuradio/trellis/CMakeLists.txt
index 831f2916dc..a9c664606c 100644
--- a/gr-trellis/include/gnuradio/trellis/CMakeLists.txt
+++ b/gr-trellis/include/gnuradio/trellis/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright 2012,2014 Free Software Foundation, Inc.
+# Copyright 2012,2014,2018 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -17,42 +17,31 @@
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
 
-########################################################################
-# Invoke macro to generate various headers
-########################################################################
-include(GrMiscUtils)
-GR_EXPAND_X_H(trellis encoder_XX                 bb bs bi ss si ii)
-GR_EXPAND_X_H(trellis sccc_encoder_XX            bb bs bi ss si ii)
-GR_EXPAND_X_H(trellis pccc_encoder_XX            bb bs bi ss si ii)
-GR_EXPAND_X_H(trellis metrics_X                  s i f c)
-GR_EXPAND_X_H(trellis viterbi_X                  b s i)
-GR_EXPAND_X_H(trellis viterbi_combined_XX        sb ss si ib is ii fb fs fi cb cs ci)
-GR_EXPAND_X_H(trellis sccc_decoder_X             b s i)
-GR_EXPAND_X_H(trellis sccc_decoder_combined_XX   fb fs fi cb cs ci)
-GR_EXPAND_X_H(trellis pccc_decoder_X             b s i)
-GR_EXPAND_X_H(trellis pccc_decoder_combined_XX   fb fs fi cb cs ci)
-
-add_custom_target(trellis_generated_includes DEPENDS
-    ${generated_includes}
-)
-
 ########################################################################
 # Install header files
 ########################################################################
 install(FILES
-    ${generated_includes}
     api.h
     base.h
     calc_metric.h
     constellation_metrics_cf.h
     core_algorithms.h
+    encoder.h
     fsm.h
     interleaver.h
+    metrics.h
+    pccc_decoder_blk.h
+    pccc_decoder_combined_blk.h
+    pccc_encoder.h
     permutation.h
     quicksort_index.h
+    sccc_encoder.h
+    sccc_decoder_blk.h
+    sccc_decoder_combined_blk.h
     siso_type.h
     siso_combined_f.h
     siso_f.h
+    viterbi.h
+    viterbi_combined.h
     DESTINATION ${GR_INCLUDE_DIR}/gnuradio/trellis
 )
-
diff --git a/gr-trellis/include/gnuradio/trellis/encoder.h b/gr-trellis/include/gnuradio/trellis/encoder.h
new file mode 100644
index 0000000000..5f022f2a01
--- /dev/null
+++ b/gr-trellis/include/gnuradio/trellis/encoder.h
@@ -0,0 +1,65 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef ENCODER_H
+#define ENCODER_H
+
+#include <gnuradio/trellis/api.h>
+#include <gnuradio/trellis/fsm.h>
+#include <gnuradio/sync_block.h>
+#include <cstdint>
+
+namespace gr {
+  namespace trellis {
+
+    /*!
+     * \brief Convolutional encoder.
+     * \ingroup trellis_coding_blk
+     */
+    template <class IN_T, class OUT_T>
+    class TRELLIS_API encoder : virtual public sync_block
+    {
+    public:
+      typedef boost::shared_ptr< encoder<IN_T,OUT_T> > sptr;
+
+      static sptr make(const fsm &FSM, int ST);
+
+      static sptr make(const fsm &FSM, int ST, int K);
+
+      virtual fsm FSM() const = 0;
+      virtual int ST() const = 0;
+      virtual int K() const = 0;
+      virtual void set_FSM(const fsm &FSM) =0;
+      virtual void set_ST(int ST) =0;
+      virtual void set_K(int K) =0;
+    };
+    typedef encoder<std::uint8_t, std::uint8_t> encoder_bb;
+    typedef encoder<std::uint8_t, std::int16_t> encoder_bs;
+    typedef encoder<std::uint8_t, std::int32_t> encoder_bi;
+    typedef encoder<std::int16_t, std::int16_t> encoder_ss;
+    typedef encoder<std::int16_t, std::int32_t> encoder_si;
+    typedef encoder<std::int32_t, std::int32_t> encoder_ii;
+
+  } /* namespace trellis */
+} /* namespace gr */
+
+#endif /* ENCODER_H */
diff --git a/gr-trellis/include/gnuradio/trellis/encoder_XX.h.t b/gr-trellis/include/gnuradio/trellis/encoder_XX.h.t
deleted file mode 100644
index affd62f68b..0000000000
--- a/gr-trellis/include/gnuradio/trellis/encoder_XX.h.t
+++ /dev/null
@@ -1,60 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/trellis/api.h>
-#include <gnuradio/trellis/fsm.h>
-#include <gnuradio/sync_block.h>
-
-namespace gr {
-  namespace trellis {
-
-    /*!
-     * \brief Convolutional encoder.
-     * \ingroup trellis_coding_blk
-     */
-    class TRELLIS_API @NAME@ : virtual public sync_block
-    {
-    public:
-      // gr::trellis::@BASE_NAME@::sptr
-      typedef boost::shared_ptr<@BASE_NAME@> sptr;
-
-      static sptr make(const fsm &FSM, int ST);
-
-      static sptr make(const fsm &FSM, int ST, int K);
-
-      virtual fsm FSM() const = 0;
-      virtual int ST() const = 0;
-      virtual int K() const = 0;
-      virtual void set_FSM(const fsm &FSM) =0;
-      virtual void set_ST(int ST) =0;
-      virtual void set_K(int K) =0;
-    };
-
-  } /* namespace trellis */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-trellis/include/gnuradio/trellis/metrics.h b/gr-trellis/include/gnuradio/trellis/metrics.h
new file mode 100644
index 0000000000..e2ca32222a
--- /dev/null
+++ b/gr-trellis/include/gnuradio/trellis/metrics.h
@@ -0,0 +1,68 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef METRICS_H
+#define METRICS_H
+
+#include <gnuradio/trellis/api.h>
+#include <gnuradio/trellis/calc_metric.h>
+#include <gnuradio/block.h>
+#include <cstdint>
+
+namespace gr {
+  namespace trellis {
+
+    /*!
+     * \brief Evaluate metrics for use by the Viterbi algorithm.
+     * \ingroup trellis_coding_blk
+     */
+template<class T>
+    class TRELLIS_API metrics : virtual public block
+    {
+    public:
+      // gr::trellis::metrics::sptr
+      typedef boost::shared_ptr< metrics<T> > sptr;
+
+      static sptr make(int O, int D, const std::vector<T> &TABLE,
+		       digital::trellis_metric_type_t TYPE);
+
+      virtual int O() const = 0;
+      virtual int D() const = 0;
+      virtual digital::trellis_metric_type_t TYPE() const = 0;
+      virtual std::vector<T> TABLE() const = 0;
+
+      virtual void set_O(int O) = 0;
+      virtual void set_D(int D) = 0;
+      virtual void set_TYPE(digital::trellis_metric_type_t type) = 0;
+      virtual void set_TABLE(const std::vector<T> &table) = 0;
+    };
+
+
+typedef metrics<std::int16_t> metrics_s;
+typedef metrics<std::int32_t> metrics_i;
+typedef metrics<float> metrics_f;
+typedef metrics<gr_complex> metrics_c;
+  } /* namespace trellis */
+} /* namespace gr */
+
+#endif /* METRICS_H */
diff --git a/gr-trellis/include/gnuradio/trellis/metrics_X.h.t b/gr-trellis/include/gnuradio/trellis/metrics_X.h.t
deleted file mode 100644
index f463c865a9..0000000000
--- a/gr-trellis/include/gnuradio/trellis/metrics_X.h.t
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/trellis/api.h>
-#include <gnuradio/trellis/calc_metric.h>
-#include <gnuradio/block.h>
-
-namespace gr {
-  namespace trellis {
-
-    /*!
-     * \brief Evaluate metrics for use by the Viterbi algorithm.
-     * \ingroup trellis_coding_blk
-     */
-    class TRELLIS_API @NAME@ : virtual public block
-    {
-    public:
-      // gr::trellis::@BASE_NAME@::sptr
-      typedef boost::shared_ptr<@BASE_NAME@> sptr;
-
-      static sptr make(int O, int D, const std::vector<@I_TYPE@> &TABLE,
-		       digital::trellis_metric_type_t TYPE);
-
-      virtual int O() const = 0;
-      virtual int D() const = 0;
-      virtual digital::trellis_metric_type_t TYPE() const = 0;
-      virtual std::vector<@I_TYPE@> TABLE() const = 0;
-
-      virtual void set_O(int O) = 0;
-      virtual void set_D(int D) = 0;
-      virtual void set_TYPE(digital::trellis_metric_type_t type) = 0;
-      virtual void set_TABLE(const std::vector<@I_TYPE@> &table) = 0;
-    };
-
-
-  } /* namespace trellis */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-trellis/include/gnuradio/trellis/pccc_decoder_X.h.t b/gr-trellis/include/gnuradio/trellis/pccc_decoder_X.h.t
deleted file mode 100644
index affce07042..0000000000
--- a/gr-trellis/include/gnuradio/trellis/pccc_decoder_X.h.t
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/trellis/api.h>
-#include <gnuradio/trellis/fsm.h>
-#include <gnuradio/trellis/interleaver.h>
-#include <gnuradio/trellis/siso_type.h>
-#include <gnuradio/block.h>
-#include <vector>
-
-namespace gr {
-  namespace trellis {
-
-    /*!
-     *  \ingroup trellis_coding_blk
-     */
-    class TRELLIS_API @NAME@ : virtual public block
-    {
-    public:
-      // gr::trellis::@BASE_NAME@::sptr
-      typedef boost::shared_ptr<@BASE_NAME@> sptr;
-
-      static sptr make(const fsm &FSM1, int ST10, int ST1K,
-		       const fsm &FSM2, int ST20, int ST2K,
-		       const interleaver &INTERLEAVER,
-		       int blocklength,
-		       int repetitions,
-		       siso_type_t SISO_TYPE);
-
-      virtual fsm FSM1() const = 0;
-      virtual fsm FSM2() const = 0;
-      virtual int ST10() const = 0;
-      virtual int ST1K() const = 0;
-      virtual int ST20() const = 0;
-      virtual int ST2K() const = 0;
-      virtual interleaver INTERLEAVER() const = 0;
-      virtual int blocklength() const = 0;
-      virtual int repetitions() const = 0;
-      virtual siso_type_t SISO_TYPE() const = 0;
-    };
-
-  } /* namespace trellis */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-trellis/include/gnuradio/trellis/pccc_decoder_blk.h b/gr-trellis/include/gnuradio/trellis/pccc_decoder_blk.h
new file mode 100644
index 0000000000..8684f33f03
--- /dev/null
+++ b/gr-trellis/include/gnuradio/trellis/pccc_decoder_blk.h
@@ -0,0 +1,73 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef PCCC_DECODER_BLK_H
+#define PCCC_DECODER_BLK_H
+
+#include <gnuradio/trellis/api.h>
+#include <gnuradio/trellis/fsm.h>
+#include <gnuradio/trellis/interleaver.h>
+#include <gnuradio/trellis/siso_type.h>
+#include <gnuradio/block.h>
+#include <vector>
+#include <cstdint>
+
+namespace gr {
+  namespace trellis {
+
+    /*!
+     *  \ingroup trellis_coding_blk
+     */
+template<class T>
+    class TRELLIS_API pccc_decoder_blk : virtual public block
+    {
+    public:
+      // gr::trellis::pccc_decoder_blk::sptr
+      typedef boost::shared_ptr< pccc_decoder_blk<T> > sptr;
+
+      static sptr make(const fsm &FSM1, int ST10, int ST1K,
+		       const fsm &FSM2, int ST20, int ST2K,
+		       const interleaver &INTERLEAVER,
+		       int blocklength,
+		       int repetitions,
+		       siso_type_t SISO_TYPE);
+
+      virtual fsm FSM1() const = 0;
+      virtual fsm FSM2() const = 0;
+      virtual int ST10() const = 0;
+      virtual int ST1K() const = 0;
+      virtual int ST20() const = 0;
+      virtual int ST2K() const = 0;
+      virtual interleaver INTERLEAVER() const = 0;
+      virtual int blocklength() const = 0;
+      virtual int repetitions() const = 0;
+      virtual siso_type_t SISO_TYPE() const = 0;
+    };
+
+typedef pccc_decoder_blk<std::uint8_t> pccc_decoder_b;
+typedef pccc_decoder_blk<std::int16_t> pccc_decoder_s;
+typedef pccc_decoder_blk<std::int32_t> pccc_decoder_i;
+  } /* namespace trellis */
+} /* namespace gr */
+
+#endif /* PCCC_DECODER_BLK_H */
diff --git a/gr-trellis/include/gnuradio/trellis/pccc_decoder_combined_XX.h.t b/gr-trellis/include/gnuradio/trellis/pccc_decoder_combined_XX.h.t
deleted file mode 100644
index 719b0aa1e5..0000000000
--- a/gr-trellis/include/gnuradio/trellis/pccc_decoder_combined_XX.h.t
+++ /dev/null
@@ -1,79 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/trellis/api.h>
-#include <gnuradio/trellis/fsm.h>
-#include <gnuradio/trellis/interleaver.h>
-#include <gnuradio/trellis/calc_metric.h>
-#include <gnuradio/trellis/siso_type.h>
-#include <gnuradio/block.h>
-#include <vector>
-
-namespace gr {
-  namespace trellis {
-
-    /*!
-     *  \ingroup trellis_coding_blk
-     */
-    class TRELLIS_API @NAME@ : virtual public block
-    {
-    public:
-      // gr::trellis::@BASE_NAME@::sptr
-      typedef boost::shared_ptr<@BASE_NAME@> sptr;
-
-      static sptr make(const fsm &FSMo, int STo0, int SToK,
-		       const fsm &FSMi, int STi0, int STiK,
-		       const interleaver &INTERLEAVER,
-		       int blocklength,
-		       int repetitions,
-		       siso_type_t SISO_TYPE,
-		       int D,
-		       const std::vector<@I_TYPE@> &TABLE,
-		       digital::trellis_metric_type_t METRIC_TYPE,
-		       float scaling);
-
-      virtual fsm FSM1() const = 0;
-      virtual fsm FSM2() const = 0;
-      virtual int ST10() const = 0;
-      virtual int ST1K() const = 0;
-      virtual int ST20() const = 0;
-      virtual int ST2K() const = 0;
-      virtual interleaver INTERLEAVER() const = 0;
-      virtual int blocklength() const = 0;
-      virtual int repetitions() const = 0;
-      virtual int D() const = 0;
-      virtual std::vector<@I_TYPE@> TABLE() const = 0;
-      virtual digital::trellis_metric_type_t METRIC_TYPE() const = 0;
-      virtual siso_type_t SISO_TYPE() const = 0;
-      virtual float scaling() const = 0;
-      virtual void set_scaling(float scaling) = 0;
-    };
-
-  } /* namespace trellis */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-trellis/include/gnuradio/trellis/pccc_decoder_combined_blk.h b/gr-trellis/include/gnuradio/trellis/pccc_decoder_combined_blk.h
new file mode 100644
index 0000000000..e09c08f3bc
--- /dev/null
+++ b/gr-trellis/include/gnuradio/trellis/pccc_decoder_combined_blk.h
@@ -0,0 +1,85 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef PCCC_DECODER_COMBINED_BLK_H
+#define PCCC_DECODER_COMBINED_BLK_H
+
+#include <gnuradio/trellis/api.h>
+#include <gnuradio/trellis/fsm.h>
+#include <gnuradio/trellis/interleaver.h>
+#include <gnuradio/trellis/calc_metric.h>
+#include <gnuradio/trellis/siso_type.h>
+#include <gnuradio/block.h>
+#include <vector>
+#include <cstdint>
+
+namespace gr {
+  namespace trellis {
+
+    /*!
+     *  \ingroup trellis_coding_blk
+     */
+    template <class IN_T,class OUT_T>
+    class TRELLIS_API pccc_decoder_combined_blk : virtual public block
+    {
+    public:
+      typedef boost::shared_ptr< pccc_decoder_combined_blk<IN_T,OUT_T> > sptr;
+
+      static sptr make(const fsm &FSMo, int STo0, int SToK,
+		       const fsm &FSMi, int STi0, int STiK,
+		       const interleaver &INTERLEAVER,
+		       int blocklength,
+		       int repetitions,
+		       siso_type_t SISO_TYPE,
+		       int D,
+		       const std::vector<IN_T> &TABLE,
+		       digital::trellis_metric_type_t METRIC_TYPE,
+		       float scaling);
+
+      virtual fsm FSM1() const = 0;
+      virtual fsm FSM2() const = 0;
+      virtual int ST10() const = 0;
+      virtual int ST1K() const = 0;
+      virtual int ST20() const = 0;
+      virtual int ST2K() const = 0;
+      virtual interleaver INTERLEAVER() const = 0;
+      virtual int blocklength() const = 0;
+      virtual int repetitions() const = 0;
+      virtual int D() const = 0;
+      virtual std::vector<IN_T> TABLE() const = 0;
+      virtual digital::trellis_metric_type_t METRIC_TYPE() const = 0;
+      virtual siso_type_t SISO_TYPE() const = 0;
+      virtual float scaling() const = 0;
+      virtual void set_scaling(float scaling) = 0;
+    };
+
+    typedef pccc_decoder_combined_blk<float, std::uint8_t> pccc_decoder_combined_fb;
+    typedef pccc_decoder_combined_blk<float, std::int16_t> pccc_decoder_combined_fs;
+    typedef pccc_decoder_combined_blk<float, std::int32_t> pccc_decoder_combined_fi;
+    typedef pccc_decoder_combined_blk<gr_complex, std::uint8_t> pccc_decoder_combined_cb;
+    typedef pccc_decoder_combined_blk<gr_complex, std::int16_t> pccc_decoder_combined_cs;
+    typedef pccc_decoder_combined_blk<gr_complex, std::int32_t> pccc_decoder_combined_ci;
+
+  } /* namespace trellis */
+} /* namespace gr */
+
+#endif /* PCCC_DECODER_COMBINED_BLK_H */
diff --git a/gr-trellis/include/gnuradio/trellis/pccc_encoder.h b/gr-trellis/include/gnuradio/trellis/pccc_encoder.h
new file mode 100644
index 0000000000..6f3ee25170
--- /dev/null
+++ b/gr-trellis/include/gnuradio/trellis/pccc_encoder.h
@@ -0,0 +1,69 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef PCCC_ENCODER_H
+#define PCCC_ENCODER_H
+
+#include <gnuradio/trellis/api.h>
+#include <gnuradio/trellis/fsm.h>
+#include <gnuradio/trellis/interleaver.h>
+#include <gnuradio/sync_block.h>
+#include <vector>
+#include <cstdint>
+
+namespace gr {
+  namespace trellis {
+
+    /*!
+     * \brief PCCC encoder.
+     * \ingroup trellis_coding_blk
+     */
+    template <class IN_T, class OUT_T>
+    class TRELLIS_API pccc_encoder : virtual public sync_block
+    {
+    public:
+      typedef boost::shared_ptr<pccc_encoder<IN_T,OUT_T>> sptr;
+
+      static sptr make(const fsm &FSM1, int ST1,
+		       const fsm &FSM2, int ST2,
+		       const interleaver &INTERLEAVER,
+		       int blocklength);
+
+      virtual fsm FSM1() const = 0;
+      virtual int ST1() const = 0;
+      virtual fsm FSM2() const = 0;
+      virtual int ST2() const = 0;
+      virtual interleaver INTERLEAVER() const = 0;
+      virtual int blocklength() const = 0;
+    };
+    typedef pccc_encoder<std::uint8_t, std::uint8_t> pccc_encoder_bb;
+    typedef pccc_encoder<std::uint8_t, std::int16_t> pccc_encoder_bs;
+    typedef pccc_encoder<std::uint8_t, std::int32_t> pccc_encoder_bi;
+    typedef pccc_encoder<std::int16_t, std::int16_t> pccc_encoder_ss;
+    typedef pccc_encoder<std::int16_t, std::int32_t> pccc_encoder_si;
+    typedef pccc_encoder<std::int32_t, std::int32_t> pccc_encoder_ii;
+
+
+  } /* namespace trellis */
+} /* namespace gr */
+
+#endif /* PCCC_ENCODER_H */
diff --git a/gr-trellis/include/gnuradio/trellis/pccc_encoder_XX.h.t b/gr-trellis/include/gnuradio/trellis/pccc_encoder_XX.h.t
deleted file mode 100644
index 5308fe275d..0000000000
--- a/gr-trellis/include/gnuradio/trellis/pccc_encoder_XX.h.t
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/trellis/api.h>
-#include <gnuradio/trellis/fsm.h>
-#include <gnuradio/trellis/interleaver.h>
-#include <gnuradio/sync_block.h>
-#include <vector>
-
-namespace gr {
-  namespace trellis {
-
-    /*!
-     * \brief PCCC encoder.
-     * \ingroup trellis_coding_blk
-     */
-    class TRELLIS_API @NAME@ : virtual public sync_block
-    {
-    public:
-      // gr::trellis::@BASE_NAME@::sptr
-      typedef boost::shared_ptr<@BASE_NAME@> sptr;
-
-      static sptr make(const fsm &FSM1, int ST1,
-		       const fsm &FSM2, int ST2,
-		       const interleaver &INTERLEAVER,
-		       int blocklength);
-
-      virtual fsm FSM1() const = 0;
-      virtual int ST1() const = 0;
-      virtual fsm FSM2() const = 0;
-      virtual int ST2() const = 0;
-      virtual interleaver INTERLEAVER() const = 0;
-      virtual int blocklength() const = 0;
-    };
-
-  } /* namespace trellis */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-trellis/include/gnuradio/trellis/sccc_decoder_X.h.t b/gr-trellis/include/gnuradio/trellis/sccc_decoder_X.h.t
deleted file mode 100644
index cc1d86b709..0000000000
--- a/gr-trellis/include/gnuradio/trellis/sccc_decoder_X.h.t
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/trellis/api.h>
-#include <gnuradio/trellis/fsm.h>
-#include <gnuradio/trellis/interleaver.h>
-#include <gnuradio/trellis/siso_type.h>
-#include <gnuradio/block.h>
-#include <vector>
-
-namespace gr {
-  namespace trellis {
-
-    /*!
-     *  \ingroup trellis_coding_blk
-     */
-    class TRELLIS_API @NAME@ : virtual public block
-    {
-    public:
-      // gr::trellis::@BASE_NAME@::sptr
-      typedef boost::shared_ptr<@BASE_NAME@> sptr;
-
-      static sptr make(const fsm &FSMo, int STo0, int SToK,
-		       const fsm &FSMi, int STi0, int STiK,
-		       const interleaver &INTERLEAVER,
-		       int blocklength,
-		       int repetitions,
-		       siso_type_t SISO_TYPE);
-
-      virtual fsm FSMo() const = 0;
-      virtual fsm FSMi() const = 0;
-      virtual int STo0() const = 0;
-      virtual int SToK() const = 0;
-      virtual int STi0() const = 0;
-      virtual int STiK() const = 0;
-      virtual interleaver INTERLEAVER() const = 0;
-      virtual int blocklength() const = 0;
-      virtual int repetitions() const = 0;
-      virtual siso_type_t SISO_TYPE() const = 0;
-    };
-
-  } /* namespace trellis */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-trellis/include/gnuradio/trellis/sccc_decoder_blk.h b/gr-trellis/include/gnuradio/trellis/sccc_decoder_blk.h
new file mode 100644
index 0000000000..48b90dc927
--- /dev/null
+++ b/gr-trellis/include/gnuradio/trellis/sccc_decoder_blk.h
@@ -0,0 +1,73 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef SCCC_DECODER_BLK_H
+#define SCCC_DECODER_BLK_H
+
+#include <gnuradio/trellis/api.h>
+#include <gnuradio/trellis/fsm.h>
+#include <gnuradio/trellis/interleaver.h>
+#include <gnuradio/trellis/siso_type.h>
+#include <gnuradio/block.h>
+#include <vector>
+#include <cstdint>
+
+namespace gr {
+  namespace trellis {
+
+    /*!
+     *  \ingroup trellis_coding_blk
+     */
+template<class T>
+    class TRELLIS_API sccc_decoder_blk : virtual public block
+    {
+    public:
+      // gr::trellis::sccc_decoder_blk::sptr
+      typedef boost::shared_ptr< sccc_decoder_blk<T> > sptr;
+
+      static sptr make(const fsm &FSMo, int STo0, int SToK,
+		       const fsm &FSMi, int STi0, int STiK,
+		       const interleaver &INTERLEAVER,
+		       int blocklength,
+		       int repetitions,
+		       siso_type_t SISO_TYPE);
+
+      virtual fsm FSMo() const = 0;
+      virtual fsm FSMi() const = 0;
+      virtual int STo0() const = 0;
+      virtual int SToK() const = 0;
+      virtual int STi0() const = 0;
+      virtual int STiK() const = 0;
+      virtual interleaver INTERLEAVER() const = 0;
+      virtual int blocklength() const = 0;
+      virtual int repetitions() const = 0;
+      virtual siso_type_t SISO_TYPE() const = 0;
+    };
+
+typedef sccc_decoder_blk<std::uint8_t> sccc_decoder_b;
+typedef sccc_decoder_blk<std::int16_t> sccc_decoder_s;
+typedef sccc_decoder_blk<std::int32_t> sccc_decoder_i;
+  } /* namespace trellis */
+} /* namespace gr */
+
+#endif /* SCCC_DECODER_BLK_H */
diff --git a/gr-trellis/include/gnuradio/trellis/sccc_decoder_combined_XX.h.t b/gr-trellis/include/gnuradio/trellis/sccc_decoder_combined_XX.h.t
deleted file mode 100644
index e1f95dff1f..0000000000
--- a/gr-trellis/include/gnuradio/trellis/sccc_decoder_combined_XX.h.t
+++ /dev/null
@@ -1,80 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/trellis/api.h>
-#include <gnuradio/trellis/fsm.h>
-#include <gnuradio/trellis/interleaver.h>
-#include <gnuradio/trellis/calc_metric.h>
-#include <gnuradio/trellis/siso_type.h>
-#include <gnuradio/block.h>
-#include <vector>
-
-namespace gr {
-  namespace trellis {
-
-    /*!
-     *  \ingroup trellis_coding_blk
-     */
-    class TRELLIS_API @NAME@ : virtual public block
-    {
-    public:
-      // gr::trellis::@BASE_NAME@::sptr
-      typedef boost::shared_ptr<@BASE_NAME@> sptr;
-
-      static sptr make(const fsm &FSMo, int STo0, int SToK,
-		       const fsm &FSMi, int STi0, int STiK,
-		       const interleaver &INTERLEAVER,
-		       int blocklength,
-		       int repetitions,
-		       siso_type_t SISO_TYPE,
-		       int D,
-		       const std::vector<@I_TYPE@> &TABLE,
-		       digital::trellis_metric_type_t METRIC_TYPE,
-		       float scaling);
-
-      virtual fsm FSMo() const = 0;
-      virtual fsm FSMi() const = 0;
-      virtual int STo0() const = 0;
-      virtual int SToK() const = 0;
-      virtual int STi0() const = 0;
-      virtual int STiK() const = 0;
-      virtual interleaver INTERLEAVER() const = 0;
-      virtual int blocklength() const = 0;
-      virtual int repetitions() const = 0;
-      virtual int D() const = 0;
-      virtual std::vector<@I_TYPE@> TABLE() const = 0;
-      virtual digital::trellis_metric_type_t METRIC_TYPE() const = 0;
-      virtual siso_type_t SISO_TYPE() const = 0;
-      virtual float scaling() const  = 0;
-
-      virtual void set_scaling(float scaling) = 0;
-    };
-
-  } /* namespace trellis */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-trellis/include/gnuradio/trellis/sccc_decoder_combined_blk.h b/gr-trellis/include/gnuradio/trellis/sccc_decoder_combined_blk.h
new file mode 100644
index 0000000000..cfec71e981
--- /dev/null
+++ b/gr-trellis/include/gnuradio/trellis/sccc_decoder_combined_blk.h
@@ -0,0 +1,86 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef SCCC_DECODER_COMBINED_BLK_H
+#define SCCC_DECODER_COMBINED_BLK_H
+
+#include <gnuradio/trellis/api.h>
+#include <gnuradio/trellis/fsm.h>
+#include <gnuradio/trellis/interleaver.h>
+#include <gnuradio/trellis/calc_metric.h>
+#include <gnuradio/trellis/siso_type.h>
+#include <gnuradio/block.h>
+#include <vector>
+#include <cstdint>
+
+namespace gr {
+  namespace trellis {
+
+    /*!
+     *  \ingroup trellis_coding_blk
+     */
+    template <class IN_T,class OUT_T>
+    class TRELLIS_API sccc_decoder_combined_blk : virtual public block
+    {
+    public:
+      typedef boost::shared_ptr< sccc_decoder_combined_blk<IN_T,OUT_T> > sptr;
+
+      static sptr make(const fsm &FSMo, int STo0, int SToK,
+		       const fsm &FSMi, int STi0, int STiK,
+		       const interleaver &INTERLEAVER,
+		       int blocklength,
+		       int repetitions,
+		       siso_type_t SISO_TYPE,
+		       int D,
+		       const std::vector<IN_T> &TABLE,
+		       digital::trellis_metric_type_t METRIC_TYPE,
+		       float scaling);
+
+      virtual fsm FSMo() const = 0;
+      virtual fsm FSMi() const = 0;
+      virtual int STo0() const = 0;
+      virtual int SToK() const = 0;
+      virtual int STi0() const = 0;
+      virtual int STiK() const = 0;
+      virtual interleaver INTERLEAVER() const = 0;
+      virtual int blocklength() const = 0;
+      virtual int repetitions() const = 0;
+      virtual int D() const = 0;
+      virtual std::vector<IN_T> TABLE() const = 0;
+      virtual digital::trellis_metric_type_t METRIC_TYPE() const = 0;
+      virtual siso_type_t SISO_TYPE() const = 0;
+      virtual float scaling() const  = 0;
+
+      virtual void set_scaling(float scaling) = 0;
+    };
+
+    typedef sccc_decoder_combined_blk<float, std::uint8_t> sccc_decoder_combined_fb;
+    typedef sccc_decoder_combined_blk<float, std::int16_t> sccc_decoder_combined_fs;
+    typedef sccc_decoder_combined_blk<float, std::int32_t> sccc_decoder_combined_fi;
+    typedef sccc_decoder_combined_blk<gr_complex, std::uint8_t> sccc_decoder_combined_cb;
+    typedef sccc_decoder_combined_blk<gr_complex, std::int16_t> sccc_decoder_combined_cs;
+    typedef sccc_decoder_combined_blk<gr_complex, std::int32_t> sccc_decoder_combined_ci;
+
+  } /* namespace trellis */
+} /* namespace gr */
+
+#endif /* SCCC_DECODER_COMBINED_H */
diff --git a/gr-trellis/include/gnuradio/trellis/sccc_encoder.h b/gr-trellis/include/gnuradio/trellis/sccc_encoder.h
new file mode 100644
index 0000000000..394cce50de
--- /dev/null
+++ b/gr-trellis/include/gnuradio/trellis/sccc_encoder.h
@@ -0,0 +1,67 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef SCCC_ENCODER_H
+#define SCCC_ENCODER_H
+
+#include <gnuradio/trellis/api.h>
+#include <gnuradio/trellis/fsm.h>
+#include <gnuradio/trellis/interleaver.h>
+#include <gnuradio/sync_block.h>
+#include <vector>
+
+namespace gr {
+  namespace trellis {
+
+    /*!
+     * \brief SCCC encoder.
+     * \ingroup trellis_coding_blk
+     */
+    template <class IN_T, class OUT_T>
+    class TRELLIS_API sccc_encoder : virtual public sync_block
+    {
+    public:
+      typedef boost::shared_ptr< sccc_encoder<IN_T,OUT_T> > sptr;
+
+      static sptr make(const fsm &FSMo, int STo,
+		       const fsm &FSMi, int STi,
+		       const interleaver &INTERLEAVER,
+		       int blocklength);
+
+      virtual fsm FSMo() const = 0;
+      virtual int STo() const = 0;
+      virtual fsm FSMi() const = 0;
+      virtual int STi() const = 0;
+      virtual interleaver INTERLEAVER() const = 0;
+      virtual int blocklength() const = 0;
+    };
+    typedef sccc_encoder<std::uint8_t, std::uint8_t> sccc_encoder_bb;
+    typedef sccc_encoder<std::uint8_t, std::int16_t> sccc_encoder_bs;
+    typedef sccc_encoder<std::uint8_t, std::int32_t> sccc_encoder_bi;
+    typedef sccc_encoder<std::int16_t, std::int16_t> sccc_encoder_ss;
+    typedef sccc_encoder<std::uint8_t, std::int32_t> sccc_encoder_si;
+    typedef sccc_encoder<std::int32_t, std::int32_t> sccc_encoder_ii;
+
+  } /* namespace trellis */
+} /* namespace gr */
+
+#endif /* SCCC_ENCODER_H */
diff --git a/gr-trellis/include/gnuradio/trellis/sccc_encoder_XX.h.t b/gr-trellis/include/gnuradio/trellis/sccc_encoder_XX.h.t
deleted file mode 100644
index 85fad02eeb..0000000000
--- a/gr-trellis/include/gnuradio/trellis/sccc_encoder_XX.h.t
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/trellis/api.h>
-#include <gnuradio/trellis/fsm.h>
-#include <gnuradio/trellis/interleaver.h>
-#include <gnuradio/sync_block.h>
-#include <vector>
-
-namespace gr {
-  namespace trellis {
-
-    /*!
-     * \brief SCCC encoder.
-     * \ingroup trellis_coding_blk
-     */
-    class TRELLIS_API @NAME@ : virtual public sync_block
-    {
-    public:
-      // gr::trellis::@BASE_NAME@::sptr
-      typedef boost::shared_ptr<@BASE_NAME@> sptr;
-
-      static sptr make(const fsm &FSMo, int STo,
-		       const fsm &FSMi, int STi,
-		       const interleaver &INTERLEAVER,
-		       int blocklength);
-
-      virtual fsm FSMo() const = 0;
-      virtual int STo() const = 0;
-      virtual fsm FSMi() const = 0;
-      virtual int STi() const = 0;
-      virtual interleaver INTERLEAVER() const = 0;
-      virtual int blocklength() const = 0;
-    };
-
-  } /* namespace trellis */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-trellis/include/gnuradio/trellis/viterbi.h b/gr-trellis/include/gnuradio/trellis/viterbi.h
new file mode 100644
index 0000000000..c37392fb99
--- /dev/null
+++ b/gr-trellis/include/gnuradio/trellis/viterbi.h
@@ -0,0 +1,66 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef VITERBI_H
+#define VITERBI_H
+
+#include <gnuradio/trellis/api.h>
+#include <gnuradio/trellis/fsm.h>
+#include <gnuradio/trellis/core_algorithms.h>
+#include <gnuradio/block.h>
+#include <cstdint>
+
+namespace gr {
+  namespace trellis {
+
+    /*!
+     *  \ingroup trellis_coding_blk
+     */
+template<class T>
+    class TRELLIS_API viterbi : virtual public block
+    {
+    public:
+      // gr::trellis::viterbi::sptr
+      typedef boost::shared_ptr< viterbi<T> > sptr;
+
+      static sptr make(const fsm &FSM, int K,
+		       int S0, int SK);
+
+      virtual fsm FSM() const  = 0;
+      virtual int K()  const = 0;
+      virtual int S0()  const = 0;
+      virtual int SK()  const = 0;
+
+      virtual void set_FSM(const fsm &FSM) =0;
+      virtual void set_K(int K) =0;
+      virtual void set_S0(int S0) =0;
+      virtual void set_SK(int SK) =0;
+    };
+
+typedef viterbi<std::uint8_t> viterbi_b;
+typedef viterbi<std::int16_t> viterbi_s;
+typedef viterbi<std::int32_t> viterbi_i;
+  } /* namespace trellis */
+} /* namespace gr */
+
+#endif /* VITERBI_H */
diff --git a/gr-trellis/include/gnuradio/trellis/viterbi_X.h.t b/gr-trellis/include/gnuradio/trellis/viterbi_X.h.t
deleted file mode 100644
index 252ffb715d..0000000000
--- a/gr-trellis/include/gnuradio/trellis/viterbi_X.h.t
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/trellis/api.h>
-#include <gnuradio/trellis/fsm.h>
-#include <gnuradio/trellis/core_algorithms.h>
-#include <gnuradio/block.h>
-
-namespace gr {
-  namespace trellis {
-
-    /*!
-     *  \ingroup trellis_coding_blk
-     */
-    class TRELLIS_API @NAME@ : virtual public block
-    {
-    public:
-      // gr::trellis::@BASE_NAME@::sptr
-      typedef boost::shared_ptr<@BASE_NAME@> sptr;
-
-      static sptr make(const fsm &FSM, int K,
-		       int S0, int SK);
-
-      virtual fsm FSM() const  = 0;
-      virtual int K()  const = 0;
-      virtual int S0()  const = 0;
-      virtual int SK()  const = 0;
-
-      virtual void set_FSM(const fsm &FSM) =0;
-      virtual void set_K(int K) =0;
-      virtual void set_S0(int S0) =0;
-      virtual void set_SK(int SK) =0;
-    };
-
-  } /* namespace trellis */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-trellis/include/gnuradio/trellis/viterbi_combined.h b/gr-trellis/include/gnuradio/trellis/viterbi_combined.h
new file mode 100644
index 0000000000..b48106a8b4
--- /dev/null
+++ b/gr-trellis/include/gnuradio/trellis/viterbi_combined.h
@@ -0,0 +1,83 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef VITERBI_COMBINED_H
+#define VITERBI_COMBINED_H
+
+#include <gnuradio/trellis/api.h>
+#include <gnuradio/trellis/fsm.h>
+#include <gnuradio/trellis/calc_metric.h>
+#include <gnuradio/trellis/core_algorithms.h>
+#include <gnuradio/block.h>
+#include <cstdint>
+
+namespace gr {
+  namespace trellis {
+
+    /*!
+     *  \ingroup trellis_coding_blk
+     */
+    template <class IN_T,class OUT_T>
+    class TRELLIS_API viterbi_combined : virtual public block
+    {
+    public:
+      typedef boost::shared_ptr< viterbi_combined<IN_T,OUT_T> > sptr;
+
+      static sptr make(const fsm &FSM, int K,
+		       int S0, int SK, int D,
+		       const std::vector<IN_T> &TABLE,
+		       digital::trellis_metric_type_t TYPE);
+
+      virtual fsm FSM() const = 0;
+      virtual int K() const = 0;
+      virtual int S0() const  = 0;
+      virtual int SK() const = 0;
+      virtual int D() const = 0;
+      virtual std::vector<IN_T> TABLE() const = 0;
+      virtual digital::trellis_metric_type_t TYPE() const = 0;
+
+      virtual void set_FSM(const fsm &FSM) =0;
+      virtual void set_K(int K) =0;
+      virtual void set_S0(int S0) =0;
+      virtual void set_SK(int SK) =0;
+      virtual void set_D(int D) =0;
+      virtual void set_TABLE (const std::vector<IN_T> &table) = 0;
+      virtual void set_TYPE(digital::trellis_metric_type_t type) = 0;
+    };
+
+    typedef viterbi_combined<std::int16_t, std::uint8_t> viterbi_combined_sb;
+    typedef viterbi_combined<std::int16_t, std::int16_t> viterbi_combined_ss;
+    typedef viterbi_combined<std::int16_t, std::int32_t> viterbi_combined_si;
+    typedef viterbi_combined<std::int32_t, std::uint8_t> viterbi_combined_ib;
+    typedef viterbi_combined<std::int32_t, std::int16_t> viterbi_combined_is;
+    typedef viterbi_combined<std::int32_t, std::int32_t> viterbi_combined_ii;
+    typedef viterbi_combined<float, std::uint8_t> viterbi_combined_fb;
+    typedef viterbi_combined<float, std::int16_t> viterbi_combined_fs;
+    typedef viterbi_combined<float, std::int32_t> viterbi_combined_fi;
+    typedef viterbi_combined<gr_complex, std::uint8_t> viterbi_combined_cb;
+    typedef viterbi_combined<gr_complex, std::int16_t> viterbi_combined_cs;
+    typedef viterbi_combined<gr_complex, std::int32_t> viterbi_combined_ci;
+
+  } /* namespace trellis */
+} /* namespace gr */
+
+#endif /* VITERBI_COMBINED_H */
diff --git a/gr-trellis/include/gnuradio/trellis/viterbi_combined_XX.h.t b/gr-trellis/include/gnuradio/trellis/viterbi_combined_XX.h.t
deleted file mode 100644
index 4546e95739..0000000000
--- a/gr-trellis/include/gnuradio/trellis/viterbi_combined_XX.h.t
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/trellis/api.h>
-#include <gnuradio/trellis/fsm.h>
-#include <gnuradio/trellis/calc_metric.h>
-#include <gnuradio/trellis/core_algorithms.h>
-#include <gnuradio/block.h>
-
-namespace gr {
-  namespace trellis {
-
-    /*!
-     *  \ingroup trellis_coding_blk
-     */
-    class TRELLIS_API @NAME@ : virtual public block
-    {
-    public:
-      // gr::trellis::@BASE_NAME@::sptr
-      typedef boost::shared_ptr<@BASE_NAME@> sptr;
-
-      static sptr make(const fsm &FSM, int K,
-		       int S0, int SK, int D,
-		       const std::vector<@I_TYPE@> &TABLE,
-		       digital::trellis_metric_type_t TYPE);
-
-      virtual fsm FSM() const = 0;
-      virtual int K() const = 0;
-      virtual int S0() const  = 0;
-      virtual int SK() const = 0;
-      virtual int D() const = 0;
-      virtual std::vector<@I_TYPE@> TABLE() const = 0;
-      virtual digital::trellis_metric_type_t TYPE() const = 0;
-
-      virtual void set_FSM(const fsm &FSM) =0;
-      virtual void set_K(int K) =0;
-      virtual void set_S0(int S0) =0;
-      virtual void set_SK(int SK) =0;
-      virtual void set_D(int D) =0;
-      virtual void set_TABLE (const std::vector<@I_TYPE@> &table) = 0;
-      virtual void set_TYPE(digital::trellis_metric_type_t type) = 0;
-    };
-
-  } /* namespace trellis */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-trellis/lib/CMakeLists.txt b/gr-trellis/lib/CMakeLists.txt
index a016f9885a..968de82879 100644
--- a/gr-trellis/lib/CMakeLists.txt
+++ b/gr-trellis/lib/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright 2012,2014 Free Software Foundation, Inc.
+# Copyright 2012,2014,2018 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -34,36 +34,30 @@ if(ENABLE_GR_CTRLPORT)
   ADD_DEFINITIONS(-DGR_CTRLPORT)
 endif(ENABLE_GR_CTRLPORT)
 
-#######################################################################
-# Invoke macro to generate various sources and headers
-########################################################################
-include(GrMiscUtils)
-GR_EXPAND_X_CC_H(trellis encoder_XX_impl                bb bs bi ss si ii)
-GR_EXPAND_X_CC_H(trellis sccc_encoder_XX_impl           bb bs bi ss si ii)
-GR_EXPAND_X_CC_H(trellis pccc_encoder_XX_impl           bb bs bi ss si ii)
-GR_EXPAND_X_CC_H(trellis metrics_X_impl                 s i f c)
-GR_EXPAND_X_CC_H(trellis viterbi_X_impl                 b s i)
-GR_EXPAND_X_CC_H(trellis viterbi_combined_XX_impl       sb ss si ib is ii fb fs fi cb cs ci)
-GR_EXPAND_X_CC_H(trellis sccc_decoder_X_impl            b s i)
-GR_EXPAND_X_CC_H(trellis sccc_decoder_combined_XX_impl  fb fs fi cb cs ci)
-GR_EXPAND_X_CC_H(trellis pccc_decoder_X_impl            b s i)
-GR_EXPAND_X_CC_H(trellis pccc_decoder_combined_XX_impl  fb fs fi cb cs ci)
-
 ########################################################################
 # Setup library
 ########################################################################
 list(APPEND trellis_sources
-    ${generated_sources}
     base.cc
     calc_metric.cc
     core_algorithms.cc
+    encoder_impl.cc
     fsm.cc
     interleaver.cc
     quicksort_index.cc
     constellation_metrics_cf_impl.cc
+    metrics_impl.cc
+    pccc_decoder_blk_impl.cc
+    pccc_encoder_impl.cc
+    pccc_decoder_combined_blk_impl.cc
     permutation_impl.cc
+    sccc_decoder_blk_impl.cc
+    sccc_decoder_combined_blk_impl.cc
+    sccc_encoder_impl.cc
     siso_f_impl.cc
     siso_combined_f_impl.cc
+    viterbi_impl.cc
+    viterbi_combined_impl.cc
 )
 
 list(APPEND trellis_libs
@@ -90,7 +84,7 @@ add_library(gnuradio-trellis SHARED ${trellis_sources})
 target_link_libraries(gnuradio-trellis ${trellis_libs})
 GR_LIBRARY_FOO(gnuradio-trellis)
 add_dependencies(gnuradio-trellis
-  trellis_generated_includes trellis_generated_swigs
+  trellis_generated_swigs
   gnuradio-runtime gnuradio-digital)
 
 if(ENABLE_STATIC_LIBS)
@@ -108,7 +102,7 @@ if(ENABLE_STATIC_LIBS)
   add_library(gnuradio-trellis_static STATIC ${trellis_sources})
 
   add_dependencies(gnuradio-trellis_static
-    trellis_generated_includes trellis_generated_swigs
+    trellis_generated_swigs
     gnuradio-runtime_static gnuradio-digital_static
     )
 
diff --git a/gr-trellis/lib/encoder_XX_impl.cc.t b/gr-trellis/lib/encoder_XX_impl.cc.t
deleted file mode 100644
index 3a004a2f94..0000000000
--- a/gr-trellis/lib/encoder_XX_impl.cc.t
+++ /dev/null
@@ -1,118 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2010,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "@NAME@.h"
-#include <gnuradio/io_signature.h>
-#include <iostream>
-
-namespace gr {
-  namespace trellis {
-
-    @BASE_NAME@::sptr
-    @BASE_NAME@::make(const fsm &FSM, int ST)
-    {
-      return gnuradio::get_initial_sptr
-	(new @IMPL_NAME@(FSM,ST,0,false));
-    }
-
-    @BASE_NAME@::sptr
-    @BASE_NAME@::make(const fsm &FSM, int ST, int K)
-    {
-      return gnuradio::get_initial_sptr
-	(new @IMPL_NAME@(FSM,ST,K,true));
-    }
-
-    @IMPL_NAME@::@IMPL_NAME@(const fsm &FSM, int ST, int K, bool B)
-    : sync_block("@BASE_NAME@",
-		    io_signature::make(1, 1, sizeof(@I_TYPE@)),
-		    io_signature::make(1, 1, sizeof(@O_TYPE@))),
-      d_FSM(FSM),
-      d_ST(ST),
-      d_K(K),
-      d_B(B)      
-    {
-    }
-
-    void @IMPL_NAME@::set_FSM(const fsm &FSM) 
-    { 
-      gr::thread::scoped_lock guard(d_setlock);
-      d_FSM = FSM; 
-    }
-
-    void @IMPL_NAME@::set_ST(int ST) 
-    { 
-      gr::thread::scoped_lock guard(d_setlock);
-      d_ST = ST; 
-    }
-
-    void @IMPL_NAME@::set_K(int K) 
-    { 
-      gr::thread::scoped_lock guard(d_setlock);
-      d_K = K; 
-    }
-
-    @IMPL_NAME@::~@IMPL_NAME@()
-    {
-    }
-
-    int
-    @IMPL_NAME@::work(int noutput_items,
-		      gr_vector_const_void_star &input_items,
-		      gr_vector_void_star &output_items)
-    {
-      gr::thread::scoped_lock guard(d_setlock);
-      int ST_tmp = 0;
-
-      if (d_B){ // blockwise operation
-        int nblocks = noutput_items /d_K;
-	const @I_TYPE@ *in = (const @I_TYPE@*)input_items[0];
-	@O_TYPE@ *out = (@O_TYPE@ *) output_items[0];
-        for(int n = 0; n < nblocks; n++) {
-          ST_tmp = d_ST;
-          for(int i = 0; i < d_K; i++) {
-            out[n*d_K+i] = (@O_TYPE@)d_FSM.OS()[ST_tmp*d_FSM.I()+in[n*d_K+i]];
-            ST_tmp = (int)d_FSM.NS()[ST_tmp*d_FSM.I()+in[n*d_K+i]];
-          }
-        }
-        return nblocks*d_K;
-      } // end blockwise operation
-      else{ // streaming operation
-        const @I_TYPE@ *in = (const @I_TYPE@*)input_items[0];
-        @O_TYPE@ *out = (@O_TYPE@ *) output_items[0];
-        ST_tmp = d_ST;
-        for(int i = 0; i < noutput_items; i++) {
-          out[i] = (@O_TYPE@)d_FSM.OS()[ST_tmp*d_FSM.I()+in[i]]; 
-          ST_tmp = (int)d_FSM.NS()[ST_tmp*d_FSM.I()+in[i]];
-        }
-        d_ST = ST_tmp;
-        return noutput_items;
-      } // end streaming operation  
-   }
-
-  } /* namespace trellis */
-} /* namespace gr */
diff --git a/gr-trellis/lib/encoder_XX_impl.h.t b/gr-trellis/lib/encoder_XX_impl.h.t
deleted file mode 100644
index 2b0ff31f4d..0000000000
--- a/gr-trellis/lib/encoder_XX_impl.h.t
+++ /dev/null
@@ -1,60 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/trellis/@BASE_NAME@.h>
-
-namespace gr {
-  namespace trellis {
-
-    class @IMPL_NAME@ : public @BASE_NAME@
-    {
-    private:
-      fsm d_FSM;
-      int d_ST;
-      int d_K;
-      bool d_B;
- 
-
-    public:
-      @IMPL_NAME@(const fsm &FSM, int ST, int K, bool B);
-      ~@IMPL_NAME@();
-
-      fsm FSM() const { return d_FSM;; }
-      int ST() const {  return d_ST; }
-      int K() const {  return d_K; }
-      void set_FSM(const fsm &FSM);
-      void set_ST(int ST);
-      void set_K(int K);
-      int work(int noutput_items,
-	       gr_vector_const_void_star &input_items,
-	       gr_vector_void_star &output_items);
-    };
-
-  } /* namespace trellis */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-trellis/lib/encoder_impl.cc b/gr-trellis/lib/encoder_impl.cc
new file mode 100644
index 0000000000..ecb0410a5f
--- /dev/null
+++ b/gr-trellis/lib/encoder_impl.cc
@@ -0,0 +1,131 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2010,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "encoder_impl.h"
+#include <gnuradio/io_signature.h>
+#include <iostream>
+
+namespace gr {
+  namespace trellis {
+
+    template <class IN_T, class OUT_T>
+    typename encoder<IN_T,OUT_T>::sptr
+    encoder<IN_T,OUT_T>::make(const fsm &FSM, int ST)
+    {
+      return gnuradio::get_initial_sptr
+	(new encoder_impl<IN_T,OUT_T>(FSM,ST,0,false));
+    }
+
+    template <class IN_T, class OUT_T>
+    typename encoder<IN_T,OUT_T>::sptr
+    encoder<IN_T,OUT_T>::make(const fsm &FSM, int ST, int K)
+    {
+      return gnuradio::get_initial_sptr
+	(new encoder_impl<IN_T,OUT_T>(FSM,ST,K,true));
+    }
+
+    template <class IN_T, class OUT_T>
+    encoder_impl<IN_T,OUT_T>::encoder_impl(const fsm &FSM, int ST, int K, bool B)
+    : sync_block("encoder<IN_T,OUT_T>",
+		    io_signature::make(1, 1, sizeof(IN_T)),
+		    io_signature::make(1, 1, sizeof(OUT_T))),
+      d_FSM(FSM),
+      d_ST(ST),
+      d_K(K),
+      d_B(B)
+    {
+    }
+
+    template <class IN_T, class OUT_T>
+    void encoder_impl<IN_T,OUT_T>::set_FSM(const fsm &FSM)
+    {
+      gr::thread::scoped_lock guard(this->d_setlock);
+      d_FSM = FSM;
+    }
+
+    template <class IN_T, class OUT_T>
+    void encoder_impl<IN_T,OUT_T>::set_ST(int ST)
+    {
+      gr::thread::scoped_lock guard(this->d_setlock);
+      d_ST = ST;
+    }
+
+    template <class IN_T, class OUT_T>
+    void encoder_impl<IN_T,OUT_T>::set_K(int K)
+    {
+      gr::thread::scoped_lock guard(this->d_setlock);
+      d_K = K;
+    }
+
+    template <class IN_T, class OUT_T>
+    encoder_impl<IN_T,OUT_T>::~encoder_impl()
+    {
+    }
+
+    template <class IN_T, class OUT_T>
+    int
+    encoder_impl<IN_T,OUT_T>::work(int noutput_items,
+		      gr_vector_const_void_star &input_items,
+		      gr_vector_void_star &output_items)
+    {
+      gr::thread::scoped_lock guard(this->d_setlock);
+      int ST_tmp = 0;
+
+      if (d_B){ // blockwise operation
+        int nblocks = noutput_items /d_K;
+	const IN_T *in = (const IN_T*)input_items[0];
+	OUT_T *out = (OUT_T *) output_items[0];
+        for(int n = 0; n < nblocks; n++) {
+          ST_tmp = d_ST;
+          for(int i = 0; i < d_K; i++) {
+            out[n*d_K+i] = (OUT_T)d_FSM.OS()[ST_tmp*d_FSM.I()+in[n*d_K+i]];
+            ST_tmp = (int)d_FSM.NS()[ST_tmp*d_FSM.I()+in[n*d_K+i]];
+          }
+        }
+        return nblocks*d_K;
+      } // end blockwise operation
+      else{ // streaming operation
+        const IN_T *in = (const IN_T*)input_items[0];
+        OUT_T *out = (OUT_T *) output_items[0];
+        ST_tmp = d_ST;
+        for(int i = 0; i < noutput_items; i++) {
+          out[i] = (OUT_T)d_FSM.OS()[ST_tmp*d_FSM.I()+in[i]];
+          ST_tmp = (int)d_FSM.NS()[ST_tmp*d_FSM.I()+in[i]];
+        }
+        d_ST = ST_tmp;
+        return noutput_items;
+      } // end streaming operation
+   }
+    template class encoder<std::uint8_t, std::uint8_t>;
+    template class encoder<std::uint8_t, std::int16_t>;
+    template class encoder<std::uint8_t, std::int32_t>;
+    template class encoder<std::int16_t, std::int16_t>;
+    template class encoder<std::int16_t, std::int32_t>;
+    template class encoder<std::int32_t, std::int32_t>;
+
+
+  } /* namespace trellis */
+} /* namespace gr */
diff --git a/gr-trellis/lib/encoder_impl.h b/gr-trellis/lib/encoder_impl.h
new file mode 100644
index 0000000000..5832b9d848
--- /dev/null
+++ b/gr-trellis/lib/encoder_impl.h
@@ -0,0 +1,59 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef ENCODER_IMPL_H
+#define ENCODER_IMPL_H
+
+#include <gnuradio/trellis/encoder.h>
+
+namespace gr {
+  namespace trellis {
+
+    template <class IN_T, class OUT_T>
+    class encoder_impl : public encoder<IN_T,OUT_T>
+    {
+    private:
+      fsm d_FSM;
+      int d_ST;
+      int d_K;
+      bool d_B;
+
+
+    public:
+      encoder_impl(const fsm &FSM, int ST, int K, bool B);
+      ~encoder_impl();
+
+      fsm FSM() const { return d_FSM;; }
+      int ST() const {  return d_ST; }
+      int K() const {  return d_K; }
+      void set_FSM(const fsm &FSM);
+      void set_ST(int ST);
+      void set_K(int K);
+      int work(int noutput_items,
+	       gr_vector_const_void_star &input_items,
+	       gr_vector_void_star &output_items);
+    };
+
+  } /* namespace trellis */
+} /* namespace gr */
+
+#endif /* ENCODER_IMPL_H */
diff --git a/gr-trellis/lib/metrics_X_impl.cc.t b/gr-trellis/lib/metrics_X_impl.cc.t
deleted file mode 100644
index 5e74e4b2fc..0000000000
--- a/gr-trellis/lib/metrics_X_impl.cc.t
+++ /dev/null
@@ -1,123 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2010,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "@NAME@.h"
-#include <gnuradio/io_signature.h>
-#include <assert.h>
-#include <stdexcept>
-#include <iostream>
-
-namespace gr {
-  namespace trellis {
-
-    @BASE_NAME@::sptr
-    @BASE_NAME@::make(int O, int D,  const std::vector<@I_TYPE@> &TABLE,
-		      digital::trellis_metric_type_t TYPE)
-    {
-      return gnuradio::get_initial_sptr
-	(new @IMPL_NAME@(O,D,TABLE,TYPE));
-    }
-
-    @IMPL_NAME@::@IMPL_NAME@(int O, int D,  const std::vector<@I_TYPE@> &TABLE,
-			     digital::trellis_metric_type_t TYPE)
-    : block("@BASE_NAME@",
-	       io_signature::make(1, -1, sizeof (@I_TYPE@)),
-	       io_signature::make(1, -1, sizeof (float))),
-      d_O(O), d_D(D), d_TYPE(TYPE), d_TABLE(TABLE)
-    {
-      set_relative_rate (1.0 * d_O / ((double) d_D));
-      set_output_multiple ((int)d_O);
-    }
-
-    void @IMPL_NAME@::set_O(int O)
-    { 
-      gr::thread::scoped_lock guard(d_setlock);
-      d_O = O; 
-      set_relative_rate (1.0 * d_O / ((double) d_D));
-      set_output_multiple ((int)d_O);
-    }
-
-    void @IMPL_NAME@::set_D(int D)
-    { 
-      gr::thread::scoped_lock guard(d_setlock);
-      d_D = D; 
-      set_relative_rate (1.0 * d_O / ((double) d_D));
-    }
-
-    void
-    @IMPL_NAME@::set_TYPE(digital::trellis_metric_type_t type)
-    {
-      gr::thread::scoped_lock guard(d_setlock);
-      d_TYPE = type;
-    }
-
-    void
-    @IMPL_NAME@::set_TABLE(const std::vector<@I_TYPE@> &table)
-    {
-      gr::thread::scoped_lock guard(d_setlock);
-      d_TABLE = table;
-    }
-
-    @IMPL_NAME@::~@IMPL_NAME@()
-    {
-    }
-
-
-    void
-    @IMPL_NAME@::forecast(int noutput_items, gr_vector_int &ninput_items_required)
-    {
-      int input_required = d_D * noutput_items / d_O;
-      unsigned ninputs = ninput_items_required.size();
-      for(unsigned int i = 0; i < ninputs; i++)
-	ninput_items_required[i] = input_required;
-    }
-
-    int
-    @IMPL_NAME@::general_work(int noutput_items,
-			      gr_vector_int &ninput_items,
-			      gr_vector_const_void_star &input_items,
-			      gr_vector_void_star &output_items)
-    {
-      gr::thread::scoped_lock guard(d_setlock);
-      int nstreams = input_items.size();
-
-      for(int m = 0; m < nstreams; m++) {
-	const @I_TYPE@ *in = (@I_TYPE@*)input_items[m];
-	float *out = (float*)output_items[m];
-
-	for(int i = 0; i < noutput_items / d_O ; i++) {
-	  calc_metric(d_O, d_D, d_TABLE,&(in[i*d_D]), &(out[i*d_O]), d_TYPE);
-	}
-      }
-
-      consume_each(d_D * noutput_items / d_O);
-      return noutput_items;
-    }
-
-  } /* namespace trellis */
-} /* namespace gr */
diff --git a/gr-trellis/lib/metrics_X_impl.h.t b/gr-trellis/lib/metrics_X_impl.h.t
deleted file mode 100644
index 9323ae4645..0000000000
--- a/gr-trellis/lib/metrics_X_impl.h.t
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/trellis/@BASE_NAME@.h>
-
-namespace gr {
-  namespace trellis {
-
-    class @IMPL_NAME@ : public @BASE_NAME@
-    {
-    private:
-      int d_O;
-      int d_D;
-      digital::trellis_metric_type_t d_TYPE;
-      std::vector<@I_TYPE@> d_TABLE;
-
-    public:
-      @IMPL_NAME@(int O, int D,  const std::vector<@I_TYPE@> &TABLE,
-		  digital::trellis_metric_type_t TYPE);
-      ~@IMPL_NAME@();
-
-      int O() const { return d_O; }
-      int D() const { return d_D; }
-      digital::trellis_metric_type_t TYPE() const { return d_TYPE; }
-      std::vector<@I_TYPE@> TABLE() const { return d_TABLE; }
-
-      void set_O(int O);
-      void set_D(int D);
-      void set_TYPE(digital::trellis_metric_type_t type);
-      void set_TABLE(const std::vector<@I_TYPE@> &table);
-
-      void forecast(int noutput_items,
-		    gr_vector_int &ninput_items_required);
-
-      int general_work(int noutput_items,
-		       gr_vector_int &ninput_items,
-		       gr_vector_const_void_star &input_items,
-		       gr_vector_void_star &output_items);
-    };
-
-  } /* namespace trellis */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-trellis/lib/metrics_impl.cc b/gr-trellis/lib/metrics_impl.cc
new file mode 100644
index 0000000000..cf0697c521
--- /dev/null
+++ b/gr-trellis/lib/metrics_impl.cc
@@ -0,0 +1,135 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2010,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "metrics_impl.h"
+#include <gnuradio/io_signature.h>
+#include <assert.h>
+#include <stdexcept>
+#include <iostream>
+
+namespace gr {
+  namespace trellis {
+
+    template <class T>
+    typename metrics<T>::sptr
+    metrics<T>::make(int O, int D,  const std::vector<T> &TABLE,
+		      digital::trellis_metric_type_t TYPE)
+    {
+      return gnuradio::get_initial_sptr
+	(new metrics_impl<T>(O,D,TABLE,TYPE));
+    }
+
+    template <class T>
+    metrics_impl<T>::metrics_impl(int O, int D,  const std::vector<T> &TABLE,
+			     digital::trellis_metric_type_t TYPE)
+    : block("metrics",
+	       io_signature::make(1, -1, sizeof (T)),
+	       io_signature::make(1, -1, sizeof (float))),
+      d_O(O), d_D(D), d_TYPE(TYPE), d_TABLE(TABLE)
+    {
+      this->set_relative_rate (1.0 * d_O / ((double) d_D));
+      this->set_output_multiple ((int)d_O);
+    }
+
+    template <class T>
+    void metrics_impl<T>::set_O(int O)
+    {
+      gr::thread::scoped_lock guard(this->d_setlock);
+      d_O = O;
+      this->set_relative_rate (1.0 * d_O / ((double) d_D));
+      this->set_output_multiple ((int)d_O);
+    }
+
+    template <class T>
+    void metrics_impl<T>::set_D(int D)
+    {
+      gr::thread::scoped_lock guard(this->d_setlock);
+      d_D = D;
+      this->set_relative_rate (1.0 * d_O / ((double) d_D));
+    }
+
+    template <class T>
+    void
+    metrics_impl<T>::set_TYPE(digital::trellis_metric_type_t type)
+    {
+      gr::thread::scoped_lock guard(this->d_setlock);
+      d_TYPE = type;
+    }
+
+    template <class T>
+    void
+    metrics_impl<T>::set_TABLE(const std::vector<T> &table)
+    {
+      gr::thread::scoped_lock guard(this->d_setlock);
+      d_TABLE = table;
+    }
+
+    template <class T>
+    metrics_impl<T>::~metrics_impl()
+    {
+    }
+
+
+    template <class T>
+    void
+    metrics_impl<T>::forecast(int noutput_items, gr_vector_int &ninput_items_required)
+    {
+      int input_required = d_D * noutput_items / d_O;
+      unsigned ninputs = ninput_items_required.size();
+      for(unsigned int i = 0; i < ninputs; i++)
+	ninput_items_required[i] = input_required;
+    }
+
+    template <class T>
+    int
+    metrics_impl<T>::general_work(int noutput_items,
+			      gr_vector_int &ninput_items,
+			      gr_vector_const_void_star &input_items,
+			      gr_vector_void_star &output_items)
+    {
+      gr::thread::scoped_lock guard(this->d_setlock);
+      int nstreams = input_items.size();
+
+      for(int m = 0; m < nstreams; m++) {
+	const T *in = (T*)input_items[m];
+	float *out = (float*)output_items[m];
+
+	for(int i = 0; i < noutput_items / d_O ; i++) {
+	  calc_metric(d_O, d_D, d_TABLE,&(in[i*d_D]), &(out[i*d_O]), d_TYPE);
+	}
+      }
+
+      this->consume_each(d_D * noutput_items / d_O);
+      return noutput_items;
+    }
+
+template class metrics<std::int16_t>;
+template class metrics<std::int32_t>;
+template class metrics<float>;
+template class metrics<gr_complex>;
+  } /* namespace trellis */
+} /* namespace gr */
diff --git a/gr-trellis/lib/metrics_impl.h b/gr-trellis/lib/metrics_impl.h
new file mode 100644
index 0000000000..95c5f44845
--- /dev/null
+++ b/gr-trellis/lib/metrics_impl.h
@@ -0,0 +1,68 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef METRICS_IMPL_H
+#define METRICS_IMPL_H
+
+#include <gnuradio/trellis/metrics.h>
+
+namespace gr {
+  namespace trellis {
+
+template<class T>
+    class metrics_impl : public  metrics<T>
+    {
+    private:
+      int d_O;
+      int d_D;
+      digital::trellis_metric_type_t d_TYPE;
+      std::vector<T> d_TABLE;
+
+    public:
+      metrics_impl(int O, int D,  const std::vector<T> &TABLE,
+		  digital::trellis_metric_type_t TYPE);
+      ~metrics_impl();
+
+      int O() const { return d_O; }
+      int D() const { return d_D; }
+      digital::trellis_metric_type_t TYPE() const { return d_TYPE; }
+      std::vector<T> TABLE() const { return d_TABLE; }
+
+      void set_O(int O);
+      void set_D(int D);
+      void set_TYPE(digital::trellis_metric_type_t type);
+      void set_TABLE(const std::vector<T> &table);
+
+      void forecast(int noutput_items,
+		    gr_vector_int &ninput_items_required);
+
+      int general_work(int noutput_items,
+		       gr_vector_int &ninput_items,
+		       gr_vector_const_void_star &input_items,
+		       gr_vector_void_star &output_items);
+    };
+
+  } /* namespace trellis */
+} /* namespace gr */
+
+#endif /* METRICS_IMPL_H */
diff --git a/gr-trellis/lib/pccc_decoder_X_impl.cc.t b/gr-trellis/lib/pccc_decoder_X_impl.cc.t
deleted file mode 100644
index 4f80598540..0000000000
--- a/gr-trellis/lib/pccc_decoder_X_impl.cc.t
+++ /dev/null
@@ -1,118 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2010,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "@NAME@.h"
-#include <gnuradio/io_signature.h>
-#include <iostream>
-#include <gnuradio/trellis/core_algorithms.h>
-
-namespace gr {
-  namespace trellis {
-
-    @BASE_NAME@::sptr
-    @BASE_NAME@::make(const fsm &FSM1, int ST10, int ST1K,
-		      const fsm &FSM2, int ST20, int ST2K,
-		      const interleaver &INTERLEAVER,
-		      int blocklength,
-		      int repetitions,
-		      siso_type_t SISO_TYPE)
-    {
-      return gnuradio::get_initial_sptr
-	(new @IMPL_NAME@(FSM1, ST10, ST1K,
-			 FSM2, ST20, ST2K,
-			 INTERLEAVER,
-			 blocklength,
-			 repetitions,
-			 SISO_TYPE));
-    }
-
-    @IMPL_NAME@::@IMPL_NAME@(const fsm &FSM1, int ST10, int ST1K,
-			     const fsm &FSM2, int ST20, int ST2K,
-			     const interleaver &INTERLEAVER,
-			     int blocklength,
-			     int repetitions,
-			     siso_type_t SISO_TYPE)
-    : block("@BASE_NAME@",
-	       io_signature::make(1, 1, sizeof(float)),
-	       io_signature::make(1, 1, sizeof(@O_TYPE@))),
-      d_FSM1(FSM1), d_ST10(ST10), d_ST1K(ST1K),
-      d_FSM2(FSM2), d_ST20(ST20), d_ST2K(ST2K),
-      d_INTERLEAVER(INTERLEAVER),
-      d_blocklength(blocklength),
-      d_repetitions(repetitions),
-      d_SISO_TYPE(SISO_TYPE)
-    {
-      set_relative_rate (1.0 / ((double) d_FSM1.O() * d_FSM2.O()));
-      set_output_multiple (d_blocklength);
-    }
-
-    @IMPL_NAME@::~@IMPL_NAME@()
-    {
-    }
-
-    void
-    @IMPL_NAME@::forecast(int noutput_items,
-			  gr_vector_int &ninput_items_required)
-    {
-      int input_required = d_FSM1.O() * d_FSM2.O() * noutput_items;
-      ninput_items_required[0] = input_required;
-    }
-
-    //===========================================================
-
-    int
-    @IMPL_NAME@::general_work(int noutput_items,
-			      gr_vector_int &ninput_items,
-			      gr_vector_const_void_star &input_items,
-			      gr_vector_void_star &output_items)
-    {
-      int nblocks = noutput_items / d_blocklength;
-
-      float (*p2min)(float, float) = NULL;
-      if(d_SISO_TYPE == TRELLIS_MIN_SUM)
-	p2min = &min;
-      else if(d_SISO_TYPE == TRELLIS_SUM_PRODUCT)
-	p2min = &min_star;
-
-      const float *in = (const float *) input_items[0];
-      @O_TYPE@ *out = (@O_TYPE@ *) output_items[0];
-      for(int n=0;n<nblocks;n++) {
-	pccc_decoder(d_FSM1, d_ST10, d_ST1K,
-		     d_FSM2, d_ST20, d_ST2K,
-		     d_INTERLEAVER, d_blocklength, d_repetitions,
-		     p2min,
-		     &(in[n*d_blocklength*d_FSM1.O()*d_FSM2.O()]),
-		     &(out[n*d_blocklength]));
-      }
-
-      consume_each(d_FSM1.O() * d_FSM2.O() * noutput_items);
-      return noutput_items;
-    }
-
-  } /* namespace trellis */
-} /* namespace gr */
diff --git a/gr-trellis/lib/pccc_decoder_X_impl.h.t b/gr-trellis/lib/pccc_decoder_X_impl.h.t
deleted file mode 100644
index 43a7257fc5..0000000000
--- a/gr-trellis/lib/pccc_decoder_X_impl.h.t
+++ /dev/null
@@ -1,80 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/trellis/@BASE_NAME@.h>
-
-namespace gr {
-  namespace trellis {
-
-    class @IMPL_NAME@ : public @BASE_NAME@
-    {
-    private:
-      fsm d_FSM1;
-      int d_ST10;
-      int d_ST1K;
-      fsm d_FSM2;
-      int d_ST20;
-      int d_ST2K;
-      interleaver d_INTERLEAVER;
-      int d_blocklength;
-      int d_repetitions;
-      siso_type_t d_SISO_TYPE;
-      std::vector<float> d_buffer;
-
-    public:
-      @IMPL_NAME@(const fsm &FSM1, int ST10, int ST1K,
-		  const fsm &FSM2, int ST20, int ST2K,
-		  const interleaver &INTERLEAVER,
-		  int blocklength,
-		  int repetitions,
-		  siso_type_t SISO_TYPE);
-      ~@IMPL_NAME@();
-
-      fsm FSM1() const { return d_FSM1; }
-      fsm FSM2() const { return d_FSM2; }
-      int ST10() const { return d_ST10; }
-      int ST1K() const { return d_ST1K; }
-      int ST20() const { return d_ST20; }
-      int ST2K() const { return d_ST2K; }
-      interleaver INTERLEAVER() const { return d_INTERLEAVER; }
-      int blocklength() const { return d_blocklength; }
-      int repetitions() const { return d_repetitions; }
-      siso_type_t SISO_TYPE() const { return d_SISO_TYPE; }
-
-      void forecast(int noutput_items,
-		    gr_vector_int &ninput_items_required);
-
-      int general_work(int noutput_items,
-		       gr_vector_int &ninput_items,
-		       gr_vector_const_void_star &input_items,
-		       gr_vector_void_star &output_items);
-    };
-
-  } /* namespace trellis */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-trellis/lib/pccc_decoder_blk_impl.cc b/gr-trellis/lib/pccc_decoder_blk_impl.cc
new file mode 100644
index 0000000000..3cadff97ea
--- /dev/null
+++ b/gr-trellis/lib/pccc_decoder_blk_impl.cc
@@ -0,0 +1,125 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2010,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "pccc_decoder_blk_impl.h"
+#include <gnuradio/io_signature.h>
+#include <iostream>
+#include <gnuradio/trellis/core_algorithms.h>
+
+namespace gr {
+  namespace trellis {
+
+    template <class T>
+    typename pccc_decoder_blk<T>::sptr
+    pccc_decoder_blk<T>::make(const fsm &FSM1, int ST10, int ST1K,
+		      const fsm &FSM2, int ST20, int ST2K,
+		      const interleaver &INTERLEAVER,
+		      int blocklength,
+		      int repetitions,
+		      siso_type_t SISO_TYPE)
+    {
+      return gnuradio::get_initial_sptr
+	(new pccc_decoder_blk_impl<T>(FSM1, ST10, ST1K,
+			 FSM2, ST20, ST2K,
+			 INTERLEAVER,
+			 blocklength,
+			 repetitions,
+			 SISO_TYPE));
+    }
+
+    template <class T>
+    pccc_decoder_blk_impl<T>::pccc_decoder_blk_impl(const fsm &FSM1, int ST10, int ST1K,
+			     const fsm &FSM2, int ST20, int ST2K,
+			     const interleaver &INTERLEAVER,
+			     int blocklength,
+			     int repetitions,
+			     siso_type_t SISO_TYPE)
+    : block("pccc_decoder_blk",
+	       io_signature::make(1, 1, sizeof(float)),
+	       io_signature::make(1, 1, sizeof(T))),
+      d_FSM1(FSM1), d_ST10(ST10), d_ST1K(ST1K),
+      d_FSM2(FSM2), d_ST20(ST20), d_ST2K(ST2K),
+      d_INTERLEAVER(INTERLEAVER),
+      d_blocklength(blocklength),
+      d_repetitions(repetitions),
+      d_SISO_TYPE(SISO_TYPE)
+    {
+      this->set_relative_rate (1.0 / ((double) d_FSM1.O() * d_FSM2.O()));
+      this->set_output_multiple (d_blocklength);
+    }
+
+    template <class T>
+    pccc_decoder_blk_impl<T>::~pccc_decoder_blk_impl()
+    {
+    }
+
+    template <class T>
+    void
+    pccc_decoder_blk_impl<T>::forecast(int noutput_items,
+			  gr_vector_int &ninput_items_required)
+    {
+      int input_required = d_FSM1.O() * d_FSM2.O() * noutput_items;
+      ninput_items_required[0] = input_required;
+    }
+
+    //===========================================================
+
+    template <class T>
+    int
+    pccc_decoder_blk_impl<T>::general_work(int noutput_items,
+			      gr_vector_int &ninput_items,
+			      gr_vector_const_void_star &input_items,
+			      gr_vector_void_star &output_items)
+    {
+      int nblocks = noutput_items / d_blocklength;
+
+      float (*p2min)(float, float) = NULL;
+      if(d_SISO_TYPE == TRELLIS_MIN_SUM)
+	p2min = &min;
+      else if(d_SISO_TYPE == TRELLIS_SUM_PRODUCT)
+	p2min = &min_star;
+
+      const float *in = (const float *) input_items[0];
+      T *out = (T *) output_items[0];
+      for(int n=0;n<nblocks;n++) {
+	pccc_decoder(d_FSM1, d_ST10, d_ST1K,
+		     d_FSM2, d_ST20, d_ST2K,
+		     d_INTERLEAVER, d_blocklength, d_repetitions,
+		     p2min,
+		     &(in[n*d_blocklength*d_FSM1.O()*d_FSM2.O()]),
+		     &(out[n*d_blocklength]));
+      }
+
+      this->consume_each(d_FSM1.O() * d_FSM2.O() * noutput_items);
+      return noutput_items;
+    }
+
+template class pccc_decoder_blk<std::uint8_t>;
+template class pccc_decoder_blk<std::int16_t>;
+template class pccc_decoder_blk<std::int32_t>;
+  } /* namespace trellis */
+} /* namespace gr */
diff --git a/gr-trellis/lib/pccc_decoder_blk_impl.h b/gr-trellis/lib/pccc_decoder_blk_impl.h
new file mode 100644
index 0000000000..ed4e2d24a6
--- /dev/null
+++ b/gr-trellis/lib/pccc_decoder_blk_impl.h
@@ -0,0 +1,80 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef PCCC_DECODER_BLK_IMPL_H
+#define PCCC_DECODER_BLK_IMPL_H
+
+#include <gnuradio/trellis/pccc_decoder_blk.h>
+
+namespace gr {
+  namespace trellis {
+
+template<class T>
+    class pccc_decoder_blk_impl  : public  pccc_decoder_blk<T>
+    {
+    private:
+      fsm d_FSM1;
+      int d_ST10;
+      int d_ST1K;
+      fsm d_FSM2;
+      int d_ST20;
+      int d_ST2K;
+      interleaver d_INTERLEAVER;
+      int d_blocklength;
+      int d_repetitions;
+      siso_type_t d_SISO_TYPE;
+      std::vector<float> d_buffer;
+
+    public:
+      pccc_decoder_blk_impl(const fsm &FSM1, int ST10, int ST1K,
+		  const fsm &FSM2, int ST20, int ST2K,
+		  const interleaver &INTERLEAVER,
+		  int blocklength,
+		  int repetitions,
+		  siso_type_t SISO_TYPE);
+      ~pccc_decoder_blk_impl();
+
+      fsm FSM1() const { return d_FSM1; }
+      fsm FSM2() const { return d_FSM2; }
+      int ST10() const { return d_ST10; }
+      int ST1K() const { return d_ST1K; }
+      int ST20() const { return d_ST20; }
+      int ST2K() const { return d_ST2K; }
+      interleaver INTERLEAVER() const { return d_INTERLEAVER; }
+      int blocklength() const { return d_blocklength; }
+      int repetitions() const { return d_repetitions; }
+      siso_type_t SISO_TYPE() const { return d_SISO_TYPE; }
+
+      void forecast(int noutput_items,
+		    gr_vector_int &ninput_items_required);
+
+      int general_work(int noutput_items,
+		       gr_vector_int &ninput_items,
+		       gr_vector_const_void_star &input_items,
+		       gr_vector_void_star &output_items);
+    };
+
+  } /* namespace trellis */
+} /* namespace gr */
+
+#endif /* PCCC_DECODER_BLK_IMPL_H */
diff --git a/gr-trellis/lib/pccc_decoder_combined_XX_impl.cc.t b/gr-trellis/lib/pccc_decoder_combined_XX_impl.cc.t
deleted file mode 100644
index 6841066416..0000000000
--- a/gr-trellis/lib/pccc_decoder_combined_XX_impl.cc.t
+++ /dev/null
@@ -1,139 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2010,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "@NAME@.h"
-#include <gnuradio/io_signature.h>
-#include <iostream>
-#include <gnuradio/trellis/core_algorithms.h>
-
-namespace gr {
-  namespace trellis {
-
-    @BASE_NAME@::sptr
-    @BASE_NAME@::make(const fsm &FSMo, int STo0, int SToK,
-		      const fsm &FSMi, int STi0, int STiK,
-		      const interleaver &INTERLEAVER,
-		      int blocklength,
-		      int repetitions,
-		      siso_type_t SISO_TYPE,
-		      int D,
-		      const std::vector<@I_TYPE@> &TABLE,
-		      digital::trellis_metric_type_t METRIC_TYPE,
-		      float scaling)
-    {
-      return gnuradio::get_initial_sptr
-	(new @NAME@(FSMo, STo0, SToK, FSMi, STi0, STiK,
-		    INTERLEAVER, blocklength, repetitions,
-		    SISO_TYPE, D, TABLE,METRIC_TYPE, scaling));
-    }
-
-    @IMPL_NAME@::@IMPL_NAME@(const fsm &FSMo, int STo0, int SToK,
-			     const fsm &FSMi, int STi0, int STiK,
-			     const interleaver &INTERLEAVER,
-			     int blocklength,
-			     int repetitions,
-			     siso_type_t SISO_TYPE,
-			     int D,
-			     const std::vector<@I_TYPE@> &TABLE,
-			     digital::trellis_metric_type_t METRIC_TYPE,
-			     float scaling)
-    : block("@BASE_NAME@",
-	       io_signature::make(1, 1, sizeof(@I_TYPE@)),
-	       io_signature::make(1, 1, sizeof(@O_TYPE@))),
-      d_FSMo(FSMo), d_STo0(STo0), d_SToK(SToK),
-      d_FSMi(FSMi), d_STi0(STi0), d_STiK(STiK),
-      d_INTERLEAVER(INTERLEAVER),
-      d_blocklength(blocklength),
-      d_repetitions(repetitions),
-      d_SISO_TYPE(SISO_TYPE),
-      d_D(D),
-      d_TABLE(TABLE),
-      d_METRIC_TYPE(METRIC_TYPE),
-      d_scaling(scaling)
-    {
-      assert(d_FSMo.I() == d_FSMi.I());
-      set_relative_rate (1.0 / ((double) d_D));
-      set_output_multiple (d_blocklength);
-    }
-
-    @IMPL_NAME@::~@IMPL_NAME@()
-    {
-    }
-
-    void
-    @IMPL_NAME@::set_scaling(float scaling)
-    {
-      gr::thread::scoped_lock guard(d_setlock);
-      d_scaling = scaling;
-    }
-
-    void
-    @IMPL_NAME@::forecast(int noutput_items,
-			  gr_vector_int &ninput_items_required)
-    {
-      int input_required = d_D * noutput_items;
-      ninput_items_required[0] = input_required;
-    }
-
-    //===========================================================
-
-    int
-    @IMPL_NAME@::general_work(int noutput_items,
-			      gr_vector_int &ninput_items,
-			      gr_vector_const_void_star &input_items,
-			      gr_vector_void_star &output_items)
-    {
-      gr::thread::scoped_lock guard(d_setlock);
-      int nblocks = noutput_items / d_blocklength;
-
-      float (*p2min)(float, float) = NULL;
-      if(d_SISO_TYPE == TRELLIS_MIN_SUM)
-	p2min = &min;
-      else if(d_SISO_TYPE == TRELLIS_SUM_PRODUCT)
-	p2min = &min_star;
-
-      const @I_TYPE@ *in = (const @I_TYPE@ *) input_items[0];
-      @O_TYPE@ *out = (@O_TYPE@ *) output_items[0];
-      for (int n=0;n<nblocks;n++) {
-	pccc_decoder_combined(d_FSMo, d_STo0, d_SToK,
-			      d_FSMi, d_STi0, d_STiK,
-			      d_INTERLEAVER, d_blocklength, d_repetitions,
-			      p2min,
-			      d_D,d_TABLE,
-			      d_METRIC_TYPE,
-			      d_scaling,
-			      &(in[n*d_blocklength*d_D]),
-			      &(out[n*d_blocklength]));
-      }
-
-      consume_each(d_D * noutput_items);
-      return noutput_items;
-    }
-
-  } /* namespace trellis */
-} /* namespace gr */
diff --git a/gr-trellis/lib/pccc_decoder_combined_XX_impl.h.t b/gr-trellis/lib/pccc_decoder_combined_XX_impl.h.t
deleted file mode 100644
index 7606017547..0000000000
--- a/gr-trellis/lib/pccc_decoder_combined_XX_impl.h.t
+++ /dev/null
@@ -1,93 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/trellis/@BASE_NAME@.h>
-
-namespace gr {
-  namespace trellis {
-
-    class @IMPL_NAME@ : public @BASE_NAME@
-    {
-    private:
-      fsm d_FSMo;
-      int d_STo0;
-      int d_SToK;
-      fsm d_FSMi;
-      int d_STi0;
-      int d_STiK;
-      interleaver d_INTERLEAVER;
-      int d_blocklength;
-      int d_repetitions;
-      siso_type_t d_SISO_TYPE;
-      int d_D;
-      std::vector<@I_TYPE@> d_TABLE;
-      digital::trellis_metric_type_t d_METRIC_TYPE;
-      float d_scaling;
-      std::vector<float> d_buffer;
-
-    public:
-      @IMPL_NAME@(const fsm &FSMo, int STo0, int SToK,
-		  const fsm &FSMi, int STi0, int STiK,
-		  const interleaver &INTERLEAVER,
-		  int blocklength,
-		  int repetitions,
-		  siso_type_t SISO_TYPE,
-		  int D,
-		  const std::vector<@I_TYPE@> &TABLE,
-		  digital::trellis_metric_type_t METRIC_TYPE,
-		  float scaling);
-      ~@IMPL_NAME@();
-
-      fsm FSM1() const { return d_FSMo; }
-      fsm FSM2() const { return d_FSMi; }
-      int ST10() const { return d_STo0; }
-      int ST1K() const { return d_SToK; }
-      int ST20() const { return d_STi0; }
-      int ST2K() const { return d_STiK; }
-      interleaver INTERLEAVER() const { return d_INTERLEAVER; }
-      int blocklength() const { return d_blocklength; }
-      int repetitions() const { return d_repetitions; }
-      int D() const { return d_D; }
-      std::vector<@I_TYPE@> TABLE() const { return d_TABLE; }
-      digital::trellis_metric_type_t METRIC_TYPE() const { return d_METRIC_TYPE; }
-      siso_type_t SISO_TYPE() const { return d_SISO_TYPE; }
-      float scaling() const { return d_scaling; }
-      void set_scaling(float scaling);
-
-      void forecast(int noutput_items,
-		    gr_vector_int &ninput_items_required);
-
-      int general_work(int noutput_items,
-		       gr_vector_int &ninput_items,
-		       gr_vector_const_void_star &input_items,
-		       gr_vector_void_star &output_items);
-    };
-
-  } /* namespace trellis */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-trellis/lib/pccc_decoder_combined_blk_impl.cc b/gr-trellis/lib/pccc_decoder_combined_blk_impl.cc
new file mode 100644
index 0000000000..a985c0d9c0
--- /dev/null
+++ b/gr-trellis/lib/pccc_decoder_combined_blk_impl.cc
@@ -0,0 +1,150 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2010,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "pccc_decoder_combined_blk_impl.h"
+#include <gnuradio/io_signature.h>
+#include <iostream>
+#include <gnuradio/trellis/core_algorithms.h>
+
+namespace gr {
+  namespace trellis {
+
+    template <class IN_T,class OUT_T>
+    typename pccc_decoder_combined_blk<IN_T,OUT_T>::sptr
+    pccc_decoder_combined_blk<IN_T,OUT_T>::make(const fsm &FSMo, int STo0, int SToK,
+		      const fsm &FSMi, int STi0, int STiK,
+		      const interleaver &INTERLEAVER,
+		      int blocklength,
+		      int repetitions,
+		      siso_type_t SISO_TYPE,
+		      int D,
+		      const std::vector<IN_T> &TABLE,
+		      digital::trellis_metric_type_t METRIC_TYPE,
+		      float scaling)
+    {
+      return gnuradio::get_initial_sptr
+	(new pccc_decoder_combined_blk_impl<IN_T,OUT_T>(FSMo, STo0, SToK, FSMi, STi0, STiK,
+		    INTERLEAVER, blocklength, repetitions,
+		    SISO_TYPE, D, TABLE,METRIC_TYPE, scaling));
+    }
+
+    template <class IN_T,class OUT_T>
+    pccc_decoder_combined_blk_impl<IN_T,OUT_T>::pccc_decoder_combined_blk_impl(const fsm &FSMo, int STo0, int SToK,
+			     const fsm &FSMi, int STi0, int STiK,
+			     const interleaver &INTERLEAVER,
+			     int blocklength,
+			     int repetitions,
+			     siso_type_t SISO_TYPE,
+			     int D,
+			     const std::vector<IN_T> &TABLE,
+			     digital::trellis_metric_type_t METRIC_TYPE,
+			     float scaling)
+    : block("pccc_decoder_combined_blk<IN_T,OUT_T>",
+	       io_signature::make(1, 1, sizeof(IN_T)),
+	       io_signature::make(1, 1, sizeof(OUT_T))),
+      d_FSMo(FSMo), d_STo0(STo0), d_SToK(SToK),
+      d_FSMi(FSMi), d_STi0(STi0), d_STiK(STiK),
+      d_INTERLEAVER(INTERLEAVER),
+      d_blocklength(blocklength),
+      d_repetitions(repetitions),
+      d_SISO_TYPE(SISO_TYPE),
+      d_D(D),
+      d_TABLE(TABLE),
+      d_METRIC_TYPE(METRIC_TYPE),
+      d_scaling(scaling)
+    {
+      assert(d_FSMo.I() == d_FSMi.I());
+      this->set_relative_rate (1.0 / ((double) d_D));
+      this->set_output_multiple (d_blocklength);
+    }
+
+    template <class IN_T,class OUT_T>
+    pccc_decoder_combined_blk_impl<IN_T,OUT_T>::~pccc_decoder_combined_blk_impl()
+    {
+    }
+
+    template <class IN_T,class OUT_T>
+    void
+    pccc_decoder_combined_blk_impl<IN_T,OUT_T>::set_scaling(float scaling)
+    {
+      gr::thread::scoped_lock guard(this->d_setlock);
+      d_scaling = scaling;
+    }
+
+    template <class IN_T,class OUT_T>
+    void
+    pccc_decoder_combined_blk_impl<IN_T,OUT_T>::forecast(int noutput_items,
+			  gr_vector_int &ninput_items_required)
+    {
+      int input_required = d_D * noutput_items;
+      ninput_items_required[0] = input_required;
+    }
+
+    //===========================================================
+
+    template <class IN_T,class OUT_T>
+    int
+    pccc_decoder_combined_blk_impl<IN_T,OUT_T>::general_work(int noutput_items,
+			      gr_vector_int &ninput_items,
+			      gr_vector_const_void_star &input_items,
+			      gr_vector_void_star &output_items)
+    {
+      gr::thread::scoped_lock guard(this->d_setlock);
+      int nblocks = noutput_items / d_blocklength;
+
+      float (*p2min)(float, float) = NULL;
+      if(d_SISO_TYPE == TRELLIS_MIN_SUM)
+	p2min = &min;
+      else if(d_SISO_TYPE == TRELLIS_SUM_PRODUCT)
+	p2min = &min_star;
+
+      const IN_T *in = (const IN_T *) input_items[0];
+      OUT_T *out = (OUT_T *) output_items[0];
+      for (int n=0;n<nblocks;n++) {
+	pccc_decoder_combined(d_FSMo, d_STo0, d_SToK,
+			      d_FSMi, d_STi0, d_STiK,
+			      d_INTERLEAVER, d_blocklength, d_repetitions,
+			      p2min,
+			      d_D,d_TABLE,
+			      d_METRIC_TYPE,
+			      d_scaling,
+			      &(in[n*d_blocklength*d_D]),
+			      &(out[n*d_blocklength]));
+      }
+
+      this->consume_each(d_D * noutput_items);
+      return noutput_items;
+    }
+    template class pccc_decoder_combined_blk<float, std::uint8_t>;
+    template class pccc_decoder_combined_blk<float, std::int16_t>;
+    template class pccc_decoder_combined_blk<float, std::int32_t>;
+    template class pccc_decoder_combined_blk<gr_complex, std::uint8_t>;
+    template class pccc_decoder_combined_blk<gr_complex, std::int16_t>;
+    template class pccc_decoder_combined_blk<gr_complex, std::int32_t>;
+
+
+  } /* namespace trellis */
+} /* namespace gr */
diff --git a/gr-trellis/lib/pccc_decoder_combined_blk_impl.h b/gr-trellis/lib/pccc_decoder_combined_blk_impl.h
new file mode 100644
index 0000000000..544a965607
--- /dev/null
+++ b/gr-trellis/lib/pccc_decoder_combined_blk_impl.h
@@ -0,0 +1,92 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef PCCC_DECODER_COMBINED_BLK_IMPL_H
+#define PCCC_DECODER_COMBINED_BLK_IMPL_H
+
+#include <gnuradio/trellis/pccc_decoder_combined_blk.h>
+
+namespace gr {
+  namespace trellis {
+
+    template <class IN_T,class OUT_T>
+    class pccc_decoder_combined_blk_impl : public pccc_decoder_combined_blk<IN_T,OUT_T>
+    {
+    private:
+      fsm d_FSMo;
+      int d_STo0;
+      int d_SToK;
+      fsm d_FSMi;
+      int d_STi0;
+      int d_STiK;
+      interleaver d_INTERLEAVER;
+      int d_blocklength;
+      int d_repetitions;
+      siso_type_t d_SISO_TYPE;
+      int d_D;
+      std::vector<IN_T> d_TABLE;
+      digital::trellis_metric_type_t d_METRIC_TYPE;
+      float d_scaling;
+      std::vector<float> d_buffer;
+
+    public:
+      pccc_decoder_combined_blk_impl(const fsm &FSMo, int STo0, int SToK,
+		  const fsm &FSMi, int STi0, int STiK,
+		  const interleaver &INTERLEAVER,
+		  int blocklength,
+		  int repetitions,
+		  siso_type_t SISO_TYPE,
+		  int D,
+		  const std::vector<IN_T> &TABLE,
+		  digital::trellis_metric_type_t METRIC_TYPE,
+		  float scaling);
+      ~pccc_decoder_combined_blk_impl();
+
+      fsm FSM1() const { return d_FSMo; }
+      fsm FSM2() const { return d_FSMi; }
+      int ST10() const { return d_STo0; }
+      int ST1K() const { return d_SToK; }
+      int ST20() const { return d_STi0; }
+      int ST2K() const { return d_STiK; }
+      interleaver INTERLEAVER() const { return d_INTERLEAVER; }
+      int blocklength() const { return d_blocklength; }
+      int repetitions() const { return d_repetitions; }
+      int D() const { return d_D; }
+      std::vector<IN_T> TABLE() const { return d_TABLE; }
+      digital::trellis_metric_type_t METRIC_TYPE() const { return d_METRIC_TYPE; }
+      siso_type_t SISO_TYPE() const { return d_SISO_TYPE; }
+      float scaling() const { return d_scaling; }
+      void set_scaling(float scaling);
+
+      void forecast(int noutput_items,
+		    gr_vector_int &ninput_items_required);
+
+      int general_work(int noutput_items,
+		       gr_vector_int &ninput_items,
+		       gr_vector_const_void_star &input_items,
+		       gr_vector_void_star &output_items);
+    };
+
+  } /* namespace trellis */
+} /* namespace gr */
+
+#endif /* PCCC_DECODER_COMBINED_BLK_IMPL_H */
diff --git a/gr-trellis/lib/pccc_encoder_XX_impl.cc.t b/gr-trellis/lib/pccc_encoder_XX_impl.cc.t
deleted file mode 100644
index 8fd143ca9d..0000000000
--- a/gr-trellis/lib/pccc_encoder_XX_impl.cc.t
+++ /dev/null
@@ -1,91 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2010,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "@NAME@.h"
-#include <gnuradio/io_signature.h>
-#include <iostream>
-
-namespace gr {
-  namespace trellis {
-
-    @BASE_NAME@::sptr
-    @BASE_NAME@::make(const fsm &FSM1, int ST1,
-		      const fsm &FSM2, int ST2,
-		      const interleaver &INTERLEAVER,
-		      int blocklength)
-    {
-      return gnuradio::get_initial_sptr
-	(new @IMPL_NAME@(FSM1, ST1, FSM2, ST2, INTERLEAVER, blocklength));
-    }
-
-    @IMPL_NAME@::@IMPL_NAME@(const fsm &FSM1, int ST1,
-			     const fsm &FSM2, int ST2,
-			     const interleaver &INTERLEAVER,
-			     int blocklength)
-    : sync_block("@BASE_NAME@",
-		    io_signature::make(1, 1, sizeof(@I_TYPE@)),
-		    io_signature::make(1, 1, sizeof(@O_TYPE@))),
-      d_FSM1(FSM1), d_ST1(ST1),
-      d_FSM2(FSM2), d_ST2(ST2),
-      d_INTERLEAVER(INTERLEAVER),
-      d_blocklength(blocklength)
-    {
-      assert(d_FSM1.I() == d_FSM2.I());
-      set_output_multiple(d_blocklength);
-      d_buffer.resize(d_blocklength);
-    }
-
-    @IMPL_NAME@::~@IMPL_NAME@()
-    {
-    }
-
-    int
-    @NAME@::work(int noutput_items,
-		 gr_vector_const_void_star &input_items,
-		 gr_vector_void_star &output_items)
-    {
-      for(int b = 0 ; b<noutput_items/d_blocklength; b++) {
-	const @I_TYPE@ *in = (const @I_TYPE@*)input_items[0]+b*d_blocklength;
-	@O_TYPE@ *out = (@O_TYPE@*)output_items[0]+b*d_blocklength;
-
-	int ST1_tmp = d_ST1;
-	int ST2_tmp = d_ST2;
-	for(int i = 0; i < d_blocklength; i++) {
-	  int k = d_INTERLEAVER.INTER()[i];
-	  int o1 = d_FSM1.OS()[ST1_tmp*d_FSM1.I()+in[i]];
-	  ST1_tmp = (int) d_FSM1.NS()[ST1_tmp*d_FSM1.I()+in[i]];
-	  int o2 = d_FSM2.OS()[ST2_tmp*d_FSM2.I()+in[k]];
-	  ST2_tmp = (int) d_FSM2.NS()[ST2_tmp*d_FSM2.I()+in[k]];
-	  out[i] = (@O_TYPE@) (o1*d_FSM2.O() + o2);
-	}
-      }
-      return noutput_items;
-    }
-
-  } /* namespace trellis */
-} /* namespace gr */
diff --git a/gr-trellis/lib/pccc_encoder_XX_impl.h.t b/gr-trellis/lib/pccc_encoder_XX_impl.h.t
deleted file mode 100644
index 5561b716d3..0000000000
--- a/gr-trellis/lib/pccc_encoder_XX_impl.h.t
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/trellis/@BASE_NAME@.h>
-
-namespace gr {
-  namespace trellis {
-
-    class @IMPL_NAME@ : public @BASE_NAME@
-    {
-    private:
-      fsm d_FSM1;
-      int d_ST1;
-      fsm d_FSM2;
-      int d_ST2;
-      interleaver d_INTERLEAVER;
-      int d_blocklength;
-      std::vector<int> d_buffer;
-
-    public:
-      @IMPL_NAME@(const fsm &FSM1, int ST1,
-		  const fsm &FSM2, int ST2,
-		  const interleaver &INTERLEAVER,
-		  int blocklength);
-      ~@IMPL_NAME@();
-
-      fsm FSM1() const { return d_FSM1; }
-      int ST1() const { return d_ST1; }
-      fsm FSM2() const { return d_FSM2; }
-      int ST2() const { return d_ST2; }
-      interleaver INTERLEAVER() const { return d_INTERLEAVER; }
-      int blocklength() const { return d_blocklength; }
-
-      int work(int noutput_items,
-	       gr_vector_const_void_star &input_items,
-	       gr_vector_void_star &output_items);
-    };
-
-  } /* namespace trellis */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-trellis/lib/pccc_encoder_impl.cc b/gr-trellis/lib/pccc_encoder_impl.cc
new file mode 100644
index 0000000000..2804f4b39c
--- /dev/null
+++ b/gr-trellis/lib/pccc_encoder_impl.cc
@@ -0,0 +1,99 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2010,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "pccc_encoder_impl.h"
+#include <gnuradio/io_signature.h>
+#include <iostream>
+
+namespace gr {
+  namespace trellis {
+
+    template <class IN_T, class OUT_T>
+    typename pccc_encoder<IN_T,OUT_T>::sptr
+    pccc_encoder<IN_T,OUT_T>::make(const fsm &FSM1, int ST1,
+		      const fsm &FSM2, int ST2,
+		      const interleaver &INTERLEAVER,
+		      int blocklength)
+    {
+      return gnuradio::get_initial_sptr
+	(new pccc_encoder_impl<IN_T,OUT_T>(FSM1, ST1, FSM2, ST2, INTERLEAVER, blocklength));
+    }
+
+    template <class IN_T, class OUT_T>
+    pccc_encoder_impl<IN_T,OUT_T>::pccc_encoder_impl(const fsm &FSM1, int ST1,
+			     const fsm &FSM2, int ST2,
+			     const interleaver &INTERLEAVER,
+			     int blocklength)
+    : sync_block("pccc_encoder<IN_T,OUT_T>",
+		    io_signature::make(1, 1, sizeof(IN_T)),
+		    io_signature::make(1, 1, sizeof(OUT_T))),
+      d_FSM1(FSM1), d_ST1(ST1),
+      d_FSM2(FSM2), d_ST2(ST2),
+      d_INTERLEAVER(INTERLEAVER),
+      d_blocklength(blocklength)
+    {
+      assert(d_FSM1.I() == d_FSM2.I());
+      this->set_output_multiple(d_blocklength);
+      d_buffer.resize(d_blocklength);
+    }
+
+    template <class IN_T, class OUT_T>
+    pccc_encoder_impl<IN_T,OUT_T>::~pccc_encoder_impl()
+    {
+    }
+
+    template <class IN_T, class OUT_T>
+    int
+    pccc_encoder_impl<IN_T,OUT_T>::work(int noutput_items,
+		 gr_vector_const_void_star &input_items,
+		 gr_vector_void_star &output_items)
+    {
+      for(int b = 0 ; b<noutput_items/d_blocklength; b++) {
+	const IN_T *in = (const IN_T*)input_items[0]+b*d_blocklength;
+	OUT_T *out = (OUT_T*)output_items[0]+b*d_blocklength;
+
+	int ST1_tmp = d_ST1;
+	int ST2_tmp = d_ST2;
+	for(int i = 0; i < d_blocklength; i++) {
+	  int k = d_INTERLEAVER.INTER()[i];
+	  int o1 = d_FSM1.OS()[ST1_tmp*d_FSM1.I()+in[i]];
+	  ST1_tmp = (int) d_FSM1.NS()[ST1_tmp*d_FSM1.I()+in[i]];
+	  int o2 = d_FSM2.OS()[ST2_tmp*d_FSM2.I()+in[k]];
+	  ST2_tmp = (int) d_FSM2.NS()[ST2_tmp*d_FSM2.I()+in[k]];
+	  out[i] = (OUT_T) (o1*d_FSM2.O() + o2);
+	}
+      }
+      return noutput_items;
+    }
+    template class pccc_encoder<std::uint8_t, std::uint8_t>;
+    template class pccc_encoder<std::uint8_t, std::int16_t>;
+    template class pccc_encoder<std::uint8_t, std::int32_t>;
+    template class pccc_encoder<std::int16_t, std::int16_t>;
+    template class pccc_encoder<std::int16_t, std::int32_t>;
+    template class pccc_encoder<std::int32_t, std::int32_t>;
+
+  } /* namespace trellis */
+} /* namespace gr */
diff --git a/gr-trellis/lib/pccc_encoder_impl.h b/gr-trellis/lib/pccc_encoder_impl.h
new file mode 100644
index 0000000000..834e8986c4
--- /dev/null
+++ b/gr-trellis/lib/pccc_encoder_impl.h
@@ -0,0 +1,65 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef PCCC_ENCODER_IMPL_H
+#define PCCC_ENCODER_IMPL_H
+
+#include <gnuradio/trellis/pccc_encoder.h>
+
+namespace gr {
+  namespace trellis {
+
+    template <class IN_T, class OUT_T>
+    class pccc_encoder_impl : public pccc_encoder<IN_T,OUT_T>
+    {
+    private:
+      fsm d_FSM1;
+      int d_ST1;
+      fsm d_FSM2;
+      int d_ST2;
+      interleaver d_INTERLEAVER;
+      int d_blocklength;
+      std::vector<int> d_buffer;
+
+    public:
+      pccc_encoder_impl(const fsm &FSM1, int ST1,
+		  const fsm &FSM2, int ST2,
+		  const interleaver &INTERLEAVER,
+		  int blocklength);
+      ~pccc_encoder_impl();
+
+      fsm FSM1() const { return d_FSM1; }
+      int ST1() const { return d_ST1; }
+      fsm FSM2() const { return d_FSM2; }
+      int ST2() const { return d_ST2; }
+      interleaver INTERLEAVER() const { return d_INTERLEAVER; }
+      int blocklength() const { return d_blocklength; }
+
+      int work(int noutput_items,
+	       gr_vector_const_void_star &input_items,
+	       gr_vector_void_star &output_items);
+    };
+
+  } /* namespace trellis */
+} /* namespace gr */
+
+#endif /* PCCC_ENCODER_IMPL_H */
diff --git a/gr-trellis/lib/sccc_decoder_X_impl.cc.t b/gr-trellis/lib/sccc_decoder_X_impl.cc.t
deleted file mode 100644
index 6f1bac585a..0000000000
--- a/gr-trellis/lib/sccc_decoder_X_impl.cc.t
+++ /dev/null
@@ -1,116 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2010,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "@NAME@.h"
-#include <gnuradio/io_signature.h>
-#include <iostream>
-#include <gnuradio/trellis/core_algorithms.h>
-
-namespace gr {
-  namespace trellis {
-
-    @BASE_NAME@::sptr
-    @BASE_NAME@::make(const fsm &FSMo, int STo0, int SToK,
-		      const fsm &FSMi, int STi0, int STiK,
-		      const interleaver &INTERLEAVER,
-		      int blocklength,
-		      int repetitions,
-		      siso_type_t SISO_TYPE)
-    {
-      return gnuradio::get_initial_sptr
-	(new @IMPL_NAME@(FSMo, STo0, SToK, FSMi, STi0, STiK,
-			 INTERLEAVER, blocklength, repetitions,
-			 SISO_TYPE));
-    }
-
-    @IMPL_NAME@::@IMPL_NAME@(const fsm &FSMo, int STo0, int SToK,
-			     const fsm &FSMi, int STi0, int STiK,
-			     const interleaver &INTERLEAVER,
-			     int blocklength,
-			     int repetitions,
-			     siso_type_t SISO_TYPE)
-    : block("@BASE_NAME@",
-	       io_signature::make(1, 1, sizeof(float)),
-	       io_signature::make(1, 1, sizeof(@O_TYPE@))),
-      d_FSMo(FSMo), d_STo0(STo0), d_SToK(SToK),
-      d_FSMi(FSMi), d_STi0(STi0), d_STiK(STiK),
-      d_INTERLEAVER(INTERLEAVER),
-      d_blocklength(blocklength),
-      d_repetitions(repetitions),
-      d_SISO_TYPE(SISO_TYPE)
-    {
-      set_relative_rate(1.0 / ((double) d_FSMi.O()));
-      set_output_multiple(d_blocklength);
-    }
-
-    @IMPL_NAME@::~@IMPL_NAME@()
-    {
-    }
-
-    void
-    @IMPL_NAME@::forecast(int noutput_items,
-			  gr_vector_int &ninput_items_required)
-    {
-      int input_required =  d_FSMi.O() * noutput_items ;
-      ninput_items_required[0] = input_required;
-    }
-
-    //===========================================================
-
-    int
-    @IMPL_NAME@::general_work(int noutput_items,
-			      gr_vector_int &ninput_items,
-			      gr_vector_const_void_star &input_items,
-			      gr_vector_void_star &output_items)
-    {
-      int nblocks = noutput_items / d_blocklength;
-      float (*p2min)(float, float) = NULL;
-
-      if(d_SISO_TYPE == TRELLIS_MIN_SUM)
-	p2min = &min;
-      else if(d_SISO_TYPE == TRELLIS_SUM_PRODUCT)
-	p2min = &min_star;
-
-      const float *in = (const float*)input_items[0];
-      @O_TYPE@ *out = (@O_TYPE@*)output_items[0];
-
-      for(int n = 0; n < nblocks; n++) {
-	sccc_decoder(d_FSMo, d_STo0, d_SToK,
-		     d_FSMi, d_STi0, d_STiK,
-		     d_INTERLEAVER, d_blocklength, d_repetitions,
-		     p2min,
-		     &(in[n*d_blocklength*d_FSMi.O()]),
-		     &(out[n*d_blocklength]));
-      }
-
-      consume_each(d_FSMi.O() * noutput_items );
-      return noutput_items;
-    }
-
-  } /* namespace trellis */
-} /* namespace gr */
diff --git a/gr-trellis/lib/sccc_decoder_X_impl.h.t b/gr-trellis/lib/sccc_decoder_X_impl.h.t
deleted file mode 100644
index c79e6ebbab..0000000000
--- a/gr-trellis/lib/sccc_decoder_X_impl.h.t
+++ /dev/null
@@ -1,80 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/trellis/@BASE_NAME@.h>
-
-namespace gr {
-  namespace trellis {
-
-    class @IMPL_NAME@ : public @BASE_NAME@
-    {
-    private:
-      fsm d_FSMo;
-      int d_STo0;
-      int d_SToK;
-      fsm d_FSMi;
-      int d_STi0;
-      int d_STiK;
-      interleaver d_INTERLEAVER;
-      int d_blocklength;
-      int d_repetitions;
-      siso_type_t d_SISO_TYPE;
-      std::vector<float> d_buffer;
-
-    public:
-      @IMPL_NAME@(const fsm &FSMo, int STo0, int SToK,
-		  const fsm &FSMi, int STi0, int STiK,
-		  const interleaver &INTERLEAVER,
-		  int blocklength,
-		  int repetitions,
-		  siso_type_t SISO_TYPE);
-      ~@IMPL_NAME@();
-
-      fsm FSMo() const { return d_FSMo; }
-      fsm FSMi() const { return d_FSMi; }
-      int STo0() const { return d_STo0; }
-      int SToK() const { return d_SToK; }
-      int STi0() const { return d_STi0; }
-      int STiK() const { return d_STiK; }
-      interleaver INTERLEAVER() const { return d_INTERLEAVER; }
-      int blocklength() const { return d_blocklength; }
-      int repetitions() const { return d_repetitions; }
-      siso_type_t SISO_TYPE() const { return d_SISO_TYPE; }
-
-      void forecast(int noutput_items,
-		    gr_vector_int &ninput_items_required);
-
-      int general_work(int noutput_items,
-		       gr_vector_int &ninput_items,
-		       gr_vector_const_void_star &input_items,
-		       gr_vector_void_star &output_items);
-    };
-
-  } /* namespace trellis */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-trellis/lib/sccc_decoder_blk_impl.cc b/gr-trellis/lib/sccc_decoder_blk_impl.cc
new file mode 100644
index 0000000000..7855f9f0fe
--- /dev/null
+++ b/gr-trellis/lib/sccc_decoder_blk_impl.cc
@@ -0,0 +1,123 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2010,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "sccc_decoder_blk_impl.h"
+#include <gnuradio/io_signature.h>
+#include <iostream>
+#include <gnuradio/trellis/core_algorithms.h>
+
+namespace gr {
+  namespace trellis {
+
+    template <class T>
+    typename sccc_decoder_blk<T>::sptr
+    sccc_decoder_blk<T>::make(const fsm &FSMo, int STo0, int SToK,
+		      const fsm &FSMi, int STi0, int STiK,
+		      const interleaver &INTERLEAVER,
+		      int blocklength,
+		      int repetitions,
+		      siso_type_t SISO_TYPE)
+    {
+      return gnuradio::get_initial_sptr
+	(new sccc_decoder_blk_impl<T>(FSMo, STo0, SToK, FSMi, STi0, STiK,
+			 INTERLEAVER, blocklength, repetitions,
+			 SISO_TYPE));
+    }
+
+    template <class T>
+    sccc_decoder_blk_impl<T>::sccc_decoder_blk_impl(const fsm &FSMo, int STo0, int SToK,
+			     const fsm &FSMi, int STi0, int STiK,
+			     const interleaver &INTERLEAVER,
+			     int blocklength,
+			     int repetitions,
+			     siso_type_t SISO_TYPE)
+    : block("sccc_decoder_blk",
+	       io_signature::make(1, 1, sizeof(float)),
+	       io_signature::make(1, 1, sizeof(T))),
+      d_FSMo(FSMo), d_STo0(STo0), d_SToK(SToK),
+      d_FSMi(FSMi), d_STi0(STi0), d_STiK(STiK),
+      d_INTERLEAVER(INTERLEAVER),
+      d_blocklength(blocklength),
+      d_repetitions(repetitions),
+      d_SISO_TYPE(SISO_TYPE)
+    {
+      this->set_relative_rate(1.0 / ((double) d_FSMi.O()));
+      this->set_output_multiple(d_blocklength);
+    }
+
+    template <class T>
+    sccc_decoder_blk_impl<T>::~sccc_decoder_blk_impl()
+    {
+    }
+
+    template <class T>
+    void
+    sccc_decoder_blk_impl<T>::forecast(int noutput_items,
+			  gr_vector_int &ninput_items_required)
+    {
+      int input_required =  d_FSMi.O() * noutput_items ;
+      ninput_items_required[0] = input_required;
+    }
+
+    //===========================================================
+
+    template <class T>
+    int
+    sccc_decoder_blk_impl<T>::general_work(int noutput_items,
+			      gr_vector_int &ninput_items,
+			      gr_vector_const_void_star &input_items,
+			      gr_vector_void_star &output_items)
+    {
+      int nblocks = noutput_items / d_blocklength;
+      float (*p2min)(float, float) = NULL;
+
+      if(d_SISO_TYPE == TRELLIS_MIN_SUM)
+	p2min = &min;
+      else if(d_SISO_TYPE == TRELLIS_SUM_PRODUCT)
+	p2min = &min_star;
+
+      const float *in = (const float*)input_items[0];
+      T *out = (T*)output_items[0];
+
+      for(int n = 0; n < nblocks; n++) {
+	sccc_decoder(d_FSMo, d_STo0, d_SToK,
+		     d_FSMi, d_STi0, d_STiK,
+		     d_INTERLEAVER, d_blocklength, d_repetitions,
+		     p2min,
+		     &(in[n*d_blocklength*d_FSMi.O()]),
+		     &(out[n*d_blocklength]));
+      }
+
+      this->consume_each(d_FSMi.O() * noutput_items );
+      return noutput_items;
+    }
+
+template class sccc_decoder_blk<std::uint8_t>;
+template class sccc_decoder_blk<std::int16_t>;
+template class sccc_decoder_blk<std::int32_t>;
+  } /* namespace trellis */
+} /* namespace gr */
diff --git a/gr-trellis/lib/sccc_decoder_blk_impl.h b/gr-trellis/lib/sccc_decoder_blk_impl.h
new file mode 100644
index 0000000000..0c3e2d9310
--- /dev/null
+++ b/gr-trellis/lib/sccc_decoder_blk_impl.h
@@ -0,0 +1,80 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef SCCC_DECODER_BLK_IMPL_H
+#define SCCC_DECODER_BLK_IMPL_H
+
+#include <gnuradio/trellis/sccc_decoder_blk.h>
+
+namespace gr {
+  namespace trellis {
+
+template<class T>
+    class sccc_decoder_blk_impl : public  sccc_decoder_blk<T>
+    {
+    private:
+      fsm d_FSMo;
+      int d_STo0;
+      int d_SToK;
+      fsm d_FSMi;
+      int d_STi0;
+      int d_STiK;
+      interleaver d_INTERLEAVER;
+      int d_blocklength;
+      int d_repetitions;
+      siso_type_t d_SISO_TYPE;
+      std::vector<float> d_buffer;
+
+    public:
+      sccc_decoder_blk_impl(const fsm &FSMo, int STo0, int SToK,
+		  const fsm &FSMi, int STi0, int STiK,
+		  const interleaver &INTERLEAVER,
+		  int blocklength,
+		  int repetitions,
+		  siso_type_t SISO_TYPE);
+      ~sccc_decoder_blk_impl();
+
+      fsm FSMo() const { return d_FSMo; }
+      fsm FSMi() const { return d_FSMi; }
+      int STo0() const { return d_STo0; }
+      int SToK() const { return d_SToK; }
+      int STi0() const { return d_STi0; }
+      int STiK() const { return d_STiK; }
+      interleaver INTERLEAVER() const { return d_INTERLEAVER; }
+      int blocklength() const { return d_blocklength; }
+      int repetitions() const { return d_repetitions; }
+      siso_type_t SISO_TYPE() const { return d_SISO_TYPE; }
+
+      void forecast(int noutput_items,
+		    gr_vector_int &ninput_items_required);
+
+      int general_work(int noutput_items,
+		       gr_vector_int &ninput_items,
+		       gr_vector_const_void_star &input_items,
+		       gr_vector_void_star &output_items);
+    };
+
+  } /* namespace trellis */
+} /* namespace gr */
+
+#endif /* SCCC_DECODER_BLK_IMPL_H */
diff --git a/gr-trellis/lib/sccc_decoder_combined_XX_impl.cc.t b/gr-trellis/lib/sccc_decoder_combined_XX_impl.cc.t
deleted file mode 100644
index 224c5f8027..0000000000
--- a/gr-trellis/lib/sccc_decoder_combined_XX_impl.cc.t
+++ /dev/null
@@ -1,139 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2010,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "@NAME@.h"
-#include <gnuradio/io_signature.h>
-#include <iostream>
-#include <gnuradio/trellis/core_algorithms.h>
-
-namespace gr {
-  namespace trellis {
-
-    @BASE_NAME@::sptr
-    @BASE_NAME@::make(const fsm &FSMo, int STo0, int SToK,
-		      const fsm &FSMi, int STi0, int STiK,
-		      const interleaver &INTERLEAVER,
-		      int blocklength,
-		      int repetitions,
-		      siso_type_t SISO_TYPE,
-		      int D,
-		      const std::vector<@I_TYPE@> &TABLE,
-		      digital::trellis_metric_type_t METRIC_TYPE,
-		      float scaling)
-    {
-      return gnuradio::get_initial_sptr
-	(new @IMPL_NAME@(FSMo, STo0, SToK, FSMi, STi0, STiK,
-			 INTERLEAVER, blocklength, repetitions,
-			 SISO_TYPE, D, TABLE,METRIC_TYPE, scaling));
-    }
-
-    @IMPL_NAME@::@IMPL_NAME@(const fsm &FSMo, int STo0, int SToK,
-			     const fsm &FSMi, int STi0, int STiK,
-			     const interleaver &INTERLEAVER,
-			     int blocklength,
-			     int repetitions,
-			     siso_type_t SISO_TYPE,
-			     int D,
-			     const std::vector<@I_TYPE@> &TABLE,
-			     digital::trellis_metric_type_t METRIC_TYPE,
-			     float scaling)
-    : block("@BASE_NAME@",
-	       io_signature::make(1, 1, sizeof(@I_TYPE@)),
-	       io_signature::make(1, 1, sizeof(@O_TYPE@))),
-      d_FSMo(FSMo), d_STo0(STo0), d_SToK(SToK),
-      d_FSMi(FSMi), d_STi0(STi0), d_STiK(STiK),
-      d_INTERLEAVER(INTERLEAVER),
-      d_blocklength(blocklength),
-      d_repetitions(repetitions),
-      d_SISO_TYPE(SISO_TYPE),
-      d_D(D),
-      d_TABLE(TABLE),
-      d_METRIC_TYPE(METRIC_TYPE),
-      d_scaling(scaling)
-    {
-      set_relative_rate(1.0 / ((double) d_D));
-      set_output_multiple(d_blocklength);
-    }
-
-    @IMPL_NAME@::~@IMPL_NAME@()
-    {
-    }
-
-    void
-    @IMPL_NAME@::set_scaling(float scaling)
-    {
-      gr::thread::scoped_lock guard(d_setlock);
-      d_scaling = scaling;
-    }
-
-    void
-    @IMPL_NAME@::forecast(int noutput_items,
-			  gr_vector_int &ninput_items_required)
-    {
-      int input_required =  d_D * noutput_items ;
-      ninput_items_required[0] = input_required;
-    }
-
-    //===========================================================
-
-    int
-    @IMPL_NAME@::general_work(int noutput_items,
-			      gr_vector_int &ninput_items,
-			      gr_vector_const_void_star &input_items,
-			      gr_vector_void_star &output_items)
-    {
-      gr::thread::scoped_lock guard(d_setlock);
-      int nblocks = noutput_items / d_blocklength;
-      float (*p2min)(float, float) = NULL;
-
-      if(d_SISO_TYPE == TRELLIS_MIN_SUM)
-	p2min = &min;
-      else if(d_SISO_TYPE == TRELLIS_SUM_PRODUCT)
-	p2min = &min_star;
-
-      const @I_TYPE@ *in = (const @I_TYPE@*)input_items[0];
-      @O_TYPE@ *out = (@O_TYPE@*)output_items[0];
-
-      for(int n = 0; n < nblocks; n++) {
-	sccc_decoder_combined(d_FSMo, d_STo0, d_SToK,
-			      d_FSMi, d_STi0, d_STiK,
-			      d_INTERLEAVER, d_blocklength, d_repetitions,
-			      p2min,
-			      d_D,d_TABLE,
-			      d_METRIC_TYPE,
-			      d_scaling,
-			      &(in[n*d_blocklength*d_D]),
-			      &(out[n*d_blocklength]));
-      }
-
-      consume_each(d_D * noutput_items);
-      return noutput_items;
-    }
-
-  } /* namespace trellis */
-} /* namespace gr */
diff --git a/gr-trellis/lib/sccc_decoder_combined_XX_impl.h.t b/gr-trellis/lib/sccc_decoder_combined_XX_impl.h.t
deleted file mode 100644
index 6a38f0114f..0000000000
--- a/gr-trellis/lib/sccc_decoder_combined_XX_impl.h.t
+++ /dev/null
@@ -1,93 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/trellis/@BASE_NAME@.h>
-
-namespace gr {
-  namespace trellis {
-
-    class @IMPL_NAME@ : public @BASE_NAME@
-    {
-    private:
-      fsm d_FSMo;
-      int d_STo0;
-      int d_SToK;
-      fsm d_FSMi;
-      int d_STi0;
-      int d_STiK;
-      interleaver d_INTERLEAVER;
-      int d_blocklength;
-      int d_repetitions;
-      siso_type_t d_SISO_TYPE;
-      int d_D;
-      std::vector<@I_TYPE@> d_TABLE;
-      digital::trellis_metric_type_t d_METRIC_TYPE;
-      float d_scaling;
-      std::vector<float> d_buffer;
-
-    public:
-      @IMPL_NAME@(const fsm &FSMo, int STo0, int SToK,
-		  const fsm &FSMi, int STi0, int STiK,
-		  const interleaver &INTERLEAVER,
-		  int blocklength,
-		  int repetitions,
-		  siso_type_t SISO_TYPE,
-		  int D,
-		  const std::vector<@I_TYPE@> &TABLE,
-		  digital::trellis_metric_type_t METRIC_TYPE,
-		  float scaling);
-      ~@IMPL_NAME@();
-
-      fsm FSMo() const { return d_FSMo; }
-      fsm FSMi() const { return d_FSMi; }
-      int STo0() const { return d_STo0; }
-      int SToK() const { return d_SToK; }
-      int STi0() const { return d_STi0; }
-      int STiK() const { return d_STiK; }
-      interleaver INTERLEAVER() const { return d_INTERLEAVER; }
-      int blocklength() const { return d_blocklength; }
-      int repetitions() const { return d_repetitions; }
-      int D() const { return d_D; }
-      std::vector<@I_TYPE@> TABLE() const { return d_TABLE; }
-      digital::trellis_metric_type_t METRIC_TYPE() const { return d_METRIC_TYPE; }
-      siso_type_t SISO_TYPE() const { return d_SISO_TYPE; }
-      float scaling() const { return d_scaling; }
-      void set_scaling(float scaling);
-
-      void forecast(int noutput_items,
-		    gr_vector_int &ninput_items_required);
-
-      int general_work(int noutput_items,
-		       gr_vector_int &ninput_items,
-		       gr_vector_const_void_star &input_items,
-		       gr_vector_void_star &output_items);
-    };
-
-  } /* namespace trellis */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-trellis/lib/sccc_decoder_combined_blk_impl.cc b/gr-trellis/lib/sccc_decoder_combined_blk_impl.cc
new file mode 100644
index 0000000000..bf8845ce52
--- /dev/null
+++ b/gr-trellis/lib/sccc_decoder_combined_blk_impl.cc
@@ -0,0 +1,151 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2010,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "sccc_decoder_combined_blk_impl.h"
+#include <gnuradio/io_signature.h>
+#include <iostream>
+#include <gnuradio/trellis/core_algorithms.h>
+
+namespace gr {
+  namespace trellis {
+
+    template <class IN_T, class OUT_T>
+    typename sccc_decoder_combined_blk<IN_T,OUT_T>::sptr
+    sccc_decoder_combined_blk<IN_T,OUT_T>::make(const fsm &FSMo, int STo0, int SToK,
+		      const fsm &FSMi, int STi0, int STiK,
+		      const interleaver &INTERLEAVER,
+		      int blocklength,
+		      int repetitions,
+		      siso_type_t SISO_TYPE,
+		      int D,
+		      const std::vector<IN_T> &TABLE,
+		      digital::trellis_metric_type_t METRIC_TYPE,
+		      float scaling)
+    {
+      return gnuradio::get_initial_sptr
+	(new sccc_decoder_combined_blk_impl<IN_T,OUT_T>(FSMo, STo0, SToK, FSMi, STi0, STiK,
+			 INTERLEAVER, blocklength, repetitions,
+			 SISO_TYPE, D, TABLE,METRIC_TYPE, scaling));
+    }
+
+    template <class IN_T, class OUT_T>
+    sccc_decoder_combined_blk_impl<IN_T,OUT_T>::sccc_decoder_combined_blk_impl(const fsm &FSMo, int STo0, int SToK,
+			     const fsm &FSMi, int STi0, int STiK,
+			     const interleaver &INTERLEAVER,
+			     int blocklength,
+			     int repetitions,
+			     siso_type_t SISO_TYPE,
+			     int D,
+			     const std::vector<IN_T> &TABLE,
+			     digital::trellis_metric_type_t METRIC_TYPE,
+			     float scaling)
+    : block("sccc_decoder_combined_blk<IN_T,OUT_T>",
+	       io_signature::make(1, 1, sizeof(IN_T)),
+	       io_signature::make(1, 1, sizeof(OUT_T))),
+      d_FSMo(FSMo), d_STo0(STo0), d_SToK(SToK),
+      d_FSMi(FSMi), d_STi0(STi0), d_STiK(STiK),
+      d_INTERLEAVER(INTERLEAVER),
+      d_blocklength(blocklength),
+      d_repetitions(repetitions),
+      d_SISO_TYPE(SISO_TYPE),
+      d_D(D),
+      d_TABLE(TABLE),
+      d_METRIC_TYPE(METRIC_TYPE),
+      d_scaling(scaling)
+    {
+      this->set_relative_rate(1.0 / ((double) d_D));
+      this->set_output_multiple(d_blocklength);
+    }
+
+    template <class IN_T, class OUT_T>
+    sccc_decoder_combined_blk_impl<IN_T,OUT_T>::~sccc_decoder_combined_blk_impl()
+    {
+    }
+
+    template <class IN_T, class OUT_T>
+    void
+    sccc_decoder_combined_blk_impl<IN_T,OUT_T>::set_scaling(float scaling)
+    {
+      gr::thread::scoped_lock guard(this->d_setlock);
+      d_scaling = scaling;
+    }
+
+    template <class IN_T, class OUT_T>
+    void
+    sccc_decoder_combined_blk_impl<IN_T,OUT_T>::forecast(int noutput_items,
+			  gr_vector_int &ninput_items_required)
+    {
+      int input_required =  d_D * noutput_items ;
+      ninput_items_required[0] = input_required;
+    }
+
+    //===========================================================
+
+    template <class IN_T, class OUT_T>
+    int
+    sccc_decoder_combined_blk_impl<IN_T,OUT_T>::general_work(int noutput_items,
+			      gr_vector_int &ninput_items,
+			      gr_vector_const_void_star &input_items,
+			      gr_vector_void_star &output_items)
+    {
+      gr::thread::scoped_lock guard(this->d_setlock);
+      int nblocks = noutput_items / d_blocklength;
+      float (*p2min)(float, float) = NULL;
+
+      if(d_SISO_TYPE == TRELLIS_MIN_SUM)
+	p2min = &min;
+      else if(d_SISO_TYPE == TRELLIS_SUM_PRODUCT)
+	p2min = &min_star;
+
+      const IN_T *in = (const IN_T*)input_items[0];
+      OUT_T *out = (OUT_T*)output_items[0];
+
+      for(int n = 0; n < nblocks; n++) {
+	sccc_decoder_combined(d_FSMo, d_STo0, d_SToK,
+			      d_FSMi, d_STi0, d_STiK,
+			      d_INTERLEAVER, d_blocklength, d_repetitions,
+			      p2min,
+			      d_D,d_TABLE,
+			      d_METRIC_TYPE,
+			      d_scaling,
+			      &(in[n*d_blocklength*d_D]),
+			      &(out[n*d_blocklength]));
+      }
+
+      this->consume_each(d_D * noutput_items);
+      return noutput_items;
+    }
+
+    template class sccc_decoder_combined_blk<float, std::uint8_t>;
+    template class sccc_decoder_combined_blk<float, std::int16_t>;
+    template class sccc_decoder_combined_blk<float, std::int32_t>;
+    template class sccc_decoder_combined_blk<gr_complex, std::uint8_t>;
+    template class sccc_decoder_combined_blk<gr_complex, std::int16_t>;
+    template class sccc_decoder_combined_blk<gr_complex, std::int32_t>;
+
+
+  } /* namespace trellis */
+} /* namespace gr */
diff --git a/gr-trellis/lib/sccc_decoder_combined_blk_impl.h b/gr-trellis/lib/sccc_decoder_combined_blk_impl.h
new file mode 100644
index 0000000000..8236c79a49
--- /dev/null
+++ b/gr-trellis/lib/sccc_decoder_combined_blk_impl.h
@@ -0,0 +1,92 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef SCCC_DECODER_COMBINED_BLK_IMPL_H
+#define SCCC_DECODER_COMBINED_BLK_IMPL_H
+
+#include <gnuradio/trellis/sccc_decoder_combined_blk.h>
+
+namespace gr {
+  namespace trellis {
+
+    template <class IN_T, class OUT_T>
+    class sccc_decoder_combined_blk_impl : public sccc_decoder_combined_blk<IN_T,OUT_T>
+    {
+    private:
+      fsm d_FSMo;
+      int d_STo0;
+      int d_SToK;
+      fsm d_FSMi;
+      int d_STi0;
+      int d_STiK;
+      interleaver d_INTERLEAVER;
+      int d_blocklength;
+      int d_repetitions;
+      siso_type_t d_SISO_TYPE;
+      int d_D;
+      std::vector<IN_T> d_TABLE;
+      digital::trellis_metric_type_t d_METRIC_TYPE;
+      float d_scaling;
+      std::vector<float> d_buffer;
+
+    public:
+      sccc_decoder_combined_blk_impl(const fsm &FSMo, int STo0, int SToK,
+		  const fsm &FSMi, int STi0, int STiK,
+		  const interleaver &INTERLEAVER,
+		  int blocklength,
+		  int repetitions,
+		  siso_type_t SISO_TYPE,
+		  int D,
+		  const std::vector<IN_T> &TABLE,
+		  digital::trellis_metric_type_t METRIC_TYPE,
+		  float scaling);
+      ~sccc_decoder_combined_blk_impl();
+
+      fsm FSMo() const { return d_FSMo; }
+      fsm FSMi() const { return d_FSMi; }
+      int STo0() const { return d_STo0; }
+      int SToK() const { return d_SToK; }
+      int STi0() const { return d_STi0; }
+      int STiK() const { return d_STiK; }
+      interleaver INTERLEAVER() const { return d_INTERLEAVER; }
+      int blocklength() const { return d_blocklength; }
+      int repetitions() const { return d_repetitions; }
+      int D() const { return d_D; }
+      std::vector<IN_T> TABLE() const { return d_TABLE; }
+      digital::trellis_metric_type_t METRIC_TYPE() const { return d_METRIC_TYPE; }
+      siso_type_t SISO_TYPE() const { return d_SISO_TYPE; }
+      float scaling() const { return d_scaling; }
+      void set_scaling(float scaling);
+
+      void forecast(int noutput_items,
+		    gr_vector_int &ninput_items_required);
+
+      int general_work(int noutput_items,
+		       gr_vector_int &ninput_items,
+		       gr_vector_const_void_star &input_items,
+		       gr_vector_void_star &output_items);
+    };
+
+  } /* namespace trellis */
+} /* namespace gr */
+
+#endif /* SCCC_DECODER_COMBINED_BLK_IMPL_H */
diff --git a/gr-trellis/lib/sccc_encoder_XX_impl.cc.t b/gr-trellis/lib/sccc_encoder_XX_impl.cc.t
deleted file mode 100644
index 9924b3c7d2..0000000000
--- a/gr-trellis/lib/sccc_encoder_XX_impl.cc.t
+++ /dev/null
@@ -1,93 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2010,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "@NAME@.h"
-#include <gnuradio/io_signature.h>
-#include <iostream>
-
-namespace gr {
-  namespace trellis {
-
-    @BASE_NAME@::sptr
-    @BASE_NAME@::make(const fsm &FSMo, int STo,
-		      const fsm &FSMi, int STi,
-		      const interleaver &INTERLEAVER,
-		      int blocklength)
-    {
-      return gnuradio::get_initial_sptr
-	(new @IMPL_NAME@(FSMo, STo, FSMi, STi, INTERLEAVER, blocklength));
-    }
-
-    @IMPL_NAME@::@IMPL_NAME@(const fsm &FSMo, int STo,
-			     const fsm &FSMi, int STi,
-			     const interleaver &INTERLEAVER,
-			     int blocklength)
-    : sync_block("@BASE_NAME@",
-		    io_signature::make(1, 1, sizeof(@I_TYPE@)),
-		    io_signature::make(1, 1, sizeof(@O_TYPE@))),
-      d_FSMo(FSMo), d_STo(STo),
-      d_FSMi(FSMi), d_STi(STi),
-      d_INTERLEAVER(INTERLEAVER),
-      d_blocklength(blocklength)
-    {
-      set_output_multiple(d_blocklength);
-      d_buffer.resize(d_blocklength);
-    }
-
-    @IMPL_NAME@::~@IMPL_NAME@()
-    {
-    }
-
-    int
-    @IMPL_NAME@::work(int noutput_items,
-		      gr_vector_const_void_star &input_items,
-		      gr_vector_void_star &output_items)
-    {
-      for(int b = 0; b < noutput_items/d_blocklength; b++) {
-	const @I_TYPE@ *in = (const @I_TYPE@*)input_items[0]+b*d_blocklength;
-	@O_TYPE@ *out = (@O_TYPE@*)output_items[0]+b*d_blocklength;
-
-	int STo_tmp = d_STo;
-	for(int i = 0; i < d_blocklength; i++) {
-	  d_buffer[i] = d_FSMo.OS()[STo_tmp*d_FSMo.I()+in[i]];
-	  STo_tmp = (int) d_FSMo.NS()[STo_tmp*d_FSMo.I()+in[i]];
-	}
-
-	int STi_tmp = d_STi;
-	for(int i = 0; i < d_blocklength; i++) {
-	  int k = d_INTERLEAVER.INTER()[i];
-	  out[i] = (@O_TYPE@) d_FSMi.OS()[STi_tmp*d_FSMi.I()+d_buffer[k]];
-	  STi_tmp = (int) d_FSMi.NS()[STi_tmp*d_FSMi.I()+d_buffer[k]];
-	}
-      }
-      return noutput_items;
-    }
-
-  } /* namespace trellis */
-} /* namespace gr */
-
diff --git a/gr-trellis/lib/sccc_encoder_XX_impl.h.t b/gr-trellis/lib/sccc_encoder_XX_impl.h.t
deleted file mode 100644
index fc64f2ade8..0000000000
--- a/gr-trellis/lib/sccc_encoder_XX_impl.h.t
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/trellis/@BASE_NAME@.h>
-
-namespace gr {
-  namespace trellis {
-
-    class @IMPL_NAME@ : public @BASE_NAME@
-    {
-    private:
-      fsm d_FSMo;
-      int d_STo;
-      fsm d_FSMi;
-      int d_STi;
-      interleaver d_INTERLEAVER;
-      int d_blocklength;
-      std::vector<int> d_buffer;
-
-    public:
-      @IMPL_NAME@(const fsm &FSMo, int STo,
-		  const fsm &FSMi, int STi,
-		  const interleaver &INTERLEAVER,
-		  int blocklength);
-      ~@IMPL_NAME@();
-
-      fsm FSMo() const { return d_FSMo; }
-      int STo() const { return d_STo; }
-      fsm FSMi() const { return d_FSMi; }
-      int STi() const { return d_STi; }
-      interleaver INTERLEAVER() const { return d_INTERLEAVER; }
-      int blocklength() const { return d_blocklength; }
-
-      int work(int noutput_items,
-	       gr_vector_const_void_star &input_items,
-	       gr_vector_void_star &output_items);
-    };
-
-  } /* namespace trellis */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-trellis/lib/sccc_encoder_impl.cc b/gr-trellis/lib/sccc_encoder_impl.cc
new file mode 100644
index 0000000000..9c3e1da2d5
--- /dev/null
+++ b/gr-trellis/lib/sccc_encoder_impl.cc
@@ -0,0 +1,101 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2010,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "sccc_encoder_impl.h"
+#include <gnuradio/io_signature.h>
+#include <iostream>
+
+namespace gr {
+  namespace trellis {
+
+    template <class IN_T, class OUT_T>
+    typename sccc_encoder<IN_T,OUT_T>::sptr
+    sccc_encoder<IN_T,OUT_T>::make(const fsm &FSMo, int STo,
+		      const fsm &FSMi, int STi,
+		      const interleaver &INTERLEAVER,
+		      int blocklength)
+    {
+      return gnuradio::get_initial_sptr
+	(new sccc_encoder_impl<IN_T,OUT_T>(FSMo, STo, FSMi, STi, INTERLEAVER, blocklength));
+    }
+
+    template <class IN_T, class OUT_T>
+    sccc_encoder_impl<IN_T,OUT_T>::sccc_encoder_impl(const fsm &FSMo, int STo,
+			     const fsm &FSMi, int STi,
+			     const interleaver &INTERLEAVER,
+			     int blocklength)
+    : sync_block("sccc_encoder<IN_T,OUT_T>",
+		    io_signature::make(1, 1, sizeof(IN_T)),
+		    io_signature::make(1, 1, sizeof(OUT_T))),
+      d_FSMo(FSMo), d_STo(STo),
+      d_FSMi(FSMi), d_STi(STi),
+      d_INTERLEAVER(INTERLEAVER),
+      d_blocklength(blocklength)
+    {
+      this->set_output_multiple(d_blocklength);
+      d_buffer.resize(d_blocklength);
+    }
+
+    template <class IN_T, class OUT_T>
+    sccc_encoder_impl<IN_T,OUT_T>::~sccc_encoder_impl()
+    {
+    }
+
+    template <class IN_T, class OUT_T>
+    int
+    sccc_encoder_impl<IN_T,OUT_T>::work(int noutput_items,
+		      gr_vector_const_void_star &input_items,
+		      gr_vector_void_star &output_items)
+    {
+      for(int b = 0; b < noutput_items/d_blocklength; b++) {
+	const IN_T *in = (const IN_T*)input_items[0]+b*d_blocklength;
+	OUT_T *out = (OUT_T*)output_items[0]+b*d_blocklength;
+
+	int STo_tmp = d_STo;
+	for(int i = 0; i < d_blocklength; i++) {
+	  d_buffer[i] = d_FSMo.OS()[STo_tmp*d_FSMo.I()+in[i]];
+	  STo_tmp = (int) d_FSMo.NS()[STo_tmp*d_FSMo.I()+in[i]];
+	}
+
+	int STi_tmp = d_STi;
+	for(int i = 0; i < d_blocklength; i++) {
+	  int k = d_INTERLEAVER.INTER()[i];
+	  out[i] = (OUT_T) d_FSMi.OS()[STi_tmp*d_FSMi.I()+d_buffer[k]];
+	  STi_tmp = (int) d_FSMi.NS()[STi_tmp*d_FSMi.I()+d_buffer[k]];
+	}
+      }
+      return noutput_items;
+    }
+    template class sccc_encoder<std::uint8_t, std::uint8_t>;
+    template class sccc_encoder<std::uint8_t, std::int16_t>;
+    template class sccc_encoder<std::uint8_t, std::int32_t>;
+    template class sccc_encoder<std::int16_t, std::int16_t>;
+    template class sccc_encoder<std::int16_t, std::int32_t>;
+    template class sccc_encoder<std::int32_t, std::int32_t>;
+
+
+  } /* namespace trellis */
+} /* namespace gr */
diff --git a/gr-trellis/lib/sccc_encoder_impl.h b/gr-trellis/lib/sccc_encoder_impl.h
new file mode 100644
index 0000000000..40968906dc
--- /dev/null
+++ b/gr-trellis/lib/sccc_encoder_impl.h
@@ -0,0 +1,65 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef SCCC_ENCODER_IMPL_H
+#define SCCC_ENCODER_IMPL_H
+
+#include <gnuradio/trellis/sccc_encoder.h>
+
+namespace gr {
+  namespace trellis {
+
+    template <class IN_T, class OUT_T>
+    class sccc_encoder_impl : public sccc_encoder<IN_T,OUT_T>
+    {
+    private:
+      fsm d_FSMo;
+      int d_STo;
+      fsm d_FSMi;
+      int d_STi;
+      interleaver d_INTERLEAVER;
+      int d_blocklength;
+      std::vector<int> d_buffer;
+
+    public:
+      sccc_encoder_impl(const fsm &FSMo, int STo,
+		  const fsm &FSMi, int STi,
+		  const interleaver &INTERLEAVER,
+		  int blocklength);
+      ~sccc_encoder_impl();
+
+      fsm FSMo() const { return d_FSMo; }
+      int STo() const { return d_STo; }
+      fsm FSMi() const { return d_FSMi; }
+      int STi() const { return d_STi; }
+      interleaver INTERLEAVER() const { return d_INTERLEAVER; }
+      int blocklength() const { return d_blocklength; }
+
+      int work(int noutput_items,
+	       gr_vector_const_void_star &input_items,
+	       gr_vector_void_star &output_items);
+    };
+
+  } /* namespace trellis */
+} /* namespace gr */
+
+#endif /* SCCC_ENCODER_IMPL_H */
diff --git a/gr-trellis/lib/viterbi_X_impl.cc.t b/gr-trellis/lib/viterbi_X_impl.cc.t
deleted file mode 100644
index d5949f0321..0000000000
--- a/gr-trellis/lib/viterbi_X_impl.cc.t
+++ /dev/null
@@ -1,124 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2010,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "@NAME@.h"
-#include <gnuradio/io_signature.h>
-#include <iostream>
-
-namespace gr {
-  namespace trellis {
-
-    @BASE_NAME@::sptr
-    @BASE_NAME@::make(const fsm &FSM, int K,
-		      int S0, int SK)
-    {
-      return gnuradio::get_initial_sptr
-	(new @IMPL_NAME@(FSM, K, S0, SK));
-    }
-
-    @IMPL_NAME@::@IMPL_NAME@(const fsm &FSM, int K,
-			     int S0, int SK)
-    : block("@BASE_NAME@",
-	       io_signature::make(1, -1, sizeof(float)),
-	       io_signature::make(1, -1, sizeof(@TYPE@))),
-      d_FSM(FSM), d_K(K), d_S0(S0), d_SK(SK)//,
-      //d_trace(FSM.S()*K)
-    {
-      set_relative_rate(1.0 / ((double)d_FSM.O()));
-      set_output_multiple(d_K);
-    }
-
-    void @IMPL_NAME@::set_FSM(const fsm &FSM) 
-    { 
-      gr::thread::scoped_lock guard(d_setlock); 
-      d_FSM = FSM; 
-      set_relative_rate(1.0 / ((double)d_FSM.O()));
-    }
-
-    void @IMPL_NAME@::set_K(int K) 
-    { 
-      gr::thread::scoped_lock guard(d_setlock); 
-      d_K = K; 
-      set_output_multiple(d_K);
-    }
-
-    void @IMPL_NAME@::set_S0(int S0) 
-    { 
-      gr::thread::scoped_lock guard(d_setlock); 
-      d_S0 = S0; 
-    }
-
-    void @IMPL_NAME@::set_SK(int SK) 
-    { 
-      gr::thread::scoped_lock guard(d_setlock); 
-      d_SK = SK; 
-    }
-
-    @IMPL_NAME@::~@IMPL_NAME@()
-    {
-    }
-
-    void
-    @IMPL_NAME@::forecast(int noutput_items,
-			  gr_vector_int &ninput_items_required)
-    {
-      int input_required =  d_FSM.O() * noutput_items;
-      unsigned ninputs = ninput_items_required.size();
-      for(unsigned int i = 0; i < ninputs; i++) {
-	ninput_items_required[i] = input_required;
-      }
-    }
-
-    int
-    @IMPL_NAME@::general_work(int noutput_items,
-			      gr_vector_int &ninput_items,
-			      gr_vector_const_void_star &input_items,
-			      gr_vector_void_star &output_items)
-    {
-      gr::thread::scoped_lock guard(d_setlock);
-      int nstreams = input_items.size();
-      int nblocks = noutput_items / d_K;
-
-      for(int m = 0; m < nstreams; m++) {
-	const float *in = (const float*)input_items[m];
-	@TYPE@ *out = (@TYPE@*)output_items[m];
-
-	for(int n = 0; n < nblocks; n++) {
-	  viterbi_algorithm(d_FSM.I(), d_FSM.S(), d_FSM.O(),
-			    d_FSM.NS(), d_FSM.OS(), d_FSM.PS(),
-			    d_FSM.PI(), d_K,d_S0, d_SK,
-			    &(in[n*d_K*d_FSM.O()]), &(out[n*d_K]));
-	}
-      }
-
-      consume_each(d_FSM.O() * noutput_items);
-      return noutput_items;
-    }
-
-  } /* namespace trellis */
-} /* namespace gr */
diff --git a/gr-trellis/lib/viterbi_X_impl.h.t b/gr-trellis/lib/viterbi_X_impl.h.t
deleted file mode 100644
index 1479ad5a3f..0000000000
--- a/gr-trellis/lib/viterbi_X_impl.h.t
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/trellis/@BASE_NAME@.h>
-
-namespace gr {
-  namespace trellis {
-
-    class @IMPL_NAME@ : public @BASE_NAME@
-    {
-    private:
-      fsm d_FSM;
-      int d_K;
-      int d_S0;
-      int d_SK;
-      //std::vector<int> d_trace;
-
-    public:
-      @IMPL_NAME@(const fsm &FSM, int K,
-		  int S0, int SK);
-      ~@IMPL_NAME@();
-
-      fsm FSM() const  { return d_FSM; }
-      int K()  const { return d_K; }
-      int S0()  const { return d_S0; }
-      int SK()  const { return d_SK; }
-
-      void set_FSM(const fsm &FSM);
-      void set_K(int K);
-      void set_S0(int S0);
-      void set_SK(int SK);
-      //std::vector<int> trace () const { return d_trace; }
-
-      void forecast(int noutput_items,
-		    gr_vector_int &ninput_items_required);
-      int general_work(int noutput_items,
-		       gr_vector_int &ninput_items,
-		       gr_vector_const_void_star &input_items,
-		       gr_vector_void_star &output_items);
-    };
-
-  } /* namespace trellis */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-trellis/lib/viterbi_combined_XX_impl.cc.t b/gr-trellis/lib/viterbi_combined_XX_impl.cc.t
deleted file mode 100644
index 6d83dc4402..0000000000
--- a/gr-trellis/lib/viterbi_combined_XX_impl.cc.t
+++ /dev/null
@@ -1,153 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2010,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "@NAME@.h"
-#include <gnuradio/io_signature.h>
-#include <iostream>
-
-namespace gr {
-  namespace trellis {
-
-    @BASE_NAME@::sptr
-    @BASE_NAME@::make(const fsm &FSM, int K,
-		      int S0, int SK, int D,
-		      const std::vector<@I_TYPE@> &TABLE,
-		      digital::trellis_metric_type_t TYPE)
-    {
-      return gnuradio::get_initial_sptr
-	(new @NAME@(FSM, K, S0, SK, D, TABLE,TYPE));
-    }
-
-    @IMPL_NAME@::@IMPL_NAME@(const fsm &FSM, int K,
-			     int S0, int SK, int D,
-			     const std::vector<@I_TYPE@> &TABLE,
-			     digital::trellis_metric_type_t TYPE)
-    : block("@BASE_NAME@",
-	       io_signature::make(1, -1, sizeof(@I_TYPE@)),
-	       io_signature::make(1, -1, sizeof(@O_TYPE@))),
-      d_FSM(FSM), d_K(K), d_S0(S0), d_SK(SK), d_D(D),
-      d_TABLE(TABLE), d_TYPE(TYPE)//,
-      //d_trace(FSM.S()*K)
-    {
-      set_relative_rate(1.0 / ((double)d_D));
-      set_output_multiple(d_K);
-    }
-
-    void
-    @IMPL_NAME@::set_K(int K)
-    {
-      gr::thread::scoped_lock guard(d_setlock);
-      d_K = K;
-      set_output_multiple(d_K);
-    }
-
-    void
-    @IMPL_NAME@::set_D(int D)
-    {
-      gr::thread::scoped_lock guard(d_setlock);
-      d_D = D;
-      set_relative_rate(1.0 / ((double)d_D));
-    }
-   
-    void @IMPL_NAME@::set_FSM(const fsm &FSM)
-    {
-      gr::thread::scoped_lock guard(d_setlock);
-      d_FSM = FSM;
-    }
-
-    void @IMPL_NAME@::set_S0(int S0)
-    {
-      gr::thread::scoped_lock guard(d_setlock);
-      d_S0 = S0;
-    }
-
-    void @IMPL_NAME@::set_SK(int SK)
-    {
-      gr::thread::scoped_lock guard(d_setlock);
-      d_SK = SK;
-    }
-
-    void
-    @IMPL_NAME@::set_TYPE(digital::trellis_metric_type_t type)
-    {
-      gr::thread::scoped_lock guard(d_setlock);
-      d_TYPE = type;
-    }
-
-    void
-    @IMPL_NAME@::set_TABLE(const std::vector<@I_TYPE@> &table)
-    {
-      gr::thread::scoped_lock guard(d_setlock);
-      d_TABLE = table;
-    }
-
-    @IMPL_NAME@::~@IMPL_NAME@()
-    {
-    }
-
-    void
-    @IMPL_NAME@::forecast(int noutput_items,
-			  gr_vector_int &ninput_items_required)
-    {
-      int input_required =  d_D * noutput_items;
-      unsigned ninputs = ninput_items_required.size();
-      for(unsigned int i = 0; i < ninputs; i++) {
-	ninput_items_required[i] = input_required;
-      }
-    }
-
-    int
-    @IMPL_NAME@::general_work(int noutput_items,
-			      gr_vector_int &ninput_items,
-			      gr_vector_const_void_star &input_items,
-			      gr_vector_void_star &output_items)
-    {
-      gr::thread::scoped_lock guard(d_setlock);
-      int nstreams = input_items.size();
-      int nblocks = noutput_items / d_K;
-
-      for(int m=0;m<nstreams;m++) {
-	const @I_TYPE@ *in = (const @I_TYPE@*)input_items[m];
-	@O_TYPE@ *out = (@O_TYPE@*)output_items[m];
-
-	for(int n=0;n<nblocks;n++) {
-	  viterbi_algorithm_combined(d_FSM.I(), d_FSM.S(), d_FSM.O(),
-				     d_FSM.NS(), d_FSM.OS(), d_FSM.PS(),
-				     d_FSM.PI(), d_K,d_S0, d_SK, d_D,
-				     d_TABLE, d_TYPE,
-				     &(in[n*d_K*d_D]), &(out[n*d_K]));
-	}
-      }
-
-      consume_each(d_D * noutput_items);
-      return noutput_items;
-    }
-
-  } /* namespace trellis */
-} /* namespace gr */
-
diff --git a/gr-trellis/lib/viterbi_combined_XX_impl.h.t b/gr-trellis/lib/viterbi_combined_XX_impl.h.t
deleted file mode 100644
index 788e609895..0000000000
--- a/gr-trellis/lib/viterbi_combined_XX_impl.h.t
+++ /dev/null
@@ -1,81 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gnuradio/trellis/@BASE_NAME@.h>
-
-namespace gr {
-  namespace trellis {
-
-    class @IMPL_NAME@ : public @BASE_NAME@
-    {
-    private:
-      fsm d_FSM;
-      int d_K;
-      int d_S0;
-      int d_SK;
-      int d_D;
-      std::vector<@I_TYPE@> d_TABLE;
-      digital::trellis_metric_type_t d_TYPE;
-      //std::vector<int> d_trace;
-
-    public:
-      @IMPL_NAME@(const fsm &FSM, int K,
-		  int S0, int SK, int D,
-		  const std::vector<@I_TYPE@> &TABLE,
-		  digital::trellis_metric_type_t TYPE);
-      ~@IMPL_NAME@();
-
-      fsm FSM() const  { return d_FSM; }
-      int K()  const { return d_K; }
-      int S0()  const { return d_S0; }
-      int SK()  const { return d_SK; }
-      int D()  const { return d_D; }
-      std::vector<@I_TYPE@> TABLE() const { return d_TABLE; }
-      digital::trellis_metric_type_t TYPE() const { return d_TYPE; }
-      //std::vector<int> trace() const { return d_trace; }
-
-      void set_FSM(const fsm &FSM);
-      void set_K(int K);
-      void set_S0(int S0);
-      void set_SK(int SK);
-      void set_D(int D);
-      void set_TABLE(const std::vector<@I_TYPE@> &table);
-      void set_TYPE(digital::trellis_metric_type_t type);
-
-      void forecast(int noutput_items,
-		    gr_vector_int &ninput_items_required);
-
-      int general_work(int noutput_items,
-		       gr_vector_int &ninput_items,
-		       gr_vector_const_void_star &input_items,
-		       gr_vector_void_star &output_items);
-    };
-
-  } /* namespace trellis */
-} /* namespace gr */
-
-#endif /* @GUARD_NAME@ */
diff --git a/gr-trellis/lib/viterbi_combined_impl.cc b/gr-trellis/lib/viterbi_combined_impl.cc
new file mode 100644
index 0000000000..e552f5a9b9
--- /dev/null
+++ b/gr-trellis/lib/viterbi_combined_impl.cc
@@ -0,0 +1,176 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2010,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "viterbi_combined_impl.h"
+#include <gnuradio/io_signature.h>
+#include <iostream>
+
+namespace gr {
+  namespace trellis {
+
+    template <class IN_T,class OUT_T>
+    typename viterbi_combined<IN_T,OUT_T>::sptr
+    viterbi_combined<IN_T,OUT_T>::make(const fsm &FSM, int K,
+		      int S0, int SK, int D,
+		      const std::vector<IN_T> &TABLE,
+		      digital::trellis_metric_type_t TYPE)
+    {
+      return gnuradio::get_initial_sptr
+	(new viterbi_combined_impl<IN_T,OUT_T>(FSM, K, S0, SK, D, TABLE,TYPE));
+    }
+
+    template <class IN_T,class OUT_T>
+    viterbi_combined_impl<IN_T,OUT_T>::viterbi_combined_impl(const fsm &FSM, int K,
+			     int S0, int SK, int D,
+			     const std::vector<IN_T> &TABLE,
+			     digital::trellis_metric_type_t TYPE)
+    : block("viterbi_combined<IN_T,OUT_T>",
+	       io_signature::make(1, -1, sizeof(IN_T)),
+	       io_signature::make(1, -1, sizeof(OUT_T))),
+      d_FSM(FSM), d_K(K), d_S0(S0), d_SK(SK), d_D(D),
+      d_TABLE(TABLE), d_TYPE(TYPE)//,
+      //d_trace(FSM.S()*K)
+    {
+      this->set_relative_rate(1.0 / ((double)d_D));
+      this->set_output_multiple(d_K);
+    }
+
+    template <class IN_T,class OUT_T>
+    void
+    viterbi_combined_impl<IN_T,OUT_T>::set_K(int K)
+    {
+      gr::thread::scoped_lock guard(this->d_setlock);
+      d_K = K;
+      this->set_output_multiple(d_K);
+    }
+
+    template <class IN_T,class OUT_T>
+    void
+    viterbi_combined_impl<IN_T,OUT_T>::set_D(int D)
+    {
+      gr::thread::scoped_lock guard(this->d_setlock);
+      d_D = D;
+      this->set_relative_rate(1.0 / ((double)d_D));
+    }
+
+    template <class IN_T,class OUT_T>
+    void viterbi_combined_impl<IN_T,OUT_T>::set_FSM(const fsm &FSM)
+    {
+      gr::thread::scoped_lock guard(this->d_setlock);
+      d_FSM = FSM;
+    }
+
+    template <class IN_T,class OUT_T>
+    void viterbi_combined_impl<IN_T,OUT_T>::set_S0(int S0)
+    {
+      gr::thread::scoped_lock guard(this->d_setlock);
+      d_S0 = S0;
+    }
+
+    template <class IN_T,class OUT_T>
+    void viterbi_combined_impl<IN_T,OUT_T>::set_SK(int SK)
+    {
+      gr::thread::scoped_lock guard(this->d_setlock);
+      d_SK = SK;
+    }
+
+    template <class IN_T,class OUT_T>
+    void
+    viterbi_combined_impl<IN_T,OUT_T>::set_TYPE(digital::trellis_metric_type_t type)
+    {
+      gr::thread::scoped_lock guard(this->d_setlock);
+      d_TYPE = type;
+    }
+
+    template <class IN_T,class OUT_T>
+    void
+    viterbi_combined_impl<IN_T,OUT_T>::set_TABLE(const std::vector<IN_T> &table)
+    {
+      gr::thread::scoped_lock guard(this->d_setlock);
+      d_TABLE = table;
+    }
+
+    template <class IN_T,class OUT_T>
+    viterbi_combined_impl<IN_T,OUT_T>::~viterbi_combined_impl()
+    {
+    }
+
+    template <class IN_T,class OUT_T>
+    void
+    viterbi_combined_impl<IN_T,OUT_T>::forecast(int noutput_items,
+			  gr_vector_int &ninput_items_required)
+    {
+      int input_required =  d_D * noutput_items;
+      unsigned ninputs = ninput_items_required.size();
+      for(unsigned int i = 0; i < ninputs; i++) {
+	ninput_items_required[i] = input_required;
+      }
+    }
+
+    template <class IN_T,class OUT_T>
+    int
+    viterbi_combined_impl<IN_T,OUT_T>::general_work(int noutput_items,
+			      gr_vector_int &ninput_items,
+			      gr_vector_const_void_star &input_items,
+			      gr_vector_void_star &output_items)
+    {
+      gr::thread::scoped_lock guard(this->d_setlock);
+      int nstreams = input_items.size();
+      int nblocks = noutput_items / d_K;
+
+      for(int m=0;m<nstreams;m++) {
+	const IN_T *in = (const IN_T*)input_items[m];
+	OUT_T *out = (OUT_T*)output_items[m];
+
+	for(int n=0;n<nblocks;n++) {
+	  viterbi_algorithm_combined(d_FSM.I(), d_FSM.S(), d_FSM.O(),
+				     d_FSM.NS(), d_FSM.OS(), d_FSM.PS(),
+				     d_FSM.PI(), d_K,d_S0, d_SK, d_D,
+				     d_TABLE, d_TYPE,
+				     &(in[n*d_K*d_D]), &(out[n*d_K]));
+	}
+      }
+
+      this->consume_each(d_D * noutput_items);
+      return noutput_items;
+    }
+
+    template class viterbi_combined<std::int16_t, std::uint8_t>;
+    template class viterbi_combined<std::int16_t, std::int16_t>;
+    template class viterbi_combined<std::int16_t, std::int32_t>;
+    template class viterbi_combined<std::int32_t, std::uint8_t>;
+    template class viterbi_combined<std::int32_t, std::int16_t>;
+    template class viterbi_combined<std::int32_t, std::int32_t>;
+    template class viterbi_combined<float, std::uint8_t>;
+    template class viterbi_combined<float, std::int16_t>;
+    template class viterbi_combined<float, std::int32_t>;
+    template class viterbi_combined<gr_complex, std::uint8_t>;
+    template class viterbi_combined<gr_complex, std::int16_t>;
+    template class viterbi_combined<gr_complex, std::int32_t>;
+
+
+  } /* namespace trellis */
+} /* namespace gr */
diff --git a/gr-trellis/lib/viterbi_combined_impl.h b/gr-trellis/lib/viterbi_combined_impl.h
new file mode 100644
index 0000000000..e83114673f
--- /dev/null
+++ b/gr-trellis/lib/viterbi_combined_impl.h
@@ -0,0 +1,80 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef VITERBI_COMBINED_IMPL_H
+#define VITERBI_COMBINED_IMPL_H
+
+#include <gnuradio/trellis/viterbi_combined.h>
+
+namespace gr {
+  namespace trellis {
+
+    template <class IN_T,class OUT_T>
+    class viterbi_combined_impl : public viterbi_combined<IN_T,OUT_T>
+    {
+    private:
+      fsm d_FSM;
+      int d_K;
+      int d_S0;
+      int d_SK;
+      int d_D;
+      std::vector<IN_T> d_TABLE;
+      digital::trellis_metric_type_t d_TYPE;
+      //std::vector<int> d_trace;
+
+    public:
+      viterbi_combined_impl(const fsm &FSM, int K,
+		  int S0, int SK, int D,
+		  const std::vector<IN_T> &TABLE,
+		  digital::trellis_metric_type_t TYPE);
+      ~viterbi_combined_impl();
+
+      fsm FSM() const  { return d_FSM; }
+      int K()  const { return d_K; }
+      int S0()  const { return d_S0; }
+      int SK()  const { return d_SK; }
+      int D()  const { return d_D; }
+      std::vector<IN_T> TABLE() const { return d_TABLE; }
+      digital::trellis_metric_type_t TYPE() const { return d_TYPE; }
+      //std::vector<int> trace() const { return d_trace; }
+
+      void set_FSM(const fsm &FSM);
+      void set_K(int K);
+      void set_S0(int S0);
+      void set_SK(int SK);
+      void set_D(int D);
+      void set_TABLE(const std::vector<IN_T> &table);
+      void set_TYPE(digital::trellis_metric_type_t type);
+
+      void forecast(int noutput_items,
+		    gr_vector_int &ninput_items_required);
+
+      int general_work(int noutput_items,
+		       gr_vector_int &ninput_items,
+		       gr_vector_const_void_star &input_items,
+		       gr_vector_void_star &output_items);
+    };
+
+  } /* namespace trellis */
+} /* namespace gr */
+
+#endif /* VITERBI_COMBINED_IMPL_H */
diff --git a/gr-trellis/lib/viterbi_impl.cc b/gr-trellis/lib/viterbi_impl.cc
new file mode 100644
index 0000000000..4b5f428d60
--- /dev/null
+++ b/gr-trellis/lib/viterbi_impl.cc
@@ -0,0 +1,135 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2010,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "viterbi_impl.h"
+#include <gnuradio/io_signature.h>
+#include <iostream>
+
+namespace gr {
+  namespace trellis {
+
+    template <class T>
+    typename viterbi<T>::sptr
+    viterbi<T>::make(const fsm &FSM, int K,
+		      int S0, int SK)
+    {
+      return gnuradio::get_initial_sptr
+	(new viterbi_impl<T>(FSM, K, S0, SK));
+    }
+
+    template <class T>
+    viterbi_impl<T>::viterbi_impl(const fsm &FSM, int K,
+			     int S0, int SK)
+    : block("viterbi",
+	       io_signature::make(1, -1, sizeof(float)),
+	       io_signature::make(1, -1, sizeof(T))),
+      d_FSM(FSM), d_K(K), d_S0(S0), d_SK(SK)//,
+      //d_trace(FSM.S()*K)
+    {
+      this->set_relative_rate(1.0 / ((double)d_FSM.O()));
+      this->set_output_multiple(d_K);
+    }
+
+    template <class T>
+    void viterbi_impl<T>::set_FSM(const fsm &FSM) 
+    { 
+      gr::thread::scoped_lock guard(this->d_setlock);
+      d_FSM = FSM; 
+      this->set_relative_rate(1.0 / ((double)d_FSM.O()));
+    }
+
+    template <class T>
+    void viterbi_impl<T>::set_K(int K) 
+    { 
+      gr::thread::scoped_lock guard(this->d_setlock);
+      d_K = K; 
+      this->set_output_multiple(d_K);
+    }
+
+    template <class T>
+    void viterbi_impl<T>::set_S0(int S0) 
+    { 
+      gr::thread::scoped_lock guard(this->d_setlock);
+      d_S0 = S0; 
+    }
+
+    template <class T>
+    void viterbi_impl<T>::set_SK(int SK) 
+    { 
+      gr::thread::scoped_lock guard(this->d_setlock);
+      d_SK = SK; 
+    }
+
+    template <class T>
+    viterbi_impl<T>::~viterbi_impl()
+    {
+    }
+
+    template <class T>
+    void
+    viterbi_impl<T>::forecast(int noutput_items,
+			  gr_vector_int &ninput_items_required)
+    {
+      int input_required =  d_FSM.O() * noutput_items;
+      unsigned ninputs = ninput_items_required.size();
+      for(unsigned int i = 0; i < ninputs; i++) {
+	ninput_items_required[i] = input_required;
+      }
+    }
+
+    template <class T>
+    int
+    viterbi_impl<T>::general_work(int noutput_items,
+			      gr_vector_int &ninput_items,
+			      gr_vector_const_void_star &input_items,
+			      gr_vector_void_star &output_items)
+    {
+      gr::thread::scoped_lock guard(this->d_setlock);
+      int nstreams = input_items.size();
+      int nblocks = noutput_items / d_K;
+
+      for(int m = 0; m < nstreams; m++) {
+	const float *in = (const float*)input_items[m];
+	T *out = (T*)output_items[m];
+
+	for(int n = 0; n < nblocks; n++) {
+	  viterbi_algorithm(d_FSM.I(), d_FSM.S(), d_FSM.O(),
+			    d_FSM.NS(), d_FSM.OS(), d_FSM.PS(),
+			    d_FSM.PI(), d_K,d_S0, d_SK,
+			    &(in[n*d_K*d_FSM.O()]), &(out[n*d_K]));
+	}
+      }
+
+      this->consume_each(d_FSM.O() * noutput_items);
+      return noutput_items;
+    }
+
+template class viterbi<std::uint8_t>;
+template class viterbi<std::int16_t>;
+template class viterbi<std::int32_t>;
+  } /* namespace trellis */
+} /* namespace gr */
diff --git a/gr-trellis/lib/viterbi_impl.h b/gr-trellis/lib/viterbi_impl.h
new file mode 100644
index 0000000000..c9f40a0b79
--- /dev/null
+++ b/gr-trellis/lib/viterbi_impl.h
@@ -0,0 +1,69 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2012,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef VITERBI_IMPL_H
+#define VITERBI_IMPL_H
+
+#include <gnuradio/trellis/viterbi.h>
+
+namespace gr {
+  namespace trellis {
+
+template<class T>
+    class viterbi_impl : public  viterbi<T>
+    {
+    private:
+      fsm d_FSM;
+      int d_K;
+      int d_S0;
+      int d_SK;
+      //std::vector<int> d_trace;
+
+    public:
+      viterbi_impl(const fsm &FSM, int K,
+		  int S0, int SK);
+      ~viterbi_impl();
+
+      fsm FSM() const  { return d_FSM; }
+      int K()  const { return d_K; }
+      int S0()  const { return d_S0; }
+      int SK()  const { return d_SK; }
+
+      void set_FSM(const fsm &FSM);
+      void set_K(int K);
+      void set_S0(int S0);
+      void set_SK(int SK);
+      //std::vector<int> trace () const { return d_trace; }
+
+      void forecast(int noutput_items,
+		    gr_vector_int &ninput_items_required);
+      int general_work(int noutput_items,
+		       gr_vector_int &ninput_items,
+		       gr_vector_const_void_star &input_items,
+		       gr_vector_void_star &output_items);
+    };
+
+  } /* namespace trellis */
+} /* namespace gr */
+
+#endif /* VITERBI_IMPL_H */
diff --git a/gr-trellis/swig/CMakeLists.txt b/gr-trellis/swig/CMakeLists.txt
index 14012abad5..1f9b7679df 100644
--- a/gr-trellis/swig/CMakeLists.txt
+++ b/gr-trellis/swig/CMakeLists.txt
@@ -59,7 +59,6 @@ foreach(swigfile ${GR_SWIG_TRELLIS_IFILES})
     ${CMAKE_CURRENT_BINARY_DIR}/../include/gnuradio/trellis
   )
   set(GR_SWIG_DOCS_TARGET_DEPS runtime_swig_swig_doc)
-  set(GR_SWIG_TARGET_DEPS trellis_generated_includes)
   set(GR_SWIG_LIBRARIES gnuradio-trellis gnuradio-digital)
   GR_SWIG_MAKE(${swigfile} ${swigfile}.i)
 
diff --git a/gr-trellis/swig/trellis_swig0.i b/gr-trellis/swig/trellis_swig0.i
index 9f309c5ca3..596a043db4 100644
--- a/gr-trellis/swig/trellis_swig0.i
+++ b/gr-trellis/swig/trellis_swig0.i
@@ -38,80 +38,44 @@
 #include "gnuradio/trellis/permutation.h"
 #include "gnuradio/trellis/siso_combined_f.h"
 #include "gnuradio/trellis/siso_f.h"
-#include "gnuradio/trellis/encoder_bb.h"
-#include "gnuradio/trellis/encoder_bs.h"
-#include "gnuradio/trellis/encoder_bi.h"
-#include "gnuradio/trellis/encoder_ss.h"
-#include "gnuradio/trellis/encoder_si.h"
-#include "gnuradio/trellis/encoder_ii.h"
-#include "gnuradio/trellis/sccc_encoder_bb.h"
-#include "gnuradio/trellis/sccc_encoder_bs.h"
-#include "gnuradio/trellis/sccc_encoder_bi.h"
-#include "gnuradio/trellis/sccc_encoder_ss.h"
-#include "gnuradio/trellis/sccc_encoder_si.h"
-#include "gnuradio/trellis/sccc_encoder_ii.h"
-#include "gnuradio/trellis/pccc_encoder_bb.h"
-#include "gnuradio/trellis/pccc_encoder_bs.h"
-#include "gnuradio/trellis/pccc_encoder_bi.h"
-#include "gnuradio/trellis/pccc_encoder_ss.h"
-#include "gnuradio/trellis/pccc_encoder_si.h"
-#include "gnuradio/trellis/pccc_encoder_ii.h"
-#include "gnuradio/trellis/metrics_s.h"
-#include "gnuradio/trellis/metrics_i.h"
-#include "gnuradio/trellis/metrics_f.h"
-#include "gnuradio/trellis/metrics_c.h"
+#include "gnuradio/trellis/encoder.h"
+#include "gnuradio/trellis/sccc_encoder.h"
+#include "gnuradio/trellis/pccc_encoder.h"
+#include "gnuradio/trellis/metrics.h"
 %}
 
 %include "gnuradio/trellis/constellation_metrics_cf.h"
 %include "gnuradio/trellis/permutation.h"
 %include "gnuradio/trellis/siso_combined_f.h"
 %include "gnuradio/trellis/siso_f.h"
-%include "gnuradio/trellis/encoder_bb.h"
-%include "gnuradio/trellis/encoder_bs.h"
-%include "gnuradio/trellis/encoder_bi.h"
-%include "gnuradio/trellis/encoder_ss.h"
-%include "gnuradio/trellis/encoder_si.h"
-%include "gnuradio/trellis/encoder_ii.h"
-%include "gnuradio/trellis/sccc_encoder_bb.h"
-%include "gnuradio/trellis/sccc_encoder_bs.h"
-%include "gnuradio/trellis/sccc_encoder_bi.h"
-%include "gnuradio/trellis/sccc_encoder_ss.h"
-%include "gnuradio/trellis/sccc_encoder_si.h"
-%include "gnuradio/trellis/sccc_encoder_ii.h"
-%include "gnuradio/trellis/pccc_encoder_bb.h"
-%include "gnuradio/trellis/pccc_encoder_bs.h"
-%include "gnuradio/trellis/pccc_encoder_bi.h"
-%include "gnuradio/trellis/pccc_encoder_ss.h"
-%include "gnuradio/trellis/pccc_encoder_si.h"
-%include "gnuradio/trellis/pccc_encoder_ii.h"
-%include "gnuradio/trellis/metrics_s.h"
-%include "gnuradio/trellis/metrics_i.h"
-%include "gnuradio/trellis/metrics_f.h"
-%include "gnuradio/trellis/metrics_c.h"
+%include "gnuradio/trellis/encoder.h"
+%include "gnuradio/trellis/sccc_encoder.h"
+%include "gnuradio/trellis/pccc_encoder.h"
+%include "gnuradio/trellis/metrics.h"
 
 GR_SWIG_BLOCK_MAGIC2(trellis, constellation_metrics_cf);
 GR_SWIG_BLOCK_MAGIC2(trellis, permutation);
 GR_SWIG_BLOCK_MAGIC2(trellis, siso_combined_f);
 GR_SWIG_BLOCK_MAGIC2(trellis, siso_f);
-GR_SWIG_BLOCK_MAGIC2(trellis, encoder_bb);
-GR_SWIG_BLOCK_MAGIC2(trellis, encoder_bs);
-GR_SWIG_BLOCK_MAGIC2(trellis, encoder_bi);
-GR_SWIG_BLOCK_MAGIC2(trellis, encoder_ss);
-GR_SWIG_BLOCK_MAGIC2(trellis, encoder_si);
-GR_SWIG_BLOCK_MAGIC2(trellis, encoder_ii);
-GR_SWIG_BLOCK_MAGIC2(trellis, sccc_encoder_bb);
-GR_SWIG_BLOCK_MAGIC2(trellis, sccc_encoder_bs);
-GR_SWIG_BLOCK_MAGIC2(trellis, sccc_encoder_bi);
-GR_SWIG_BLOCK_MAGIC2(trellis, sccc_encoder_ss);
-GR_SWIG_BLOCK_MAGIC2(trellis, sccc_encoder_si);
-GR_SWIG_BLOCK_MAGIC2(trellis, sccc_encoder_ii);
-GR_SWIG_BLOCK_MAGIC2(trellis, pccc_encoder_bb);
-GR_SWIG_BLOCK_MAGIC2(trellis, pccc_encoder_bs);
-GR_SWIG_BLOCK_MAGIC2(trellis, pccc_encoder_bi);
-GR_SWIG_BLOCK_MAGIC2(trellis, pccc_encoder_ss);
-GR_SWIG_BLOCK_MAGIC2(trellis, pccc_encoder_si);
-GR_SWIG_BLOCK_MAGIC2(trellis, pccc_encoder_ii);
-GR_SWIG_BLOCK_MAGIC2(trellis, metrics_s);
-GR_SWIG_BLOCK_MAGIC2(trellis, metrics_i);
-GR_SWIG_BLOCK_MAGIC2(trellis, metrics_f);
-GR_SWIG_BLOCK_MAGIC2(trellis, metrics_c);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, encoder_bb, encoder<std::uint8_t,std::uint8_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, encoder_bs, encoder<std::uint8_t,std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, encoder_bi, encoder<std::uint8_t,std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, encoder_ss, encoder<std::int16_t,std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, encoder_si, encoder<std::int16_t,std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, encoder_ii, encoder<std::int32_t,std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, sccc_encoder_bb, sccc_encoder<std::uint8_t,std::uint8_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, sccc_encoder_bs, sccc_encoder<std::uint8_t,std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, sccc_encoder_bi, sccc_encoder<std::uint8_t,std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, sccc_encoder_ss, sccc_encoder<std::int16_t,std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, sccc_encoder_si, sccc_encoder<std::int16_t,std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, sccc_encoder_ii, sccc_encoder<std::int32_t,std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, pccc_encoder_bb, pccc_encoder<std::uint8_t,std::uint8_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, pccc_encoder_bs, pccc_encoder<std::uint8_t,std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, pccc_encoder_bi, pccc_encoder<std::uint8_t,std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, pccc_encoder_ss, pccc_encoder<std::int16_t,std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, pccc_encoder_si, pccc_encoder<std::int16_t,std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, pccc_encoder_ii, pccc_encoder<std::int32_t,std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, metrics_s, metrics<std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, metrics_i, metrics<std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, metrics_f, metrics<float>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, metrics_c, metrics<gr_complex>);
diff --git a/gr-trellis/swig/trellis_swig1.i b/gr-trellis/swig/trellis_swig1.i
index 6481aee245..7a8728efd2 100644
--- a/gr-trellis/swig/trellis_swig1.i
+++ b/gr-trellis/swig/trellis_swig1.i
@@ -33,105 +33,52 @@
 %include "gnuradio/trellis/interleaver.h"
 
 %{
-#include "gnuradio/trellis/pccc_decoder_b.h"
-#include "gnuradio/trellis/pccc_decoder_s.h"
-#include "gnuradio/trellis/pccc_decoder_i.h"
-#include "gnuradio/trellis/pccc_decoder_combined_fb.h"
-#include "gnuradio/trellis/pccc_decoder_combined_fs.h"
-#include "gnuradio/trellis/pccc_decoder_combined_fi.h"
-#include "gnuradio/trellis/pccc_decoder_combined_cb.h"
-#include "gnuradio/trellis/pccc_decoder_combined_cs.h"
-#include "gnuradio/trellis/pccc_decoder_combined_ci.h"
-#include "gnuradio/trellis/viterbi_b.h"
-#include "gnuradio/trellis/viterbi_s.h"
-#include "gnuradio/trellis/viterbi_i.h"
-#include "gnuradio/trellis/viterbi_combined_sb.h"
-#include "gnuradio/trellis/viterbi_combined_ss.h"
-#include "gnuradio/trellis/viterbi_combined_si.h"
-#include "gnuradio/trellis/viterbi_combined_ib.h"
-#include "gnuradio/trellis/viterbi_combined_is.h"
-#include "gnuradio/trellis/viterbi_combined_ii.h"
-#include "gnuradio/trellis/viterbi_combined_fb.h"
-#include "gnuradio/trellis/viterbi_combined_fs.h"
-#include "gnuradio/trellis/viterbi_combined_fi.h"
-#include "gnuradio/trellis/viterbi_combined_cb.h"
-#include "gnuradio/trellis/viterbi_combined_cs.h"
-#include "gnuradio/trellis/viterbi_combined_ci.h"
-#include "gnuradio/trellis/sccc_decoder_b.h"
-#include "gnuradio/trellis/sccc_decoder_s.h"
-#include "gnuradio/trellis/sccc_decoder_i.h"
-#include "gnuradio/trellis/sccc_decoder_combined_fb.h"
-#include "gnuradio/trellis/sccc_decoder_combined_fs.h"
-#include "gnuradio/trellis/sccc_decoder_combined_fi.h"
-#include "gnuradio/trellis/sccc_decoder_combined_cb.h"
-#include "gnuradio/trellis/sccc_decoder_combined_cs.h"
-#include "gnuradio/trellis/sccc_decoder_combined_ci.h"
+#include "gnuradio/trellis/pccc_decoder_blk.h"
+#include "gnuradio/trellis/pccc_decoder_combined_blk.h"
+#include "gnuradio/trellis/viterbi.h"
+#include "gnuradio/trellis/viterbi_combined.h"
+#include "gnuradio/trellis/sccc_decoder_blk.h"
+#include "gnuradio/trellis/sccc_decoder_combined_blk.h"
 %}
 
-%include "gnuradio/trellis/pccc_decoder_b.h"
-%include "gnuradio/trellis/pccc_decoder_s.h"
-%include "gnuradio/trellis/pccc_decoder_i.h"
-%include "gnuradio/trellis/pccc_decoder_combined_fb.h"
-%include "gnuradio/trellis/pccc_decoder_combined_fs.h"
-%include "gnuradio/trellis/pccc_decoder_combined_fi.h"
-%include "gnuradio/trellis/pccc_decoder_combined_cb.h"
-%include "gnuradio/trellis/pccc_decoder_combined_cs.h"
-%include "gnuradio/trellis/pccc_decoder_combined_ci.h"
-%include "gnuradio/trellis/viterbi_b.h"
-%include "gnuradio/trellis/viterbi_s.h"
-%include "gnuradio/trellis/viterbi_i.h"
-%include "gnuradio/trellis/viterbi_combined_sb.h"
-%include "gnuradio/trellis/viterbi_combined_ss.h"
-%include "gnuradio/trellis/viterbi_combined_si.h"
-%include "gnuradio/trellis/viterbi_combined_ib.h"
-%include "gnuradio/trellis/viterbi_combined_is.h"
-%include "gnuradio/trellis/viterbi_combined_ii.h"
-%include "gnuradio/trellis/viterbi_combined_fb.h"
-%include "gnuradio/trellis/viterbi_combined_fs.h"
-%include "gnuradio/trellis/viterbi_combined_fi.h"
-%include "gnuradio/trellis/viterbi_combined_cb.h"
-%include "gnuradio/trellis/viterbi_combined_cs.h"
-%include "gnuradio/trellis/viterbi_combined_ci.h"
-%include "gnuradio/trellis/sccc_decoder_b.h"
-%include "gnuradio/trellis/sccc_decoder_s.h"
-%include "gnuradio/trellis/sccc_decoder_i.h"
-%include "gnuradio/trellis/sccc_decoder_combined_fb.h"
-%include "gnuradio/trellis/sccc_decoder_combined_fs.h"
-%include "gnuradio/trellis/sccc_decoder_combined_fi.h"
-%include "gnuradio/trellis/sccc_decoder_combined_cb.h"
-%include "gnuradio/trellis/sccc_decoder_combined_cs.h"
-%include "gnuradio/trellis/sccc_decoder_combined_ci.h"
+%include "gnuradio/trellis/pccc_decoder_blk.h"
+%include "gnuradio/trellis/pccc_decoder_combined_blk.h"
+%include "gnuradio/trellis/viterbi.h"
+%include "gnuradio/trellis/viterbi_combined.h"
+%include "gnuradio/trellis/sccc_decoder_blk.h"
+%include "gnuradio/trellis/sccc_decoder_combined_blk.h"
 
-GR_SWIG_BLOCK_MAGIC2(trellis, pccc_decoder_b);
-GR_SWIG_BLOCK_MAGIC2(trellis, pccc_decoder_s);
-GR_SWIG_BLOCK_MAGIC2(trellis, pccc_decoder_i);
-GR_SWIG_BLOCK_MAGIC2(trellis, pccc_decoder_combined_fb);
-GR_SWIG_BLOCK_MAGIC2(trellis, pccc_decoder_combined_fs);
-GR_SWIG_BLOCK_MAGIC2(trellis, pccc_decoder_combined_fi);
-GR_SWIG_BLOCK_MAGIC2(trellis, pccc_decoder_combined_cb);
-GR_SWIG_BLOCK_MAGIC2(trellis, pccc_decoder_combined_cs);
-GR_SWIG_BLOCK_MAGIC2(trellis, pccc_decoder_combined_ci);
-GR_SWIG_BLOCK_MAGIC2(trellis, viterbi_b);
-GR_SWIG_BLOCK_MAGIC2(trellis, viterbi_s);
-GR_SWIG_BLOCK_MAGIC2(trellis, viterbi_i);
-GR_SWIG_BLOCK_MAGIC2(trellis, viterbi_combined_sb);
-GR_SWIG_BLOCK_MAGIC2(trellis, viterbi_combined_ss);
-GR_SWIG_BLOCK_MAGIC2(trellis, viterbi_combined_si);
-GR_SWIG_BLOCK_MAGIC2(trellis, viterbi_combined_ib);
-GR_SWIG_BLOCK_MAGIC2(trellis, viterbi_combined_is);
-GR_SWIG_BLOCK_MAGIC2(trellis, viterbi_combined_ii);
-GR_SWIG_BLOCK_MAGIC2(trellis, viterbi_combined_fb);
-GR_SWIG_BLOCK_MAGIC2(trellis, viterbi_combined_fs);
-GR_SWIG_BLOCK_MAGIC2(trellis, viterbi_combined_fi);
-GR_SWIG_BLOCK_MAGIC2(trellis, viterbi_combined_cb);
-GR_SWIG_BLOCK_MAGIC2(trellis, viterbi_combined_cs);
-GR_SWIG_BLOCK_MAGIC2(trellis, viterbi_combined_ci);
-GR_SWIG_BLOCK_MAGIC2(trellis, sccc_decoder_b);
-GR_SWIG_BLOCK_MAGIC2(trellis, sccc_decoder_s);
-GR_SWIG_BLOCK_MAGIC2(trellis, sccc_decoder_i);
-GR_SWIG_BLOCK_MAGIC2(trellis, sccc_decoder_combined_fb);
-GR_SWIG_BLOCK_MAGIC2(trellis, sccc_decoder_combined_fs);
-GR_SWIG_BLOCK_MAGIC2(trellis, sccc_decoder_combined_fi);
-GR_SWIG_BLOCK_MAGIC2(trellis, sccc_decoder_combined_cb);
-GR_SWIG_BLOCK_MAGIC2(trellis, sccc_decoder_combined_cs);
-GR_SWIG_BLOCK_MAGIC2(trellis, sccc_decoder_combined_ci);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, pccc_decoder_b, pccc_decoder_blk<std::uint8_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, pccc_decoder_s, pccc_decoder_blk<std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, pccc_decoder_i, pccc_decoder_blk<std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, viterbi_b, viterbi<std::uint8_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, viterbi_s, viterbi<std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, viterbi_i, viterbi<std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, viterbi_combined_sb, viterbi_combined<std::int16_t,std::uint8_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, viterbi_combined_ss, viterbi_combined<std::int16_t,std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, viterbi_combined_si, viterbi_combined<std::int16_t,std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, viterbi_combined_ib, viterbi_combined<std::int32_t,std::uint8_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, viterbi_combined_is, viterbi_combined<std::int32_t,std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, viterbi_combined_ii, viterbi_combined<std::int32_t,std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, viterbi_combined_fb, viterbi_combined<float,std::uint8_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, viterbi_combined_fs, viterbi_combined<float,std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, viterbi_combined_fi, viterbi_combined<float,std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, viterbi_combined_cb, viterbi_combined<gr_complex,std::uint8_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, viterbi_combined_cs, viterbi_combined<gr_complex,std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, viterbi_combined_ci, viterbi_combined<gr_complex,std::int32_t>);
+
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, sccc_decoder_b, sccc_decoder_blk<std::uint8_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, sccc_decoder_s, sccc_decoder_blk<std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, sccc_decoder_i, sccc_decoder_blk<std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, sccc_decoder_combined_fb, sccc_decoder_combined_blk<float, std::uint8_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, sccc_decoder_combined_fs, sccc_decoder_combined_blk<float, std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, sccc_decoder_combined_fi, sccc_decoder_combined_blk<float, std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, sccc_decoder_combined_cb, sccc_decoder_combined_blk<gr_complex, std::uint8_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, sccc_decoder_combined_cs, sccc_decoder_combined_blk<gr_complex, std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, sccc_decoder_combined_ci, sccc_decoder_combined_blk<gr_complex, std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, pccc_decoder_combined_fb, pccc_decoder_combined_blk<float, std::uint8_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, pccc_decoder_combined_fs, pccc_decoder_combined_blk<float, std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, pccc_decoder_combined_fi, pccc_decoder_combined_blk<float, std::int32_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, pccc_decoder_combined_cb, pccc_decoder_combined_blk<gr_complex, std::uint8_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, pccc_decoder_combined_cs, pccc_decoder_combined_blk<gr_complex, std::int16_t>);
+GR_SWIG_BLOCK_MAGIC2_TMPL(trellis, pccc_decoder_combined_ci, pccc_decoder_combined_blk<gr_complex, std::int32_t>);
-- 
cgit v1.2.3


From a02e23e1889b90a85a9d5f5a86078382471bd8eb Mon Sep 17 00:00:00 2001
From: Andrej Rode <mail@andrejro.de>
Date: Wed, 22 Aug 2018 15:38:18 +0200
Subject: cmake: remove gengen tools

---
 cmake/Modules/GrMiscUtils.cmake                    | 173 ----------------
 docs/doxygen/Doxyfile.in                           |   2 -
 gnuradio-runtime/python/build_utils.py             | 227 --------------------
 gnuradio-runtime/python/build_utils_codes.py       |  53 -----
 .../gr-newmod/cmake/Modules/GrMiscUtils.cmake      | 176 ----------------
 .../python/modtool/gr-newmod/python/build_utils.py | 228 ---------------------
 .../modtool/gr-newmod/python/build_utils_codes.py  |  53 -----
 7 files changed, 912 deletions(-)
 delete mode 100644 gnuradio-runtime/python/build_utils.py
 delete mode 100644 gr-utils/python/modtool/gr-newmod/python/build_utils.py
 delete mode 100644 gr-utils/python/modtool/gr-newmod/python/build_utils_codes.py

(limited to 'docs/doxygen')

diff --git a/cmake/Modules/GrMiscUtils.cmake b/cmake/Modules/GrMiscUtils.cmake
index 6f0c8ac270..920e8adbee 100644
--- a/cmake/Modules/GrMiscUtils.cmake
+++ b/cmake/Modules/GrMiscUtils.cmake
@@ -302,176 +302,3 @@ set(CMAKE_REQUIRED_LIBRARIES -lpthread)
     )
     GR_ADD_COND_DEF(HAVE_SCHED_SETSCHEDULER)
 endmacro(GR_CHECK_LINUX_SCHED_AVAIL)
-
-########################################################################
-# Macros to generate source and header files from template
-########################################################################
-macro(GR_EXPAND_X_H component root)
-
-  include(GrPython)
-
-  file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-"#!${PYTHON_EXECUTABLE}
-
-import sys, os, re
-sys.path.append('${GR_RUNTIME_PYTHONPATH}')
-os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
-os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
-
-if __name__ == '__main__':
-    import build_utils
-    root, inp = sys.argv[1:3]
-    for sig in sys.argv[3:]:
-        name = re.sub ('X+', sig, root)
-        d = build_utils.standard_dict2(name, sig, '${component}')
-        build_utils.expand_template(d, inp)
-")
-
-  #make a list of all the generated headers
-  unset(expanded_files_h)
-  foreach(sig ${ARGN})
-    string(REGEX REPLACE "X+" ${sig} name ${root})
-    list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
-  endforeach(sig)
-  unset(name)
-
-  #create a command to generate the headers
-  add_custom_command(
-    OUTPUT ${expanded_files_h}
-    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
-    COMMAND ${PYTHON_EXECUTABLE} -B
-    ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-    ${root} ${root}.h.t ${ARGN}
-  )
-
-  #install rules for the generated headers
-  list(APPEND generated_includes ${expanded_files_h})
-
-endmacro(GR_EXPAND_X_H)
-
-macro(GR_EXPAND_X_CC_H component root)
-
-  include(GrPython)
-
-  file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-"#!${PYTHON_EXECUTABLE}
-
-import sys, os, re
-sys.path.append('${GR_RUNTIME_PYTHONPATH}')
-os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
-os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
-
-if __name__ == '__main__':
-    import build_utils
-    root, inp = sys.argv[1:3]
-    for sig in sys.argv[3:]:
-        name = re.sub ('X+', sig, root)
-        d = build_utils.standard_impl_dict2(name, sig, '${component}')
-        build_utils.expand_template(d, inp)
-")
-
-  #make a list of all the generated files
-  unset(expanded_files_cc)
-  unset(expanded_files_h)
-  foreach(sig ${ARGN})
-    string(REGEX REPLACE "X+" ${sig} name ${root})
-    list(APPEND expanded_files_cc ${CMAKE_CURRENT_BINARY_DIR}/${name}.cc)
-    list(APPEND expanded_files_h  ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
-  endforeach(sig)
-  unset(name)
-
-  #create a command to generate the source files
-  add_custom_command(
-    OUTPUT ${expanded_files_cc}
-    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.cc.t
-    COMMAND ${PYTHON_EXECUTABLE} -B
-    ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-    ${root} ${root}.cc.t ${ARGN}
-  )
-
-  #create a command to generate the header files
-  add_custom_command(
-    OUTPUT ${expanded_files_h}
-    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
-    COMMAND ${PYTHON_EXECUTABLE} -B
-    ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-    ${root} ${root}.h.t ${ARGN}
-  )
-
-  #make source files depends on headers to force generation
-  set_source_files_properties(${expanded_files_cc}
-    PROPERTIES OBJECT_DEPENDS "${expanded_files_h}"
-  )
-
-  #install rules for the generated files
-  list(APPEND generated_sources ${expanded_files_cc})
-  list(APPEND generated_headers ${expanded_files_h})
-
-endmacro(GR_EXPAND_X_CC_H)
-
-macro(GR_EXPAND_X_CC_H_IMPL component root)
-
-  include(GrPython)
-
-  file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-"#!${PYTHON_EXECUTABLE}
-
-import sys, os, re
-sys.path.append('${GR_RUNTIME_PYTHONPATH}')
-os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
-os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
-
-if __name__ == '__main__':
-    import build_utils
-    root, inp = sys.argv[1:3]
-    for sig in sys.argv[3:]:
-        name = re.sub ('X+', sig, root)
-        d = build_utils.standard_dict(name, sig, '${component}')
-        build_utils.expand_template(d, inp, '_impl')
-")
-
-  #make a list of all the generated files
-  unset(expanded_files_cc_impl)
-  unset(expanded_files_h_impl)
-  unset(expanded_files_h)
-  foreach(sig ${ARGN})
-    string(REGEX REPLACE "X+" ${sig} name ${root})
-    list(APPEND expanded_files_cc_impl ${CMAKE_CURRENT_BINARY_DIR}/${name}_impl.cc)
-    list(APPEND expanded_files_h_impl ${CMAKE_CURRENT_BINARY_DIR}/${name}_impl.h)
-    list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/../include/gnuradio/${component}/${name}.h)
-  endforeach(sig)
-  unset(name)
-
-  #create a command to generate the _impl.cc files
-  add_custom_command(
-    OUTPUT ${expanded_files_cc_impl}
-    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}_impl.cc.t
-    COMMAND ${PYTHON_EXECUTABLE} -B
-    ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-    ${root} ${root}_impl.cc.t ${ARGN}
-  )
-
-  #create a command to generate the _impl.h files
-  add_custom_command(
-    OUTPUT ${expanded_files_h_impl}
-    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}_impl.h.t
-    COMMAND ${PYTHON_EXECUTABLE} -B
-    ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-    ${root} ${root}_impl.h.t ${ARGN}
-  )
-
-  #make _impl.cc source files depend on _impl.h to force generation
-  set_source_files_properties(${expanded_files_cc_impl}
-    PROPERTIES OBJECT_DEPENDS "${expanded_files_h_impl}"
-  )
-
-  #make _impl.h source files depend on headers to force generation
-  set_source_files_properties(${expanded_files_h_impl}
-    PROPERTIES OBJECT_DEPENDS "${expanded_files_h}"
-  )
-
-  #install rules for the generated files
-  list(APPEND generated_sources ${expanded_files_cc_impl})
-  list(APPEND generated_headers ${expanded_files_h_impl})
-
-endmacro(GR_EXPAND_X_CC_H_IMPL)
diff --git a/docs/doxygen/Doxyfile.in b/docs/doxygen/Doxyfile.in
index 3be1cbc23a..698798d762 100644
--- a/docs/doxygen/Doxyfile.in
+++ b/docs/doxygen/Doxyfile.in
@@ -738,8 +738,6 @@ EXCLUDE                = @abs_top_srcdir@/volk \
                          @abs_top_builddir@/dtools \
                          @abs_top_builddir@/gnuradio-runtime/lib/runtime/gr_error_handler.cc \
                          @abs_top_builddir@/gnuradio-runtime/swig \
-                         @abs_top_builddir@/gnuradio-runtime/python/build_utils.py \
-                         @abs_top_builddir@/gnuradio-runtime/python/build_utils_codes.py \
                          @abs_top_builddir@/gnuradio-runtime/python/gnuradio/gr/gr_threading.py \
                          @abs_top_builddir@/gnuradio-runtime/python/gnuradio/gr/gr_threading_23.py \
                          @abs_top_builddir@/gnuradio-runtime/python/gnuradio/gr/gr_threading_24.py \
diff --git a/gnuradio-runtime/python/build_utils.py b/gnuradio-runtime/python/build_utils.py
deleted file mode 100644
index 82a2265cc2..0000000000
--- a/gnuradio-runtime/python/build_utils.py
+++ /dev/null
@@ -1,227 +0,0 @@
-#
-# Copyright 2004,2009,2012 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-"""Misc utilities used at build time
-"""
-from __future__ import unicode_literals
-
-import re, os, os.path
-from build_utils_codes import *
-
-
-# set srcdir to the directory that contains Makefile.am
-try:
-    srcdir = os.environ['srcdir']
-except KeyError as e:
-    srcdir = "."
-srcdir = srcdir + '/'
-
-# set do_makefile to either true or false dependeing on the environment
-try:
-    if os.environ['do_makefile'] == '0':
-        do_makefile = False
-    else:
-        do_makefile = True
-except KeyError as e:
-    do_makefile = False
-
-# set do_sources to either true or false dependeing on the environment
-try:
-    if os.environ['do_sources'] == '0':
-        do_sources = False
-    else:
-        do_sources = True
-except KeyError as e:
-    do_sources = True
-
-name_dict = {}
-
-def log_output_name (name):
-    (base, ext) = os.path.splitext (name)
-    ext = ext[1:]                       # drop the leading '.'
-
-    entry = name_dict.setdefault (ext, [])
-    entry.append (name)
-
-def open_and_log_name (name, dir):
-    global do_sources
-    if do_sources:
-        f = open (name, dir)
-    else:
-        f = None
-    log_output_name (name)
-    return f
-
-def expand_template (d, template_filename, extra = ""):
-    '''Given a dictionary D and a TEMPLATE_FILENAME, expand template into output file
-    '''
-    global do_sources
-    output_extension = extract_extension (template_filename)
-    template = open_src (template_filename, 'r')
-    output_name = d['NAME'] + extra + '.' + output_extension
-    log_output_name (output_name)
-    if do_sources:
-        output = open (output_name, 'w')
-        do_substitution (d, template, output)
-        output.close ()
-    template.close ()
-
-def output_glue (dirname):
-    output_makefile_fragment ()
-    output_ifile_include (dirname)
-
-def output_makefile_fragment ():
-    global do_makefile
-    if not do_makefile:
-        return
-# overwrite the source, which must be writable; this should have been
-# checked for beforehand in the top-level Makefile.gen.gen .
-    f = open (os.path.join (os.environ.get('gendir', os.environ.get('srcdir', '.')), 'Makefile.gen'), 'w')
-    f.write ('#\n# This file is machine generated.  All edits will be overwritten\n#\n')
-    output_subfrag (f, 'h')
-    output_subfrag (f, 'i')
-    output_subfrag (f, 'cc')
-    f.close ()
-
-def output_ifile_include (dirname):
-    global do_sources
-    if do_sources:
-        f = open ('%s_generated.i' % (dirname,), 'w')
-        f.write ('//\n// This file is machine generated.  All edits will be overwritten\n//\n')
-        files = name_dict.setdefault ('i', [])
-        files.sort ()
-        f.write ('%{\n')
-        for file in files:
-            f.write ('#include <%s>\n' % (file[0:-1] + 'h',))
-        f.write ('%}\n\n')
-        for file in files:
-            f.write ('%%include <%s>\n' % (file,))
-
-def output_subfrag (f, ext):
-    files = name_dict.setdefault (ext, [])
-    files.sort ()
-    f.write ("GENERATED_%s =" % (ext.upper ()))
-    for file in files:
-        f.write (" \\\n\t%s" % (file,))
-    f.write ("\n\n")
-
-def extract_extension (template_name):
-    # template name is something like: GrFIRfilterXXX.h.t
-    # we return everything between the penultimate . and .t
-    mo = re.search (r'\.([a-z]+)\.t$', template_name)
-    if not mo:
-        raise ValueError("Incorrectly formed template_name '%s'" % (template_name,))
-    return mo.group (1)
-
-def open_src (name, mode):
-    global srcdir
-    return open (os.path.join (srcdir, name), mode)
-
-def do_substitution (d, in_file, out_file):
-    def repl (match_obj):
-        key = match_obj.group (1)
-        # print key
-        return d[key]
-
-    inp = in_file.read ()
-    out = re.sub (r"@([a-zA-Z0-9_]+)@", repl, inp)
-    out_file.write (out)
-
-
-
-copyright = '''/* -*- c++ -*- */
-/*
- * Copyright 2003,2004 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-'''
-
-def is_complex (code3):
-    if i_code (code3) == 'c' or o_code (code3) == 'c':
-        return '1'
-    else:
-        return '0'
-
-
-def standard_dict (name, code3, package='gr'):
-    d = {}
-    d['NAME'] = name
-    d['NAME_IMPL'] = name+'_impl'
-    d['GUARD_NAME'] = 'INCLUDED_%s_%s_H' % (package.upper(), name.upper())
-    d['GUARD_NAME_IMPL'] = 'INCLUDED_%s_%s_IMPL_H' % (package.upper(), name.upper())
-    d['BASE_NAME'] = re.sub ('^' + package + '_', '', name)
-    d['SPTR_NAME'] = '%s_sptr' % name
-    d['WARNING'] = 'WARNING: this file is machine generated. Edits will be overwritten'
-    d['COPYRIGHT'] = copyright
-    d['TYPE'] = i_type (code3)
-    d['I_TYPE'] = i_type (code3)
-    d['O_TYPE'] = o_type (code3)
-    d['TAP_TYPE'] = tap_type (code3)
-    d['IS_COMPLEX'] = is_complex (code3)
-    return d
-
-
-def standard_dict2 (name, code3, package):
-    d = {}
-    d['NAME'] = name
-    d['BASE_NAME'] = name
-    d['GUARD_NAME'] = 'INCLUDED_%s_%s_H' % (package.upper(), name.upper())
-    d['WARNING'] = 'WARNING: this file is machine generated. Edits will be overwritten'
-    d['COPYRIGHT'] = copyright
-    d['TYPE'] = i_type (code3)
-    d['I_TYPE'] = i_type (code3)
-    d['O_TYPE'] = o_type (code3)
-    d['TAP_TYPE'] = tap_type (code3)
-    d['IS_COMPLEX'] = is_complex (code3)
-    return d
-
-def standard_impl_dict2 (name, code3, package):
-    d = {}
-    d['NAME'] = name
-    d['IMPL_NAME'] = name
-    d['BASE_NAME'] = name.rstrip("impl").rstrip("_")
-    d['GUARD_NAME'] = 'INCLUDED_%s_%s_H' % (package.upper(), name.upper())
-    d['WARNING'] = 'WARNING: this file is machine generated. Edits will be overwritten'
-    d['COPYRIGHT'] = copyright
-    d['FIR_TYPE'] = "fir_filter_" + code3
-    d['CFIR_TYPE'] = "fir_filter_" + code3[0:2] + 'c'
-    d['TYPE'] = i_type (code3)
-    d['I_TYPE'] = i_type (code3)
-    d['O_TYPE'] = o_type (code3)
-    d['TAP_TYPE'] = tap_type (code3)
-    d['IS_COMPLEX'] = is_complex (code3)
-    return d
diff --git a/gnuradio-runtime/python/build_utils_codes.py b/gnuradio-runtime/python/build_utils_codes.py
index 22a6bdb99b..e69de29bb2 100644
--- a/gnuradio-runtime/python/build_utils_codes.py
+++ b/gnuradio-runtime/python/build_utils_codes.py
@@ -1,53 +0,0 @@
-from __future__ import unicode_literals
-#
-# Copyright 2004 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-def i_code (code3):
-    return code3[0]
-
-def o_code (code3):
-    if len (code3) >= 2:
-        return code3[1]
-    else:
-        return code3[0]
-
-def tap_code (code3):
-    if len (code3) >= 3:
-        return code3[2]
-    else:
-        return code3[0]
-
-def i_type (code3):
-    return char_to_type[i_code (code3)]
-
-def o_type (code3):
-    return char_to_type[o_code (code3)]
-
-def tap_type (code3):
-    return char_to_type[tap_code (code3)]
-
-
-char_to_type = {}
-char_to_type['s'] = 'short'
-char_to_type['i'] = 'int'
-char_to_type['f'] = 'float'
-char_to_type['c'] = 'gr_complex'
-char_to_type['b'] = 'unsigned char'
diff --git a/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrMiscUtils.cmake b/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrMiscUtils.cmake
index cc8e7c17dc..beeeebe72a 100644
--- a/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrMiscUtils.cmake
+++ b/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrMiscUtils.cmake
@@ -303,179 +303,3 @@ set(CMAKE_REQUIRED_LIBRARIES -lpthread)
     )
     GR_ADD_COND_DEF(HAVE_SCHED_SETSCHEDULER)
 endmacro(GR_CHECK_LINUX_SCHED_AVAIL)
-
-########################################################################
-# Macros to generate source and header files from template
-########################################################################
-macro(GR_EXPAND_X_H component root)
-
-  include(GrPython)
-
-  file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-"#!${PYTHON_EXECUTABLE}
-
-import sys, os, re
-sys.path.append('${GR_RUNTIME_PYTHONPATH}')
-sys.path.append('${CMAKE_SOURCE_DIR}/python')
-os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
-os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
-
-if __name__ == '__main__':
-    import build_utils
-    root, inp = sys.argv[1:3]
-    for sig in sys.argv[3:]:
-        name = re.sub ('X+', sig, root)
-        d = build_utils.standard_dict2(name, sig, '${component}')
-        build_utils.expand_template(d, inp)
-")
-
-  #make a list of all the generated headers
-  unset(expanded_files_h)
-  foreach(sig ${ARGN})
-    string(REGEX REPLACE "X+" ${sig} name ${root})
-    list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
-  endforeach(sig)
-  unset(name)
-
-  #create a command to generate the headers
-  add_custom_command(
-    OUTPUT ${expanded_files_h}
-    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
-    COMMAND ${PYTHON_EXECUTABLE} -B
-    ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-    ${root} ${root}.h.t ${ARGN}
-  )
-
-  #install rules for the generated headers
-  list(APPEND generated_includes ${expanded_files_h})
-
-endmacro(GR_EXPAND_X_H)
-
-macro(GR_EXPAND_X_CC_H component root)
-
-  include(GrPython)
-
-  file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-"#!${PYTHON_EXECUTABLE}
-
-import sys, os, re
-sys.path.append('${GR_RUNTIME_PYTHONPATH}')
-sys.path.append('${CMAKE_SOURCE_DIR}/python')
-os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
-os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
-
-if __name__ == '__main__':
-    import build_utils
-    root, inp = sys.argv[1:3]
-    for sig in sys.argv[3:]:
-        name = re.sub ('X+', sig, root)
-        d = build_utils.standard_impl_dict2(name, sig, '${component}')
-        build_utils.expand_template(d, inp)
-")
-
-  #make a list of all the generated files
-  unset(expanded_files_cc)
-  unset(expanded_files_h)
-  foreach(sig ${ARGN})
-    string(REGEX REPLACE "X+" ${sig} name ${root})
-    list(APPEND expanded_files_cc ${CMAKE_CURRENT_BINARY_DIR}/${name}.cc)
-    list(APPEND expanded_files_h  ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
-  endforeach(sig)
-  unset(name)
-
-  #create a command to generate the source files
-  add_custom_command(
-    OUTPUT ${expanded_files_cc}
-    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.cc.t
-    COMMAND ${PYTHON_EXECUTABLE} -B
-    ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-    ${root} ${root}.cc.t ${ARGN}
-  )
-
-  #create a command to generate the header files
-  add_custom_command(
-    OUTPUT ${expanded_files_h}
-    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
-    COMMAND ${PYTHON_EXECUTABLE} -B
-    ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-    ${root} ${root}.h.t ${ARGN}
-  )
-
-  #make source files depends on headers to force generation
-  set_source_files_properties(${expanded_files_cc}
-    PROPERTIES OBJECT_DEPENDS "${expanded_files_h}"
-  )
-
-  #install rules for the generated files
-  list(APPEND generated_sources ${expanded_files_cc})
-  list(APPEND generated_headers ${expanded_files_h})
-
-endmacro(GR_EXPAND_X_CC_H)
-
-macro(GR_EXPAND_X_CC_H_IMPL component root)
-
-  include(GrPython)
-
-  file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-"#!${PYTHON_EXECUTABLE}
-
-import sys, os, re
-sys.path.append('${GR_RUNTIME_PYTHONPATH}')
-sys.path.append('${CMAKE_SOURCE_DIR}/python')
-os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
-os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
-
-if __name__ == '__main__':
-    import build_utils
-    root, inp = sys.argv[1:3]
-    for sig in sys.argv[3:]:
-        name = re.sub ('X+', sig, root)
-        d = build_utils.standard_dict(name, sig, '${component}')
-        build_utils.expand_template(d, inp, '_impl')
-")
-
-  #make a list of all the generated files
-  unset(expanded_files_cc_impl)
-  unset(expanded_files_h_impl)
-  unset(expanded_files_h)
-  foreach(sig ${ARGN})
-    string(REGEX REPLACE "X+" ${sig} name ${root})
-    list(APPEND expanded_files_cc_impl ${CMAKE_CURRENT_BINARY_DIR}/${name}_impl.cc)
-    list(APPEND expanded_files_h_impl ${CMAKE_CURRENT_BINARY_DIR}/${name}_impl.h)
-    list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/../include/gnuradio/${component}/${name}.h)
-  endforeach(sig)
-  unset(name)
-
-  #create a command to generate the _impl.cc files
-  add_custom_command(
-    OUTPUT ${expanded_files_cc_impl}
-    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}_impl.cc.t
-    COMMAND ${PYTHON_EXECUTABLE} -B
-    ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-    ${root} ${root}_impl.cc.t ${ARGN}
-  )
-
-  #create a command to generate the _impl.h files
-  add_custom_command(
-    OUTPUT ${expanded_files_h_impl}
-    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}_impl.h.t
-    COMMAND ${PYTHON_EXECUTABLE} -B
-    ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
-    ${root} ${root}_impl.h.t ${ARGN}
-  )
-
-  #make _impl.cc source files depend on _impl.h to force generation
-  set_source_files_properties(${expanded_files_cc_impl}
-    PROPERTIES OBJECT_DEPENDS "${expanded_files_h_impl}"
-  )
-
-  #make _impl.h source files depend on headers to force generation
-  set_source_files_properties(${expanded_files_h_impl}
-    PROPERTIES OBJECT_DEPENDS "${expanded_files_h}"
-  )
-
-  #install rules for the generated files
-  list(APPEND generated_sources ${expanded_files_cc_impl})
-  list(APPEND generated_headers ${expanded_files_h_impl})
-
-endmacro(GR_EXPAND_X_CC_H_IMPL)
diff --git a/gr-utils/python/modtool/gr-newmod/python/build_utils.py b/gr-utils/python/modtool/gr-newmod/python/build_utils.py
deleted file mode 100644
index 0b26844cbf..0000000000
--- a/gr-utils/python/modtool/gr-newmod/python/build_utils.py
+++ /dev/null
@@ -1,228 +0,0 @@
-#
-# Copyright 2004,2009,2012 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-"""Misc utilities used at build time
-"""
-from __future__ import absolute_import
-from __future__ import unicode_literals
-
-import re, os, os.path
-from .build_utils_codes import *
-
-
-# set srcdir to the directory that contains Makefile.am
-try:
-    srcdir = os.environ['srcdir']
-except KeyError as e:
-    srcdir = "."
-srcdir = srcdir + '/'
-
-# set do_makefile to either true or false dependeing on the environment
-try:
-    if os.environ['do_makefile'] == '0':
-        do_makefile = False
-    else:
-        do_makefile = True
-except KeyError as e:
-    do_makefile = False
-
-# set do_sources to either true or false dependeing on the environment
-try:
-    if os.environ['do_sources'] == '0':
-        do_sources = False
-    else:
-        do_sources = True
-except KeyError as e:
-    do_sources = True
-
-name_dict = {}
-
-def log_output_name (name):
-    (base, ext) = os.path.splitext (name)
-    ext = ext[1:]                       # drop the leading '.'
-
-    entry = name_dict.setdefault (ext, [])
-    entry.append (name)
-
-def open_and_log_name (name, dir):
-    global do_sources
-    if do_sources:
-        f = open (name, dir)
-    else:
-        f = None
-    log_output_name (name)
-    return f
-
-def expand_template (d, template_filename, extra = ""):
-    '''Given a dictionary D and a TEMPLATE_FILENAME, expand template into output file
-    '''
-    global do_sources
-    output_extension = extract_extension (template_filename)
-    template = open_src (template_filename, 'r')
-    output_name = d['NAME'] + extra + '.' + output_extension
-    log_output_name (output_name)
-    if do_sources:
-        output = open (output_name, 'w')
-        do_substitution (d, template, output)
-        output.close ()
-    template.close ()
-
-def output_glue (dirname):
-    output_makefile_fragment ()
-    output_ifile_include (dirname)
-
-def output_makefile_fragment ():
-    global do_makefile
-    if not do_makefile:
-        return
-# overwrite the source, which must be writable; this should have been
-# checked for beforehand in the top-level Makefile.gen.gen .
-    f = open (os.path.join (os.environ.get('gendir', os.environ.get('srcdir', '.')), 'Makefile.gen'), 'w')
-    f.write ('#\n# This file is machine generated.  All edits will be overwritten\n#\n')
-    output_subfrag (f, 'h')
-    output_subfrag (f, 'i')
-    output_subfrag (f, 'cc')
-    f.close ()
-
-def output_ifile_include (dirname):
-    global do_sources
-    if do_sources:
-        f = open ('%s_generated.i' % (dirname,), 'w')
-        f.write ('//\n// This file is machine generated.  All edits will be overwritten\n//\n')
-        files = name_dict.setdefault ('i', [])
-        files.sort ()
-        f.write ('%{\n')
-        for file in files:
-            f.write ('#include <%s>\n' % (file[0:-1] + 'h',))
-        f.write ('%}\n\n')
-        for file in files:
-            f.write ('%%include <%s>\n' % (file,))
-
-def output_subfrag (f, ext):
-    files = name_dict.setdefault (ext, [])
-    files.sort ()
-    f.write ("GENERATED_%s =" % (ext.upper ()))
-    for file in files:
-        f.write (" \\\n\t%s" % (file,))
-    f.write ("\n\n")
-
-def extract_extension (template_name):
-    # template name is something like: GrFIRfilterXXX.h.t
-    # we return everything between the penultimate . and .t
-    mo = re.search (r'\.([a-z]+)\.t$', template_name)
-    if not mo:
-        raise ValueError("Incorrectly formed template_name '%s'" % (template_name,))
-    return mo.group (1)
-
-def open_src (name, mode):
-    global srcdir
-    return open (os.path.join (srcdir, name), mode)
-
-def do_substitution (d, in_file, out_file):
-    def repl (match_obj):
-        key = match_obj.group (1)
-        # print key
-        return d[key]
-
-    inp = in_file.read ()
-    out = re.sub (r"@([a-zA-Z0-9_]+)@", repl, inp)
-    out_file.write (out)
-
-
-
-copyright = '''/* -*- c++ -*- */
-/*
- * Copyright 2003,2004 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-'''
-
-def is_complex (code3):
-    if i_code (code3) == 'c' or o_code (code3) == 'c':
-        return '1'
-    else:
-        return '0'
-
-
-def standard_dict (name, code3, package='gr'):
-    d = {}
-    d['NAME'] = name
-    d['NAME_IMPL'] = name+'_impl'
-    d['GUARD_NAME'] = 'INCLUDED_%s_%s_H' % (package.upper(), name.upper())
-    d['GUARD_NAME_IMPL'] = 'INCLUDED_%s_%s_IMPL_H' % (package.upper(), name.upper())
-    d['BASE_NAME'] = re.sub ('^' + package + '_', '', name)
-    d['SPTR_NAME'] = '%s_sptr' % name
-    d['WARNING'] = 'WARNING: this file is machine generated. Edits will be overwritten'
-    d['COPYRIGHT'] = copyright
-    d['TYPE'] = i_type (code3)
-    d['I_TYPE'] = i_type (code3)
-    d['O_TYPE'] = o_type (code3)
-    d['TAP_TYPE'] = tap_type (code3)
-    d['IS_COMPLEX'] = is_complex (code3)
-    return d
-
-
-def standard_dict2 (name, code3, package):
-    d = {}
-    d['NAME'] = name
-    d['BASE_NAME'] = name
-    d['GUARD_NAME'] = 'INCLUDED_%s_%s_H' % (package.upper(), name.upper())
-    d['WARNING'] = 'WARNING: this file is machine generated. Edits will be overwritten'
-    d['COPYRIGHT'] = copyright
-    d['TYPE'] = i_type (code3)
-    d['I_TYPE'] = i_type (code3)
-    d['O_TYPE'] = o_type (code3)
-    d['TAP_TYPE'] = tap_type (code3)
-    d['IS_COMPLEX'] = is_complex (code3)
-    return d
-
-def standard_impl_dict2 (name, code3, package):
-    d = {}
-    d['NAME'] = name
-    d['IMPL_NAME'] = name
-    d['BASE_NAME'] = name.rstrip("impl").rstrip("_")
-    d['GUARD_NAME'] = 'INCLUDED_%s_%s_H' % (package.upper(), name.upper())
-    d['WARNING'] = 'WARNING: this file is machine generated. Edits will be overwritten'
-    d['COPYRIGHT'] = copyright
-    d['FIR_TYPE'] = "fir_filter_" + code3
-    d['CFIR_TYPE'] = "fir_filter_" + code3[0:2] + 'c'
-    d['TYPE'] = i_type (code3)
-    d['I_TYPE'] = i_type (code3)
-    d['O_TYPE'] = o_type (code3)
-    d['TAP_TYPE'] = tap_type (code3)
-    d['IS_COMPLEX'] = is_complex (code3)
-    return d
diff --git a/gr-utils/python/modtool/gr-newmod/python/build_utils_codes.py b/gr-utils/python/modtool/gr-newmod/python/build_utils_codes.py
deleted file mode 100644
index 22a6bdb99b..0000000000
--- a/gr-utils/python/modtool/gr-newmod/python/build_utils_codes.py
+++ /dev/null
@@ -1,53 +0,0 @@
-from __future__ import unicode_literals
-#
-# Copyright 2004 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-def i_code (code3):
-    return code3[0]
-
-def o_code (code3):
-    if len (code3) >= 2:
-        return code3[1]
-    else:
-        return code3[0]
-
-def tap_code (code3):
-    if len (code3) >= 3:
-        return code3[2]
-    else:
-        return code3[0]
-
-def i_type (code3):
-    return char_to_type[i_code (code3)]
-
-def o_type (code3):
-    return char_to_type[o_code (code3)]
-
-def tap_type (code3):
-    return char_to_type[tap_code (code3)]
-
-
-char_to_type = {}
-char_to_type['s'] = 'short'
-char_to_type['i'] = 'int'
-char_to_type['f'] = 'float'
-char_to_type['c'] = 'gr_complex'
-char_to_type['b'] = 'unsigned char'
-- 
cgit v1.2.3


From 890217f5b1420b3de96b381febf889fd403c210e Mon Sep 17 00:00:00 2001
From: Andrej Rode <mail@andrejro.de>
Date: Wed, 22 Aug 2018 22:58:55 +0200
Subject: pmt: replace file generation with pre-generated files

---
 docs/doxygen/CMakeLists.txt                    |    4 -
 gnuradio-runtime/include/pmt/CMakeLists.txt    |    1 +
 gnuradio-runtime/include/pmt/pmt_serial_tags.h |   62 +
 gnuradio-runtime/lib/CMakeLists.txt            |    5 -
 gnuradio-runtime/lib/pmt/CMakeLists.txt        |   63 +-
 gnuradio-runtime/lib/pmt/gen-serial-tags.py    |   56 -
 gnuradio-runtime/lib/pmt/generate_unv.py       |  192 ---
 gnuradio-runtime/lib/pmt/pmt-serial-tags.scm   |   77 -
 gnuradio-runtime/lib/pmt/pmt_int.h             |    3 -
 gnuradio-runtime/lib/pmt/pmt_unv.cc            | 1821 ++++++++++++++++++++++++
 gnuradio-runtime/lib/pmt/pmt_unv_int.h         |  331 +++++
 gnuradio-runtime/lib/pmt/qa_pmt_unv.cc         |  448 ++++++
 gnuradio-runtime/lib/pmt/qa_pmt_unv.h          |   61 +
 gnuradio-runtime/lib/pmt/unv_qa_template.cc.t  |   35 -
 gnuradio-runtime/lib/pmt/unv_template.cc.t     |  149 --
 gnuradio-runtime/lib/pmt/unv_template.h.t      |   25 -
 gnuradio-runtime/swig/CMakeLists.txt           |    1 -
 17 files changed, 2727 insertions(+), 607 deletions(-)
 create mode 100644 gnuradio-runtime/include/pmt/pmt_serial_tags.h
 delete mode 100644 gnuradio-runtime/lib/pmt/gen-serial-tags.py
 delete mode 100644 gnuradio-runtime/lib/pmt/generate_unv.py
 delete mode 100644 gnuradio-runtime/lib/pmt/pmt-serial-tags.scm
 create mode 100644 gnuradio-runtime/lib/pmt/pmt_unv.cc
 create mode 100644 gnuradio-runtime/lib/pmt/pmt_unv_int.h
 create mode 100644 gnuradio-runtime/lib/pmt/qa_pmt_unv.cc
 create mode 100644 gnuradio-runtime/lib/pmt/qa_pmt_unv.h
 delete mode 100644 gnuradio-runtime/lib/pmt/unv_qa_template.cc.t
 delete mode 100644 gnuradio-runtime/lib/pmt/unv_template.cc.t
 delete mode 100644 gnuradio-runtime/lib/pmt/unv_template.h.t

(limited to 'docs/doxygen')

diff --git a/docs/doxygen/CMakeLists.txt b/docs/doxygen/CMakeLists.txt
index 8c8bd4b248..952579f589 100644
--- a/docs/doxygen/CMakeLists.txt
+++ b/docs/doxygen/CMakeLists.txt
@@ -41,10 +41,6 @@ configure_file(
 
 set(BUILT_DIRS ${CMAKE_CURRENT_BINARY_DIR}/xml ${CMAKE_CURRENT_BINARY_DIR}/html)
 
-if(ENABLE_GNURADIO_RUNTIME)
-  list(APPEND GENERATED_DEPS pmt_generated)
-endif(ENABLE_GNURADIO_RUNTIME)
-
 ########################################################################
 # Make and install doxygen docs
 ########################################################################
diff --git a/gnuradio-runtime/include/pmt/CMakeLists.txt b/gnuradio-runtime/include/pmt/CMakeLists.txt
index f4a541e0dd..2b33ea0105 100644
--- a/gnuradio-runtime/include/pmt/CMakeLists.txt
+++ b/gnuradio-runtime/include/pmt/CMakeLists.txt
@@ -25,5 +25,6 @@ install(FILES
   pmt.h
   pmt_pool.h
   pmt_sugar.h
+  pmt_serial_tags.h
   DESTINATION ${GR_INCLUDE_DIR}/pmt
 )
diff --git a/gnuradio-runtime/include/pmt/pmt_serial_tags.h b/gnuradio-runtime/include/pmt/pmt_serial_tags.h
new file mode 100644
index 0000000000..ea89693a49
--- /dev/null
+++ b/gnuradio-runtime/include/pmt/pmt_serial_tags.h
@@ -0,0 +1,62 @@
+
+//
+// Copyright 2011 Free Software Foundation, Inc.
+//
+// This file is part of GNU Radio
+//
+// GNU Radio is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// GNU Radio is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this program; if not, write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+//
+//
+// THIS FILE IS MACHINE GENERATED FROM gen-serial-tags.py. DO NOT EDIT BY HAND.
+// See pmt-serial-tags.scm for additional commentary.
+//
+
+#ifndef INCLUDED_PMT_SERIAL_TAGS_H
+#define INCLUDED_PMT_SERIAL_TAGS_H
+
+enum pst_tags {
+    PST_TRUE = 0x00,
+    PST_FALSE = 0x01,
+    PST_SYMBOL = 0x02,
+    PST_INT32 = 0x03,
+    PST_DOUBLE = 0x04,
+    PST_COMPLEX = 0x05,
+    PST_NULL = 0x06,
+    PST_PAIR = 0x07,
+    PST_VECTOR = 0x08,
+    PST_DICT = 0x09,
+    PST_UNIFORM_VECTOR = 0x0a,
+    PST_UINT64 = 0x0b,
+    PST_TUPLE = 0x0c,
+    UVI_ENDIAN_MASK = 0x80,
+    UVI_SUBTYPE_MASK = 0x7f,
+    UVI_LITTLE_ENDIAN = 0x00,
+    UVI_BIG_ENDIAN = 0x80,
+    UVI_U8 = 0x00,
+    UVI_S8 = 0x01,
+    UVI_U16 = 0x02,
+    UVI_S16 = 0x03,
+    UVI_U32 = 0x04,
+    UVI_S32 = 0x05,
+    UVI_U64 = 0x06,
+    UVI_S64 = 0x07,
+    UVI_F32 = 0x08,
+    UVI_F64 = 0x09,
+    UVI_C32 = 0x0a,
+    UVI_C64 = 0x0b,
+    PST_COMMENT = 0x3b,
+    PST_COMMENT_END = 0x0a
+};
+#endif /* INCLUDED_PMT_SERIAL_TAGS_H */
diff --git a/gnuradio-runtime/lib/CMakeLists.txt b/gnuradio-runtime/lib/CMakeLists.txt
index 4fd5a610f6..cd4a850c79 100644
--- a/gnuradio-runtime/lib/CMakeLists.txt
+++ b/gnuradio-runtime/lib/CMakeLists.txt
@@ -198,11 +198,6 @@ add_library(gnuradio-runtime SHARED ${gnuradio_runtime_sources})
 target_link_libraries(gnuradio-runtime ${gnuradio_runtime_libs})
 GR_LIBRARY_FOO(gnuradio-runtime)
 
-add_dependencies(gnuradio-runtime
-  pmt_generated runtime_generated_includes
-)
-
-
 #######################################################
 # STATIC LIB BUILD
 #######################################################
diff --git a/gnuradio-runtime/lib/pmt/CMakeLists.txt b/gnuradio-runtime/lib/pmt/CMakeLists.txt
index 85b2a4d6e0..c840b8b930 100644
--- a/gnuradio-runtime/lib/pmt/CMakeLists.txt
+++ b/gnuradio-runtime/lib/pmt/CMakeLists.txt
@@ -23,57 +23,8 @@
 include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR})
 include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
 
-########################################################################
-# Generate serial tags header file
-########################################################################
-
-get_filename_component(PMT_SERIAL_TAGS_H
-    ${CMAKE_CURRENT_BINARY_DIR}/../../include/pmt/pmt_serial_tags.h ABSOLUTE
-)
-
-add_custom_command(
-    OUTPUT ${PMT_SERIAL_TAGS_H}
-    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/gen-serial-tags.py
-    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/pmt-serial-tags.scm
-    COMMAND ${PYTHON_EXECUTABLE}
-        ${CMAKE_CURRENT_SOURCE_DIR}/gen-serial-tags.py
-        ${CMAKE_CURRENT_SOURCE_DIR}/pmt-serial-tags.scm
-        ${PMT_SERIAL_TAGS_H}
-)
-
-install(
-    FILES ${PMT_SERIAL_TAGS_H}
-    DESTINATION ${GR_INCLUDE_DIR}/pmt
-)
-
-include(AddFileDependencies)
-ADD_FILE_DEPENDENCIES(
-    ${CMAKE_CURRENT_SOURCE_DIR}/pmt_serialize.cc
-    ${PMT_SERIAL_TAGS_H}
-)
-
-########################################################################
-# Generate other pmt stuff
-########################################################################
-add_custom_command(
-    OUTPUT
-        ${CMAKE_CURRENT_BINARY_DIR}/pmt_unv_int.h
-        ${CMAKE_CURRENT_BINARY_DIR}/qa_pmt_unv.h
-        ${CMAKE_CURRENT_BINARY_DIR}/pmt_unv.cc
-        ${CMAKE_CURRENT_BINARY_DIR}/qa_pmt_unv.cc
-    DEPENDS
-        ${CMAKE_CURRENT_SOURCE_DIR}/generate_unv.py
-        ${CMAKE_CURRENT_SOURCE_DIR}/unv_template.h.t
-        ${CMAKE_CURRENT_SOURCE_DIR}/unv_template.cc.t
-        ${CMAKE_CURRENT_SOURCE_DIR}/unv_qa_template.cc.t
-    COMMAND ${PYTHON_EXECUTABLE} -B -c
-    "import os, sys; srcdir='${CMAKE_CURRENT_SOURCE_DIR}'; sys.path.append(srcdir); os.environ['srcdir']=srcdir; from generate_unv import main; main()"
-    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-    VERBATIM
-)
-
 set(pmt_sources
-  ${CMAKE_CURRENT_BINARY_DIR}/pmt_unv.cc
+  ${CMAKE_CURRENT_SOURCE_DIR}/pmt_unv.cc
   ${CMAKE_CURRENT_SOURCE_DIR}/pmt.cc
   ${CMAKE_CURRENT_SOURCE_DIR}/pmt_io.cc
   ${CMAKE_CURRENT_SOURCE_DIR}/pmt_pool.cc
@@ -85,10 +36,6 @@ list(APPEND gnuradio_pmt_libs
     ${LOG4CPP_LIBRARIES}
 )
 
-add_custom_target(pmt_generated
-  DEPENDS ${PMT_SERIAL_TAGS_H} ${CMAKE_CURRENT_BINARY_DIR}/pmt_unv_int.h)
-
-
 #Add Windows DLL resource file if using MSVC
 if(MSVC)
     include(${CMAKE_SOURCE_DIR}/cmake/Modules/GrVersion.cmake)
@@ -109,14 +56,10 @@ target_link_libraries(gnuradio-pmt ${gnuradio_pmt_libs})
 
 GR_LIBRARY_FOO(gnuradio-pmt)
 
-add_dependencies(gnuradio-pmt
-  pmt_generated
-)
-
 if(ENABLE_STATIC_LIBS)
   add_library(gnuradio-pmt_static STATIC ${pmt_sources})
 
-  add_dependencies(gnuradio-pmt_static pmt_generated)
+  add_dependencies(gnuradio-pmt_static)
 
   if(NOT WIN32)
     set_target_properties(gnuradio-pmt_static
@@ -140,7 +83,7 @@ include(GrTest)
 list(APPEND test_gnuradio_pmt_sources
   qa_pmt.cc
   qa_pmt_prims.cc
-  ${CMAKE_CURRENT_BINARY_DIR}/qa_pmt_unv.cc
+  qa_pmt_unv.cc
 )
 
 include_directories(${CPPUNIT_INCLUDE_DIRS})
diff --git a/gnuradio-runtime/lib/pmt/gen-serial-tags.py b/gnuradio-runtime/lib/pmt/gen-serial-tags.py
deleted file mode 100644
index 2ff2240a47..0000000000
--- a/gnuradio-runtime/lib/pmt/gen-serial-tags.py
+++ /dev/null
@@ -1,56 +0,0 @@
-"""
-//
-// Copyright 2011 Free Software Foundation, Inc.
-//
-// This file is part of GNU Radio
-//
-// GNU Radio is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3, or (at your option)
-// any later version.
-//
-// GNU Radio is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-//
-// THIS FILE IS MACHINE GENERATED FROM %s. DO NOT EDIT BY HAND.
-// See %s for additional commentary.
-//
-
-#ifndef INCLUDED_PMT_SERIAL_TAGS_H
-#define INCLUDED_PMT_SERIAL_TAGS_H
-
-enum pst_tags {
-%s
-};
-#endif /* INCLUDED_PMT_SERIAL_TAGS_H */
-"""
-
-from __future__ import print_function
-from __future__ import unicode_literals
-
-import sys, os, re
-
-if __name__ == '__main__':
-    if len(sys.argv) != 3:
-        print("Usage %s <input_scm_file> <output_hdr_file>"%__file__)
-        exit()
-    input_scm_file, output_hdr_file = sys.argv[1:]
-    enums = list()
-    for line in open(input_scm_file).readlines():
-        match = re.match('^\s*\(define\s+([\w|-]+)\s+#x([0-9a-fA-F]+)\)', line)
-        if not match: continue
-        name, value = match.groups()
-        name = name.upper().replace('-', '_')
-        enums.append('    %s = 0x%s'%(name, value))
-    open(output_hdr_file, 'w').write(__doc__%(
-        os.path.basename(__file__),
-        os.path.basename(input_scm_file),
-        ',\n'.join(enums),
-    ))
diff --git a/gnuradio-runtime/lib/pmt/generate_unv.py b/gnuradio-runtime/lib/pmt/generate_unv.py
deleted file mode 100644
index 45c57a3fb8..0000000000
--- a/gnuradio-runtime/lib/pmt/generate_unv.py
+++ /dev/null
@@ -1,192 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2006,2009 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-"""
-Generate code for uniform numeric vectors
-"""
-from __future__ import unicode_literals
-
-import re, os, os.path
-
-
-unv_types = (
-    ('u8', 'uint8_t'),
-    ('s8', 'int8_t'),
-    ('u16', 'uint16_t'),
-    ('s16', 'int16_t'),
-    ('u32', 'uint32_t'),
-    ('s32', 'int32_t'),
-    ('u64', 'uint64_t'),
-    ('s64', 'int64_t'),
-    ('f32', 'float'),
-    ('f64', 'double'),
-    ('c32', 'std::complex<float>'),
-    ('c64', 'std::complex<double>')
-    )
-
-header = """\
-/* -*- c++ -*- */
-/*
- * Copyright 2006,2009 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-"""
-
-guard_tail = """
-#endif
-"""
-
-includes = """
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include <vector>
-#include <pmt/pmt.h>
-#include <boost/lexical_cast.hpp>
-#include "pmt_int.h"
-"""
-
-qa_includes = """
-#include <qa_pmt_unv.h>
-#include <cppunit/TestAssert.h>
-#include <pmt/pmt.h>
-#include <stdio.h>
-
-using namespace pmt;
-"""
-
-
-# set srcdir to the directory that contains Makefile.am
-try:
-    srcdir = os.environ['srcdir']
-except KeyError as e:
-    srcdir = "."
-srcdir = srcdir + '/'
-
-
-def open_src (name, mode):
-    global srcdir
-    return open(os.path.join (srcdir, name), mode)
-
-
-def guard_name(filename):
-    return 'INCLUDED_' + re.sub('\.', '_', filename.upper())
-
-def guard_head(filename):
-    guard = guard_name(filename)
-    return """
-#ifndef %s
-#define %s
-""" % (guard, guard)
-
-
-def do_substitution (d, input, out_file):
-    def repl (match_obj):
-        key = match_obj.group (1)
-        # print key
-        return d[key]
-
-    out = re.sub (r"@([a-zA-Z0-9_]+)@", repl, input)
-    out_file.write (out)
-
-
-def generate_h():
-    template = open_src('unv_template.h.t', 'r').read()
-    output_filename = 'pmt_unv_int.h'
-    output = open(output_filename, 'w')
-    output.write(header)
-    output.write(guard_head(output_filename))
-    for tag, typ in unv_types:
-        d = { 'TAG' : tag, 'TYPE' : typ }
-        do_substitution(d, template, output)
-    output.write(guard_tail)
-
-def generate_cc():
-    template = open_src('unv_template.cc.t', 'r').read()
-    output = open('pmt_unv.cc', 'w')
-    output.write(header)
-    output.write(includes)
-    for tag, typ in unv_types:
-        d = { 'TAG' : tag, 'TYPE' : typ }
-        do_substitution(d, template, output)
-
-
-def generate_qa_h():
-    output_filename = 'qa_pmt_unv.h'
-    output = open(output_filename, 'w')
-    output.write(header)
-    output.write(guard_head(output_filename))
-
-    output.write('''
-#include <cppunit/extensions/HelperMacros.h>
-#include <cppunit/TestCase.h>
-
-class qa_pmt_unv : public CppUnit::TestCase {
-
-  CPPUNIT_TEST_SUITE(qa_pmt_unv);
-''')
-    for tag, typ in unv_types:
-        output.write('  CPPUNIT_TEST(test_%svector);\n' % (tag,))
-    output.write('''\
-  CPPUNIT_TEST_SUITE_END();
-
- private:
-''')
-    for tag, typ in unv_types:
-        output.write('  void test_%svector();\n' % (tag,))
-    output.write('};\n')
-    output.write(guard_tail)
-
-def generate_qa_cc():
-    template = open_src('unv_qa_template.cc.t', 'r').read()
-    output = open('qa_pmt_unv.cc', 'w')
-    output.write(header)
-    output.write(qa_includes)
-    for tag, typ in unv_types:
-        d = { 'TAG' : tag, 'TYPE' : typ }
-        do_substitution(d, template, output)
-
-
-def main():
-    generate_h()
-    generate_cc()
-    generate_qa_h()
-    generate_qa_cc()
-
-if __name__ == '__main__':
-    main()
diff --git a/gnuradio-runtime/lib/pmt/pmt-serial-tags.scm b/gnuradio-runtime/lib/pmt/pmt-serial-tags.scm
deleted file mode 100644
index 4f06bf75f8..0000000000
--- a/gnuradio-runtime/lib/pmt/pmt-serial-tags.scm
+++ /dev/null
@@ -1,77 +0,0 @@
-;;; -*-scheme-*-
-;;;
-;;; Copyright 2007 Free Software Foundation, Inc.
-;;;
-;;; This file is part of GNU Radio
-;;;
-;;; GNU Radio is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 3, or (define at your option)
-;;; any later version.
-;;;
-;;; GNU Radio is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License along
-;;; with this program; if not, write to the Free Software Foundation, Inc.,
-;;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-;;;
-
-;;; definitions of tag values used for marshalling pmt data
-
-(define pst-true		#x00)
-(define pst-false		#x01)
-(define pst-symbol		#x02)   ; untagged-int16 n; followed by n bytes of symbol name
-(define pst-int32		#x03)
-(define pst-double		#x04)
-(define pst-complex		#x05)   ; complex<double>: real, imag
-(define pst-null		#x06)
-(define pst-pair		#x07)   ; followed by two objects
-(define pst-vector		#x08)   ; untagged-int32 n; followed by n objects
-(define pst-dict		#x09)   ; untagged-int32 n; followed by n key/value tuples
-
-(define pst-uniform-vector	#x0a)
-(define pst-uint64	#x0b)
-(define pst-tuple	#x0c)
-
-;; u8, s8, u16, s16, u32, s32, u64, s64, f32, f64, c32, c64
-;;
-;;   untagged-uint8  tag
-;;   untagged-uint8  uvi (define uniform vector info, see below)
-;;   untagged-int32  n-items
-;;   untagged-uint8  npad
-;;   npad bytes of zeros to align binary data
-;;   n-items binary numeric items
-;;
-;; uvi:
-;; +-+-+-+-+-+-+-+-+
-;; |B|   subtype   |
-;; +-+-+-+-+-+-+-+-+
-;;
-;; B == 0, numeric data is little-endian.
-;; B == 1, numeric data is big-endian.
-
-    (define uvi-endian-mask     #x80)
-    (define uvi-subtype-mask    #x7f)
-
-    (define uvi-little-endian   #x00)
-    (define uvi-big-endian      #x80)
-
-    (define uvi-u8		#x00)
-    (define uvi-s8		#x01)
-    (define uvi-u16		#x02)
-    (define uvi-s16		#x03)
-    (define uvi-u32		#x04)
-    (define uvi-s32		#x05)
-    (define uvi-u64		#x06)
-    (define uvi-s64		#x07)
-    (define uvi-f32		#x08)
-    (define uvi-f64		#x09)
-    (define uvi-c32		#x0a)
-    (define uvi-c64		#x0b)
-
-
-(define pst-comment		#x3b)	; ascii ';'
-(define pst-comment-end		#x0a)	; ascii '\n'
diff --git a/gnuradio-runtime/lib/pmt/pmt_int.h b/gnuradio-runtime/lib/pmt/pmt_int.h
index f06f507944..ead058598d 100644
--- a/gnuradio-runtime/lib/pmt/pmt_int.h
+++ b/gnuradio-runtime/lib/pmt/pmt_int.h
@@ -242,9 +242,6 @@ public:
   virtual size_t itemsize() const = 0;
   virtual const std::string string_ref(size_t k) const { return std::string("not implemented"); }
 };
-
-#include "pmt_unv_int.h"
-
 } /* namespace pmt */
 
 #endif /* INCLUDED_PMT_INT_H */
diff --git a/gnuradio-runtime/lib/pmt/pmt_unv.cc b/gnuradio-runtime/lib/pmt/pmt_unv.cc
new file mode 100644
index 0000000000..cda0c085cd
--- /dev/null
+++ b/gnuradio-runtime/lib/pmt/pmt_unv.cc
@@ -0,0 +1,1821 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006,2009,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// This file is machine generated using the generate_unv.py tool
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "pmt_unv_int.h"
+#include "pmt_int.h"
+#include <pmt/pmt.h>
+#include <boost/lexical_cast.hpp>
+#include <vector>
+////////////////////////////////////////////////////////////////////////////
+//                           pmt_u8vector
+////////////////////////////////////////////////////////////////////////////
+
+namespace pmt {
+
+static pmt_u8vector *
+_u8vector(pmt_t x)
+{
+  return dynamic_cast<pmt_u8vector*>(x.get());
+}
+
+
+pmt_u8vector::pmt_u8vector(size_t k, uint8_t fill)
+  : d_v(k)
+{
+  for (size_t i = 0; i < k; i++)
+    d_v[i] = fill;
+}
+
+pmt_u8vector::pmt_u8vector(size_t k, const uint8_t *data)
+  : d_v(k)
+{
+  if(k)
+    memcpy( &d_v[0], data, k * sizeof(uint8_t) );
+}
+
+uint8_t
+pmt_u8vector::ref(size_t k) const
+{
+  if (k >= length())
+    throw out_of_range("pmt_u8vector_ref", from_long(k));
+  return d_v[k];
+}
+
+void
+pmt_u8vector::set(size_t k, uint8_t x)
+{
+  if (k >= length())
+    throw out_of_range("pmt_u8vector_set", from_long(k));
+  d_v[k] = x;
+}
+
+const uint8_t *
+pmt_u8vector::elements(size_t &len)
+{
+  len = length();
+  return len ?  &d_v[0] : nullptr;
+}
+
+uint8_t *
+pmt_u8vector::writable_elements(size_t &len)
+{
+  len = length();
+  return len ? &d_v[0] : nullptr;
+}
+
+const void*
+pmt_u8vector::uniform_elements(size_t &len)
+{
+  len = length() * sizeof(uint8_t);
+  return len ? &d_v[0] : nullptr;
+}
+
+void*
+pmt_u8vector::uniform_writable_elements(size_t &len)
+{
+  len = length() * sizeof(uint8_t);
+  return len ? (&d_v[0]) : nullptr;
+}
+
+bool
+is_u8vector(pmt_t obj)
+{
+  return obj->is_u8vector();
+}
+
+pmt_t
+make_u8vector(size_t k, uint8_t fill)
+{
+  return pmt_t(new pmt_u8vector(k, fill));
+}
+
+pmt_t
+init_u8vector(size_t k, const uint8_t *data)
+{
+  return pmt_t(new pmt_u8vector(k, data));
+}
+
+pmt_t
+init_u8vector(size_t k, const std::vector< uint8_t > &data)
+{
+  if(k) {
+    return pmt_t(new pmt_u8vector(k, &data[0]));
+  }
+  return pmt_t(new pmt_u8vector(k, static_cast< uint8_t >(0))); // fills an empty vector with 0
+}
+
+uint8_t
+u8vector_ref(pmt_t vector, size_t k)
+{
+  if (!vector->is_u8vector())
+    throw wrong_type("pmt_u8vector_ref", vector);
+  return _u8vector(vector)->ref(k);
+}
+
+void
+u8vector_set(pmt_t vector, size_t k, uint8_t obj)
+{
+  if (!vector->is_u8vector())
+    throw wrong_type("pmt_u8vector_set", vector);
+  _u8vector(vector)->set(k, obj);
+}
+
+const uint8_t *
+u8vector_elements(pmt_t vector, size_t &len)
+{
+  if (!vector->is_u8vector())
+    throw wrong_type("pmt_u8vector_elements", vector);
+  return _u8vector(vector)->elements(len);
+}
+
+const std::vector< uint8_t >
+u8vector_elements(pmt_t vector)
+{
+  if (!vector->is_u8vector())
+    throw wrong_type("pmt_u8vector_elements", vector);
+  size_t len;
+  const uint8_t *array = _u8vector(vector)->elements(len);
+  const std::vector< uint8_t > vec(array, array+len);
+  return vec;
+}
+
+
+uint8_t *
+u8vector_writable_elements(pmt_t vector, size_t &len)
+{
+  if (!vector->is_u8vector())
+    throw wrong_type("pmt_u8vector_writable_elements", vector);
+  return _u8vector(vector)->writable_elements(len);
+}
+
+const std::string
+pmt_u8vector::string_ref(size_t k) const
+{
+  return boost::lexical_cast< std::string, uint8_t > (ref(k));
+}
+
+} /* namespace pmt */
+////////////////////////////////////////////////////////////////////////////
+//                           pmt_s8vector
+////////////////////////////////////////////////////////////////////////////
+
+namespace pmt {
+
+static pmt_s8vector *
+_s8vector(pmt_t x)
+{
+  return dynamic_cast<pmt_s8vector*>(x.get());
+}
+
+
+pmt_s8vector::pmt_s8vector(size_t k, int8_t fill)
+  : d_v(k)
+{
+  for (size_t i = 0; i < k; i++)
+    d_v[i] = fill;
+}
+
+pmt_s8vector::pmt_s8vector(size_t k, const int8_t *data)
+  : d_v(k)
+{
+  if(k)
+    memcpy( &d_v[0], data, k * sizeof(int8_t) );
+}
+
+int8_t
+pmt_s8vector::ref(size_t k) const
+{
+  if (k >= length())
+    throw out_of_range("pmt_s8vector_ref", from_long(k));
+  return d_v[k];
+}
+
+void
+pmt_s8vector::set(size_t k, int8_t x)
+{
+  if (k >= length())
+    throw out_of_range("pmt_s8vector_set", from_long(k));
+  d_v[k] = x;
+}
+
+const int8_t *
+pmt_s8vector::elements(size_t &len)
+{
+  len = length();
+  return len ?  &d_v[0] : nullptr;
+}
+
+int8_t *
+pmt_s8vector::writable_elements(size_t &len)
+{
+  len = length();
+  return len ? &d_v[0] : nullptr;
+}
+
+const void*
+pmt_s8vector::uniform_elements(size_t &len)
+{
+  len = length() * sizeof(int8_t);
+  return len ? &d_v[0] : nullptr;
+}
+
+void*
+pmt_s8vector::uniform_writable_elements(size_t &len)
+{
+  len = length() * sizeof(int8_t);
+  return len ? (&d_v[0]) : nullptr;
+}
+
+bool
+is_s8vector(pmt_t obj)
+{
+  return obj->is_s8vector();
+}
+
+pmt_t
+make_s8vector(size_t k, int8_t fill)
+{
+  return pmt_t(new pmt_s8vector(k, fill));
+}
+
+pmt_t
+init_s8vector(size_t k, const int8_t *data)
+{
+  return pmt_t(new pmt_s8vector(k, data));
+}
+
+pmt_t
+init_s8vector(size_t k, const std::vector< int8_t > &data)
+{
+  if(k) {
+    return pmt_t(new pmt_s8vector(k, &data[0]));
+  }
+  return pmt_t(new pmt_s8vector(k, static_cast< int8_t >(0))); // fills an empty vector with 0
+}
+
+int8_t
+s8vector_ref(pmt_t vector, size_t k)
+{
+  if (!vector->is_s8vector())
+    throw wrong_type("pmt_s8vector_ref", vector);
+  return _s8vector(vector)->ref(k);
+}
+
+void
+s8vector_set(pmt_t vector, size_t k, int8_t obj)
+{
+  if (!vector->is_s8vector())
+    throw wrong_type("pmt_s8vector_set", vector);
+  _s8vector(vector)->set(k, obj);
+}
+
+const int8_t *
+s8vector_elements(pmt_t vector, size_t &len)
+{
+  if (!vector->is_s8vector())
+    throw wrong_type("pmt_s8vector_elements", vector);
+  return _s8vector(vector)->elements(len);
+}
+
+const std::vector< int8_t >
+s8vector_elements(pmt_t vector)
+{
+  if (!vector->is_s8vector())
+    throw wrong_type("pmt_s8vector_elements", vector);
+  size_t len;
+  const int8_t *array = _s8vector(vector)->elements(len);
+  const std::vector< int8_t > vec(array, array+len);
+  return vec;
+}
+
+
+int8_t *
+s8vector_writable_elements(pmt_t vector, size_t &len)
+{
+  if (!vector->is_s8vector())
+    throw wrong_type("pmt_s8vector_writable_elements", vector);
+  return _s8vector(vector)->writable_elements(len);
+}
+
+const std::string
+pmt_s8vector::string_ref(size_t k) const
+{
+  return boost::lexical_cast< std::string, int8_t > (ref(k));
+}
+
+} /* namespace pmt */
+////////////////////////////////////////////////////////////////////////////
+//                           pmt_u16vector
+////////////////////////////////////////////////////////////////////////////
+
+namespace pmt {
+
+static pmt_u16vector *
+_u16vector(pmt_t x)
+{
+  return dynamic_cast<pmt_u16vector*>(x.get());
+}
+
+
+pmt_u16vector::pmt_u16vector(size_t k, uint16_t fill)
+  : d_v(k)
+{
+  for (size_t i = 0; i < k; i++)
+    d_v[i] = fill;
+}
+
+pmt_u16vector::pmt_u16vector(size_t k, const uint16_t *data)
+  : d_v(k)
+{
+  if(k)
+    memcpy( &d_v[0], data, k * sizeof(uint16_t) );
+}
+
+uint16_t
+pmt_u16vector::ref(size_t k) const
+{
+  if (k >= length())
+    throw out_of_range("pmt_u16vector_ref", from_long(k));
+  return d_v[k];
+}
+
+void
+pmt_u16vector::set(size_t k, uint16_t x)
+{
+  if (k >= length())
+    throw out_of_range("pmt_u16vector_set", from_long(k));
+  d_v[k] = x;
+}
+
+const uint16_t *
+pmt_u16vector::elements(size_t &len)
+{
+  len = length();
+  return len ?  &d_v[0] : nullptr;
+}
+
+uint16_t *
+pmt_u16vector::writable_elements(size_t &len)
+{
+  len = length();
+  return len ? &d_v[0] : nullptr;
+}
+
+const void*
+pmt_u16vector::uniform_elements(size_t &len)
+{
+  len = length() * sizeof(uint16_t);
+  return len ? &d_v[0] : nullptr;
+}
+
+void*
+pmt_u16vector::uniform_writable_elements(size_t &len)
+{
+  len = length() * sizeof(uint16_t);
+  return len ? (&d_v[0]) : nullptr;
+}
+
+bool
+is_u16vector(pmt_t obj)
+{
+  return obj->is_u16vector();
+}
+
+pmt_t
+make_u16vector(size_t k, uint16_t fill)
+{
+  return pmt_t(new pmt_u16vector(k, fill));
+}
+
+pmt_t
+init_u16vector(size_t k, const uint16_t *data)
+{
+  return pmt_t(new pmt_u16vector(k, data));
+}
+
+pmt_t
+init_u16vector(size_t k, const std::vector< uint16_t > &data)
+{
+  if(k) {
+    return pmt_t(new pmt_u16vector(k, &data[0]));
+  }
+  return pmt_t(new pmt_u16vector(k, static_cast< uint16_t >(0))); // fills an empty vector with 0
+}
+
+uint16_t
+u16vector_ref(pmt_t vector, size_t k)
+{
+  if (!vector->is_u16vector())
+    throw wrong_type("pmt_u16vector_ref", vector);
+  return _u16vector(vector)->ref(k);
+}
+
+void
+u16vector_set(pmt_t vector, size_t k, uint16_t obj)
+{
+  if (!vector->is_u16vector())
+    throw wrong_type("pmt_u16vector_set", vector);
+  _u16vector(vector)->set(k, obj);
+}
+
+const uint16_t *
+u16vector_elements(pmt_t vector, size_t &len)
+{
+  if (!vector->is_u16vector())
+    throw wrong_type("pmt_u16vector_elements", vector);
+  return _u16vector(vector)->elements(len);
+}
+
+const std::vector< uint16_t >
+u16vector_elements(pmt_t vector)
+{
+  if (!vector->is_u16vector())
+    throw wrong_type("pmt_u16vector_elements", vector);
+  size_t len;
+  const uint16_t *array = _u16vector(vector)->elements(len);
+  const std::vector< uint16_t > vec(array, array+len);
+  return vec;
+}
+
+
+uint16_t *
+u16vector_writable_elements(pmt_t vector, size_t &len)
+{
+  if (!vector->is_u16vector())
+    throw wrong_type("pmt_u16vector_writable_elements", vector);
+  return _u16vector(vector)->writable_elements(len);
+}
+
+const std::string
+pmt_u16vector::string_ref(size_t k) const
+{
+  return boost::lexical_cast< std::string, uint16_t > (ref(k));
+}
+
+} /* namespace pmt */
+////////////////////////////////////////////////////////////////////////////
+//                           pmt_s16vector
+////////////////////////////////////////////////////////////////////////////
+
+namespace pmt {
+
+static pmt_s16vector *
+_s16vector(pmt_t x)
+{
+  return dynamic_cast<pmt_s16vector*>(x.get());
+}
+
+
+pmt_s16vector::pmt_s16vector(size_t k, int16_t fill)
+  : d_v(k)
+{
+  for (size_t i = 0; i < k; i++)
+    d_v[i] = fill;
+}
+
+pmt_s16vector::pmt_s16vector(size_t k, const int16_t *data)
+  : d_v(k)
+{
+  if(k)
+    memcpy( &d_v[0], data, k * sizeof(int16_t) );
+}
+
+int16_t
+pmt_s16vector::ref(size_t k) const
+{
+  if (k >= length())
+    throw out_of_range("pmt_s16vector_ref", from_long(k));
+  return d_v[k];
+}
+
+void
+pmt_s16vector::set(size_t k, int16_t x)
+{
+  if (k >= length())
+    throw out_of_range("pmt_s16vector_set", from_long(k));
+  d_v[k] = x;
+}
+
+const int16_t *
+pmt_s16vector::elements(size_t &len)
+{
+  len = length();
+  return len ?  &d_v[0] : nullptr;
+}
+
+int16_t *
+pmt_s16vector::writable_elements(size_t &len)
+{
+  len = length();
+  return len ? &d_v[0] : nullptr;
+}
+
+const void*
+pmt_s16vector::uniform_elements(size_t &len)
+{
+  len = length() * sizeof(int16_t);
+  return len ? &d_v[0] : nullptr;
+}
+
+void*
+pmt_s16vector::uniform_writable_elements(size_t &len)
+{
+  len = length() * sizeof(int16_t);
+  return len ? (&d_v[0]) : nullptr;
+}
+
+bool
+is_s16vector(pmt_t obj)
+{
+  return obj->is_s16vector();
+}
+
+pmt_t
+make_s16vector(size_t k, int16_t fill)
+{
+  return pmt_t(new pmt_s16vector(k, fill));
+}
+
+pmt_t
+init_s16vector(size_t k, const int16_t *data)
+{
+  return pmt_t(new pmt_s16vector(k, data));
+}
+
+pmt_t
+init_s16vector(size_t k, const std::vector< int16_t > &data)
+{
+  if(k) {
+    return pmt_t(new pmt_s16vector(k, &data[0]));
+  }
+  return pmt_t(new pmt_s16vector(k, static_cast< int16_t >(0))); // fills an empty vector with 0
+}
+
+int16_t
+s16vector_ref(pmt_t vector, size_t k)
+{
+  if (!vector->is_s16vector())
+    throw wrong_type("pmt_s16vector_ref", vector);
+  return _s16vector(vector)->ref(k);
+}
+
+void
+s16vector_set(pmt_t vector, size_t k, int16_t obj)
+{
+  if (!vector->is_s16vector())
+    throw wrong_type("pmt_s16vector_set", vector);
+  _s16vector(vector)->set(k, obj);
+}
+
+const int16_t *
+s16vector_elements(pmt_t vector, size_t &len)
+{
+  if (!vector->is_s16vector())
+    throw wrong_type("pmt_s16vector_elements", vector);
+  return _s16vector(vector)->elements(len);
+}
+
+const std::vector< int16_t >
+s16vector_elements(pmt_t vector)
+{
+  if (!vector->is_s16vector())
+    throw wrong_type("pmt_s16vector_elements", vector);
+  size_t len;
+  const int16_t *array = _s16vector(vector)->elements(len);
+  const std::vector< int16_t > vec(array, array+len);
+  return vec;
+}
+
+
+int16_t *
+s16vector_writable_elements(pmt_t vector, size_t &len)
+{
+  if (!vector->is_s16vector())
+    throw wrong_type("pmt_s16vector_writable_elements", vector);
+  return _s16vector(vector)->writable_elements(len);
+}
+
+const std::string
+pmt_s16vector::string_ref(size_t k) const
+{
+  return boost::lexical_cast< std::string, int16_t > (ref(k));
+}
+
+} /* namespace pmt */
+////////////////////////////////////////////////////////////////////////////
+//                           pmt_u32vector
+////////////////////////////////////////////////////////////////////////////
+
+namespace pmt {
+
+static pmt_u32vector *
+_u32vector(pmt_t x)
+{
+  return dynamic_cast<pmt_u32vector*>(x.get());
+}
+
+
+pmt_u32vector::pmt_u32vector(size_t k, uint32_t fill)
+  : d_v(k)
+{
+  for (size_t i = 0; i < k; i++)
+    d_v[i] = fill;
+}
+
+pmt_u32vector::pmt_u32vector(size_t k, const uint32_t *data)
+  : d_v(k)
+{
+  if(k)
+    memcpy( &d_v[0], data, k * sizeof(uint32_t) );
+}
+
+uint32_t
+pmt_u32vector::ref(size_t k) const
+{
+  if (k >= length())
+    throw out_of_range("pmt_u32vector_ref", from_long(k));
+  return d_v[k];
+}
+
+void
+pmt_u32vector::set(size_t k, uint32_t x)
+{
+  if (k >= length())
+    throw out_of_range("pmt_u32vector_set", from_long(k));
+  d_v[k] = x;
+}
+
+const uint32_t *
+pmt_u32vector::elements(size_t &len)
+{
+  len = length();
+  return len ?  &d_v[0] : nullptr;
+}
+
+uint32_t *
+pmt_u32vector::writable_elements(size_t &len)
+{
+  len = length();
+  return len ? &d_v[0] : nullptr;
+}
+
+const void*
+pmt_u32vector::uniform_elements(size_t &len)
+{
+  len = length() * sizeof(uint32_t);
+  return len ? &d_v[0] : nullptr;
+}
+
+void*
+pmt_u32vector::uniform_writable_elements(size_t &len)
+{
+  len = length() * sizeof(uint32_t);
+  return len ? (&d_v[0]) : nullptr;
+}
+
+bool
+is_u32vector(pmt_t obj)
+{
+  return obj->is_u32vector();
+}
+
+pmt_t
+make_u32vector(size_t k, uint32_t fill)
+{
+  return pmt_t(new pmt_u32vector(k, fill));
+}
+
+pmt_t
+init_u32vector(size_t k, const uint32_t *data)
+{
+  return pmt_t(new pmt_u32vector(k, data));
+}
+
+pmt_t
+init_u32vector(size_t k, const std::vector< uint32_t > &data)
+{
+  if(k) {
+    return pmt_t(new pmt_u32vector(k, &data[0]));
+  }
+  return pmt_t(new pmt_u32vector(k, static_cast< uint32_t >(0))); // fills an empty vector with 0
+}
+
+uint32_t
+u32vector_ref(pmt_t vector, size_t k)
+{
+  if (!vector->is_u32vector())
+    throw wrong_type("pmt_u32vector_ref", vector);
+  return _u32vector(vector)->ref(k);
+}
+
+void
+u32vector_set(pmt_t vector, size_t k, uint32_t obj)
+{
+  if (!vector->is_u32vector())
+    throw wrong_type("pmt_u32vector_set", vector);
+  _u32vector(vector)->set(k, obj);
+}
+
+const uint32_t *
+u32vector_elements(pmt_t vector, size_t &len)
+{
+  if (!vector->is_u32vector())
+    throw wrong_type("pmt_u32vector_elements", vector);
+  return _u32vector(vector)->elements(len);
+}
+
+const std::vector< uint32_t >
+u32vector_elements(pmt_t vector)
+{
+  if (!vector->is_u32vector())
+    throw wrong_type("pmt_u32vector_elements", vector);
+  size_t len;
+  const uint32_t *array = _u32vector(vector)->elements(len);
+  const std::vector< uint32_t > vec(array, array+len);
+  return vec;
+}
+
+
+uint32_t *
+u32vector_writable_elements(pmt_t vector, size_t &len)
+{
+  if (!vector->is_u32vector())
+    throw wrong_type("pmt_u32vector_writable_elements", vector);
+  return _u32vector(vector)->writable_elements(len);
+}
+
+const std::string
+pmt_u32vector::string_ref(size_t k) const
+{
+  return boost::lexical_cast< std::string, uint32_t > (ref(k));
+}
+
+} /* namespace pmt */
+////////////////////////////////////////////////////////////////////////////
+//                           pmt_s32vector
+////////////////////////////////////////////////////////////////////////////
+
+namespace pmt {
+
+static pmt_s32vector *
+_s32vector(pmt_t x)
+{
+  return dynamic_cast<pmt_s32vector*>(x.get());
+}
+
+
+pmt_s32vector::pmt_s32vector(size_t k, int32_t fill)
+  : d_v(k)
+{
+  for (size_t i = 0; i < k; i++)
+    d_v[i] = fill;
+}
+
+pmt_s32vector::pmt_s32vector(size_t k, const int32_t *data)
+  : d_v(k)
+{
+  if(k)
+    memcpy( &d_v[0], data, k * sizeof(int32_t) );
+}
+
+int32_t
+pmt_s32vector::ref(size_t k) const
+{
+  if (k >= length())
+    throw out_of_range("pmt_s32vector_ref", from_long(k));
+  return d_v[k];
+}
+
+void
+pmt_s32vector::set(size_t k, int32_t x)
+{
+  if (k >= length())
+    throw out_of_range("pmt_s32vector_set", from_long(k));
+  d_v[k] = x;
+}
+
+const int32_t *
+pmt_s32vector::elements(size_t &len)
+{
+  len = length();
+  return len ?  &d_v[0] : nullptr;
+}
+
+int32_t *
+pmt_s32vector::writable_elements(size_t &len)
+{
+  len = length();
+  return len ? &d_v[0] : nullptr;
+}
+
+const void*
+pmt_s32vector::uniform_elements(size_t &len)
+{
+  len = length() * sizeof(int32_t);
+  return len ? &d_v[0] : nullptr;
+}
+
+void*
+pmt_s32vector::uniform_writable_elements(size_t &len)
+{
+  len = length() * sizeof(int32_t);
+  return len ? (&d_v[0]) : nullptr;
+}
+
+bool
+is_s32vector(pmt_t obj)
+{
+  return obj->is_s32vector();
+}
+
+pmt_t
+make_s32vector(size_t k, int32_t fill)
+{
+  return pmt_t(new pmt_s32vector(k, fill));
+}
+
+pmt_t
+init_s32vector(size_t k, const int32_t *data)
+{
+  return pmt_t(new pmt_s32vector(k, data));
+}
+
+pmt_t
+init_s32vector(size_t k, const std::vector< int32_t > &data)
+{
+  if(k) {
+    return pmt_t(new pmt_s32vector(k, &data[0]));
+  }
+  return pmt_t(new pmt_s32vector(k, static_cast< int32_t >(0))); // fills an empty vector with 0
+}
+
+int32_t
+s32vector_ref(pmt_t vector, size_t k)
+{
+  if (!vector->is_s32vector())
+    throw wrong_type("pmt_s32vector_ref", vector);
+  return _s32vector(vector)->ref(k);
+}
+
+void
+s32vector_set(pmt_t vector, size_t k, int32_t obj)
+{
+  if (!vector->is_s32vector())
+    throw wrong_type("pmt_s32vector_set", vector);
+  _s32vector(vector)->set(k, obj);
+}
+
+const int32_t *
+s32vector_elements(pmt_t vector, size_t &len)
+{
+  if (!vector->is_s32vector())
+    throw wrong_type("pmt_s32vector_elements", vector);
+  return _s32vector(vector)->elements(len);
+}
+
+const std::vector< int32_t >
+s32vector_elements(pmt_t vector)
+{
+  if (!vector->is_s32vector())
+    throw wrong_type("pmt_s32vector_elements", vector);
+  size_t len;
+  const int32_t *array = _s32vector(vector)->elements(len);
+  const std::vector< int32_t > vec(array, array+len);
+  return vec;
+}
+
+
+int32_t *
+s32vector_writable_elements(pmt_t vector, size_t &len)
+{
+  if (!vector->is_s32vector())
+    throw wrong_type("pmt_s32vector_writable_elements", vector);
+  return _s32vector(vector)->writable_elements(len);
+}
+
+const std::string
+pmt_s32vector::string_ref(size_t k) const
+{
+  return boost::lexical_cast< std::string, int32_t > (ref(k));
+}
+
+} /* namespace pmt */
+////////////////////////////////////////////////////////////////////////////
+//                           pmt_u64vector
+////////////////////////////////////////////////////////////////////////////
+
+namespace pmt {
+
+static pmt_u64vector *
+_u64vector(pmt_t x)
+{
+  return dynamic_cast<pmt_u64vector*>(x.get());
+}
+
+
+pmt_u64vector::pmt_u64vector(size_t k, uint64_t fill)
+  : d_v(k)
+{
+  for (size_t i = 0; i < k; i++)
+    d_v[i] = fill;
+}
+
+pmt_u64vector::pmt_u64vector(size_t k, const uint64_t *data)
+  : d_v(k)
+{
+  if(k)
+    memcpy( &d_v[0], data, k * sizeof(uint64_t) );
+}
+
+uint64_t
+pmt_u64vector::ref(size_t k) const
+{
+  if (k >= length())
+    throw out_of_range("pmt_u64vector_ref", from_long(k));
+  return d_v[k];
+}
+
+void
+pmt_u64vector::set(size_t k, uint64_t x)
+{
+  if (k >= length())
+    throw out_of_range("pmt_u64vector_set", from_long(k));
+  d_v[k] = x;
+}
+
+const uint64_t *
+pmt_u64vector::elements(size_t &len)
+{
+  len = length();
+  return len ?  &d_v[0] : nullptr;
+}
+
+uint64_t *
+pmt_u64vector::writable_elements(size_t &len)
+{
+  len = length();
+  return len ? &d_v[0] : nullptr;
+}
+
+const void*
+pmt_u64vector::uniform_elements(size_t &len)
+{
+  len = length() * sizeof(uint64_t);
+  return len ? &d_v[0] : nullptr;
+}
+
+void*
+pmt_u64vector::uniform_writable_elements(size_t &len)
+{
+  len = length() * sizeof(uint64_t);
+  return len ? (&d_v[0]) : nullptr;
+}
+
+bool
+is_u64vector(pmt_t obj)
+{
+  return obj->is_u64vector();
+}
+
+pmt_t
+make_u64vector(size_t k, uint64_t fill)
+{
+  return pmt_t(new pmt_u64vector(k, fill));
+}
+
+pmt_t
+init_u64vector(size_t k, const uint64_t *data)
+{
+  return pmt_t(new pmt_u64vector(k, data));
+}
+
+pmt_t
+init_u64vector(size_t k, const std::vector< uint64_t > &data)
+{
+  if(k) {
+    return pmt_t(new pmt_u64vector(k, &data[0]));
+  }
+  return pmt_t(new pmt_u64vector(k, static_cast< uint64_t >(0))); // fills an empty vector with 0
+}
+
+uint64_t
+u64vector_ref(pmt_t vector, size_t k)
+{
+  if (!vector->is_u64vector())
+    throw wrong_type("pmt_u64vector_ref", vector);
+  return _u64vector(vector)->ref(k);
+}
+
+void
+u64vector_set(pmt_t vector, size_t k, uint64_t obj)
+{
+  if (!vector->is_u64vector())
+    throw wrong_type("pmt_u64vector_set", vector);
+  _u64vector(vector)->set(k, obj);
+}
+
+const uint64_t *
+u64vector_elements(pmt_t vector, size_t &len)
+{
+  if (!vector->is_u64vector())
+    throw wrong_type("pmt_u64vector_elements", vector);
+  return _u64vector(vector)->elements(len);
+}
+
+const std::vector< uint64_t >
+u64vector_elements(pmt_t vector)
+{
+  if (!vector->is_u64vector())
+    throw wrong_type("pmt_u64vector_elements", vector);
+  size_t len;
+  const uint64_t *array = _u64vector(vector)->elements(len);
+  const std::vector< uint64_t > vec(array, array+len);
+  return vec;
+}
+
+
+uint64_t *
+u64vector_writable_elements(pmt_t vector, size_t &len)
+{
+  if (!vector->is_u64vector())
+    throw wrong_type("pmt_u64vector_writable_elements", vector);
+  return _u64vector(vector)->writable_elements(len);
+}
+
+const std::string
+pmt_u64vector::string_ref(size_t k) const
+{
+  return boost::lexical_cast< std::string, uint64_t > (ref(k));
+}
+
+} /* namespace pmt */
+////////////////////////////////////////////////////////////////////////////
+//                           pmt_s64vector
+////////////////////////////////////////////////////////////////////////////
+
+namespace pmt {
+
+static pmt_s64vector *
+_s64vector(pmt_t x)
+{
+  return dynamic_cast<pmt_s64vector*>(x.get());
+}
+
+
+pmt_s64vector::pmt_s64vector(size_t k, int64_t fill)
+  : d_v(k)
+{
+  for (size_t i = 0; i < k; i++)
+    d_v[i] = fill;
+}
+
+pmt_s64vector::pmt_s64vector(size_t k, const int64_t *data)
+  : d_v(k)
+{
+  if(k)
+    memcpy( &d_v[0], data, k * sizeof(int64_t) );
+}
+
+int64_t
+pmt_s64vector::ref(size_t k) const
+{
+  if (k >= length())
+    throw out_of_range("pmt_s64vector_ref", from_long(k));
+  return d_v[k];
+}
+
+void
+pmt_s64vector::set(size_t k, int64_t x)
+{
+  if (k >= length())
+    throw out_of_range("pmt_s64vector_set", from_long(k));
+  d_v[k] = x;
+}
+
+const int64_t *
+pmt_s64vector::elements(size_t &len)
+{
+  len = length();
+  return len ?  &d_v[0] : nullptr;
+}
+
+int64_t *
+pmt_s64vector::writable_elements(size_t &len)
+{
+  len = length();
+  return len ? &d_v[0] : nullptr;
+}
+
+const void*
+pmt_s64vector::uniform_elements(size_t &len)
+{
+  len = length() * sizeof(int64_t);
+  return len ? &d_v[0] : nullptr;
+}
+
+void*
+pmt_s64vector::uniform_writable_elements(size_t &len)
+{
+  len = length() * sizeof(int64_t);
+  return len ? (&d_v[0]) : nullptr;
+}
+
+bool
+is_s64vector(pmt_t obj)
+{
+  return obj->is_s64vector();
+}
+
+pmt_t
+make_s64vector(size_t k, int64_t fill)
+{
+  return pmt_t(new pmt_s64vector(k, fill));
+}
+
+pmt_t
+init_s64vector(size_t k, const int64_t *data)
+{
+  return pmt_t(new pmt_s64vector(k, data));
+}
+
+pmt_t
+init_s64vector(size_t k, const std::vector< int64_t > &data)
+{
+  if(k) {
+    return pmt_t(new pmt_s64vector(k, &data[0]));
+  }
+  return pmt_t(new pmt_s64vector(k, static_cast< int64_t >(0))); // fills an empty vector with 0
+}
+
+int64_t
+s64vector_ref(pmt_t vector, size_t k)
+{
+  if (!vector->is_s64vector())
+    throw wrong_type("pmt_s64vector_ref", vector);
+  return _s64vector(vector)->ref(k);
+}
+
+void
+s64vector_set(pmt_t vector, size_t k, int64_t obj)
+{
+  if (!vector->is_s64vector())
+    throw wrong_type("pmt_s64vector_set", vector);
+  _s64vector(vector)->set(k, obj);
+}
+
+const int64_t *
+s64vector_elements(pmt_t vector, size_t &len)
+{
+  if (!vector->is_s64vector())
+    throw wrong_type("pmt_s64vector_elements", vector);
+  return _s64vector(vector)->elements(len);
+}
+
+const std::vector< int64_t >
+s64vector_elements(pmt_t vector)
+{
+  if (!vector->is_s64vector())
+    throw wrong_type("pmt_s64vector_elements", vector);
+  size_t len;
+  const int64_t *array = _s64vector(vector)->elements(len);
+  const std::vector< int64_t > vec(array, array+len);
+  return vec;
+}
+
+
+int64_t *
+s64vector_writable_elements(pmt_t vector, size_t &len)
+{
+  if (!vector->is_s64vector())
+    throw wrong_type("pmt_s64vector_writable_elements", vector);
+  return _s64vector(vector)->writable_elements(len);
+}
+
+const std::string
+pmt_s64vector::string_ref(size_t k) const
+{
+  return boost::lexical_cast< std::string, int64_t > (ref(k));
+}
+
+} /* namespace pmt */
+////////////////////////////////////////////////////////////////////////////
+//                           pmt_f32vector
+////////////////////////////////////////////////////////////////////////////
+
+namespace pmt {
+
+static pmt_f32vector *
+_f32vector(pmt_t x)
+{
+  return dynamic_cast<pmt_f32vector*>(x.get());
+}
+
+
+pmt_f32vector::pmt_f32vector(size_t k, float fill)
+  : d_v(k)
+{
+  for (size_t i = 0; i < k; i++)
+    d_v[i] = fill;
+}
+
+pmt_f32vector::pmt_f32vector(size_t k, const float *data)
+  : d_v(k)
+{
+  if(k)
+    memcpy( &d_v[0], data, k * sizeof(float) );
+}
+
+float
+pmt_f32vector::ref(size_t k) const
+{
+  if (k >= length())
+    throw out_of_range("pmt_f32vector_ref", from_long(k));
+  return d_v[k];
+}
+
+void
+pmt_f32vector::set(size_t k, float x)
+{
+  if (k >= length())
+    throw out_of_range("pmt_f32vector_set", from_long(k));
+  d_v[k] = x;
+}
+
+const float *
+pmt_f32vector::elements(size_t &len)
+{
+  len = length();
+  return len ?  &d_v[0] : nullptr;
+}
+
+float *
+pmt_f32vector::writable_elements(size_t &len)
+{
+  len = length();
+  return len ? &d_v[0] : nullptr;
+}
+
+const void*
+pmt_f32vector::uniform_elements(size_t &len)
+{
+  len = length() * sizeof(float);
+  return len ? &d_v[0] : nullptr;
+}
+
+void*
+pmt_f32vector::uniform_writable_elements(size_t &len)
+{
+  len = length() * sizeof(float);
+  return len ? (&d_v[0]) : nullptr;
+}
+
+bool
+is_f32vector(pmt_t obj)
+{
+  return obj->is_f32vector();
+}
+
+pmt_t
+make_f32vector(size_t k, float fill)
+{
+  return pmt_t(new pmt_f32vector(k, fill));
+}
+
+pmt_t
+init_f32vector(size_t k, const float *data)
+{
+  return pmt_t(new pmt_f32vector(k, data));
+}
+
+pmt_t
+init_f32vector(size_t k, const std::vector< float > &data)
+{
+  if(k) {
+    return pmt_t(new pmt_f32vector(k, &data[0]));
+  }
+  return pmt_t(new pmt_f32vector(k, static_cast< float >(0))); // fills an empty vector with 0
+}
+
+float
+f32vector_ref(pmt_t vector, size_t k)
+{
+  if (!vector->is_f32vector())
+    throw wrong_type("pmt_f32vector_ref", vector);
+  return _f32vector(vector)->ref(k);
+}
+
+void
+f32vector_set(pmt_t vector, size_t k, float obj)
+{
+  if (!vector->is_f32vector())
+    throw wrong_type("pmt_f32vector_set", vector);
+  _f32vector(vector)->set(k, obj);
+}
+
+const float *
+f32vector_elements(pmt_t vector, size_t &len)
+{
+  if (!vector->is_f32vector())
+    throw wrong_type("pmt_f32vector_elements", vector);
+  return _f32vector(vector)->elements(len);
+}
+
+const std::vector< float >
+f32vector_elements(pmt_t vector)
+{
+  if (!vector->is_f32vector())
+    throw wrong_type("pmt_f32vector_elements", vector);
+  size_t len;
+  const float *array = _f32vector(vector)->elements(len);
+  const std::vector< float > vec(array, array+len);
+  return vec;
+}
+
+
+float *
+f32vector_writable_elements(pmt_t vector, size_t &len)
+{
+  if (!vector->is_f32vector())
+    throw wrong_type("pmt_f32vector_writable_elements", vector);
+  return _f32vector(vector)->writable_elements(len);
+}
+
+const std::string
+pmt_f32vector::string_ref(size_t k) const
+{
+  return boost::lexical_cast< std::string, float > (ref(k));
+}
+
+} /* namespace pmt */
+////////////////////////////////////////////////////////////////////////////
+//                           pmt_f64vector
+////////////////////////////////////////////////////////////////////////////
+
+namespace pmt {
+
+static pmt_f64vector *
+_f64vector(pmt_t x)
+{
+  return dynamic_cast<pmt_f64vector*>(x.get());
+}
+
+
+pmt_f64vector::pmt_f64vector(size_t k, double fill)
+  : d_v(k)
+{
+  for (size_t i = 0; i < k; i++)
+    d_v[i] = fill;
+}
+
+pmt_f64vector::pmt_f64vector(size_t k, const double *data)
+  : d_v(k)
+{
+  if(k)
+    memcpy( &d_v[0], data, k * sizeof(double) );
+}
+
+double
+pmt_f64vector::ref(size_t k) const
+{
+  if (k >= length())
+    throw out_of_range("pmt_f64vector_ref", from_long(k));
+  return d_v[k];
+}
+
+void
+pmt_f64vector::set(size_t k, double x)
+{
+  if (k >= length())
+    throw out_of_range("pmt_f64vector_set", from_long(k));
+  d_v[k] = x;
+}
+
+const double *
+pmt_f64vector::elements(size_t &len)
+{
+  len = length();
+  return len ?  &d_v[0] : nullptr;
+}
+
+double *
+pmt_f64vector::writable_elements(size_t &len)
+{
+  len = length();
+  return len ? &d_v[0] : nullptr;
+}
+
+const void*
+pmt_f64vector::uniform_elements(size_t &len)
+{
+  len = length() * sizeof(double);
+  return len ? &d_v[0] : nullptr;
+}
+
+void*
+pmt_f64vector::uniform_writable_elements(size_t &len)
+{
+  len = length() * sizeof(double);
+  return len ? (&d_v[0]) : nullptr;
+}
+
+bool
+is_f64vector(pmt_t obj)
+{
+  return obj->is_f64vector();
+}
+
+pmt_t
+make_f64vector(size_t k, double fill)
+{
+  return pmt_t(new pmt_f64vector(k, fill));
+}
+
+pmt_t
+init_f64vector(size_t k, const double *data)
+{
+  return pmt_t(new pmt_f64vector(k, data));
+}
+
+pmt_t
+init_f64vector(size_t k, const std::vector< double > &data)
+{
+  if(k) {
+    return pmt_t(new pmt_f64vector(k, &data[0]));
+  }
+  return pmt_t(new pmt_f64vector(k, static_cast< double >(0))); // fills an empty vector with 0
+}
+
+double
+f64vector_ref(pmt_t vector, size_t k)
+{
+  if (!vector->is_f64vector())
+    throw wrong_type("pmt_f64vector_ref", vector);
+  return _f64vector(vector)->ref(k);
+}
+
+void
+f64vector_set(pmt_t vector, size_t k, double obj)
+{
+  if (!vector->is_f64vector())
+    throw wrong_type("pmt_f64vector_set", vector);
+  _f64vector(vector)->set(k, obj);
+}
+
+const double *
+f64vector_elements(pmt_t vector, size_t &len)
+{
+  if (!vector->is_f64vector())
+    throw wrong_type("pmt_f64vector_elements", vector);
+  return _f64vector(vector)->elements(len);
+}
+
+const std::vector< double >
+f64vector_elements(pmt_t vector)
+{
+  if (!vector->is_f64vector())
+    throw wrong_type("pmt_f64vector_elements", vector);
+  size_t len;
+  const double *array = _f64vector(vector)->elements(len);
+  const std::vector< double > vec(array, array+len);
+  return vec;
+}
+
+
+double *
+f64vector_writable_elements(pmt_t vector, size_t &len)
+{
+  if (!vector->is_f64vector())
+    throw wrong_type("pmt_f64vector_writable_elements", vector);
+  return _f64vector(vector)->writable_elements(len);
+}
+
+const std::string
+pmt_f64vector::string_ref(size_t k) const
+{
+  return boost::lexical_cast< std::string, double > (ref(k));
+}
+
+} /* namespace pmt */
+////////////////////////////////////////////////////////////////////////////
+//                           pmt_c32vector
+////////////////////////////////////////////////////////////////////////////
+
+namespace pmt {
+
+static pmt_c32vector *
+_c32vector(pmt_t x)
+{
+  return dynamic_cast<pmt_c32vector*>(x.get());
+}
+
+
+pmt_c32vector::pmt_c32vector(size_t k, std::complex<float> fill)
+  : d_v(k)
+{
+  for (size_t i = 0; i < k; i++)
+    d_v[i] = fill;
+}
+
+pmt_c32vector::pmt_c32vector(size_t k, const std::complex<float> *data)
+  : d_v(k)
+{
+  if(k)
+    memcpy( &d_v[0], data, k * sizeof(std::complex<float>) );
+}
+
+std::complex<float>
+pmt_c32vector::ref(size_t k) const
+{
+  if (k >= length())
+    throw out_of_range("pmt_c32vector_ref", from_long(k));
+  return d_v[k];
+}
+
+void
+pmt_c32vector::set(size_t k, std::complex<float> x)
+{
+  if (k >= length())
+    throw out_of_range("pmt_c32vector_set", from_long(k));
+  d_v[k] = x;
+}
+
+const std::complex<float> *
+pmt_c32vector::elements(size_t &len)
+{
+  len = length();
+  return len ?  &d_v[0] : nullptr;
+}
+
+std::complex<float> *
+pmt_c32vector::writable_elements(size_t &len)
+{
+  len = length();
+  return len ? &d_v[0] : nullptr;
+}
+
+const void*
+pmt_c32vector::uniform_elements(size_t &len)
+{
+  len = length() * sizeof(std::complex<float>);
+  return len ? &d_v[0] : nullptr;
+}
+
+void*
+pmt_c32vector::uniform_writable_elements(size_t &len)
+{
+  len = length() * sizeof(std::complex<float>);
+  return len ? (&d_v[0]) : nullptr;
+}
+
+bool
+is_c32vector(pmt_t obj)
+{
+  return obj->is_c32vector();
+}
+
+pmt_t
+make_c32vector(size_t k, std::complex<float> fill)
+{
+  return pmt_t(new pmt_c32vector(k, fill));
+}
+
+pmt_t
+init_c32vector(size_t k, const std::complex<float> *data)
+{
+  return pmt_t(new pmt_c32vector(k, data));
+}
+
+pmt_t
+init_c32vector(size_t k, const std::vector< std::complex<float> > &data)
+{
+  if(k) {
+    return pmt_t(new pmt_c32vector(k, &data[0]));
+  }
+  return pmt_t(new pmt_c32vector(k, static_cast< std::complex<float> >(0))); // fills an empty vector with 0
+}
+
+std::complex<float>
+c32vector_ref(pmt_t vector, size_t k)
+{
+  if (!vector->is_c32vector())
+    throw wrong_type("pmt_c32vector_ref", vector);
+  return _c32vector(vector)->ref(k);
+}
+
+void
+c32vector_set(pmt_t vector, size_t k, std::complex<float> obj)
+{
+  if (!vector->is_c32vector())
+    throw wrong_type("pmt_c32vector_set", vector);
+  _c32vector(vector)->set(k, obj);
+}
+
+const std::complex<float> *
+c32vector_elements(pmt_t vector, size_t &len)
+{
+  if (!vector->is_c32vector())
+    throw wrong_type("pmt_c32vector_elements", vector);
+  return _c32vector(vector)->elements(len);
+}
+
+const std::vector< std::complex<float> >
+c32vector_elements(pmt_t vector)
+{
+  if (!vector->is_c32vector())
+    throw wrong_type("pmt_c32vector_elements", vector);
+  size_t len;
+  const std::complex<float> *array = _c32vector(vector)->elements(len);
+  const std::vector< std::complex<float> > vec(array, array+len);
+  return vec;
+}
+
+
+std::complex<float> *
+c32vector_writable_elements(pmt_t vector, size_t &len)
+{
+  if (!vector->is_c32vector())
+    throw wrong_type("pmt_c32vector_writable_elements", vector);
+  return _c32vector(vector)->writable_elements(len);
+}
+
+const std::string
+pmt_c32vector::string_ref(size_t k) const
+{
+  return boost::lexical_cast< std::string, std::complex<float> > (ref(k));
+}
+
+} /* namespace pmt */
+////////////////////////////////////////////////////////////////////////////
+//                           pmt_c64vector
+////////////////////////////////////////////////////////////////////////////
+
+namespace pmt {
+
+static pmt_c64vector *
+_c64vector(pmt_t x)
+{
+  return dynamic_cast<pmt_c64vector*>(x.get());
+}
+
+
+pmt_c64vector::pmt_c64vector(size_t k, std::complex<double> fill)
+  : d_v(k)
+{
+  for (size_t i = 0; i < k; i++)
+    d_v[i] = fill;
+}
+
+pmt_c64vector::pmt_c64vector(size_t k, const std::complex<double> *data)
+  : d_v(k)
+{
+  if(k)
+    memcpy( &d_v[0], data, k * sizeof(std::complex<double>) );
+}
+
+std::complex<double>
+pmt_c64vector::ref(size_t k) const
+{
+  if (k >= length())
+    throw out_of_range("pmt_c64vector_ref", from_long(k));
+  return d_v[k];
+}
+
+void
+pmt_c64vector::set(size_t k, std::complex<double> x)
+{
+  if (k >= length())
+    throw out_of_range("pmt_c64vector_set", from_long(k));
+  d_v[k] = x;
+}
+
+const std::complex<double> *
+pmt_c64vector::elements(size_t &len)
+{
+  len = length();
+  return len ?  &d_v[0] : nullptr;
+}
+
+std::complex<double> *
+pmt_c64vector::writable_elements(size_t &len)
+{
+  len = length();
+  return len ? &d_v[0] : nullptr;
+}
+
+const void*
+pmt_c64vector::uniform_elements(size_t &len)
+{
+  len = length() * sizeof(std::complex<double>);
+  return len ? &d_v[0] : nullptr;
+}
+
+void*
+pmt_c64vector::uniform_writable_elements(size_t &len)
+{
+  len = length() * sizeof(std::complex<double>);
+  return len ? (&d_v[0]) : nullptr;
+}
+
+bool
+is_c64vector(pmt_t obj)
+{
+  return obj->is_c64vector();
+}
+
+pmt_t
+make_c64vector(size_t k, std::complex<double> fill)
+{
+  return pmt_t(new pmt_c64vector(k, fill));
+}
+
+pmt_t
+init_c64vector(size_t k, const std::complex<double> *data)
+{
+  return pmt_t(new pmt_c64vector(k, data));
+}
+
+pmt_t
+init_c64vector(size_t k, const std::vector< std::complex<double> > &data)
+{
+  if(k) {
+    return pmt_t(new pmt_c64vector(k, &data[0]));
+  }
+  return pmt_t(new pmt_c64vector(k, static_cast< std::complex<double> >(0))); // fills an empty vector with 0
+}
+
+std::complex<double>
+c64vector_ref(pmt_t vector, size_t k)
+{
+  if (!vector->is_c64vector())
+    throw wrong_type("pmt_c64vector_ref", vector);
+  return _c64vector(vector)->ref(k);
+}
+
+void
+c64vector_set(pmt_t vector, size_t k, std::complex<double> obj)
+{
+  if (!vector->is_c64vector())
+    throw wrong_type("pmt_c64vector_set", vector);
+  _c64vector(vector)->set(k, obj);
+}
+
+const std::complex<double> *
+c64vector_elements(pmt_t vector, size_t &len)
+{
+  if (!vector->is_c64vector())
+    throw wrong_type("pmt_c64vector_elements", vector);
+  return _c64vector(vector)->elements(len);
+}
+
+const std::vector< std::complex<double> >
+c64vector_elements(pmt_t vector)
+{
+  if (!vector->is_c64vector())
+    throw wrong_type("pmt_c64vector_elements", vector);
+  size_t len;
+  const std::complex<double> *array = _c64vector(vector)->elements(len);
+  const std::vector< std::complex<double> > vec(array, array+len);
+  return vec;
+}
+
+
+std::complex<double> *
+c64vector_writable_elements(pmt_t vector, size_t &len)
+{
+  if (!vector->is_c64vector())
+    throw wrong_type("pmt_c64vector_writable_elements", vector);
+  return _c64vector(vector)->writable_elements(len);
+}
+
+const std::string
+pmt_c64vector::string_ref(size_t k) const
+{
+  return boost::lexical_cast< std::string, std::complex<double> > (ref(k));
+}
+
+} /* namespace pmt */
diff --git a/gnuradio-runtime/lib/pmt/pmt_unv_int.h b/gnuradio-runtime/lib/pmt/pmt_unv_int.h
new file mode 100644
index 0000000000..4b4364b411
--- /dev/null
+++ b/gnuradio-runtime/lib/pmt/pmt_unv_int.h
@@ -0,0 +1,331 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006,2009,2018 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_PMT_UNV_INT_H
+#define INCLUDED_PMT_UNV_INT_H
+
+#include "pmt_int.h"
+
+#include <vector>
+#include <cstdint>
+
+namespace pmt{
+////////////////////////////////////////////////////////////////////////////
+//                           pmt_u8vector
+////////////////////////////////////////////////////////////////////////////
+class PMT_API pmt_u8vector : public pmt_uniform_vector
+{
+  std::vector< uint8_t >	d_v;
+
+public:
+  pmt_u8vector(size_t k, uint8_t fill);
+  pmt_u8vector(size_t k, const uint8_t *data);
+  // ~pmt_u8vector();
+
+  bool is_u8vector() const { return true; }
+  size_t length() const { return d_v.size(); }
+  size_t itemsize() const { return sizeof(uint8_t); }
+  uint8_t ref(size_t k) const;
+  void set(size_t k, uint8_t x);
+  const uint8_t *elements(size_t &len);
+  uint8_t *writable_elements(size_t &len);
+  const void *uniform_elements(size_t &len);
+  void *uniform_writable_elements(size_t &len);
+  virtual const std::string string_ref(size_t k) const;
+};
+
+////////////////////////////////////////////////////////////////////////////
+//                           pmt_s8vector
+////////////////////////////////////////////////////////////////////////////
+
+class pmt_s8vector : public pmt_uniform_vector
+{
+  std::vector< int8_t >	d_v;
+
+public:
+  pmt_s8vector(size_t k, int8_t fill);
+  pmt_s8vector(size_t k, const int8_t *data);
+  // ~pmt_s8vector();
+
+  bool is_s8vector() const { return true; }
+  size_t length() const { return d_v.size(); }
+  size_t itemsize() const { return sizeof(int8_t); }
+  int8_t ref(size_t k) const;
+  void set(size_t k, int8_t x);
+  const int8_t *elements(size_t &len);
+  int8_t *writable_elements(size_t &len);
+  const void *uniform_elements(size_t &len);
+  void *uniform_writable_elements(size_t &len);
+  virtual const std::string string_ref(size_t k) const;
+};
+
+////////////////////////////////////////////////////////////////////////////
+//                           pmt_u16vector
+////////////////////////////////////////////////////////////////////////////
+
+class pmt_u16vector : public pmt_uniform_vector
+{
+  std::vector< uint16_t >	d_v;
+
+public:
+  pmt_u16vector(size_t k, uint16_t fill);
+  pmt_u16vector(size_t k, const uint16_t *data);
+  // ~pmt_u16vector();
+
+  bool is_u16vector() const { return true; }
+  size_t length() const { return d_v.size(); }
+  size_t itemsize() const { return sizeof(uint16_t); }
+  uint16_t ref(size_t k) const;
+  void set(size_t k, uint16_t x);
+  const uint16_t *elements(size_t &len);
+  uint16_t *writable_elements(size_t &len);
+  const void *uniform_elements(size_t &len);
+  void *uniform_writable_elements(size_t &len);
+  virtual const std::string string_ref(size_t k) const;
+};
+
+////////////////////////////////////////////////////////////////////////////
+//                           pmt_s16vector
+////////////////////////////////////////////////////////////////////////////
+
+class pmt_s16vector : public pmt_uniform_vector
+{
+  std::vector< int16_t >	d_v;
+
+public:
+  pmt_s16vector(size_t k, int16_t fill);
+  pmt_s16vector(size_t k, const int16_t *data);
+  // ~pmt_s16vector();
+
+  bool is_s16vector() const { return true; }
+  size_t length() const { return d_v.size(); }
+  size_t itemsize() const { return sizeof(int16_t); }
+  int16_t ref(size_t k) const;
+  void set(size_t k, int16_t x);
+  const int16_t *elements(size_t &len);
+  int16_t *writable_elements(size_t &len);
+  const void *uniform_elements(size_t &len);
+  void *uniform_writable_elements(size_t &len);
+  virtual const std::string string_ref(size_t k) const;
+};
+
+////////////////////////////////////////////////////////////////////////////
+//                           pmt_u32vector
+////////////////////////////////////////////////////////////////////////////
+
+class pmt_u32vector : public pmt_uniform_vector
+{
+  std::vector< uint32_t >	d_v;
+
+public:
+  pmt_u32vector(size_t k, uint32_t fill);
+  pmt_u32vector(size_t k, const uint32_t *data);
+  // ~pmt_u32vector();
+
+  bool is_u32vector() const { return true; }
+  size_t length() const { return d_v.size(); }
+  size_t itemsize() const { return sizeof(uint32_t); }
+  uint32_t ref(size_t k) const;
+  void set(size_t k, uint32_t x);
+  const uint32_t *elements(size_t &len);
+  uint32_t *writable_elements(size_t &len);
+  const void *uniform_elements(size_t &len);
+  void *uniform_writable_elements(size_t &len);
+  virtual const std::string string_ref(size_t k) const;
+};
+
+////////////////////////////////////////////////////////////////////////////
+//                           pmt_s32vector
+////////////////////////////////////////////////////////////////////////////
+
+class pmt_s32vector : public pmt_uniform_vector
+{
+  std::vector< int32_t >	d_v;
+
+public:
+  pmt_s32vector(size_t k, int32_t fill);
+  pmt_s32vector(size_t k, const int32_t *data);
+  // ~pmt_s32vector();
+
+  bool is_s32vector() const { return true; }
+  size_t length() const { return d_v.size(); }
+  size_t itemsize() const { return sizeof(int32_t); }
+  int32_t ref(size_t k) const;
+  void set(size_t k, int32_t x);
+  const int32_t *elements(size_t &len);
+  int32_t *writable_elements(size_t &len);
+  const void *uniform_elements(size_t &len);
+  void *uniform_writable_elements(size_t &len);
+  virtual const std::string string_ref(size_t k) const;
+};
+
+////////////////////////////////////////////////////////////////////////////
+//                           pmt_u64vector
+////////////////////////////////////////////////////////////////////////////
+
+class pmt_u64vector : public pmt_uniform_vector
+{
+  std::vector< uint64_t >	d_v;
+
+public:
+  pmt_u64vector(size_t k, uint64_t fill);
+  pmt_u64vector(size_t k, const uint64_t *data);
+  // ~pmt_u64vector();
+
+  bool is_u64vector() const { return true; }
+  size_t length() const { return d_v.size(); }
+  size_t itemsize() const { return sizeof(uint64_t); }
+  uint64_t ref(size_t k) const;
+  void set(size_t k, uint64_t x);
+  const uint64_t *elements(size_t &len);
+  uint64_t *writable_elements(size_t &len);
+  const void *uniform_elements(size_t &len);
+  void *uniform_writable_elements(size_t &len);
+  virtual const std::string string_ref(size_t k) const;
+};
+
+////////////////////////////////////////////////////////////////////////////
+//                           pmt_s64vector
+////////////////////////////////////////////////////////////////////////////
+
+class pmt_s64vector : public pmt_uniform_vector
+{
+  std::vector< int64_t >	d_v;
+
+public:
+  pmt_s64vector(size_t k, int64_t fill);
+  pmt_s64vector(size_t k, const int64_t *data);
+  // ~pmt_s64vector();
+
+  bool is_s64vector() const { return true; }
+  size_t length() const { return d_v.size(); }
+  size_t itemsize() const { return sizeof(int64_t); }
+  int64_t ref(size_t k) const;
+  void set(size_t k, int64_t x);
+  const int64_t *elements(size_t &len);
+  int64_t *writable_elements(size_t &len);
+  const void *uniform_elements(size_t &len);
+  void *uniform_writable_elements(size_t &len);
+  virtual const std::string string_ref(size_t k) const;
+};
+
+////////////////////////////////////////////////////////////////////////////
+//                           pmt_f32vector
+////////////////////////////////////////////////////////////////////////////
+
+class pmt_f32vector : public pmt_uniform_vector
+{
+  std::vector< float >	d_v;
+
+public:
+  pmt_f32vector(size_t k, float fill);
+  pmt_f32vector(size_t k, const float *data);
+  // ~pmt_f32vector();
+
+  bool is_f32vector() const { return true; }
+  size_t length() const { return d_v.size(); }
+  size_t itemsize() const { return sizeof(float); }
+  float ref(size_t k) const;
+  void set(size_t k, float x);
+  const float *elements(size_t &len);
+  float *writable_elements(size_t &len);
+  const void *uniform_elements(size_t &len);
+  void *uniform_writable_elements(size_t &len);
+  virtual const std::string string_ref(size_t k) const;
+};
+
+////////////////////////////////////////////////////////////////////////////
+//                           pmt_f64vector
+////////////////////////////////////////////////////////////////////////////
+
+class pmt_f64vector : public pmt_uniform_vector
+{
+  std::vector< double >	d_v;
+
+public:
+  pmt_f64vector(size_t k, double fill);
+  pmt_f64vector(size_t k, const double *data);
+  // ~pmt_f64vector();
+
+  bool is_f64vector() const { return true; }
+  size_t length() const { return d_v.size(); }
+  size_t itemsize() const { return sizeof(double); }
+  double ref(size_t k) const;
+  void set(size_t k, double x);
+  const double *elements(size_t &len);
+  double *writable_elements(size_t &len);
+  const void *uniform_elements(size_t &len);
+  void *uniform_writable_elements(size_t &len);
+  virtual const std::string string_ref(size_t k) const;
+};
+
+////////////////////////////////////////////////////////////////////////////
+//                           pmt_c32vector
+////////////////////////////////////////////////////////////////////////////
+
+class pmt_c32vector : public pmt_uniform_vector
+{
+  std::vector< std::complex<float> >	d_v;
+
+public:
+  pmt_c32vector(size_t k, std::complex<float> fill);
+  pmt_c32vector(size_t k, const std::complex<float> *data);
+  // ~pmt_c32vector();
+
+  bool is_c32vector() const { return true; }
+  size_t length() const { return d_v.size(); }
+  size_t itemsize() const { return sizeof(std::complex<float>); }
+  std::complex<float> ref(size_t k) const;
+  void set(size_t k, std::complex<float> x);
+  const std::complex<float> *elements(size_t &len);
+  std::complex<float> *writable_elements(size_t &len);
+  const void *uniform_elements(size_t &len);
+  void *uniform_writable_elements(size_t &len);
+  virtual const std::string string_ref(size_t k) const;
+};
+
+////////////////////////////////////////////////////////////////////////////
+//                           pmt_c64vector
+////////////////////////////////////////////////////////////////////////////
+
+class pmt_c64vector : public pmt_uniform_vector
+{
+  std::vector< std::complex<double> >	d_v;
+
+public:
+  pmt_c64vector(size_t k, std::complex<double> fill);
+  pmt_c64vector(size_t k, const std::complex<double> *data);
+  // ~pmt_c64vector();
+
+  bool is_c64vector() const { return true; }
+  size_t length() const { return d_v.size(); }
+  size_t itemsize() const { return sizeof(std::complex<double>); }
+  std::complex<double> ref(size_t k) const;
+  void set(size_t k, std::complex<double> x);
+  const std::complex<double> *elements(size_t &len);
+  std::complex<double> *writable_elements(size_t &len);
+  const void *uniform_elements(size_t &len);
+  void *uniform_writable_elements(size_t &len);
+  virtual const std::string string_ref(size_t k) const;
+};
+} /* namespace pmt */
+#endif
diff --git a/gnuradio-runtime/lib/pmt/qa_pmt_unv.cc b/gnuradio-runtime/lib/pmt/qa_pmt_unv.cc
new file mode 100644
index 0000000000..9751f5e610
--- /dev/null
+++ b/gnuradio-runtime/lib/pmt/qa_pmt_unv.cc
@@ -0,0 +1,448 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006,2009 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <qa_pmt_unv.h>
+#include <cppunit/TestAssert.h>
+#include <pmt/pmt.h>
+#include <stdio.h>
+
+using namespace pmt;
+void
+qa_pmt_unv::test_u8vector()
+{
+  static const size_t N = 3;
+  pmt::pmt_t v1 = pmt::make_u8vector(N, 0);
+  CPPUNIT_ASSERT_EQUAL(N, pmt::length(v1));
+  uint8_t s0 = uint8_t(10);
+  uint8_t s1 = uint8_t(20);
+  uint8_t s2 = uint8_t(30);
+
+  pmt::u8vector_set(v1, 0, s0);
+  pmt::u8vector_set(v1, 1, s1);
+  pmt::u8vector_set(v1, 2, s2);
+
+  CPPUNIT_ASSERT_EQUAL(s0, pmt::u8vector_ref(v1, 0));
+  CPPUNIT_ASSERT_EQUAL(s1, pmt::u8vector_ref(v1, 1));
+  CPPUNIT_ASSERT_EQUAL(s2, pmt::u8vector_ref(v1, 2));
+
+  CPPUNIT_ASSERT_THROW(pmt::u8vector_ref(v1, N), pmt::out_of_range);
+  CPPUNIT_ASSERT_THROW(pmt::u8vector_set(v1, N, uint8_t(0)), pmt::out_of_range);
+
+  size_t	len;
+  const uint8_t *rd = pmt::u8vector_elements(v1, len);
+  CPPUNIT_ASSERT_EQUAL(len, N);
+  CPPUNIT_ASSERT_EQUAL(s0, rd[0]);
+  CPPUNIT_ASSERT_EQUAL(s1, rd[1]);
+  CPPUNIT_ASSERT_EQUAL(s2, rd[2]);
+
+  uint8_t *wr = pmt::u8vector_writable_elements(v1, len);
+  CPPUNIT_ASSERT_EQUAL(len, N);
+  wr[0] = uint8_t(0);
+  CPPUNIT_ASSERT_EQUAL(uint8_t(0), wr[0]);
+  CPPUNIT_ASSERT_EQUAL(s1, wr[1]);
+  CPPUNIT_ASSERT_EQUAL(s2, wr[2]);
+}
+void
+qa_pmt_unv::test_s8vector()
+{
+  static const size_t N = 3;
+  pmt::pmt_t v1 = pmt::make_s8vector(N, 0);
+  CPPUNIT_ASSERT_EQUAL(N, pmt::length(v1));
+  int8_t s0 = int8_t(10);
+  int8_t s1 = int8_t(20);
+  int8_t s2 = int8_t(30);
+
+  pmt::s8vector_set(v1, 0, s0);
+  pmt::s8vector_set(v1, 1, s1);
+  pmt::s8vector_set(v1, 2, s2);
+
+  CPPUNIT_ASSERT_EQUAL(s0, pmt::s8vector_ref(v1, 0));
+  CPPUNIT_ASSERT_EQUAL(s1, pmt::s8vector_ref(v1, 1));
+  CPPUNIT_ASSERT_EQUAL(s2, pmt::s8vector_ref(v1, 2));
+
+  CPPUNIT_ASSERT_THROW(pmt::s8vector_ref(v1, N), pmt::out_of_range);
+  CPPUNIT_ASSERT_THROW(pmt::s8vector_set(v1, N, int8_t(0)), pmt::out_of_range);
+
+  size_t	len;
+  const int8_t *rd = pmt::s8vector_elements(v1, len);
+  CPPUNIT_ASSERT_EQUAL(len, N);
+  CPPUNIT_ASSERT_EQUAL(s0, rd[0]);
+  CPPUNIT_ASSERT_EQUAL(s1, rd[1]);
+  CPPUNIT_ASSERT_EQUAL(s2, rd[2]);
+
+  int8_t *wr = pmt::s8vector_writable_elements(v1, len);
+  CPPUNIT_ASSERT_EQUAL(len, N);
+  wr[0] = int8_t(0);
+  CPPUNIT_ASSERT_EQUAL(int8_t(0), wr[0]);
+  CPPUNIT_ASSERT_EQUAL(s1, wr[1]);
+  CPPUNIT_ASSERT_EQUAL(s2, wr[2]);
+}
+void
+qa_pmt_unv::test_u16vector()
+{
+  static const size_t N = 3;
+  pmt::pmt_t v1 = pmt::make_u16vector(N, 0);
+  CPPUNIT_ASSERT_EQUAL(N, pmt::length(v1));
+  uint16_t s0 = uint16_t(10);
+  uint16_t s1 = uint16_t(20);
+  uint16_t s2 = uint16_t(30);
+
+  pmt::u16vector_set(v1, 0, s0);
+  pmt::u16vector_set(v1, 1, s1);
+  pmt::u16vector_set(v1, 2, s2);
+
+  CPPUNIT_ASSERT_EQUAL(s0, pmt::u16vector_ref(v1, 0));
+  CPPUNIT_ASSERT_EQUAL(s1, pmt::u16vector_ref(v1, 1));
+  CPPUNIT_ASSERT_EQUAL(s2, pmt::u16vector_ref(v1, 2));
+
+  CPPUNIT_ASSERT_THROW(pmt::u16vector_ref(v1, N), pmt::out_of_range);
+  CPPUNIT_ASSERT_THROW(pmt::u16vector_set(v1, N, uint16_t(0)), pmt::out_of_range);
+
+  size_t	len;
+  const uint16_t *rd = pmt::u16vector_elements(v1, len);
+  CPPUNIT_ASSERT_EQUAL(len, N);
+  CPPUNIT_ASSERT_EQUAL(s0, rd[0]);
+  CPPUNIT_ASSERT_EQUAL(s1, rd[1]);
+  CPPUNIT_ASSERT_EQUAL(s2, rd[2]);
+
+  uint16_t *wr = pmt::u16vector_writable_elements(v1, len);
+  CPPUNIT_ASSERT_EQUAL(len, N);
+  wr[0] = uint16_t(0);
+  CPPUNIT_ASSERT_EQUAL(uint16_t(0), wr[0]);
+  CPPUNIT_ASSERT_EQUAL(s1, wr[1]);
+  CPPUNIT_ASSERT_EQUAL(s2, wr[2]);
+}
+void
+qa_pmt_unv::test_s16vector()
+{
+  static const size_t N = 3;
+  pmt::pmt_t v1 = pmt::make_s16vector(N, 0);
+  CPPUNIT_ASSERT_EQUAL(N, pmt::length(v1));
+  int16_t s0 = int16_t(10);
+  int16_t s1 = int16_t(20);
+  int16_t s2 = int16_t(30);
+
+  pmt::s16vector_set(v1, 0, s0);
+  pmt::s16vector_set(v1, 1, s1);
+  pmt::s16vector_set(v1, 2, s2);
+
+  CPPUNIT_ASSERT_EQUAL(s0, pmt::s16vector_ref(v1, 0));
+  CPPUNIT_ASSERT_EQUAL(s1, pmt::s16vector_ref(v1, 1));
+  CPPUNIT_ASSERT_EQUAL(s2, pmt::s16vector_ref(v1, 2));
+
+  CPPUNIT_ASSERT_THROW(pmt::s16vector_ref(v1, N), pmt::out_of_range);
+  CPPUNIT_ASSERT_THROW(pmt::s16vector_set(v1, N, int16_t(0)), pmt::out_of_range);
+
+  size_t	len;
+  const int16_t *rd = pmt::s16vector_elements(v1, len);
+  CPPUNIT_ASSERT_EQUAL(len, N);
+  CPPUNIT_ASSERT_EQUAL(s0, rd[0]);
+  CPPUNIT_ASSERT_EQUAL(s1, rd[1]);
+  CPPUNIT_ASSERT_EQUAL(s2, rd[2]);
+
+  int16_t *wr = pmt::s16vector_writable_elements(v1, len);
+  CPPUNIT_ASSERT_EQUAL(len, N);
+  wr[0] = int16_t(0);
+  CPPUNIT_ASSERT_EQUAL(int16_t(0), wr[0]);
+  CPPUNIT_ASSERT_EQUAL(s1, wr[1]);
+  CPPUNIT_ASSERT_EQUAL(s2, wr[2]);
+}
+void
+qa_pmt_unv::test_u32vector()
+{
+  static const size_t N = 3;
+  pmt::pmt_t v1 = pmt::make_u32vector(N, 0);
+  CPPUNIT_ASSERT_EQUAL(N, pmt::length(v1));
+  uint32_t s0 = uint32_t(10);
+  uint32_t s1 = uint32_t(20);
+  uint32_t s2 = uint32_t(30);
+
+  pmt::u32vector_set(v1, 0, s0);
+  pmt::u32vector_set(v1, 1, s1);
+  pmt::u32vector_set(v1, 2, s2);
+
+  CPPUNIT_ASSERT_EQUAL(s0, pmt::u32vector_ref(v1, 0));
+  CPPUNIT_ASSERT_EQUAL(s1, pmt::u32vector_ref(v1, 1));
+  CPPUNIT_ASSERT_EQUAL(s2, pmt::u32vector_ref(v1, 2));
+
+  CPPUNIT_ASSERT_THROW(pmt::u32vector_ref(v1, N), pmt::out_of_range);
+  CPPUNIT_ASSERT_THROW(pmt::u32vector_set(v1, N, uint32_t(0)), pmt::out_of_range);
+
+  size_t	len;
+  const uint32_t *rd = pmt::u32vector_elements(v1, len);
+  CPPUNIT_ASSERT_EQUAL(len, N);
+  CPPUNIT_ASSERT_EQUAL(s0, rd[0]);
+  CPPUNIT_ASSERT_EQUAL(s1, rd[1]);
+  CPPUNIT_ASSERT_EQUAL(s2, rd[2]);
+
+  uint32_t *wr = pmt::u32vector_writable_elements(v1, len);
+  CPPUNIT_ASSERT_EQUAL(len, N);
+  wr[0] = uint32_t(0);
+  CPPUNIT_ASSERT_EQUAL(uint32_t(0), wr[0]);
+  CPPUNIT_ASSERT_EQUAL(s1, wr[1]);
+  CPPUNIT_ASSERT_EQUAL(s2, wr[2]);
+}
+void
+qa_pmt_unv::test_s32vector()
+{
+  static const size_t N = 3;
+  pmt::pmt_t v1 = pmt::make_s32vector(N, 0);
+  CPPUNIT_ASSERT_EQUAL(N, pmt::length(v1));
+  int32_t s0 = int32_t(10);
+  int32_t s1 = int32_t(20);
+  int32_t s2 = int32_t(30);
+
+  pmt::s32vector_set(v1, 0, s0);
+  pmt::s32vector_set(v1, 1, s1);
+  pmt::s32vector_set(v1, 2, s2);
+
+  CPPUNIT_ASSERT_EQUAL(s0, pmt::s32vector_ref(v1, 0));
+  CPPUNIT_ASSERT_EQUAL(s1, pmt::s32vector_ref(v1, 1));
+  CPPUNIT_ASSERT_EQUAL(s2, pmt::s32vector_ref(v1, 2));
+
+  CPPUNIT_ASSERT_THROW(pmt::s32vector_ref(v1, N), pmt::out_of_range);
+  CPPUNIT_ASSERT_THROW(pmt::s32vector_set(v1, N, int32_t(0)), pmt::out_of_range);
+
+  size_t	len;
+  const int32_t *rd = pmt::s32vector_elements(v1, len);
+  CPPUNIT_ASSERT_EQUAL(len, N);
+  CPPUNIT_ASSERT_EQUAL(s0, rd[0]);
+  CPPUNIT_ASSERT_EQUAL(s1, rd[1]);
+  CPPUNIT_ASSERT_EQUAL(s2, rd[2]);
+
+  int32_t *wr = pmt::s32vector_writable_elements(v1, len);
+  CPPUNIT_ASSERT_EQUAL(len, N);
+  wr[0] = int32_t(0);
+  CPPUNIT_ASSERT_EQUAL(int32_t(0), wr[0]);
+  CPPUNIT_ASSERT_EQUAL(s1, wr[1]);
+  CPPUNIT_ASSERT_EQUAL(s2, wr[2]);
+}
+void
+qa_pmt_unv::test_u64vector()
+{
+  static const size_t N = 3;
+  pmt::pmt_t v1 = pmt::make_u64vector(N, 0);
+  CPPUNIT_ASSERT_EQUAL(N, pmt::length(v1));
+  uint64_t s0 = uint64_t(10);
+  uint64_t s1 = uint64_t(20);
+  uint64_t s2 = uint64_t(30);
+
+  pmt::u64vector_set(v1, 0, s0);
+  pmt::u64vector_set(v1, 1, s1);
+  pmt::u64vector_set(v1, 2, s2);
+
+  CPPUNIT_ASSERT_EQUAL(s0, pmt::u64vector_ref(v1, 0));
+  CPPUNIT_ASSERT_EQUAL(s1, pmt::u64vector_ref(v1, 1));
+  CPPUNIT_ASSERT_EQUAL(s2, pmt::u64vector_ref(v1, 2));
+
+  CPPUNIT_ASSERT_THROW(pmt::u64vector_ref(v1, N), pmt::out_of_range);
+  CPPUNIT_ASSERT_THROW(pmt::u64vector_set(v1, N, uint64_t(0)), pmt::out_of_range);
+
+  size_t	len;
+  const uint64_t *rd = pmt::u64vector_elements(v1, len);
+  CPPUNIT_ASSERT_EQUAL(len, N);
+  CPPUNIT_ASSERT_EQUAL(s0, rd[0]);
+  CPPUNIT_ASSERT_EQUAL(s1, rd[1]);
+  CPPUNIT_ASSERT_EQUAL(s2, rd[2]);
+
+  uint64_t *wr = pmt::u64vector_writable_elements(v1, len);
+  CPPUNIT_ASSERT_EQUAL(len, N);
+  wr[0] = uint64_t(0);
+  CPPUNIT_ASSERT_EQUAL(uint64_t(0), wr[0]);
+  CPPUNIT_ASSERT_EQUAL(s1, wr[1]);
+  CPPUNIT_ASSERT_EQUAL(s2, wr[2]);
+}
+void
+qa_pmt_unv::test_s64vector()
+{
+  static const size_t N = 3;
+  pmt::pmt_t v1 = pmt::make_s64vector(N, 0);
+  CPPUNIT_ASSERT_EQUAL(N, pmt::length(v1));
+  int64_t s0 = int64_t(10);
+  int64_t s1 = int64_t(20);
+  int64_t s2 = int64_t(30);
+
+  pmt::s64vector_set(v1, 0, s0);
+  pmt::s64vector_set(v1, 1, s1);
+  pmt::s64vector_set(v1, 2, s2);
+
+  CPPUNIT_ASSERT_EQUAL(s0, pmt::s64vector_ref(v1, 0));
+  CPPUNIT_ASSERT_EQUAL(s1, pmt::s64vector_ref(v1, 1));
+  CPPUNIT_ASSERT_EQUAL(s2, pmt::s64vector_ref(v1, 2));
+
+  CPPUNIT_ASSERT_THROW(pmt::s64vector_ref(v1, N), pmt::out_of_range);
+  CPPUNIT_ASSERT_THROW(pmt::s64vector_set(v1, N, int64_t(0)), pmt::out_of_range);
+
+  size_t	len;
+  const int64_t *rd = pmt::s64vector_elements(v1, len);
+  CPPUNIT_ASSERT_EQUAL(len, N);
+  CPPUNIT_ASSERT_EQUAL(s0, rd[0]);
+  CPPUNIT_ASSERT_EQUAL(s1, rd[1]);
+  CPPUNIT_ASSERT_EQUAL(s2, rd[2]);
+
+  int64_t *wr = pmt::s64vector_writable_elements(v1, len);
+  CPPUNIT_ASSERT_EQUAL(len, N);
+  wr[0] = int64_t(0);
+  CPPUNIT_ASSERT_EQUAL(int64_t(0), wr[0]);
+  CPPUNIT_ASSERT_EQUAL(s1, wr[1]);
+  CPPUNIT_ASSERT_EQUAL(s2, wr[2]);
+}
+void
+qa_pmt_unv::test_f32vector()
+{
+  static const size_t N = 3;
+  pmt::pmt_t v1 = pmt::make_f32vector(N, 0);
+  CPPUNIT_ASSERT_EQUAL(N, pmt::length(v1));
+  float s0 = float(10);
+  float s1 = float(20);
+  float s2 = float(30);
+
+  pmt::f32vector_set(v1, 0, s0);
+  pmt::f32vector_set(v1, 1, s1);
+  pmt::f32vector_set(v1, 2, s2);
+
+  CPPUNIT_ASSERT_EQUAL(s0, pmt::f32vector_ref(v1, 0));
+  CPPUNIT_ASSERT_EQUAL(s1, pmt::f32vector_ref(v1, 1));
+  CPPUNIT_ASSERT_EQUAL(s2, pmt::f32vector_ref(v1, 2));
+
+  CPPUNIT_ASSERT_THROW(pmt::f32vector_ref(v1, N), pmt::out_of_range);
+  CPPUNIT_ASSERT_THROW(pmt::f32vector_set(v1, N, float(0)), pmt::out_of_range);
+
+  size_t	len;
+  const float *rd = pmt::f32vector_elements(v1, len);
+  CPPUNIT_ASSERT_EQUAL(len, N);
+  CPPUNIT_ASSERT_EQUAL(s0, rd[0]);
+  CPPUNIT_ASSERT_EQUAL(s1, rd[1]);
+  CPPUNIT_ASSERT_EQUAL(s2, rd[2]);
+
+  float *wr = pmt::f32vector_writable_elements(v1, len);
+  CPPUNIT_ASSERT_EQUAL(len, N);
+  wr[0] = float(0);
+  CPPUNIT_ASSERT_EQUAL(float(0), wr[0]);
+  CPPUNIT_ASSERT_EQUAL(s1, wr[1]);
+  CPPUNIT_ASSERT_EQUAL(s2, wr[2]);
+}
+void
+qa_pmt_unv::test_f64vector()
+{
+  static const size_t N = 3;
+  pmt::pmt_t v1 = pmt::make_f64vector(N, 0);
+  CPPUNIT_ASSERT_EQUAL(N, pmt::length(v1));
+  double s0 = double(10);
+  double s1 = double(20);
+  double s2 = double(30);
+
+  pmt::f64vector_set(v1, 0, s0);
+  pmt::f64vector_set(v1, 1, s1);
+  pmt::f64vector_set(v1, 2, s2);
+
+  CPPUNIT_ASSERT_EQUAL(s0, pmt::f64vector_ref(v1, 0));
+  CPPUNIT_ASSERT_EQUAL(s1, pmt::f64vector_ref(v1, 1));
+  CPPUNIT_ASSERT_EQUAL(s2, pmt::f64vector_ref(v1, 2));
+
+  CPPUNIT_ASSERT_THROW(pmt::f64vector_ref(v1, N), pmt::out_of_range);
+  CPPUNIT_ASSERT_THROW(pmt::f64vector_set(v1, N, double(0)), pmt::out_of_range);
+
+  size_t	len;
+  const double *rd = pmt::f64vector_elements(v1, len);
+  CPPUNIT_ASSERT_EQUAL(len, N);
+  CPPUNIT_ASSERT_EQUAL(s0, rd[0]);
+  CPPUNIT_ASSERT_EQUAL(s1, rd[1]);
+  CPPUNIT_ASSERT_EQUAL(s2, rd[2]);
+
+  double *wr = pmt::f64vector_writable_elements(v1, len);
+  CPPUNIT_ASSERT_EQUAL(len, N);
+  wr[0] = double(0);
+  CPPUNIT_ASSERT_EQUAL(double(0), wr[0]);
+  CPPUNIT_ASSERT_EQUAL(s1, wr[1]);
+  CPPUNIT_ASSERT_EQUAL(s2, wr[2]);
+}
+void
+qa_pmt_unv::test_c32vector()
+{
+  static const size_t N = 3;
+  pmt::pmt_t v1 = pmt::make_c32vector(N, 0);
+  CPPUNIT_ASSERT_EQUAL(N, pmt::length(v1));
+  std::complex<float> s0 = std::complex<float>(10);
+  std::complex<float> s1 = std::complex<float>(20);
+  std::complex<float> s2 = std::complex<float>(30);
+
+  pmt::c32vector_set(v1, 0, s0);
+  pmt::c32vector_set(v1, 1, s1);
+  pmt::c32vector_set(v1, 2, s2);
+
+  CPPUNIT_ASSERT_EQUAL(s0, pmt::c32vector_ref(v1, 0));
+  CPPUNIT_ASSERT_EQUAL(s1, pmt::c32vector_ref(v1, 1));
+  CPPUNIT_ASSERT_EQUAL(s2, pmt::c32vector_ref(v1, 2));
+
+  CPPUNIT_ASSERT_THROW(pmt::c32vector_ref(v1, N), pmt::out_of_range);
+  CPPUNIT_ASSERT_THROW(pmt::c32vector_set(v1, N, std::complex<float>(0)), pmt::out_of_range);
+
+  size_t	len;
+  const std::complex<float> *rd = pmt::c32vector_elements(v1, len);
+  CPPUNIT_ASSERT_EQUAL(len, N);
+  CPPUNIT_ASSERT_EQUAL(s0, rd[0]);
+  CPPUNIT_ASSERT_EQUAL(s1, rd[1]);
+  CPPUNIT_ASSERT_EQUAL(s2, rd[2]);
+
+  std::complex<float> *wr = pmt::c32vector_writable_elements(v1, len);
+  CPPUNIT_ASSERT_EQUAL(len, N);
+  wr[0] = std::complex<float>(0);
+  CPPUNIT_ASSERT_EQUAL(std::complex<float>(0), wr[0]);
+  CPPUNIT_ASSERT_EQUAL(s1, wr[1]);
+  CPPUNIT_ASSERT_EQUAL(s2, wr[2]);
+}
+void
+qa_pmt_unv::test_c64vector()
+{
+  static const size_t N = 3;
+  pmt::pmt_t v1 = pmt::make_c64vector(N, 0);
+  CPPUNIT_ASSERT_EQUAL(N, pmt::length(v1));
+  std::complex<double> s0 = std::complex<double>(10);
+  std::complex<double> s1 = std::complex<double>(20);
+  std::complex<double> s2 = std::complex<double>(30);
+
+  pmt::c64vector_set(v1, 0, s0);
+  pmt::c64vector_set(v1, 1, s1);
+  pmt::c64vector_set(v1, 2, s2);
+
+  CPPUNIT_ASSERT_EQUAL(s0, pmt::c64vector_ref(v1, 0));
+  CPPUNIT_ASSERT_EQUAL(s1, pmt::c64vector_ref(v1, 1));
+  CPPUNIT_ASSERT_EQUAL(s2, pmt::c64vector_ref(v1, 2));
+
+  CPPUNIT_ASSERT_THROW(pmt::c64vector_ref(v1, N), pmt::out_of_range);
+  CPPUNIT_ASSERT_THROW(pmt::c64vector_set(v1, N, std::complex<double>(0)), pmt::out_of_range);
+
+  size_t	len;
+  const std::complex<double> *rd = pmt::c64vector_elements(v1, len);
+  CPPUNIT_ASSERT_EQUAL(len, N);
+  CPPUNIT_ASSERT_EQUAL(s0, rd[0]);
+  CPPUNIT_ASSERT_EQUAL(s1, rd[1]);
+  CPPUNIT_ASSERT_EQUAL(s2, rd[2]);
+
+  std::complex<double> *wr = pmt::c64vector_writable_elements(v1, len);
+  CPPUNIT_ASSERT_EQUAL(len, N);
+  wr[0] = std::complex<double>(0);
+  CPPUNIT_ASSERT_EQUAL(std::complex<double>(0), wr[0]);
+  CPPUNIT_ASSERT_EQUAL(s1, wr[1]);
+  CPPUNIT_ASSERT_EQUAL(s2, wr[2]);
+}
diff --git a/gnuradio-runtime/lib/pmt/qa_pmt_unv.h b/gnuradio-runtime/lib/pmt/qa_pmt_unv.h
new file mode 100644
index 0000000000..71462a9212
--- /dev/null
+++ b/gnuradio-runtime/lib/pmt/qa_pmt_unv.h
@@ -0,0 +1,61 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006,2009 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_QA_PMT_UNV_H
+#define INCLUDED_QA_PMT_UNV_H
+
+#include <cppunit/extensions/HelperMacros.h>
+#include <cppunit/TestCase.h>
+
+class qa_pmt_unv : public CppUnit::TestCase {
+
+  CPPUNIT_TEST_SUITE(qa_pmt_unv);
+  CPPUNIT_TEST(test_u8vector);
+  CPPUNIT_TEST(test_s8vector);
+  CPPUNIT_TEST(test_u16vector);
+  CPPUNIT_TEST(test_s16vector);
+  CPPUNIT_TEST(test_u32vector);
+  CPPUNIT_TEST(test_s32vector);
+  CPPUNIT_TEST(test_u64vector);
+  CPPUNIT_TEST(test_s64vector);
+  CPPUNIT_TEST(test_f32vector);
+  CPPUNIT_TEST(test_f64vector);
+  CPPUNIT_TEST(test_c32vector);
+  CPPUNIT_TEST(test_c64vector);
+  CPPUNIT_TEST_SUITE_END();
+
+ private:
+  void test_u8vector();
+  void test_s8vector();
+  void test_u16vector();
+  void test_s16vector();
+  void test_u32vector();
+  void test_s32vector();
+  void test_u64vector();
+  void test_s64vector();
+  void test_f32vector();
+  void test_f64vector();
+  void test_c32vector();
+  void test_c64vector();
+};
+
+#endif
diff --git a/gnuradio-runtime/lib/pmt/unv_qa_template.cc.t b/gnuradio-runtime/lib/pmt/unv_qa_template.cc.t
deleted file mode 100644
index ea675cee16..0000000000
--- a/gnuradio-runtime/lib/pmt/unv_qa_template.cc.t
+++ /dev/null
@@ -1,35 +0,0 @@
-void
-qa_pmt_unv::test_@TAG@vector()
-{
-  static const size_t N = 3;
-  pmt::pmt_t v1 = pmt::make_@TAG@vector(N, 0);
-  CPPUNIT_ASSERT_EQUAL(N, pmt::length(v1));
-  @TYPE@ s0 = @TYPE@(10);
-  @TYPE@ s1 = @TYPE@(20);
-  @TYPE@ s2 = @TYPE@(30);
-
-  pmt::@TAG@vector_set(v1, 0, s0);
-  pmt::@TAG@vector_set(v1, 1, s1);
-  pmt::@TAG@vector_set(v1, 2, s2);
-
-  CPPUNIT_ASSERT_EQUAL(s0, pmt::@TAG@vector_ref(v1, 0));
-  CPPUNIT_ASSERT_EQUAL(s1, pmt::@TAG@vector_ref(v1, 1));
-  CPPUNIT_ASSERT_EQUAL(s2, pmt::@TAG@vector_ref(v1, 2));
-
-  CPPUNIT_ASSERT_THROW(pmt::@TAG@vector_ref(v1, N), pmt::out_of_range);
-  CPPUNIT_ASSERT_THROW(pmt::@TAG@vector_set(v1, N, @TYPE@(0)), pmt::out_of_range);
-
-  size_t	len;
-  const @TYPE@ *rd = pmt::@TAG@vector_elements(v1, len);
-  CPPUNIT_ASSERT_EQUAL(len, N);
-  CPPUNIT_ASSERT_EQUAL(s0, rd[0]);
-  CPPUNIT_ASSERT_EQUAL(s1, rd[1]);
-  CPPUNIT_ASSERT_EQUAL(s2, rd[2]);
-
-  @TYPE@ *wr = pmt::@TAG@vector_writable_elements(v1, len);
-  CPPUNIT_ASSERT_EQUAL(len, N);
-  wr[0] = @TYPE@(0);
-  CPPUNIT_ASSERT_EQUAL(@TYPE@(0), wr[0]);
-  CPPUNIT_ASSERT_EQUAL(s1, wr[1]);
-  CPPUNIT_ASSERT_EQUAL(s2, wr[2]);
-}
diff --git a/gnuradio-runtime/lib/pmt/unv_template.cc.t b/gnuradio-runtime/lib/pmt/unv_template.cc.t
deleted file mode 100644
index b6c9d05c1d..0000000000
--- a/gnuradio-runtime/lib/pmt/unv_template.cc.t
+++ /dev/null
@@ -1,149 +0,0 @@
-////////////////////////////////////////////////////////////////////////////
-//                           pmt_@TAG@vector
-////////////////////////////////////////////////////////////////////////////
-
-namespace pmt {
-
-static pmt_@TAG@vector *
-_@TAG@vector(pmt_t x)
-{
-  return dynamic_cast<pmt_@TAG@vector*>(x.get());
-}
-
-
-pmt_@TAG@vector::pmt_@TAG@vector(size_t k, @TYPE@ fill)
-  : d_v(k)
-{
-  for (size_t i = 0; i < k; i++)
-    d_v[i] = fill;
-}
-
-pmt_@TAG@vector::pmt_@TAG@vector(size_t k, const @TYPE@ *data)
-  : d_v(k)
-{
-  if(k)
-    memcpy( &d_v[0], data, k * sizeof(@TYPE@) );
-}
-
-@TYPE@
-pmt_@TAG@vector::ref(size_t k) const
-{
-  if (k >= length())
-    throw out_of_range("pmt_@TAG@vector_ref", from_long(k));
-  return d_v[k];
-}
-
-void
-pmt_@TAG@vector::set(size_t k, @TYPE@ x)
-{
-  if (k >= length())
-    throw out_of_range("pmt_@TAG@vector_set", from_long(k));
-  d_v[k] = x;
-}
-
-const @TYPE@ *
-pmt_@TAG@vector::elements(size_t &len)
-{
-  len = length();
-  return len ?  &d_v[0] : nullptr;
-}
-
-@TYPE@ *
-pmt_@TAG@vector::writable_elements(size_t &len)
-{
-  len = length();
-  return len ? &d_v[0] : nullptr;
-}
-
-const void*
-pmt_@TAG@vector::uniform_elements(size_t &len)
-{
-  len = length() * sizeof(@TYPE@);
-  return len ? &d_v[0] : nullptr;
-}
-
-void*
-pmt_@TAG@vector::uniform_writable_elements(size_t &len)
-{
-  len = length() * sizeof(@TYPE@);
-  return len ? (&d_v[0]) : nullptr;
-}
-
-bool
-is_@TAG@vector(pmt_t obj)
-{
-  return obj->is_@TAG@vector();
-}
-
-pmt_t
-make_@TAG@vector(size_t k, @TYPE@ fill)
-{
-  return pmt_t(new pmt_@TAG@vector(k, fill));
-}
-
-pmt_t
-init_@TAG@vector(size_t k, const @TYPE@ *data)
-{
-  return pmt_t(new pmt_@TAG@vector(k, data));
-}
-
-pmt_t
-init_@TAG@vector(size_t k, const std::vector< @TYPE@ > &data)
-{
-  if(k) {
-    return pmt_t(new pmt_@TAG@vector(k, &data[0]));
-  }
-  return pmt_t(new pmt_@TAG@vector(k, static_cast< @TYPE@ >(0))); // fills an empty vector with 0
-}
-
-@TYPE@
-@TAG@vector_ref(pmt_t vector, size_t k)
-{
-  if (!vector->is_@TAG@vector())
-    throw wrong_type("pmt_@TAG@vector_ref", vector);
-  return _@TAG@vector(vector)->ref(k);
-}
-
-void
-@TAG@vector_set(pmt_t vector, size_t k, @TYPE@ obj)
-{
-  if (!vector->is_@TAG@vector())
-    throw wrong_type("pmt_@TAG@vector_set", vector);
-  _@TAG@vector(vector)->set(k, obj);
-}
-
-const @TYPE@ *
-@TAG@vector_elements(pmt_t vector, size_t &len)
-{
-  if (!vector->is_@TAG@vector())
-    throw wrong_type("pmt_@TAG@vector_elements", vector);
-  return _@TAG@vector(vector)->elements(len);
-}
-
-const std::vector< @TYPE@ >
-@TAG@vector_elements(pmt_t vector)
-{
-  if (!vector->is_@TAG@vector())
-    throw wrong_type("pmt_@TAG@vector_elements", vector);
-  size_t len;
-  const @TYPE@ *array = _@TAG@vector(vector)->elements(len);
-  const std::vector< @TYPE@ > vec(array, array+len);
-  return vec;
-}
-
-
-@TYPE@ *
-@TAG@vector_writable_elements(pmt_t vector, size_t &len)
-{
-  if (!vector->is_@TAG@vector())
-    throw wrong_type("pmt_@TAG@vector_writable_elements", vector);
-  return _@TAG@vector(vector)->writable_elements(len);
-}
-
-const std::string
-pmt_@TAG@vector::string_ref(size_t k) const
-{
-  return boost::lexical_cast< std::string, @TYPE@ > (ref(k));
-}
-
-} /* namespace pmt */
diff --git a/gnuradio-runtime/lib/pmt/unv_template.h.t b/gnuradio-runtime/lib/pmt/unv_template.h.t
deleted file mode 100644
index ab5c163570..0000000000
--- a/gnuradio-runtime/lib/pmt/unv_template.h.t
+++ /dev/null
@@ -1,25 +0,0 @@
-
-////////////////////////////////////////////////////////////////////////////
-//                           pmt_@TAG@vector
-////////////////////////////////////////////////////////////////////////////
-
-class pmt_@TAG@vector : public pmt_uniform_vector
-{
-  std::vector< @TYPE@ >	d_v;
-
-public:
-  pmt_@TAG@vector(size_t k, @TYPE@ fill);
-  pmt_@TAG@vector(size_t k, const @TYPE@ *data);
-  // ~pmt_@TAG@vector();
-
-  bool is_@TAG@vector() const { return true; }
-  size_t length() const { return d_v.size(); }
-  size_t itemsize() const { return sizeof(@TYPE@); }
-  @TYPE@ ref(size_t k) const;
-  void set(size_t k, @TYPE@ x);
-  const @TYPE@ *elements(size_t &len);
-  @TYPE@ *writable_elements(size_t &len);
-  const void *uniform_elements(size_t &len);
-  void *uniform_writable_elements(size_t &len);
-  virtual const std::string string_ref(size_t k) const;
-};
diff --git a/gnuradio-runtime/swig/CMakeLists.txt b/gnuradio-runtime/swig/CMakeLists.txt
index 9135f311c6..a48aaeb9f3 100644
--- a/gnuradio-runtime/swig/CMakeLists.txt
+++ b/gnuradio-runtime/swig/CMakeLists.txt
@@ -45,7 +45,6 @@ set(GR_SWIG_LIBRARIES
 set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/pmt_swig_doc.i)
 set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../include/pmt
   ${CMAKE_CURRENT_BINARY_DIR}/../include/pmt)
-list(APPEND GR_SWIG_TARGET_DEPS pmt_generated)
 GR_SWIG_MAKE(pmt_swig pmt_swig.i)
 
 GR_SWIG_INSTALL(
-- 
cgit v1.2.3