aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2020-05-07 09:43:15 -0700
committerAaron Rossetto <aaron.rossetto@ni.com>2020-05-07 15:10:41 -0500
commit1bba62a75a0ce825b66d6f06fbfe4d73ffc6d50a (patch)
tree51d34499aa91d7555338952f946a9f6c48ea0b71
parent75b7991378e3f465f9d91cba597d98ee5b9054ed (diff)
downloaduhd-1bba62a75a0ce825b66d6f06fbfe4d73ffc6d50a.tar.gz
uhd-1bba62a75a0ce825b66d6f06fbfe4d73ffc6d50a.tar.bz2
uhd-1bba62a75a0ce825b66d6f06fbfe4d73ffc6d50a.zip
Remove remaining Python 2 references
This changes two things in all applicable files: - Remove imports from __future__ - Change default shebangs from /usr/bin/env python to /usr/bin/env python3
-rw-r--r--host/cmake/Modules/UHDPython.cmake1
-rwxr-xr-xhost/examples/python/benchmark_rate.py2
-rwxr-xr-xhost/examples/python/curses_fft.py2
-rwxr-xr-xhost/examples/python/rx_to_file.py2
-rwxr-xr-xhost/examples/python/tx_waveforms.py2
-rw-r--r--host/lib/convert/gen_convert_general.py2
-rwxr-xr-xhost/lib/deps/import_rpclib.py2
-rwxr-xr-xhost/lib/ic_reg_maps/gen_ad5623_regs.py2
-rwxr-xr-xhost/lib/ic_reg_maps/gen_ad7922_regs.py2
-rwxr-xr-xhost/lib/ic_reg_maps/gen_ad9510_regs.py2
-rwxr-xr-xhost/lib/ic_reg_maps/gen_ad9522_regs.py2
-rwxr-xr-xhost/lib/ic_reg_maps/gen_ad9777_regs.py2
-rwxr-xr-xhost/lib/ic_reg_maps/gen_ad9862_regs.py2
-rwxr-xr-xhost/lib/ic_reg_maps/gen_adf4350_regs.py2
-rwxr-xr-xhost/lib/ic_reg_maps/gen_adf4351_regs.py2
-rwxr-xr-xhost/lib/ic_reg_maps/gen_adf4360_regs.py2
-rwxr-xr-xhost/lib/ic_reg_maps/gen_adf5355_regs.py2
-rwxr-xr-xhost/lib/ic_reg_maps/gen_adf5356_regs.py2
-rwxr-xr-xhost/lib/ic_reg_maps/gen_ads62p44_regs.py2
-rwxr-xr-xhost/lib/ic_reg_maps/gen_ads62p48_regs.py2
-rwxr-xr-xhost/lib/ic_reg_maps/gen_lmx2592_regs.py2
-rwxr-xr-xhost/lib/ic_reg_maps/gen_max2112_regs.py2
-rwxr-xr-xhost/lib/ic_reg_maps/gen_max2118_regs.py2
-rwxr-xr-xhost/lib/ic_reg_maps/gen_max2829_regs.py2
-rwxr-xr-xhost/lib/ic_reg_maps/gen_max2870_regs.py2
-rwxr-xr-xhost/lib/ic_reg_maps/gen_max2871_regs.py2
-rw-r--r--host/lib/ic_reg_maps/gen_mgcpld_regs.py2
-rw-r--r--host/lib/ic_reg_maps/gen_rhcpld_regs.py2
-rwxr-xr-xhost/lib/ic_reg_maps/gen_tda18272hnm_regs.py2
-rwxr-xr-xhost/lib/ic_reg_maps/gen_tuner_4937di5_regs.py2
-rw-r--r--host/lib/transport/gen_vrt_if_packet.py2
-rw-r--r--host/python/CMakeLists.txt5
-rwxr-xr-xhost/python/setup.py.in2
-rwxr-xr-xhost/tests/devtest/multi_usrp_test.py1
-rw-r--r--host/tests/devtest/python_api_test.py1
-rwxr-xr-xhost/tests/devtest/run_testsuite.py1
-rwxr-xr-xhost/tests/devtest/uhd_test_base.py1
-rw-r--r--host/tests/devtest/usrp_probe.py1
-rwxr-xr-xhost/utils/b2xx_side_channel.py2
-rw-r--r--host/utils/converter_benchmark.py3
-rwxr-xr-xhost/utils/latency/graph.py2
-rwxr-xr-xhost/utils/latency/pci_hwdata.py2
-rwxr-xr-xhost/utils/latency/run_tests.py2
-rw-r--r--host/utils/rfnoc_blocktool/rfnoc_create_verilog.py2
-rwxr-xr-xhost/utils/rfnoc_image_builder.py2
-rw-r--r--host/utils/setup.py.in2
-rw-r--r--host/utils/uhd_images_downloader.py.in1
-rwxr-xr-xhost/utils/usrp2_card_burner.py2
-rwxr-xr-xhost/utils/usrp2_card_burner_gui.py2
-rwxr-xr-xhost/utils/usrp2_recovery.py2
-rwxr-xr-xhost/utils/x300_reset.py2
51 files changed, 44 insertions, 55 deletions
diff --git a/host/cmake/Modules/UHDPython.cmake b/host/cmake/Modules/UHDPython.cmake
index d3fac6100..f5e67fc2d 100644
--- a/host/cmake/Modules/UHDPython.cmake
+++ b/host/cmake/Modules/UHDPython.cmake
@@ -47,7 +47,6 @@ endif(NOT PYTHONINTERP_FOUND)
if(NOT PYTHON_VERSION)
message(STATUS "Manually determining build Python version...")
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "
-from __future__ import print_function
import sys
print('{}.{}.{}'.format(
sys.version_info.major,
diff --git a/host/examples/python/benchmark_rate.py b/host/examples/python/benchmark_rate.py
index 6f3191e07..948b30ce3 100755
--- a/host/examples/python/benchmark_rate.py
+++ b/host/examples/python/benchmark_rate.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2018 Ettus Research, a National Instruments Company
# Copyright 2019 Ettus Research, a National Instruments Brand
diff --git a/host/examples/python/curses_fft.py b/host/examples/python/curses_fft.py
index 7a447cc67..f435def79 100755
--- a/host/examples/python/curses_fft.py
+++ b/host/examples/python/curses_fft.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2017-2018 Ettus Research, a National Instruments Company
#
diff --git a/host/examples/python/rx_to_file.py b/host/examples/python/rx_to_file.py
index 7017a08c2..0b98be76e 100755
--- a/host/examples/python/rx_to_file.py
+++ b/host/examples/python/rx_to_file.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2017-2018 Ettus Research, a National Instruments Company
#
diff --git a/host/examples/python/tx_waveforms.py b/host/examples/python/tx_waveforms.py
index 6db50fa2b..58b6472f7 100755
--- a/host/examples/python/tx_waveforms.py
+++ b/host/examples/python/tx_waveforms.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2017-2018 Ettus Research, a National Instruments Company
#
diff --git a/host/lib/convert/gen_convert_general.py b/host/lib/convert/gen_convert_general.py
index 19d699cd2..40ea1c7ba 100644
--- a/host/lib/convert/gen_convert_general.py
+++ b/host/lib/convert/gen_convert_general.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2011-2012 Ettus Research LLC
# Copyright 2018 Ettus Research, a National Instruments Company
diff --git a/host/lib/deps/import_rpclib.py b/host/lib/deps/import_rpclib.py
index e30b167dc..ffc4bbff0 100755
--- a/host/lib/deps/import_rpclib.py
+++ b/host/lib/deps/import_rpclib.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2017 Ettus Research, a National Instruments Company
#
diff --git a/host/lib/ic_reg_maps/gen_ad5623_regs.py b/host/lib/ic_reg_maps/gen_ad5623_regs.py
index eb7ec42fc..855e3aa6c 100755
--- a/host/lib/ic_reg_maps/gen_ad5623_regs.py
+++ b/host/lib/ic_reg_maps/gen_ad5623_regs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2010 Ettus Research LLC
# Copyright 2018 Ettus Research, a National Instruments Company
diff --git a/host/lib/ic_reg_maps/gen_ad7922_regs.py b/host/lib/ic_reg_maps/gen_ad7922_regs.py
index bcf9fe895..8074d19f0 100755
--- a/host/lib/ic_reg_maps/gen_ad7922_regs.py
+++ b/host/lib/ic_reg_maps/gen_ad7922_regs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2010 Ettus Research LLC
# Copyright 2018 Ettus Research, a National Instruments Company
diff --git a/host/lib/ic_reg_maps/gen_ad9510_regs.py b/host/lib/ic_reg_maps/gen_ad9510_regs.py
index 9e06eee61..0b12abc12 100755
--- a/host/lib/ic_reg_maps/gen_ad9510_regs.py
+++ b/host/lib/ic_reg_maps/gen_ad9510_regs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2010-2012 Ettus Research LLC
# Copyright 2018 Ettus Research, a National Instruments Company
diff --git a/host/lib/ic_reg_maps/gen_ad9522_regs.py b/host/lib/ic_reg_maps/gen_ad9522_regs.py
index 762a54e8e..21a3e94df 100755
--- a/host/lib/ic_reg_maps/gen_ad9522_regs.py
+++ b/host/lib/ic_reg_maps/gen_ad9522_regs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2010-2011,2015 Ettus Research LLC
# Copyright 2018 Ettus Research, a National Instruments Company
diff --git a/host/lib/ic_reg_maps/gen_ad9777_regs.py b/host/lib/ic_reg_maps/gen_ad9777_regs.py
index 1db890c74..efdc26a74 100755
--- a/host/lib/ic_reg_maps/gen_ad9777_regs.py
+++ b/host/lib/ic_reg_maps/gen_ad9777_regs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2010 Ettus Research LLC
# Copyright 2018 Ettus Research, a National Instruments Company
diff --git a/host/lib/ic_reg_maps/gen_ad9862_regs.py b/host/lib/ic_reg_maps/gen_ad9862_regs.py
index 13326ee94..600e1ae34 100755
--- a/host/lib/ic_reg_maps/gen_ad9862_regs.py
+++ b/host/lib/ic_reg_maps/gen_ad9862_regs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2010 Ettus Research LLC
# Copyright 2018 Ettus Research, a National Instruments Company
diff --git a/host/lib/ic_reg_maps/gen_adf4350_regs.py b/host/lib/ic_reg_maps/gen_adf4350_regs.py
index 8bd78e24f..ea9f6565d 100755
--- a/host/lib/ic_reg_maps/gen_adf4350_regs.py
+++ b/host/lib/ic_reg_maps/gen_adf4350_regs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2010 Ettus Research LLC
# Copyright 2018 Ettus Research, a National Instruments Company
diff --git a/host/lib/ic_reg_maps/gen_adf4351_regs.py b/host/lib/ic_reg_maps/gen_adf4351_regs.py
index 8f504fa1d..dffad14a2 100755
--- a/host/lib/ic_reg_maps/gen_adf4351_regs.py
+++ b/host/lib/ic_reg_maps/gen_adf4351_regs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2010 Ettus Research LLC
# Copyright 2018 Ettus Research, a National Instruments Company
diff --git a/host/lib/ic_reg_maps/gen_adf4360_regs.py b/host/lib/ic_reg_maps/gen_adf4360_regs.py
index 911c7927c..c3109791b 100755
--- a/host/lib/ic_reg_maps/gen_adf4360_regs.py
+++ b/host/lib/ic_reg_maps/gen_adf4360_regs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2010 Ettus Research LLC
# Copyright 2018 Ettus Research, a National Instruments Company
diff --git a/host/lib/ic_reg_maps/gen_adf5355_regs.py b/host/lib/ic_reg_maps/gen_adf5355_regs.py
index f36581e85..6786d8274 100755
--- a/host/lib/ic_reg_maps/gen_adf5355_regs.py
+++ b/host/lib/ic_reg_maps/gen_adf5355_regs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2010 Ettus Research LLC
# Copyright 2018 Ettus Research, a National Instruments Company
diff --git a/host/lib/ic_reg_maps/gen_adf5356_regs.py b/host/lib/ic_reg_maps/gen_adf5356_regs.py
index 7c9fce068..11662a67c 100755
--- a/host/lib/ic_reg_maps/gen_adf5356_regs.py
+++ b/host/lib/ic_reg_maps/gen_adf5356_regs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2017 Ettus Research, A National Instruments Company
#
diff --git a/host/lib/ic_reg_maps/gen_ads62p44_regs.py b/host/lib/ic_reg_maps/gen_ads62p44_regs.py
index ea5321524..b0c9395ef 100755
--- a/host/lib/ic_reg_maps/gen_ads62p44_regs.py
+++ b/host/lib/ic_reg_maps/gen_ads62p44_regs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2010 Ettus Research LLC
# Copyright 2018 Ettus Research, a National Instruments Company
diff --git a/host/lib/ic_reg_maps/gen_ads62p48_regs.py b/host/lib/ic_reg_maps/gen_ads62p48_regs.py
index 6971f135a..c8221f061 100755
--- a/host/lib/ic_reg_maps/gen_ads62p48_regs.py
+++ b/host/lib/ic_reg_maps/gen_ads62p48_regs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2013 Ettus Research LLC
# Copyright 2018 Ettus Research, a National Instruments Company
diff --git a/host/lib/ic_reg_maps/gen_lmx2592_regs.py b/host/lib/ic_reg_maps/gen_lmx2592_regs.py
index afd3b0596..0d5f0be23 100755
--- a/host/lib/ic_reg_maps/gen_lmx2592_regs.py
+++ b/host/lib/ic_reg_maps/gen_lmx2592_regs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2017 Ettus Research, A National Instruments Company
#
diff --git a/host/lib/ic_reg_maps/gen_max2112_regs.py b/host/lib/ic_reg_maps/gen_max2112_regs.py
index 9f1165632..bdfc5e186 100755
--- a/host/lib/ic_reg_maps/gen_max2112_regs.py
+++ b/host/lib/ic_reg_maps/gen_max2112_regs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2010 Ettus Research LLC
# Copyright 2018 Ettus Research, a National Instruments Company
diff --git a/host/lib/ic_reg_maps/gen_max2118_regs.py b/host/lib/ic_reg_maps/gen_max2118_regs.py
index 191d1fe67..02e52f601 100755
--- a/host/lib/ic_reg_maps/gen_max2118_regs.py
+++ b/host/lib/ic_reg_maps/gen_max2118_regs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2010 Ettus Research LLC
# Copyright 2018 Ettus Research, a National Instruments Company
diff --git a/host/lib/ic_reg_maps/gen_max2829_regs.py b/host/lib/ic_reg_maps/gen_max2829_regs.py
index 3a1cc492a..c4dfb6d8f 100755
--- a/host/lib/ic_reg_maps/gen_max2829_regs.py
+++ b/host/lib/ic_reg_maps/gen_max2829_regs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2010 Ettus Research LLC
# Copyright 2018 Ettus Research, a National Instruments Company
diff --git a/host/lib/ic_reg_maps/gen_max2870_regs.py b/host/lib/ic_reg_maps/gen_max2870_regs.py
index ee89ab47d..49a357fea 100755
--- a/host/lib/ic_reg_maps/gen_max2870_regs.py
+++ b/host/lib/ic_reg_maps/gen_max2870_regs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2013 Ettus Research LLC
# Copyright 2018 Ettus Research, a National Instruments Company
diff --git a/host/lib/ic_reg_maps/gen_max2871_regs.py b/host/lib/ic_reg_maps/gen_max2871_regs.py
index 8b3a7b5e7..99a038014 100755
--- a/host/lib/ic_reg_maps/gen_max2871_regs.py
+++ b/host/lib/ic_reg_maps/gen_max2871_regs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2014 Ettus Research LLC
# Copyright 2018 Ettus Research, a National Instruments Company
diff --git a/host/lib/ic_reg_maps/gen_mgcpld_regs.py b/host/lib/ic_reg_maps/gen_mgcpld_regs.py
index 91d9417eb..dba247304 100644
--- a/host/lib/ic_reg_maps/gen_mgcpld_regs.py
+++ b/host/lib/ic_reg_maps/gen_mgcpld_regs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2017 Ettus Research, a National Instruments Company
#
diff --git a/host/lib/ic_reg_maps/gen_rhcpld_regs.py b/host/lib/ic_reg_maps/gen_rhcpld_regs.py
index 1ce88fdcb..9bdb9a7c3 100644
--- a/host/lib/ic_reg_maps/gen_rhcpld_regs.py
+++ b/host/lib/ic_reg_maps/gen_rhcpld_regs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2018 Ettus Research, a National Instruments Company
#
diff --git a/host/lib/ic_reg_maps/gen_tda18272hnm_regs.py b/host/lib/ic_reg_maps/gen_tda18272hnm_regs.py
index ec7c9d614..821eeaa2f 100755
--- a/host/lib/ic_reg_maps/gen_tda18272hnm_regs.py
+++ b/host/lib/ic_reg_maps/gen_tda18272hnm_regs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2010 Ettus Research LLC
# Copyright 2018 Ettus Research, a National Instruments Company
diff --git a/host/lib/ic_reg_maps/gen_tuner_4937di5_regs.py b/host/lib/ic_reg_maps/gen_tuner_4937di5_regs.py
index e4eff5492..106d558b0 100755
--- a/host/lib/ic_reg_maps/gen_tuner_4937di5_regs.py
+++ b/host/lib/ic_reg_maps/gen_tuner_4937di5_regs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2010 Ettus Research LLC
# Copyright 2018 Ettus Research, a National Instruments Company
diff --git a/host/lib/transport/gen_vrt_if_packet.py b/host/lib/transport/gen_vrt_if_packet.py
index 6a17d9e3b..865b97220 100644
--- a/host/lib/transport/gen_vrt_if_packet.py
+++ b/host/lib/transport/gen_vrt_if_packet.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2010-2013,2015 Ettus Research LLC
# Copyright 2018 Ettus Research, a National Instruments Company
diff --git a/host/python/CMakeLists.txt b/host/python/CMakeLists.txt
index 0990e2582..04e637f2e 100644
--- a/host/python/CMakeLists.txt
+++ b/host/python/CMakeLists.txt
@@ -25,7 +25,7 @@ set(PYBIND11_INCLUDE_DIR
include_directories(${PYBIND11_INCLUDE_DIR})
execute_process(
COMMAND "${PYTHON_EXECUTABLE}" -c
- "from __future__ import print_function\ntry:\n import numpy\n import os\n inc_path = numpy.get_include()\n if os.path.exists(os.path.join(inc_path, 'numpy', 'arrayobject.h')):\n print(inc_path, end='')\nexcept:\n pass"
+ "try:\n import numpy\n import os\n inc_path = numpy.get_include()\n if os.path.exists(os.path.join(inc_path, 'numpy', 'arrayobject.h')):\n print(inc_path, end='')\nexcept:\n pass"
OUTPUT_VARIABLE PYTHON_NUMPY_INCLUDE_DIR)
# Build pyuhd library
@@ -99,8 +99,7 @@ else()
# packages, and install to our prefix
if(NOT DEFINED UHD_PYTHON_DIR)
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c
- "from __future__ import print_function;\
- from distutils import sysconfig;\
+ "from distutils import sysconfig;\
print(sysconfig.get_python_lib(plat_specific=True, prefix='${CMAKE_INSTALL_PREFIX}'));"
OUTPUT_VARIABLE UHD_PYTHON_DIR OUTPUT_STRIP_TRAILING_WHITESPACE
)
diff --git a/host/python/setup.py.in b/host/python/setup.py.in
index 4d2df10a5..505e8d199 100755
--- a/host/python/setup.py.in
+++ b/host/python/setup.py.in
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2017-2018 Ettus Research, a National Instruments Company
#
diff --git a/host/tests/devtest/multi_usrp_test.py b/host/tests/devtest/multi_usrp_test.py
index 04baf904e..aa95cf54f 100755
--- a/host/tests/devtest/multi_usrp_test.py
+++ b/host/tests/devtest/multi_usrp_test.py
@@ -5,7 +5,6 @@
# SPDX-License-Identifier: GPL-3.0-or-later
#
""" Test all python API functions for the connected device. """
-from __future__ import print_function
import sys
import argparse
import numpy
diff --git a/host/tests/devtest/python_api_test.py b/host/tests/devtest/python_api_test.py
index feccd91f9..d9fcda0b0 100644
--- a/host/tests/devtest/python_api_test.py
+++ b/host/tests/devtest/python_api_test.py
@@ -6,7 +6,6 @@
#
""" Test Python API """
-from __future__ import print_function
import os
from uhd_test_base import shell_application
from uhd_test_base import uhd_test_case
diff --git a/host/tests/devtest/run_testsuite.py b/host/tests/devtest/run_testsuite.py
index 650f34fa3..0c82fe9c6 100755
--- a/host/tests/devtest/run_testsuite.py
+++ b/host/tests/devtest/run_testsuite.py
@@ -9,7 +9,6 @@
Device test runner.
"""
-from __future__ import print_function
import os
import sys
import subprocess
diff --git a/host/tests/devtest/uhd_test_base.py b/host/tests/devtest/uhd_test_base.py
index 9f710b7be..11ff9b026 100755
--- a/host/tests/devtest/uhd_test_base.py
+++ b/host/tests/devtest/uhd_test_base.py
@@ -10,7 +10,6 @@
Devtest: Base module. Provides classes for running devtest tests.
"""
-from __future__ import print_function
import os
import sys
import unittest
diff --git a/host/tests/devtest/usrp_probe.py b/host/tests/devtest/usrp_probe.py
index e6c09d53f..b9afd4d50 100644
--- a/host/tests/devtest/usrp_probe.py
+++ b/host/tests/devtest/usrp_probe.py
@@ -7,7 +7,6 @@
#
""" Run uhd_find_devices and parse the output. """
-from __future__ import print_function
import re
import subprocess
diff --git a/host/utils/b2xx_side_channel.py b/host/utils/b2xx_side_channel.py
index df4540a40..bb0a0156b 100755
--- a/host/utils/b2xx_side_channel.py
+++ b/host/utils/b2xx_side_channel.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2013-2015 Ettus Research LLC
diff --git a/host/utils/converter_benchmark.py b/host/utils/converter_benchmark.py
index 5e6cba11c..0f7f32937 100644
--- a/host/utils/converter_benchmark.py
+++ b/host/utils/converter_benchmark.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2015 Ettus Research LLC
# Copyright 2018 Ettus Research, a National Instruments Company
@@ -9,7 +9,6 @@
Wrap the converter_benchmark tool and produce prettier results.
"""
-from __future__ import print_function
import argparse
import csv
import subprocess
diff --git a/host/utils/latency/graph.py b/host/utils/latency/graph.py
index a675bc7cd..0eb47081c 100755
--- a/host/utils/latency/graph.py
+++ b/host/utils/latency/graph.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2012 Ettus Research LLC
# Copyright 2018 Ettus Research, a National Instruments Company
diff --git a/host/utils/latency/pci_hwdata.py b/host/utils/latency/pci_hwdata.py
index a0f969caa..f37df964d 100755
--- a/host/utils/latency/pci_hwdata.py
+++ b/host/utils/latency/pci_hwdata.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2013 Ettus Research LLC
# Copyright 2018 Ettus Research, a National Instruments Company
diff --git a/host/utils/latency/run_tests.py b/host/utils/latency/run_tests.py
index e3056964d..63f1eef40 100755
--- a/host/utils/latency/run_tests.py
+++ b/host/utils/latency/run_tests.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2012 Ettus Research LLC
# Copyright 2018 Ettus Research, a National Instruments Company
diff --git a/host/utils/rfnoc_blocktool/rfnoc_create_verilog.py b/host/utils/rfnoc_blocktool/rfnoc_create_verilog.py
index ce8d4cae7..cc5add95d 100644
--- a/host/utils/rfnoc_blocktool/rfnoc_create_verilog.py
+++ b/host/utils/rfnoc_blocktool/rfnoc_create_verilog.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2013-2015 Ettus Research LLC
diff --git a/host/utils/rfnoc_image_builder.py b/host/utils/rfnoc_image_builder.py
index a031621ca..3fa1ce6f4 100755
--- a/host/utils/rfnoc_image_builder.py
+++ b/host/utils/rfnoc_image_builder.py
@@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
-from __future__ import print_function
-
import sys
import argparse
import hashlib
diff --git a/host/utils/setup.py.in b/host/utils/setup.py.in
index f932c80ad..0731ce85b 100644
--- a/host/utils/setup.py.in
+++ b/host/utils/setup.py.in
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
from distutils.core import setup
diff --git a/host/utils/uhd_images_downloader.py.in b/host/utils/uhd_images_downloader.py.in
index 87dc9b3e3..de74d37e2 100644
--- a/host/utils/uhd_images_downloader.py.in
+++ b/host/utils/uhd_images_downloader.py.in
@@ -33,7 +33,6 @@ Inventory files are JSON files called `inventory.json`, by default. It is possib
inventory file in command line arguments, but we don't recommend using this functionality unless
you're really sure you need it.
"""
-from __future__ import print_function
import argparse
import hashlib
import json
diff --git a/host/utils/usrp2_card_burner.py b/host/utils/usrp2_card_burner.py
index 7d904746e..b17b01549 100755
--- a/host/utils/usrp2_card_burner.py
+++ b/host/utils/usrp2_card_burner.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2010-2011 Ettus Research LLC
# Copyright 2018 Ettus Research, a National Instruments Company
diff --git a/host/utils/usrp2_card_burner_gui.py b/host/utils/usrp2_card_burner_gui.py
index 5586fc770..edba1f7b4 100755
--- a/host/utils/usrp2_card_burner_gui.py
+++ b/host/utils/usrp2_card_burner_gui.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2010-2011 Ettus Research LLC
# Copyright 2018 Ettus Research, a National Instruments Company
diff --git a/host/utils/usrp2_recovery.py b/host/utils/usrp2_recovery.py
index aca1d6f24..dc4ea31a9 100755
--- a/host/utils/usrp2_recovery.py
+++ b/host/utils/usrp2_recovery.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2010-2011 Ettus Research LLC
# Copyright 2018 Ettus Research, a National Instruments Company
diff --git a/host/utils/x300_reset.py b/host/utils/x300_reset.py
index 7335c5d75..b00f10197 100755
--- a/host/utils/x300_reset.py
+++ b/host/utils/x300_reset.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2019 Ettus Research, a National Instruments Brand
#