From 6183d9eeaa2cae6ca859b0a2f125d13842f57c39 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Wed, 31 May 2017 19:02:58 -0700 Subject: mpm: Made code Python3-compatible --- mpm/python/usrp_mpm/dboard_manager/base.py | 1 + mpm/python/usrp_mpm/dboard_manager/eiscat.py | 2 ++ mpm/python/usrp_mpm/dboard_manager/lmk_mg.py | 2 ++ mpm/python/usrp_mpm/dboard_manager/magnesium.py | 5 +++-- mpm/python/usrp_mpm/dboard_manager/test.py | 2 ++ 5 files changed, 10 insertions(+), 2 deletions(-) (limited to 'mpm/python/usrp_mpm/dboard_manager') diff --git a/mpm/python/usrp_mpm/dboard_manager/base.py b/mpm/python/usrp_mpm/dboard_manager/base.py index cc18292c1..724558445 100644 --- a/mpm/python/usrp_mpm/dboard_manager/base.py +++ b/mpm/python/usrp_mpm/dboard_manager/base.py @@ -18,6 +18,7 @@ dboard base implementation module """ +from builtins import object from six import iteritems from ..mpmlog import get_logger diff --git a/mpm/python/usrp_mpm/dboard_manager/eiscat.py b/mpm/python/usrp_mpm/dboard_manager/eiscat.py index 4a4d4a256..6997e2fc9 100644 --- a/mpm/python/usrp_mpm/dboard_manager/eiscat.py +++ b/mpm/python/usrp_mpm/dboard_manager/eiscat.py @@ -17,6 +17,8 @@ """ EISCAT rx board implementation module """ +from builtins import range +from builtins import object import time from ..mpmlog import get_logger diff --git a/mpm/python/usrp_mpm/dboard_manager/lmk_mg.py b/mpm/python/usrp_mpm/dboard_manager/lmk_mg.py index 96795f7fd..6c2660521 100644 --- a/mpm/python/usrp_mpm/dboard_manager/lmk_mg.py +++ b/mpm/python/usrp_mpm/dboard_manager/lmk_mg.py @@ -19,6 +19,8 @@ LMK04828 driver for use with Magnesium """ from time import sleep +from builtins import zip +from builtins import hex from ..mpmlog import get_logger from ..chips import LMK04828 diff --git a/mpm/python/usrp_mpm/dboard_manager/magnesium.py b/mpm/python/usrp_mpm/dboard_manager/magnesium.py index 9edfe497c..b779607c8 100644 --- a/mpm/python/usrp_mpm/dboard_manager/magnesium.py +++ b/mpm/python/usrp_mpm/dboard_manager/magnesium.py @@ -18,6 +18,7 @@ magnesium dboard implementation module """ +from __future__ import print_function import struct import time from six import iteritems @@ -141,8 +142,8 @@ class Magnesium(DboardManagerBase): def dump_jesd_core(self): for i in range(0x2000, 0x2110, 0x10): - print("0x%04X " % i), + print(("0x%04X " % i), end=' ') for j in range(0, 0x10, 0x4): - print("%08X" % self.radio_regs.peek32(i + j)), + print(("%08X" % self.radio_regs.peek32(i + j)), end=' ') print("") diff --git a/mpm/python/usrp_mpm/dboard_manager/test.py b/mpm/python/usrp_mpm/dboard_manager/test.py index da7b34c7a..3dfeab167 100644 --- a/mpm/python/usrp_mpm/dboard_manager/test.py +++ b/mpm/python/usrp_mpm/dboard_manager/test.py @@ -17,6 +17,8 @@ """ magnesium dboard implementation module """ + +from builtins import object from . import lib from .base import DboardManagerBase from logging import getLogger -- cgit v1.2.3